aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-06-11vexpress: Use cpu_arm_init() to obtain ARMCPUAndreas Färber1-8/+8
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11realview: Use cpu_arm_init() to obtain ARMCPUAndreas Färber1-4/+6
Needed for arm_pic_init_cpu(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11arm_boot: Pass ARMCPU to arm_boot_info::secondary_cpu_reset_hook()Andreas Färber3-4/+8
Adapt highbank accordingly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11arm_boot: Pass ARMCPU to arm_boot_info::write_secondary_boot()Andreas Färber5-7/+7
Adapt exynos4210 and highbank accordingly. The parameter itself is unused. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Igor Mitsyanko <i.mitsyanko@samsung.com> (for exynos)
2012-06-11versatilepb: Use cpu_arm_init() to obtain ARMCPUAndreas Färber1-6/+7
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11musicpal: Use cpu_arm_init() to obtain ARMCPUAndreas Färber1-5/+5
Needed for arm_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11integratorcp: Use cpu_arm_init() to obtain ARMCPUAndreas Färber1-6/+8
Needed for arm_load_kernel(). Add missing braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11strongarm: Use cpu_arm_init() to store ARMCPU in StrongARMStateAndreas Färber3-5/+5
Adapt collie accordingly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11z2: Rename PXA2xxState variableAndreas Färber1-13/+13
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11tosa: Rename PXA2xxState variableAndreas Färber1-7/+7
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11spitz: Rename PXA2xxState variableAndreas Färber1-12/+12
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11mainstone: Rename PXA2xxState variableAndreas Färber1-8/+8
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11palm: Rename omap_mpu_state_s variableAndreas Färber1-6/+6
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11omap_sx1: Rename omap_mpu_state_s variableAndreas Färber1-3/+3
Avoid cpu->cpu by using "mpu" as variable name. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-11nseries: Rename n800_s::cpu to mpuAndreas Färber1-36/+36
omap_mpu_state_s::env was renamed to cpu while changing its type. With n800_s::cpu of type omap_mpu_state_s* this leads to s->cpu->cpu. Rename the field to "mpu" to avoid this ugliness. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-06-10Revert "build: compile oslib-obj-y once"Blue Swirl2-3/+2
This reverts commit 25f27a4f7160d077d6992e811021b4bc3a82abc1 because of bsd-user breakage. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-10target-xtensa: switch to AREG0-free modeMax Filippov5-155/+152
Add env parameter to every helper function that needs it, update 'configure' script. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-10target-xtensa: add attributes to helper functionsMax Filippov1-8/+8
Mark exception generating functions 'noreturn' and pure constant functions as such. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-10target-xtensa: remove unnecessary include of dyngen-exec.hPeter Portante1-1/+0
Signed-off-by: Peter Portante <peter.portante@redhat.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: fix CCOUNT for conditional branchesMax Filippov1-0/+2
Taken conditional branches fail to update CCOUNT register because accumulated ccount_delta is reset during translation of non-taken branch. To fix it only update CCOUNT once per conditional branch instruction translation. This fixes guest linux freeze on LTP waitpid06 test. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09exec: fix TB invalidation after breakpoint insertion/deletionMax Filippov1-1/+2
tb_invalidate_phys_addr has to be called with the exact physical address of the breakpoint we add/remove, not just the page's base address. Otherwise we easily fail to flush the right TB. This breakage was introduced by the commit f3705d5329 "memory: make phys_page_find() return an unadjusted". This appeared to work for some guest architectures because their cpu_get_phys_page_debug implementation returns full translated physical address, not just the base of the TARGET_PAGE_SIZE-sized page. Reported-by: TeLeMan <geleman@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: add MMU pagewalking testsMax Filippov1-14/+207
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: control page table lookup explicitlyMax Filippov1-5/+5
Hardware pagetable walking may not be nested. Stop guessing and pass explicit flag to the get_physical_addr_mmu function that controls page table lookup. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: update autorefill TLB entries conditionallyMax Filippov3-27/+35
This is to avoid interference of internal QEMU helpers (cpu_get_phys_page_debug, tb_invalidate_virtual_addr) with guest-visible TLB state. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: extract TLB entry setting methodMax Filippov2-4/+14
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: update EXCVADDR in case of page table lookupMax Filippov1-0/+1
According to ISA, 4.4.2.6, EXCVADDR may be changed by any TLB miss, even if the miss is handled entirely by processor hardware. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-xtensa: flush TLB page for new MMU mappingMax Filippov1-0/+1
Both old and new mappings need flushing because their VPN may be different in MMU case. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09w32: Fix broken build (missing include file)Stefan Weil1-4/+0
dump.c was recently added to the code. It unconditionally includes sys/procfs which is not available with MinGW (w32, w64). It looks like this file is not needed at all (tested on Linux), so I removed it completely. Some other include statements are also redundant because they are already included in qemu-common, therefore they were removed, too. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09do not include <libutil.h> needlessly or if it doesn't existMichael Tokarev3-19/+7
<libutil.h> and <util.h> on *BSD (some have one, some another) were #included just for openpty() declaration. The only file where this function is actually used is qemu-char.c. In vl.c and net/tap-bsd.c, none of functions declared in libutil.h (login logout logwtmp timdomain openpty forkpty uu_lock realhostname fparseln and a few others depending on version) are used. Initially the code which is currently in qemu-char.c was in vl.c, it has been removed into separate file in commit 0e82f34d077dc2542 Fri Oct 31 18:44:40 2008, but the #includes were left in vl.c. So with vl.c, we just remove includes - libutil.h, util.h and pty.h (which declares only openpty() and forkpty()) from there. The code in net/tap-bsd.c, which come from net/tap.c, had this commit 5281d757efa6e40d74ce124be048b08d43887555 Author: Mark McLoughlin <markmc@redhat.com> Date: Thu Oct 22 17:49:07 2009 +0100 net: split all the tap code out into net/tap.c Note this commit not only moved stuff out of net.c to net/tap.c, but also rewrote large portions of the tap code, and added these completely unnecessary #includes -- as usual, I question why such a misleading commit messages are allowed. Again, no functions defined in libutil.h or util.h on *BSD are used by neither net/tap.c nor net/tap-bsd.c. Removing them. And finally, the only real user for these #includes, qemu-char.c, which actually uses openpty(). There, the #ifdef logic is wrong. A GLIBC-based system has <pty.h>, even if it is a variant of *BSD. So __GLIBC__ should be checked first, and instead of trying to include <libutil.h> or <util.h>, we include <pty.h>. If it is not GLIBC-based, we check for variations between <*util.h> as before. This patch fixes build of qemu 1.1 on Debian/kFreebsd (well, one of the two problems): it is a distribution with a FreeBSD kernel, so it #defines at least __FreeBSD_kernel__, but since it is based on GLIBC, it has <pty.h>, but current version does not have neither <util.h> nor <libutil.h>, which the code tries to include 3 times but uses only once. Signed-off-By: Michael Tokarev <mjt@tls.msk.ru> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09target-ppc: Unbreak kvm_ppc.c buildAndreas Färber2-2/+1
The file is located in target-ppc/, not hw/. Signed-off-by: Andreas Färber <andreas.faerber@web.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-09dump: Fix build breakage (missing sys/procfs.h)Stefan Weil1-14/+1
sys/procfs is not available everywhere (MingW does not have it). Remove this and more unused or redundant include statements. This fixes the broken build. qerror.h was previously included indirectly. Add an explicit include statement for it because it is needed. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-06-08target-i386: Use uint32 visitor for [x]level propertiesAndreas Färber1-38/+4
This simplifies the code and resolves TODOs. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2012-06-08qdev: Remove PropertyInfo range checkingPaolo Bonzini2-82/+26
Range checking in PropertyInfo is now used only for pci_devfn properties and some error reporting. Remove all code that implements it in the various property types, and the now unused fields. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [AF: Fix blocksize min/max for 32-bit hosts by using const int64_t.] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qdev: Switch property accessors to fixed-width visitor interfacesMichael Roth2-63/+91
This introduces {get,set}_uint{8,16,32,64}() functions for the respective qdev types. TADDR and VLAN are switched to explicit int64, BLOCKSIZE to uint16. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qdev: Use int32_t container for devfn propertyMichael Roth4-10/+7
Valid range for devfn is -1 to 255 (-1 for automatic assignment). We do not currently validate this due to devfn being stored as a uint32_t. This can lead to segfaults and other strange behavior. We could technically just cast it to int32_t to implement the checking, but this will not work for visitor-based setting where we may do additional bounds-checking based on target container type, which is int32_t for this case. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qapi: Add String visitor coverage to serialization unit testsMichael Roth1-0/+40
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qapi: String visitor, use %f representation for floatsMichael Roth2-2/+2
Currently string-output-visitor formats floats as %g, which is nice in that trailing 0's are automatically truncated, but otherwise this causes some issues: - it uses 6 significant figures instead of 6 decimal places, which means something like 155777.5 (which even has an exact floating point representation) will be rounded to 155778 when converted to a string. - output will be presented in scientific notation when the normalized form requires a 10^x multiplier. Not a huge deal, but arguably less readable for command-line arguments. - due to using scientific notation for numbers requiring more than 6 significant figures, instead of hard-defined decimal places, it fails a lot of the test-visitor-serialization unit tests for floats. Instead, let's just use %f, which is what the QJSON and the QMP visitors use. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qapi: Unit tests for visitor-based serializationMichael Roth2-1/+747
Currently we test our visitors individually, and seperately for input vs. output. This is useful for validating internal representations against the native C types and vice-versa, and other visitor-specific testing, but it doesn't cover the potential use-case of using visitor pairs for serialization/deserialization very well, and makes it hard to easily extend the coverage for different C types / boundary conditions. To cover that we add a set of unit tests that takes a number of native C values, passes them into an output visitor, extracts the values with an input visitor, then compares the result to the original. Plugging in new visitors to the test harness only requires a user to implement the SerializeOps interface and add it to a list. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08qapi: Add Visitor interfaces for uint*_t and int*_tMichael Roth3-7/+155
This adds visitor interfaces for fixed-width integers types. Implementing these in visitors is optional, otherwise we fall back to visit_type_int() (int64_t) with some additional bounds checking to avoid integer overflows for cases where the value fetched exceeds the bounds of our target C type. Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> [LE: exclude negative values in uint*_t Visitor interfaces] Signed-off-by: Laszlo Ersek <lersek@redhat.com> [AF: Merged fix by Laszlo] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-08configure: report missing libraries for virtfsHarsh Prateek Bora1-1/+2
Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-08trace/simple.c: fix deprecated glib2 interfaceHarsh Prateek Bora1-1/+4
Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-08Clarify comments of tb_invalidate_phys_[page_]rangeJan Kiszka1-10/+12
They could suggest that all TBs of the page containing the range would be invalidated. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-06-07Merge remote-tracking branch 'bonzini/nested-makefiles-3' into stagingAnthony Liguori66-741/+842
* bonzini/nested-makefiles-3: (29 commits) build: do not create directories at configure time configure: ensure directory exists when creating symlink build: compile oslib-obj-y once build: limit usage of vpath build: libcacard Makefile cleanups build: move device tree to per-target Makefile.objs build: move per-target hw/ objects to nested Makefile.objs build: convert libhw to nested Makefile.objs build: move target-independent hw/ objects to nested Makefile.objs build: move qga/ objects to nested Makefile.objs build: move qapi/ objects to nested Makefile.objs build: move slirp/ objects to nested Makefile.objs build: move audio/ objects to nested Makefile.objs build: move ui/ objects to nested Makefile.objs build: move fsdev/ objects to nested Makefile.objs build: move net/ objects to nested Makefile.objs build: move block/ objects to nested Makefile.objs build: adapt qom/Makefile and move it to Makefile.objs build: move rules for nesting to Makefile.objs build: move other target-*/ objects to nested Makefile.objs ...
2012-06-07target-microblaze: fix swx build breakagePeter A. G. Crosthwaite1-5/+6
The lazy initialisation of r_check was throwing an error on --enable-debug. Removed the lazy initialisation of r_check and swx_addr. Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-07ehci: rework frame skippingGerd Hoffmann1-15/+10
Move the framecount check out of the loop and use the new ehci_update_frindex function to skip frames if needed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: adaptive wakeup rate.Gerd Hoffmann1-18/+39
Adapt the frame timer sleeps according to the actual needs. With the periodic schedule being active we'll have to wakeup 1000 times per second and go check for work. In case only the async schedule is active we can be more lazy though. When idle ehci will increate the sleep time step by step, so qemu has to wake up less frequently. When we'll see transactions on the bus or the guest fiddles with the schedule enable/disable bits we'll return to a 1000 Hz wakeup rate and full speed. With both schedules disabled we stop wakeups altogether. This patch also drops the freq property (configures wakeup rate manually) which is obsoleted by this patch. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: create ehci_update_frindexGerd Hoffmann1-12/+23
Factor out code from ehci_frame_timer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: remove unused attach_poll_counterGerd Hoffmann1-2/+0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: fix halt status handlingGerd Hoffmann1-15/+24
When the enable bits for controller / async schedule / periodic schedule change just make sure we kick the frame timer and let ehci_advance_periodic_state and ehci_advance_async_state handle the controller state changes. This will make ehci set USBSTS_HALT when the controller shutdown is actually done, once both schedules are in inactive state and the USBSTS_PSS and USBSTS_ASS bits are clear. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2012-06-07ehci: update status bits in ehci_set_stateGerd Hoffmann1-4/+10
Update the status register in the ehci_set_state function, to make sure the guest-visible register is in sync with our internal schedule state. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>