aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* target-i386: fix xchg rax,r8Richard Henderson2010-07-201-2/+7
| | | | | | | | We were ignoring REX_B while special-casing NOP, i.e. xchg eax,eax. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 7418027ea4fec276455abd4291558bc58a0a7ba7)
* Merge commit 'v0.12.4' into stable-0.12qemu-kvm-0.12.4Avi Kivity2010-05-091-6/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'v0.12.4': (49 commits) Update for 0.12.4 release Workaround for broken OSS_GETVERSION on FreeBSD, part two oss: fix fragment setting oss: issue OSS_GETVERSION ioctl only when needed oss: refactor code around policy setting oss: workaround for cases when OSS_GETVERSION is not defined block: Free iovec arrays allocated by multiwrite_merge() lsi: fix segfault in lsi_command_complete lsi: pass lsi_request to lsi_reselect lsi: move dma_len+dma_buf into lsi_request lsi: move current_dev into lsi_request lsi: have lsi_request for the whole life time of the request. lsi: use QTAILQ for lsi_queue tcp/mips: Change TCG_AREG0 (fp -> s0) sh_pci: fix memory and I/O access Fix incoming migration with iothread Fix SIGFPE for vnc display of width/height = 1 net: remove broken net_set_boot_mask() boot device validation qcow2: Remove request from in-flight list after error qcow2: Don't ignore immediate read/write failures ... Signed-off-by: Avi Kivity <avi@redhat.com>
| * target-i386: fix commit c22549204a6edc431e8e4358e61bd56386ff6957TeLeMan2010-03-131-0/+5
| | | | | | | | | | | | | | | | | | The commit c22549204a6edc431e8e4358e61bd56386ff6957 led movntps & movntdq to be translated incorrectly. Signed-off-by: TeLeMan <geleman@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 2e21e7491ff2af3628a97d4652e7adcc6961c2e9)
| * target-i386: fix SIB decoding with index = 4Aurelien Jarno2010-03-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A SIB byte with an index of 4 means "no scaled index", even if the scale value is not 0. In 64-bit mode, if REX.X is used, an index of 4 selects %r12. This is correctly handled by the computation of the index variable, which includes the index bits, and also the REX.X prefix: index = ((code >> 3) & 7) | REX_X(s); Thanks to Avi Kivity, Jamie Lokier and Malc for the analysis of the problem and the initial patch. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit b16f827bdf7444b8cd338b9ecb654b4752f47225)
| * target-i386: Fix long jumps/calls in long mode with REX.W setmalc2010-03-061-3/+1
| | | | | | | | | | | | Signed-off-by: malc <av1474@comtv.ru> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 41b1e61f51b05fd6ca060f901b822f83e0beb6b6)
| * target-i386: fix lddqu SSE instructionAurelien Jarno2010-03-061-1/+1
| | | | | | | | | | | | | | This instruction load data from memory to register and not the reverse. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit c22549204a6edc431e8e4358e61bd56386ff6957)
* | KVM: Request setting of nmi_pending and sipi_vectorJan Kiszka2010-01-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | The final version of VCPU events in 2.6.33 will allow to skip nmi_pending and sipi_vector on KVM_SET_VCPU_EVENTS. For now let's write them unconditionally, which is unproblematic for upstream due to missing SMP support. Future version which enable SMP will write them only on reset. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | qemu-kvm: enable get/set vcpu events on reset and migrationMarcelo Tosatti2010-01-312-3/+11
| | | | | | | | | | | | | | | | qemu-kvm should reset and save/restore vcpu events. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Jan Kiszka <jan.kiszka@siemens.com> Acked-by: Gleb Natapov <gleb@redhat.com>
* | Merge remote branch 'upstream/stable-0.12' into stable-0.12Avi Kivity2010-01-173-0/+5
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upstream/stable-0.12: (27 commits) Update version and changelog for release Update SeaBIOS to 0.5.1 Qemu's internal TFTP server breaks lock-step-iness of TFTP osdep.c: Fix accept4 fallback pc: add rombar to compat properties for pc-0.10 and pc-0.11 pci: allow loading roms via fw_cfg. roms: rework rom loading via fw fw_cfg: rom loader tweaks. roms: minor fixes and cleanups. pc: add machine type for 0.12 loader: more ignores for rom intended to be loaded by the bios vnc_refresh: return if vd->timer is NULL QMP: Don't free async event's 'data' Handle TFTP ERROR from client dmg: fix ->open failure virtio-pci: thinko fix pc-bios: Update README (SeaBIOS) vmware_vga: Check cursor dimensions passed from guest to avoid buffer overflow remove pending exception on vcpu reset. Fix CPU topology initialization ... Conflicts: hw/pc.c hw/pci.h qemu-options.hx Signed-off-by: Avi Kivity <avi@redhat.com>
| * remove pending exception on vcpu reset.Gleb Natapov2010-01-111-0/+1
| | | | | | | | | | | | | | | | | | | | Without this qemu can even start on kvm modules with events support since default value of exception_injected in zero and this is #DE exception. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit e73223a5849d9e695b5f3b5a4a2a812e68e3735d)
| * MCE: Fix bug of IA32_MCG_STATUS after system resetHuang Ying2010-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, if we inject a fatal MCE into guest OS, for example Linux, Linux will go panic and then reboot. But if we inject another MCE now, system will reset directly instead of go panic firstly, because MCG_STATUS.MCIP is set to 1 and not cleared after reboot. This is does not follow the behavior in real hardware. This patch fixes this via set env->mcg_status to 0 during system reset. Signed-off-by: Huang Ying <ying.huang@intel.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit af364b418cc57c53275c76ee5e0e0645908605b9)
| * target-i386: Fix "call im" on x86_64 when executing 32-bit codeAurelien Jarno2010-01-031-0/+2
| | | | | | | | | | | | | | | | | | Similarly to what is done in 32938e127f50a40844a0fb9c5abb8691aeeccf7e for "jmp im", trunc the immediate to 32-bit when not running in 64-bit mode. Reported-by: Kevin O'Connor <kevin@koconnor.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Reinstate cpuid vendor override when kvm is enabledAvi Kivity2009-12-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Due to upstream qemu changes we no longer expose the host cpu vendor id to the guest. This leads to failures when the syscall/sysenter instructions are used in compatibility mode. Change the default to override when kvm is enabled. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge commit '72bb3c7571226af13cfe9eec020a56add3d30a70' into stable-0.12-mergeAvi Kivity2009-12-201-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '72bb3c7571226af13cfe9eec020a56add3d30a70': Support PCI based option rom loading Fix backcompat for hotplug of SCSI controllers fdc: fix migration from 0.11 Revert "fdc: fix vmstate variable passed" monitor: Accept input only byte-wise Revert "kvm: x86: Save/restore exception_index" vmware: increase cursor buffer size. Conflicts: hw/pci.c hw/pci.h Signed-off-by: Avi Kivity <avi@redhat.com>
| * Revert "kvm: x86: Save/restore exception_index"Anthony Liguori2009-12-191-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ebbc8a3d8e76d0402f8a08c10c0f32e24715d41d. As suggested by Jan Kiszka, "It was obsoleted by d1793b836f8f123b961c613de1bb1c0c185c84cc and now saves/restores a useless field." Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit acb6685feaeea0989d29b6f12e96fea48e8ce9d9)
* | Merge commit '3c547d7bb7889182d5bcecbb3edea4c71774c6a3' into stable-0.12-mergeAvi Kivity2009-12-203-5/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3c547d7bb7889182d5bcecbb3edea4c71774c6a3': (23 commits) Make sure to enable dirty tracking of VBE vram mapping vmware: setup PCI BAR 2 for FIFO as per vmware spec qdev: improve property error reporting. fix vga names in default_list usb-host: check mon before using it. usb-net: use qdev for -usbdevice Check rom_load_all() return value. defaults: update device_list[] defaults: split default_drive monitor: Catch printing to non-existent monitor monitor: Avoid readline functions in QMP monitor: do_balloon(): Check for errors monitor: Use 'device' in eject QDict: Fix size update qdev: Improve uni-north device names Avoid permanently disabled QEMU monitor when UNIX migration fails Fix loading of ELF multiboot kernels Revert "Rename DriveInfo.onerror to on_write_error" (fix mismerge) qemu-io: Fix memory leak Fix thinko in linuxboot.S ... Conflicts: hw/vga.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * target-i386: Fix evaluation of DR7 registerJan Kiszka2009-12-191-2/+2
| | | | | | | | | | | | | | | | | | hw_breakpoint_type and hw_breakpoint_len used the wrong index multiplier to extract type and len. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit d46272c774a94a8b2f0849703070dbcd93057f50)
| * kvm: x86: Use separate exception_injected CPUState fieldJan Kiszka2009-12-193-3/+5
| | | | | | | | | | | | | | | | | | | | Marcelo correctly remarked that there are usage conflicts between QEMU core code and KVM /wrt exception_index. So spend a separate field and also save/restore it properly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 31827373f03b0ff1550d45ddef0ca1305a2ae70d)
* | Merge commit '910628f39676ee65211727245809eec7ca4d75f5' into stable-0.12-mergeAvi Kivity2009-12-141-9/+11
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit '910628f39676ee65211727245809eec7ca4d75f5': target-i386: Update CPUID feature set for TCG s390: typo fix s390: fix build on 32 bit host Update Changelog and VERSION for 0.12.0-rc2 Conflicts: target-i386/helper.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * target-i386: Update CPUID feature set for TCGAndre Przywara2009-12-131-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | The CPUID features QEMU presented to the guest were not up-to-date with QEMU's emulated feature set. Add the missing bits of recent (and not so recent) additions to QEMU's emulation engine. For stability reasons only the user mode usable bits are exposed for now, features like Monitor or CR8LEG are left out. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry picked from commit f1e00a9cf326acc1f2386a72525af8859852e1df)
* | Merge commit '0014803d23acaccc15b31180f06784f5d6edfd3a' into stable-0.12-mergeAvi Kivity2009-12-142-2/+17
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '0014803d23acaccc15b31180f06784f5d6edfd3a': v2: properly save kvm system time msr registers VNC: Convert do_info_vnc() to QObject Conflicts: target-i386/kvm.c target-i386/machine.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * v2: properly save kvm system time msr registersGlauber Costa2009-12-123-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the msrs involved in setting up pvclock are not saved over migration and/or save/restore. This patch puts their value in special fields in our CPUState, and deal with them using vmstate. kvm also has to account for it, by including them in the msr list for the ioctls. This is a backport from qemu-kvm.git [v2: sucessfully build without kerneldir ] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 1a03675db146dfc760b3b48b3448075189f142cc)
* | Merge commit 'f883e4f7b8f37b53fc54660d20fd36fbe3383f46' into stable-0.12-mergeAvi Kivity2009-12-141-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f883e4f7b8f37b53fc54660d20fd36fbe3383f46': (63 commits) monitor: do_info_cpus(): Use QBool monitor: Fix do_info_commands() output monitor: Fix do_info_balloon() output QDict: Introduce qdict_get_qlist() QDict: Introduce qdict_get_qbool() Makefile: move QObject objs to their own entry Introduce qemu-objects.h header file vnc: fix capslock tracking logic. QemuOpts: allow larger option values. scsi: fix drive hotplug. pci: don't hw_error() when no slot is available. pci: don't abort() when trying to hotplug with acpi off. Set default console to virtio on S390x default devices: virtio consoles. add -qmp convinience switch add new -mon switch rework -monitor handling, switch to QemuOpts un-static qemu_chr_parse_compat() default devices: drives default devices: network ... Conflicts: monitor.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: x86: Save/restore exception_indexJan Kiszka2009-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | As KVM now makes use of exception_index to keep pending exceptions, we have to save&restore this field as well. NOTE: We have to nail the arch-independent exception_index down to a certain bit width for proper vmstate processing, namely to 32 bit. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 4d6e3ac5d411c461d0fb4b1cd2ace854963c9e30)
* | Merge commit 'c99d32efe6970493c44fe410ee4a4aafc1a35428' into stable-0.12-mergeAvi Kivity2009-12-142-17/+33
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'c99d32efe6970493c44fe410ee4a4aafc1a35428': msix: function mask support msix: macro rename for function mask support cpuid: Fix multicore setup on Intel kvm: x86: Fix initial kvm_has_msr_star Update OpenBIOS images to r640 Update version to -rc1 Conflicts: hw/msix.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * cpuid: Fix multicore setup on IntelAndre Przywara2009-12-071-15/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The multicore CPUID code detects whether the guest is an Intel or an AMD CPU, because the Linux kernel is picky about the CmpLegacy bit. KVM by default passes through the host's vendor, which was not catched by the code. So fork out the vendor determining bits into a separate function to be used from both places and always get the real vendor. This fixes KVM's multicore setup on Intel CPUs. Signed-off-by: Andre Przywara <andre.przywara@amd.com> Reported-by: Dietmar Maurer <dietmar@proxmox.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6d9fef1a02e6efd51e9ebd0130651ca61f75839b)
| * kvm: x86: Fix initial kvm_has_msr_starJan Kiszka2009-12-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | KVM_GET_MSR_INDEX_LIST returns -E2BIG when the provided space is too small for all MSRs. But this is precisely the error we trigger with the initial request in order to obtain that size. Do not fail in that case. This caused a subtle corruption of the guest state as MSR_STAR was not properly saved/restored. The corruption became visible with latest kvm optimizing the MSR updates. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6fb6d245546d3ae48c4cb764b3593e4739aa1364)
* | tpr patching: defer post-migration load to vcpu contextAvi Kivity2009-12-101-0/+2
| | | | | | | | | | | | This makes sure the cpu state is properly loaded. Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge commit 'a0fb002c6462d21ceb9eac8c5772e469ec189374' into upstream-mergeAvi Kivity2009-12-073-0/+92
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0fb002c6462d21ceb9eac8c5772e469ec189374': kvm: x86: Add support for VCPU event states kvm: x86: Fix merge artifact of f8d926e9 about mp_state targe-ppc: Sync CPU state for KVM target-ppc: Get MMU state on register sync qemu: cleanup unused macros in cirrus qemu: make cirrus init value pci spec compliant Conflicts: kvm-all.c target-i386/kvm.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: x86: Add support for VCPU event statesJan Kiszka2009-12-033-0/+88
| | | | | | | | | | | | | | | | | | This patch extends the qemu-kvm state sync logic with support for KVM_GET/SET_VCPU_EVENTS, giving access to yet missing exception, interrupt and NMI states. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * kvm: x86: Fix merge artifact of f8d926e9 about mp_stateJan Kiszka2009-12-031-4/+4
| | | | | | | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Fix mismerge in cpu_post_loadJan Kiszka2009-12-061-1/+9
| | | | | | | | | | | | | | | | | | | | Merge 8e2c5ec2f6 forgot to restore some qemu-kvm-specific hooks in cpu_post_load. mp_state was readded later on, but tsc was missing, breaking the guest timing after resume. Also, reset of halt was dropped which is obviously required for in-kernel irqchip. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* | Merge commit '0e607a80d323ba9f46dee71cd07380c4eb5c2b0a' into upstream-mergeAvi Kivity2009-11-223-31/+25
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '0e607a80d323ba9f46dee71cd07380c4eb5c2b0a': (22 commits) kvm: x86: Refactor use of interrupt_bitmap kvm: Add arch reset handler Enable migration without shared storage from the monitor Block live migration Expose a mechanism to trace block writes char: rename qemu_chr_reset to qemu_chr_generic_open char: Remove special init_reset handling char: don't limit data sent to backends to 1k per buffer ARM PB-A8 support LAN9118 emulation mips_r4k: fix reset PPC64: map Uni-North AGP bus aka fix Linux boot PPC64: Partial fix to Linux crash: revert to old devfn PCI: make duplicate devfn allocation fatal Do not execute shell scripts directly mips malta: fix indentation target-mips: fix indentation mips-malta: fix reset mips: fix cpu_reset memory leak fix make clean targets ... Carry changes to qemu-kvm-x86.c. Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: x86: Refactor use of interrupt_bitmapJan Kiszka2009-11-173-31/+21
| | | | | | | | | | | | | | | | | | | | Drop interrupt_bitmap from the cpustate and solely rely on the integer interupt_injected. This prepares us for the new injected-interrupt interface, which will deprecate the bitmap, while preserving compatibility. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
| * kvm: Add arch reset handlerJan Kiszka2009-11-171-0/+4
| | | | | | | | | | | | | | Will be required by succeeding changes. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge commit '91011d4f3b7c311a42b842f6682ac64a2372d2b7' into upstream-mergeAvi Kivity2009-11-221-0/+20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '91011d4f3b7c311a42b842f6682ac64a2372d2b7': pci: Fix function pci_default_write_config mips: fix CPU reset Fix PPC crash ARM MPCore tweaks Realview/EB procid hacks pci: fix the conversion of config field from array to pointer qemu_system_reset: we need to call it before loadvm/migration fdc: fix vmstate variable passed vnc: improve capslock handling. e1000 fix: read access to some registers is missing. Fix 32-bit overflow in parallels image support kvm ppc: Remove unused label kvm: Move KVM mp_state accessors to i386-specific code virtio-blk: Pass read errors to the guest savevm: Delete existing snapshots in all images Fix incoming migration fix type in CFLAGS name Conflicts: hw/pci.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Move KVM mp_state accessors to i386-specific codeHollis Blanchard2009-11-121-0/+20
| | | | | | | | | | | | | | Unbreaks PowerPC and S390 KVM builds. Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge commit '59f2689d9082f2f631253c810f73cd22290144a9' into upstream-mergeAvi Kivity2009-11-221-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '59f2689d9082f2f631253c810f73cd22290144a9': Added readonly flag to -drive command qcow2: Allow qcow2 disk images with size zero (x86/Sparc/PPC)-user: fix cpu_copy IDE: Fix reset handling user: move CPU reset call to main.c for x86/PPC/Sparc PPC: rename cpu_ppc_reset to cpu_reset for consistency Sparc64/x86: remove unneeded calls to device reset PPC: remove unneeded calls to device reset sparc32 (mostly): remove unneeded calls to device reset v3: don't call reset functions on cpu initialization vga: fix line comparison vga: Respect Line Compare Register in text modes Conflicts: qemu-config.c Signed-off-by: Avi Kivity <avi@redhat.com>
| * user: move CPU reset call to main.c for x86/PPC/SparcBlue Swirl2009-11-071-3/+0
| | | | | | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
| * v3: don't call reset functions on cpu initializationGlauber Costa2009-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is absolutely no need to call reset functions when initializing devices. Since we are already registering them, calling qemu_system_reset() should suffice. Actually, it is what happens when we reboot the machine, and using the same process instead of a special case semantics will even allow us to find bugs easier. Furthermore, the fact that we initialize things like the cpu quite early, leads to the need to introduce synchronization stuff like qemu_system_cond. This patch removes it entirely. All we need to do is call qemu_system_reset() only when we're already sure the system is up and running I tested it with qemu (with and without io-thread) and qemu-kvm, and it seems to be doing okay - although qemu-kvm uses a slightly different patch. [ v2: user mode still needs cpu_reset, so put it in ifdef. ] [ v3: leave qemu_system_cond for now. ] Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge commit '59c7b155aa6e1cbfe8a92e2322ea59ab31965c10' into upstream-mergeMark McLoughlin2009-10-281-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '59c7b155aa6e1cbfe8a92e2322ea59ab31965c10': (81 commits) posix-aio-compat: Split out posix_aio_process_queue monitor: Convert do_closefd() to QObject monitor: Convert do_getfd() to QObject monitor: Convert do_eject() to QObject monitor: Convert do_pci_device_hot_remove() to QObject monitor: Convert do_migrate_cancel() to QObject monitor: Convert do_migrate_set_speed() to QObject monitor: Convert do_migrate() to QObject monitor: Convert do_physical_memory_save() to QObject monitor: Convert do_memory_save() to QObject lsi_scsi: port to vmstate vmstate: Add VMSTATE_BUFFER_UNSAFE vmware_vga: port to vmstate vmware_vga: the support to change dinamically depth is not there vmware_vga: scratch is really an array of uint32_t vmware_vga: remove !EMBED_STDVGA code vmware_vga: qemu_malloc() returns void * vmware_vga: Remove uselss casts from void * vmware_vga: Pass pci_vmsga_state_t arg no VGACommonState vga: remove unused vga_common_save/load ... Conflicts: posix-aio-compat.c Signed-off-by: Mark McLoughlin <markmc@redhat.com>
| * vmstate: Add version arg to VMSTATE_SINGLE_TEST()Juan Quintela2009-10-271-1/+1
| | | | | | | | | | | | This allows to define VMSTATE_SINGLE with VMSTATE_SINGLE_TEST Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* | Merge commit '93db66850d99fd9885edeff6af5679be51e1c610' into upstream-mergeMark McLoughlin2009-10-284-19/+43
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '93db66850d99fd9885edeff6af5679be51e1c610': (81 commits) ne2k_isa: use qdev properties for configuration. qdev/net: common nic property bits qdev: add vlan property qdev: add netdev property qdev: mac addr property fixups net: add macaddr type. Send a RARP packet after migration. multiboot.S patch for old as(1) (was: Re: [Qemu-devel] Some OpenBSD/amd64 build fixes) raw/linux-aio: Also initialize POSIX AIO qcow2: Fix grow_refcount_table error handling usb-linux: return USB_RET_STALL on -EPIPE Makefile: Change make to be quiet again when doing nothing eepro100: Restructure code target-arm: use native tcg-ops for ror/bic/vorn target-arm: fix neon shift helper functions target-arm: fix neon vsri, vshl and vsli ops target-arm: allow modifying vfp fpexc en bit only target-arm: add support for neon vld1.64/vst1.64 instructions target-arm: fix neon vshrn/vrshrn ops target-arm: fix incorrect temporary variable freeing ... Signed-off-by: Mark McLoughlin <markmc@redhat.com>
| * target-i386: implement lzcnt emulationAndre Przywara2009-10-233-14/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | lzcnt is a AMD Phenom/Barcelona added instruction returning the number of leading zero bits in a word. As this is similar to the "bsr" instruction, reuse the existing code. There need to be some more changes, though, as lzcnt always returns a valid value (in opposite to bsr, which has a special case when the operand is 0). lzcnt is guarded by the ABM CPUID bit (Fn8000_0001:ECX_5). Signed-off-by: Andre Przywara <andre.przywara@amd.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
| * x86: add 'static' to please SparseBlue Swirl2009-10-181-5/+5
| | | | | | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | use upstream version of kvm_arch_post_runGlauber Costa2009-10-201-0/+2
| | | | | | | | | | | | | | | | Replace ours with qemu.git version. A couple of functions go unused, and are deleted. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | properly save kvm system time msr registersGlauber Costa2009-10-192-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Currently, the msrs involved in setting up pvclock are not saved over migration and/or save/restore. This patch puts their value in special fields in our CPUState, and deal with them using vmstate. kvm also has to account for it, by including them in the msr list for the ioctls. Signed-off-by: Glauber Costa <glommer@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge commit '1215c6e7615897e4a0bfd6867b762a47fc34f37f' into upstream-mergeMarcelo Tosatti2009-10-141-3/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1215c6e7615897e4a0bfd6867b762a47fc34f37f': Move generation of config-host.h to Makefile from configure Don't include config-host.mak from inside config.mak CRIS: Update PR_EDA on TLB faults. Clean up test for qdev_init() failure Warn if value of qdev_init() isn't checked Make isa_create() terminate program on failure New qdev_init_nofail() Check return value of qdev_init() Make qdev_init() destroy the device on failure Unbreak USB autoconnect filters tcg: improve output log target-i386: fix ARPL configure and Makefile are not generated in qemu Don't use implicit rules for Makefile optionrom: create .PHONY variable add build-all to .PHONY rules optionrom: remove use of implicit RM variable AIOLIBS is not used anywhere qdev: move comment Conflicts: Makefile Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * target-i386: fix ARPLLaurent Desnogues2009-10-061-3/+7
| | | | | | | | | | | | | | | | The arpl implementation in target-i386/translate.c uses cpu_A0 temporary across a brcond op. This patch fixes that issue. Signed-off-by: Laurent Desnogues <laurent.desnogues@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Don't sync mpstate to/from kernel when unneeded.Gleb Natapov2009-10-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mp_state, unlike other cpu state, can be changed not only from vcpu context it belongs to, but by other vcpus too. That makes its loading from kernel/saving back not safe if mp_state value is changed inside kernel between load and save. For example vcpu 1 loads mp_sate into user-space and the state is RUNNING, vcpu 0 sends INIT/SIPI to vcpu 1 so in-kernel mp_sate becomes SIPI, vcpu 1 save user-space copy into kernel and calls vcpu_run(). SIPI sate is lost. The patch copies mp_sate into kernel only when it is knows that int-kernel value is outdated. This happens on reset and vmload. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>