summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-08-07Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into stagingPeter Maydell16-32/+444
KVM changes include a MIPS patch and the testdev backend used by the ARM kvm-unit-tests. icount include the first part of reverse execution and Sebastian Tanase's patches to slow down -icount execution to the desired speed of the target. v1->v2: fix dump_drift_info to print nothing outside icount mode, and to compile on 32-bit architectures # gpg: Signature made Thu 07 Aug 2014 14:09:58 BST using RSA key ID 9B4D86F2 # gpg: Good signature from "Paolo Bonzini <pbonzini@redhat.com>" # gpg: aka "Paolo Bonzini <bonzini@gnu.org>" * remotes/bonzini/tags/for-upstream: target-mips: Ignore unassigned accesses with KVM monitor: Add drift info to 'info jit' cpu-exec: Print to console if the guest is late cpu-exec: Add sleeping algorithm icount: Add align option to icount icount: Add QemuOpts for icount icount: Fix virtual clock start value on ARM timer: add cpu_icount_to_ns function. migration: migrate icount fields. icount: put icount variables into TimerState. backends: Introduce chr-testdev Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-07target-mips: Ignore unassigned accesses with KVMJames Hogan1-0/+11
MIPS registers an unassigned access handler which raises a guest bus error exception. However this causes QEMU to crash when KVM is enabled as it isn't called from the main execution loop so longjmp() gets called without a corresponding setjmp(). Until the KVM API can be updated to trigger a guest exception in response to an MMIO exit, prevent the bus error exception being raised from mips_cpu_unassigned_access() if KVM is enabled. The check is at run time since the do_unassigned_access callback is initialised before it is known whether KVM will be enabled. The problem can be triggered with Malta emulation by making the guest write to the reset region at physical address 0x1bf00000, since it is marked read-only which is treated as unassigned for writes. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Gleb Natapov <gleb@redhat.com> Cc: Christoffer Dall <christoffer.dall@linaro.org> Cc: Sanjay Lal <sanjayl@kymasys.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-07monitor: Add drift info to 'info jit'Sebastian Tanase4-0/+30
Show in 'info jit' the current delay between the host clock and the guest clock. In addition, print the maximum advance and delay of the guest compared to the host. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-07Merge remote-tracking branch ↵Peter Maydell1-15/+31
'remotes/awilliam/tags/vfio-pci-for-qemu-20140805.0' into staging VFIO patches: Fix MSI-X vector expansion, remove MSI/X message caching # gpg: Signature made Tue 05 Aug 2014 20:25:57 BST using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140805.0: vfio: Don't cache MSIMessage vfio: Fix MSI-X vector expansion Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-06cpu-exec: Print to console if the guest is lateSebastian Tanase1-1/+32
If the align option is enabled, we print to the user whenever the guest clock is behind the host clock in order for he/she to have a hint about the actual performance. The maximum print interval is 2s and we limit the number of messages to 100. If desired, this can be changed in cpu-exec.c Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06cpu-exec: Add sleeping algorithmSebastian Tanase3-0/+97
The goal is to sleep qemu whenever the guest clock is in advance compared to the host clock (we use the monotonic clocks). The amount of time to sleep is calculated in the execution loop in cpu_exec. At first, we tried to approximate at each for loop the real time elapsed while searching for a TB (generating or retrieving from cache) and executing it. We would then approximate the virtual time corresponding to the number of virtual instructions executed. The difference between these 2 values would allow us to know if the guest is in advance or delayed. However, the function used for measuring the real time (qemu_clock_get_ns(QEMU_CLOCK_REALTIME)) proved to be very expensive. We had an added overhead of 13% of the total run time. Therefore, we modified the algorithm and only take into account the difference between the 2 clocks at the begining of the cpu_exec function. During the for loop we try to reduce the advance of the guest only by computing the virtual time elapsed and sleeping if necessary. The overhead is thus reduced to 3%. Even though this method still has a noticeable overhead, it no longer is a bottleneck in trying to achieve a better guest frequency for which the guest clock is faster than the host one. As for the the alignement of the 2 clocks, with the first algorithm the guest clock was oscillating between -1 and 1ms compared to the host clock. Using the second algorithm we notice that the guest is 5ms behind the host, which is still acceptable for our use case. The tests where conducted using fio and stress. The host machine in an i5 CPU at 3.10GHz running Debian Jessie (kernel 3.12). The guest machine is an arm versatile-pb built with buildroot. Currently, on our test machine, the lowest icount we can achieve that is suitable for aligning the 2 clocks is 6. However, we observe that the IO tests (using fio) are slower than the cpu tests (using stress). Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06icount: Add align option to icountSebastian Tanase4-9/+30
The align option is used for activating the align algorithm in order to synchronise the host clock and the guest clock. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06icount: Add QemuOpts for icountSebastian Tanase5-13/+52
Make icount parameter use QemuOpts style options in order to easily add other suboptions. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Tested-by: Camille Bégué <camille.begue@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06icount: Fix virtual clock start value on ARMSebastian Tanase1-1/+1
When using the icount option on ARM, the virtual clock starts counting at realtime clock but it should start at 0. The reason why the virtual clock starts at realtime clock is because the first time we call qemu_clock_warp (which calls icount_warp_rt) in tcg_exec_all, qemu_icount_bias (which is part of the virtual time computation mechanism) will increment by realtime - vm_clock_warp_start, with vm_clock_warp_start being 0 (see icount_warp_rt in cpus.c). By changing the value of vm_clock_warp_start from 0 to -1, the first time we call qemu_clock_warp which calls icount_warp_rt, we will return immediatly because icount_warp_rt first checks if vm_clock_warp_start is -1 and if it's the case it returns. Therefore, qemu_icount_bias will first be incremented by the value of a virtual timer deadline when the virtual cpu goes from active to inactive. The virtual time will start at 0 and increment based on the instruction counter when the vcpu is active or the qemu_icount_bias value when inactive. Signed-off-by: Sebastian Tanase <sebastian.tanase@openwide.fr> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06timer: add cpu_icount_to_ns function.KONRAD Frederic2-1/+7
This adds cpu_icount_to_ns function which is needed for reverse execution. It returns the time for a specific instruction. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06migration: migrate icount fields.KONRAD Frederic1-0/+27
This fixes a bug where qemu_icount and qemu_icount_bias are not migrated. It adds a subsection "timer/icount" to vmstate_timers so icount is migrated only when needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06icount: put icount variables into TimerState.KONRAD Frederic1-13/+16
This puts qemu_icount and qemu_icount_bias into TimerState structure to allow them to be migrated. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-06backends: Introduce chr-testdevPaolo Bonzini7-2/+149
From: Paolo Bonzini <pbonzini@redhat.com> chr-testdev enables a virtio serial channel to be used for guest initiated qemu exits. hw/misc/debugexit already enables guest initiated qemu exits, but only for PC targets. chr-testdev supports any virtio-capable target. kvm-unit-tests/arm is already making use of this backend. Currently there is a single command implemented, "q". It takes a (prefix) argument for the exit code, thus an exit is implemented by writing, e.g. "1q", to the virtio-serial port. It can be used as: $QEMU ... \ -device virtio-serial-device \ -device virtserialport,chardev=ctd -chardev testdev,id=ctd or, use: $QEMU ... \ -device virtio-serial-device \ -device virtconsole,chardev=ctd -chardev testdev,id=ctd to bind it to virtio-serial port0. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2014-08-05vfio: Don't cache MSIMessageAlex Williamson1-6/+2
Commit 40509f7f added a test to avoid updating KVM MSI routes when the MSIMessage is unchanged and f4d45d47 switched to relying on this rather than doing our own comparison. Our cached msg is effectively unused now. Remove it. Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-08-05vfio: Fix MSI-X vector expansionAlex Williamson1-9/+29
When new MSI-X vectors are enabled we need to disable MSI-X and re-enable it with the correct number of vectors. That means we need to reprogram the eventfd triggers for each vector. Prior to f4d45d47 vector->use tracked whether a vector was masked or unmasked and we could always pick the KVM path when available for unmasked vectors. Now vfio doesn't track mask state itself and vector->use and virq remains configured even for masked vectors. Therefore we need to ask the MSI-X code whether a vector is masked in order to select the correct signaling path. As noted in the comment, MSI relies on hardware to handle masking. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Cc: qemu-stable@nongnu.org # QEMU 2.1
2014-08-04Merge remote-tracking branch ↵Peter Maydell10-54/+79
'remotes/pmaydell/tags/pull-target-arm-20140804' into staging target-arm queue: * Set PC correctly when loading AArch64 ELF files * sdhci: Fix ADMA dma_memory_read access * some more foundational work for EL2/EL3 support * fix bugs which reveal themselves if the TARGET_PAGE_SIZE is not set to 1K # gpg: Signature made Mon 04 Aug 2014 14:51:34 BST using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * remotes/pmaydell/tags/pull-target-arm-20140804: target-arm: A64: fix TLB flush instructions target-arm: don't hardcode mask values in arm_cpu_handle_mmu_fault target-arm: Fix bit test in sp_el0_access target-arm: Add FAR_EL2 and 3 target-arm: Add ESR_EL2 and 3 target-arm: Make far_el1 an array target-arm: A64: Respect SPSEL when taking exceptions target-arm: A64: Respect SPSEL in ERET SP restore target-arm: A64: Break out aarch64_save/restore_sp sd: sdhci: Fix ADMA dma_memory_read access hw/arm/virt: formatting: memory map hw/arm/boot: Set PC correctly when loading AArch64 ELF files Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: A64: fix TLB flush instructionsAlex Bennée1-2/+8
According to the ARM ARM we weren't correctly flushing the TLB entries where bits 63:56 didn't match bit 55 of the virtual address. This exposed a problem when we switched QEMU's internal TARGET_PAGE_BITS to 12 for aarch64. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1406733627-24255-3-git-send-email-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: don't hardcode mask values in arm_cpu_handle_mmu_faultAlex Bennée1-2/+2
Otherwise we break quickly when we change TARGET_PAGE_SIZE. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1406733627-24255-2-git-send-email-alex.bennee@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: Fix bit test in sp_el0_accessStefan Weil1-1/+1
Static code analyzers complain about a dubious & operation used for a boolean value. The code does not test the PSTATE_SP bit as it should. Cc: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Stefan Weil <sw@weilnetz.de> Message-id: 1406359601-25583-1-git-send-email-sw@weilnetz.de Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: Add FAR_EL2 and 3Edgar E. Iglesias2-1/+7
Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1402994746-8328-7-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: Add ESR_EL2 and 3Edgar E. Iglesias2-1/+9
Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1402994746-8328-6-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: Make far_el1 an arrayEdgar E. Iglesias4-10/+10
No functional change. Prepares for future additions of the EL2 and 3 versions of this reg. Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-id: 1402994746-8328-5-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: A64: Respect SPSEL when taking exceptionsEdgar E. Iglesias1-2/+2
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Message-id: 1402994746-8328-4-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: A64: Respect SPSEL in ERET SP restoreEdgar E. Iglesias1-1/+1
Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Message-id: 1402994746-8328-3-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04target-arm: A64: Break out aarch64_save/restore_spEdgar E. Iglesias3-24/+24
Break out code to save/restore AArch64 SP into functions. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Greg Bellows <greg.bellows@linaro.org> Message-id: 1402994746-8328-2-git-send-email-edgar.iglesias@gmail.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04sd: sdhci: Fix ADMA dma_memory_read accessPeter Crosthwaite1-1/+2
This dma_memory_read was giving too big a size when begin was non-zero. This could cause segfaults in some circumstances. Fix. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04hw/arm/virt: formatting: memory mapAndrew Jones1-8/+8
Add some spacing and zeros to make it easier to read and modify the map. This patch has no functional changes. The review looks ugly, but it's actually pretty easy to confirm all the addresses are as they should be - thanks to the new formatting ;-) Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04hw/arm/boot: Set PC correctly when loading AArch64 ELF filesPeter Maydell1-2/+6
The code in do_cpu_reset() correctly handled AArch64 CPUs when running Linux kernels, but was missing code in the branch of the if() that deals with loading ELF files. Correctly jump to the ELF entry point on reset rather than leaving the reset PC at zero. Reported-by: Christopher Covington <cov@codeaurora.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Christopher Covington <cov@codeaurora.org> Cc: qemu-stable@nongnu.org
2014-08-04Merge remote-tracking branch 'remotes/amit-migration/for-2.2' into stagingPeter Maydell1-5/+65
* remotes/amit-migration/for-2.2: checker: ignore fields marked unused vmstate static checker: whitelist additions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04Merge remote-tracking branch 'remotes/amit-virtio-rng/for-2.2' into stagingPeter Maydell1-13/+12
* remotes/amit-virtio-rng/for-2.2: virtio-rng: replace error_set calls with error_setg virtio-rng: Move error-checking forward to prevent memory leak Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04Merge remote-tracking branch 'remotes/sstabellini/xen-20140801' into stagingPeter Maydell6-3/+112
* remotes/sstabellini/xen-20140801: qemu: support xen hvm direct kernel boot tap-bsd: implement a FreeBSD only version of tap_open xen: fix usage of ENODATA Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-04checker: ignore fields marked unusedAmit Shah1-4/+50
While comparing qemu-1.0 json output with qemu-2.1, a few fields got marked unused. These need to be skipped over, and not flagged as mismatches. For handling unused fields, the exact number of bytes need to be skipped over as the size of the unused field. Currently, only the term "unused" is matched. When more field names turn up, this will have to be updated based on the whitelist matching method to match more such terms. Signed-off-by: Amit Shah <amit.shah@redhat.com>
2014-08-04virtio-rng: replace error_set calls with error_setgJohn Snow1-5/+4
Under recommendation from Luiz Capitulino, we are changing the error_set calls to error_setg while we are fixing up the error handling pathways of virtio-rng. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
2014-08-04virtio-rng: Move error-checking forward to prevent memory leakJohn Snow1-10/+10
This patch pushes the error-checking forward and the virtio initialization backward in the device realization function in order to prevent memory leaks for hot plug scenarios. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>
2014-08-01Open 2.2 development treePeter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-08-01qemu: support xen hvm direct kernel bootChunyan Liu4-0/+38
qemu side patch to support xen HVM direct kernel boot: if -kernel exists, calls xen_load_linux(), which will read kernel/initrd and add a linuxboot.bin or multiboot.bin option rom. The linuxboot.bin/multiboot.bin will load kernel/initrd and jump to execute kernel directly. It's working when xen uses seabios. During this work, found the 'kvmvapic' is in option_rom list, it should not be there in xen case. Set s->vapic_control = 0 in xen_apic_realize() to handle that. Signed-off-by: Chunyan Liu <cyliu@suse.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2014-08-01tap-bsd: implement a FreeBSD only version of tap_openRoger Pau Monne1-1/+69
The current behaviour of tap_open for BSD systems differ greatly from it's Linux counterpart. Since FreeBSD supports interface renaming and tap device cloning by opening /dev/tap, implement a FreeBSD specific version of tap_open that behaves like it's Linux counterpart. This is specially important for toolstacks that use Qemu (like Xen libxl), in order to have a unified behaviour across suported platforms. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-08-01xen: fix usage of ENODATARoger Pau Monne1-2/+5
ENODATA doesn't exist on FreeBSD, so ENODATA errors returned by the hypervisor are translated to ENOENT. Also, the error code is returned in errno if the call returns -1, so compare the error code with the value in errno instead of the value returned by the function. Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: xen-devel@lists.xenproject.org Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Anthony Perard <anthony.perard@citrix.com>
2014-08-01Update version for v2.1.0 releasev2.1.0Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29Update version for v2.1.0-rc5 releasev2.1.0-rc5Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29hw/arm/virt: fix pl031 addr typoAndrew Jones1-1/+1
pl031's base address should be 0x9010000, not 0x90010000, otherwise it sits in ram when configuring a guest with greater than 1G. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29Update version for v2.1.0-rc4 releasev2.1.0-rc4Peter Maydell1-1/+1
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29po: update Italian translationPaolo Bonzini1-23/+40
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29po: Update French translationAurelien Jarno1-15/+39
Add new translations for recently added messages. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell8-1842/+249
pc migration fixes Last minute fixes for migration. It seems that if we don't fix it now, fixing it in the next version will be even more painful ... Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 29 Jul 2014 11:45:18 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: piix: set legacy table size for 1.7 acpi-build: tweak acpi migration limits pc: future-proof migration-compatibility of ACPI tables acpi-build: minor code cleanup pc: acpi: generate AML only for PCI0 devices if PCI bridge hotplug is disabled bios-tables-test: fix ASL normalization false positive pc: hack for migration compatibility from QEMU 2.0 acpi-dsdt: procedurally generate _PRT Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-07-29piix: set legacy table size for 1.7Michael S. Tsirkin1-0/+1
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-07-29acpi-build: tweak acpi migration limitsMichael S. Tsirkin1-7/+9
- Tweak error message for legacy machine type: Basically if table size exceeds the limits we set all bets are off for migration: e.g. it can start failing even within given qemu minor version simply because of a bugfix. - Increase table size to 128k. - Make sure we notice it long before we start getting close to the 128k limit: warn at 64k. - Don't fail if we exceed the limit: most people don't care about migration, even less people care about cross version miration. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2014-07-29pc: future-proof migration-compatibility of ACPI tablesPaolo Bonzini1-1/+9
This patch avoids that similar changes break QEMU again in the future. QEMU will now hard-code 64k as the maximum ACPI table size, which (despite being an order of magnitude smaller than 640k) should be enough for everyone. Reviewed-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-07-29acpi-build: minor code cleanupMichael S. Tsirkin1-6/+12
Fix up and add comments to clarify code, plus a trivial code change for clarity. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-07-29pc: acpi: generate AML only for PCI0 devices if PCI bridge hotplug is disabledIgor Mammedov1-5/+21
Fixes migration regression from QEMU-1.7 to a newer QEMUs. SSDT table size in QEMU-1.7 doesn't change regardless of a number of PCI bridge devices present at startup. However in QEMU-2.0 since addition of hotplug on PCI bridges, each PCI bridge adds ~1875 bytes to SSDT table, including pc-i440fx-1.7 machine type where PCI bridge hotplug disabled via compat property. It breaks migration from "QEMU-1.7" to "QEMU-2.[01] -M pc-i440fx-1.7" since RAMBlock size of ACPI tables on target becomes larger then on source and migration fails with: "Length mismatch: /rom@etc/acpi/tables: 2000 in != 3000" error. Fix this by generating AML only for PCI0 bus if hotplug on PCI bridges is disabled and preserves PCI brigde description in AML as it was done in QEMU-1.7 for pc-i440fx-1.7. It will help to maintain size of SSDT static regardless of number of PCI bridges on startup for pc-i440fx-1.7 machine type. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>