summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2014-02-04Merge remote-tracking branch 'remotes/borntraeger/tags/kvm-s390-20140131' ↵Peter Maydell4-1/+171
into staging This patch set contains the sclp defines and events for cpu hotplug, the initial sclp defines (without code yet) for standby memory (some sort of memory hotplug) as well as a cleanup of the kvm register synchronization. # gpg: Signature made Fri 31 Jan 2014 08:54:29 GMT using RSA key ID B5A61C7C # gpg: Can't check signature: public key not found * remotes/borntraeger/tags/kvm-s390-20140131: s390x/kvm: cleanup partial register handling sclp-s390: Define new SCLP codes and structures s390-sclp: SCLP Event integration s390-sclp: SCLP CPU Info s390-sclp: Define New SCLP Codes Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-04milkymist-vgafb: swap pixel data in source bufferMichael Walle1-1/+1
In commit fc97bb5ba3e7239c0b6d24095df6784868dfebbf the lduw_raw() call was eliminated. But we are reading from the target buffer a 16-bit value, which is in big-endian format. Therefore, use lduw_be_p() to read the value. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Walle <michael@walle.cc>
2014-02-04lm32_uart/lm32_juart: use qemu_chr_fe_write_all()Michael Walle2-2/+2
qemu_chr_fe_write() may return EAGAIN. Therefore, use qemu_chr_fe_write_all(). Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-04milkymist-uart: use qemu_chr_fe_write_all() instead of qemu_chr_fe_write()Antony Pavlov1-1/+1
qemu_chr_fe_write() is capable of returning 0 to indicate EAGAIN (and friends) and we don't handle this. Just change it to qemu_chr_fe_write_all() to fix. Reported-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-04lm32_sys: increase test case name length limitMichael Walle1-2/+3
The new MMU tests use longer names. Signed-off-by: Michael Walle <michael@walle.cc>
2014-02-04vmstate: Make VMSTATE_STRUCT_POINTER take type, not ptr-to-typePeter Maydell1-1/+1
The VMSTATE_STRUCT_POINTER macros are a bit odd in that they must be passed an argument "FooType *" rather than just taking the FooType. They're only used in one place, so it's easy to tidy this up. This also lets us use the macro to replace the hand-rolled VMSTATE_PTIMER. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Juan Quintela <quintela@redhat.com>
2014-02-03cris: Remove the CRIS PIC glueEdgar E. Iglesias2-48/+0
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-03axis-dev88: Connect the PIC upstream IRQs directly to the CPUEdgar E. Iglesias1-4/+3
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2014-02-03hw/display/qxl: fix signed to unsigned comparisonAlon Levy1-6/+9
Several small signedness / overflow corrections to qxl_create_guest_primary: 1. use 64 bit unsigned for size to avoid overflow possible from two 32 bit multiplicants. 2. correct sign for requested_height 3. add a more verbose error message when setting guest bug state (which causes a complete guess blackout until reset, so it helps if it is verbose). Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-02-03qxl: clear irq on resetAlon Levy1-0/+1
Without this we occasionally trigger an assert at hw/pci/pci.c:pcibus_reset that asserts the irq_count is zero on reset. This has become a problem with the new drm driver for linux, since doing a reboot from console causes a race between console updates that set the irq and the reset assertion that the irq is clear. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-02-02hw/9pfs: fix P9_STATS_GEN handlingKirill A. Shutemov2-6/+10
Currently we fail getattr request altogether if we can't read P9_STATS_GEN for some reason. It breaks valid use cases: E.g let's assume we have non-readable directory with execution bit set on host and we export it to client over 9p On host we can chdir into directory, but not open directory on read and list content. But if client will try to call getattr (as part of chdir(2)) for the directory it will fail with -EACCES. It happens because we try to open the directory on read to call ioctl(FS_IOC_GETVERSION), it fails and we return the error code to client. It's excessive. The solution is to make P9_STATS_GEN failure non-fatal for getattr request. Just don't set P9_STATS_GEN flag in result mask on failure. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2014-02-02hw/9pfs: make get_st_gen() return ENOTTY error on special filesKirill A. Shutemov3-3/+6
Currently we silently ignore getversion requests for anything except file or directory. Let's instead return ENOTTY error to indicate that getversion is not supported. It makes implementation consistent on all not-supported cases. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2014-02-02hw/9pfs: handle undefined FS_IOC_GETVERSION case in handle_ioc_getversion()Kirill A. Shutemov1-0/+5
All get_st_gen() implementations except handle_ioc_getversion() have guard for undefined FS_IOC_GETVERSION. Let's add it there too. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2014-02-02hw/9pfs: fix error handing in local_ioc_getversion()Kirill A. Shutemov1-3/+4
v9fs_co_st_gen() expects to see error code in errno, not in return code. Let's fix this. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2014-02-01Merge remote-tracking branch 'qmp-unstable/queue/qmp' into stagingPeter Maydell1-6/+9
* qmp-unstable/queue/qmp: monitor: Cleanup mon->outbuf on write error virtio_rng: replace custom backend API with UserCreatable.complete() callback add optional 2nd stage initialization to -object/object-add commands vl.c: -object: don't ignore duplicate 'id' object_add: consolidate error handling Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-01Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20140131' into ↵Peter Maydell7-37/+88
staging target-arm queue: * implementation of first part of the A64 Neon instruction set * v8 AArch32 rounding and 16<->64 fp conversion instructions * fix MIDR value on Zynq boards * some minor bugfixes/code cleanups # gpg: Signature made Fri 31 Jan 2014 15:06:34 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" * pmaydell/tags/pull-target-arm-20140131: (34 commits) arm_gic: Fix GICD_ICPENDR and GICD_ISPENDR writes arm_gic: Introduce define for GIC_NR_SGIS target-arm: A64: Add SIMD shift by immediate target-arm: A64: Add simple SIMD 3-same floating point ops target-arm: A64: Add integer ops from SIMD 3-same group target-arm: A64: Add logic ops from SIMD 3 same group target-arm: A64: Add top level decode for SIMD 3-same group target-arm: A64: Add SIMD scalar 3 same add, sub and compare ops target-arm: A64: Add SIMD three-different ABDL instructions target-arm: A64: Add SIMD three-different multiply accumulate insns target-arm: Add AArch32 SIMD VCVTA, VCVTN, VCVTP and VCVTM target-arm: Add AArch32 FP VCVTA, VCVTN, VCVTP and VCVTM target-arm: Add AArch32 SIMD VRINTA, VRINTN, VRINTP, VRINTM, VRINTZ target-arm: Add set_neon_rmode helper target-arm: Add support for AArch32 SIMD VRINTX target-arm: Add support for AArch32 FP VRINTX target-arm: Add support for AArch32 FP VRINTZ target-arm: Add support for AArch32 FP VRINTR target-arm: Add AArch32 FP VRINTA, VRINTN, VRINTP and VRINTM target-arm: Move arm_rmode_to_sf to a shared location. ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-01Merge remote-tracking branch ↵Peter Maydell1-11/+67
'remotes/awilliam/tags/vfio-pci-for-qemu-20140128.0' into staging vfio-pci updates include: - Destroy MemoryRegions on device teardown - Print warnings around PCI option ROM failures - Skip bogus mappings from 64bit BAR sizing - Act on DMA mapping failures - Fix alignment to avoid MSI-X table mapping - Fix debug macro typo # gpg: Signature made Tue 28 Jan 2014 15:27:47 GMT using RSA key ID 3BB08B22 # gpg: Can't check signature: public key not found * remotes/awilliam/tags/vfio-pci-for-qemu-20140128.0: vfio: correct debug macro typo vfio: fix mapping of MSIX bar kvm: initialize qemu_host_page_size vfio-pci: Fail initfn on DMA mapping errors vfio: Filter out bogus mappings vfio: Do not reattempt a failed rom read vfio: warn if host device rom can't be read vfio: Destroy memory regions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-02-01hw/ppc: Remove unused definesStefan Weil1-2/+0
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-02-01i386: Add missing include file for QEMU_PACKEDStefan Weil1-2/+1
Instead of packing BiosLinkerLoaderEntry, an unused global variable called QEMU_PACKED was created (detected by smatch static code analysis). Including qemu-common.h gets the right definition and also includes some standard include files which now can be removed here. Cc: qemu-stable@nongnu.org Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-01-31dataplane: Comment fixMarkus Armbruster1-1/+1
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-01-31arm_gic: Fix GICD_ICPENDR and GICD_ISPENDR writesChristoffer Dall1-1/+5
Fix two bugs that would allow changing the state of SGIs through the ICPENDR and ISPENDRs. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-31arm_gic: Introduce define for GIC_NR_SGISChristoffer Dall1-6/+11
Instead of hardcoding 16 various places in the code, use a define to make it more clear what is going on. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-31display: avoid multi-statement macroPaolo Bonzini4-29/+59
For blizzard, pl110 and tc6393xb this is harmless, but for pxa2xx Coverity noticed that it is used inside an "if" statement. Fix it because it's the file with the highest number of defects in the whole QEMU tree! Use "do...while (0)", or just remove the semicolon if there's a single statement in the macro. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-31ZYNQ: Implement board MIDR control for ZynqAlistair Francis1-0/+7
This patch uses the fact that the midr variable is now a property This patch sets the midr variable to the boards custom midr Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: a3754b10d150af72e4688a993e484fa2b9b8fa21.1390176489.git.alistair.francis@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-31hw/arm/boot: Don't set up ATAGS for autogenerated dtb bootingPeter Maydell1-2/+7
The code which decides whether to set up the ATAGS data structure on reset was using the wrong conditional, which meant we were creating an ATAGS structure when doing a device-tree boot if the dtb was autogenerated by the board. This is harmless, but unnecessary, so bring it in to line with user-provided-dtb boots. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Message-id: 1388326833-656-1-git-send-email-peter.maydell@linaro.org
2014-01-31Merge remote-tracking branch 'mst/tags/for_anthony' into stagingPeter Maydell22-306/+1147
acpi,pci,pc,virtio fixes and enhancements This includes new unit-tests for acpi by Marcel, hotplug for pci bridges by myself (piix only so far) and cpu hotplug for q35. And a bunch of fixes all over the place as usual. I included the patch to fix memory alignment for q35 as well - even though it limits 32 bit guests to 3G (they previously could address more memory with PAE). To remove the limit, this will have to be fixed in seabios. I also added self as virtio co-maintainer so I don't need to troll the list for patches to review. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Sun 26 Jan 2014 11:12:09 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * mst/tags/for_anthony: (35 commits) MAINTAINERS: add self as virtio co-maintainer q35: document gigabyte_align q35: gigabyte alignment for ram acpi: Fix PCI hole handling on build_srat() pc: Save size of RAM below 4GB hw/pci: fix error flow in pci multifunction init acpi-test: update expected AML since recent changes pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generated pc: ACPI: unify source of CPU hotplug IO base/len pc: ACPI: expose PRST IO range via _CRS pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resources pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resources pc: set PRST base in DSDT depending on chipset acpi: ich9: add CPU hotplug handling to Q35 machine acpi: factor out common cpu hotplug code for PIIX4/Q35 acpi-build: enable hotplug for PCI bridges piix4: add acpi pci hotplug support pcihp: generalization of piix4 acpi pci: add pci_for_each_bus_depth_first pc: make: fix dependencies: rebuild when included file is changed ... Message-id: 1390735289-15563-1-git-send-email-mst@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-31Merge remote-tracking branch 'sstabellini/xen-170114' into stagingPeter Maydell2-5/+10
* sstabellini/xen-170114: xen_pt: Fix passthrough of device with ROM. xen_pt: Fix debug output. xenfb: map framebuffer read-only and handle unmap errors Message-id: alpine.DEB.2.02.1401171537140.21510@kaball.uk.xensource.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-30Merge remote-tracking branch 'stefanha/tags/net-pull-request' into stagingPeter Maydell1-3/+3
Net patches # gpg: Signature made Mon 27 Jan 2014 14:45:35 GMT using RSA key ID 81AB73C8 # gpg: Can't check signature: public key not found * stefanha/tags/net-pull-request: tap-linux: Get features once and use it many times Fix lan9118 buffer length handling Fix lan9118 TX "CMD A" handling net: Use g_strdup_printf instead of snprintf. Message-id: 1390834129-19625-1-git-send-email-stefanha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-30Merge remote-tracking branch 'mjt/tags/trivial-patches-2014-01-16' into stagingPeter Maydell2-3/+5
trivial-patches for 2014-01-16 # gpg: Signature made Thu 16 Jan 2014 17:29:05 GMT using RSA key ID 74F0C838 # gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>" # gpg: aka "Michael Tokarev <mjt@corpit.ru>" # gpg: aka "Michael Tokarev <mjt@debian.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D 4324 457C E0A0 8044 65C5 # Subkey fingerprint: E190 8639 3B10 B51B AC2C 8B73 5253 C5AD 74F0 C838 Message-id: 1389893719-16336-1-git-send-email-mjt@msgid.tls.msk.ru Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-01-28virtio_rng: replace custom backend API with UserCreatable.complete() callbackIgor Mammedov1-6/+9
in addition fix default backend leak by releasing it if its initialization failed. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-01-28vfio: correct debug macro typoBandan Das1-1/+1
Change to DEBUG_VFIO in vfio_msi_interrupt() for debug messages to get printed Signed-off-by: Bandan Das <bsd@redhat.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2014-01-27Fix lan9118 buffer length handlingRoy Franz1-1/+1
The 9118 ethernet controller supports transmission of multi-buffer packets with arbitrary byte alignment of the start and end bytes. All writes to the packet fifo are 32 bits, so the controller discards bytes at the beginning and end of each buffer based on the 'Data start offset' and 'Buffer size' of the TX command 'A' format. This patch uses the provided buffer length to limit the bytes transmitted. Previously all the bytes of the last 32-bit word written to the TX fifo were added to the internal transmit buffer structure resulting in more bytes being transmitted than were submitted to the hardware in the command. This resulted in extra bytes being inserted into the middle of multi-buffer packets when the non-final buffers had non-32bit aligned ending addresses. Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-01-27Fix lan9118 TX "CMD A" handlingRoy Franz1-2/+2
The 9118 ethernet controller supports transmission of multi-buffer packets with arbitrary byte alignment of the start and end bytes. All writes to the packet fifo are 32 bits, so the controller discards bytes at the beginning and end of each buffer based on the 'Data start offset' and 'Buffer size' of the TX command 'A' format. This patch changes the buffer size and offset internal state variables to be updated on every "TX command A" write. Previously they were only updated for the first segment, which resulted incorrect behavior for packets with more than one segment. Each segment of the packet has its own CMD A command, with its own buffer size and start offset. Also update extraction of fields from the CMD A word to use extract32(). Signed-off-by: Roy Franz <roy.franz@linaro.org> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-01-26q35: document gigabyte_alignMichael S. Tsirkin1-0/+13
Document the logic behind the below/above 4G split. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26q35: gigabyte alignment for ramGerd Hoffmann1-2/+5
Map 2G (q35) of memory below 4G, so the RAM pieces are nicely aligned to gigabyte borders. Keep old memory layout for (a) old machine types and (b) in case all memory fits below 4G and thus we don't have to split RAM into pieces in the first place. The later makes sure this change doesn't take away memory from 32bit guests. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi: Fix PCI hole handling on build_srat()Eduardo Habkost1-5/+5
The original SeaBIOS code used the RamSize variable, that was used by SeaBIOS for the size of RAM below 4GB, not for all RAM. When copied to QEMU, the code was changed to use the full RAM size, and this broke the build_srat() code that handles the PCI hole. Change build_srat() to use ram_size_below_4g instead of ram_size, to restore the original behavior from SeaBIOS. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: Save size of RAM below 4GBEduardo Habkost1-0/+1
The ram_below_4g value will be useful in other places, such as the ACPI table code, and other code that currently requires passing below_4g_mem_size around in function arguments. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26hw/pci: fix error flow in pci multifunction initMarcel Apfelbaum1-10/+10
Scenario: - There is a non multifunction pci device A on 00:0X.0. - Hot-plug another multifunction pci device B at 00:0X.1. - The operation will fail of course. - Try to hot-plug the B device 2-3 more times, qemu will crash. Reason: The error flow leaves the B's address space into global address spaces list, but the device object is freed. Fixed that. Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: ACPI: update acpi-dsdt.hex.generated q35-acpi-dsdt.hex.generatedIgor Mammedov4-92/+225
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: ACPI: unify source of CPU hotplug IO base/lenIgor Mammedov5-7/+8
use C headers defines as source of IO base/len for respective values in ASL code. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: ACPI: expose PRST IO range via _CRSIgor Mammedov1-1/+13
.. so OSPM could notice resource conflict if there is any. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: Q35 DSDT: exclude CPU hotplug IO range from PCI bus resourcesIgor Mammedov3-7/+15
... for range defined at hw/acpi/ich9.c:ICH9_PROC_BASE Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: PIIX DSDT: exclude CPU/PCI hotplug & GPE0 IO range from PCI bus resourcesIgor Mammedov3-7/+41
.. so that they might not be used by PCI devices. Note: Resort to concatenating templates with preprocessor help, because 1.0b spec isn't supporting ConcatenateResTemplate, as result Windows XP fails to execute PCI0._CRS method if ConcatenateResTemplate() is used. Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pc: set PRST base in DSDT depending on chipsetIgor Mammedov3-1/+3
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi: ich9: add CPU hotplug handling to Q35 machineIgor Mammedov1-0/+14
.. use IO port 0cd8-0xcf7 range for CPU present bitmap Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi: factor out common cpu hotplug code for PIIX4/Q35Igor Mammedov3-72/+71
.. so it could be used for adding CPU hotplug to Q35 machine Add an additional header with that will be shared between C and ASL code: include/hw/acpi/cpu_hotplug_defs.h Signed-off-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26acpi-build: enable hotplug for PCI bridgesMichael S. Tsirkin3-94/+297
This enables support for device hotplug behind pci bridges. Bridge devices themselves need to be pre-configured on qemu command line. Design: - at machine init time, assign "bsel" property to bridges with hotplug support - dynamically (At ACPI table read) generate ACPI code to handle hotplug events for each bridge with "bsel" property Note: ACPI doesn't support adding or removing bridges by hotplug. We detect and prevent removal of bridges by hotplug, unless they were added by hotplug previously (and so, are not described by ACPI). Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26piix4: add acpi pci hotplug supportMichael S. Tsirkin1-10/+65
Add support for acpi pci hotplug using the new infrastructure. PIIX4 legacy interface is maintained as is for machine types 1.7 and older. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pcihp: generalization of piix4 acpiMichael S. Tsirkin2-2/+317
Add ACPI based PCI hotplug library with bridge hotplug support. Design - each bus gets assigned "bsel" property. - ACPI code writes this number to a new BNUM register, then uses existing UP/DOWN registers to probe slot status; to eject, write number to BNUM register, then slot into existing EJ. The interface is actually backwards-compatible with existing PIIX4 ACPI (though not migration compatible). This is split out from PIIX4 codebase so we can reuse it for Q35 as well. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2014-01-26pci: add pci_for_each_bus_depth_firstMichael S. Tsirkin1-0/+28
Useful for ACPI hotplug. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>