summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2012-08-22pci: Derive PCI host bridges from TYPE_PCI_HOST_BRIDGEAndreas Färber13-47/+45
Use PCIHostState and PCI_HOST_BRIDGE() where appropriate. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci_host: Turn into SysBus-derived QOM typeAndreas Färber2-0/+17
The preceding commits fixed misuses of FROM_SYSBUS() that led people to add a bogus busdev field. For qdev the field order was less relevant but for QOM the PCIHostState field (including the SysBusDevice actually initialized with a value) must be placed first within the state struct. To facilitate accessing the PCIHostState fields, derive all PCI host bridges from TYPE_PCI_HOST_BRIDGE rather than TYPE_SYS_BUS_DEVICE. We can now access PCIHostState QOM-style, with PCI_HOST_BRIDGE() macro. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22unin_pci: QOM'ify UniNorth PCI host bridgesAndreas Färber1-65/+72
Introduce type constants and cast macros. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22spapr_pci: QOM'ify sPAPR PCI host bridgeAndreas Färber3-46/+56
Introduce type constant. Introduce cast macro to drop bogus busdev field that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Free the identifier phb as acronym for PCI_HOST_BRIDGE. Updated against conflicting merge from branch 'agraf/ppc-for-upstream' (0d16fdd732d1b211842fa96b7c90ddf9e6bde0e4), which removed busdev field differently, moved some code around and added new occurrences of 'phb'. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22prep_pci: QOM'ify Raven PCI host bridgeAndreas Färber1-5/+12
Introduce type constant and cast macro. Avoid accessing parent fields directly. Also add missing space and braces. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22ppce500_pci: QOM'ify e500 PCI host bridgeAndreas Färber1-5/+11
Introduce type constant and cast macro. Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22ppc4xx_pci: QOM'ify ppc4xx PCI host bridgeAndreas Färber3-6/+12
Introduce type constant and cast macro. Avoid accessing its parent field directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22gt64xxx: QOM'ify GT64120 PCI host bridgeAndreas Färber1-15/+20
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() macro that would've broken SYS_BUS_DEVICE(). Avoid accessing DeviceState indirectly through PCIHostState. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22grackle_pci: QOM'ify Grackle PCI host bridgeAndreas Färber2-29/+29
Introduce type constant. Introduce cast macro to drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Drop no-op reset function. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22dec_pci: QOM'ify DEC 21154 PCI-PCI bridgeAndreas Färber2-10/+13
Introduce type constant. Introduce cast macro and drop dummy busdev field used with FROM_SYSBUS() that would've broken SYS_BUS_DEVICE(). Avoid accessing parent fields directly. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22bonito: QOM'ify Bonito PCI host bridgeAndreas Färber1-56/+90
Introduce type constant. Avoid accessing DeviceState or SysBusDevice indirectly through PCIHostState field. Drop global state by passing BonitoState as opaque and adding the IRQs and a pointer to PCIBonitoState to its state. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22alpha_typhoon: QOM'ify Typhoon PCI host bridgeAndreas Färber1-7/+13
Introduce type constant and cast macro. Don't access DeviceState or PCIHostState indirectly through parent fields. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22pci: Make host bridge TypeInfos constAndreas Färber11-29/+29
During the QOM migration they were amended with further info but this is no longer the case. All static TypeInfos can be const these days. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-22virtio-blk: hide VIRTIO_BLK_F_CONFIG_WCE from old machine typesStefan Hajnoczi3-2/+6
QEMU has a policy of keeping a stable guest device ABI. When new guest device features are introduced they must not change hardware info seen by existing guests. This is important because operating systems or applications may "fingerprint" the hardware and refuse to run when the hardware changes. To always get the latest guest device ABI, run with x86 machine type "pc". This patch hides the new VIRTIO_BLK_F_CONFIG_WCE virtio feature bit from existing machine types. Only pc-1.2 and later will expose this feature by default. For more info on the VIRTIO_BLK_F_CONFIG_WCE feature bit, see: commit 13e3dce068773c971ff2f19d986378c55897c4a3 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Thu Aug 9 16:07:19 2012 +0200 virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Anthony Liguori <aliguori@us.ibm.com> reported: This broke qemu-test because it changed the pc-1.0 machine type: Setting guest RANDOM seed to 47167 *** Running tests *** Running test /tests/finger-print.sh... OK --- fingerprints/pc-1.0.x86_64 2011-12-18 13:08:40.000000000 -0600 +++ fingerprint.txt 2012-08-12 13:30:48.000000000 -0500 @@ -55,7 +55,7 @@ /sys/bus/pci/devices/0000:00:06.0/subsystem_device=0x0002 /sys/bus/pci/devices/0000:00:06.0/class=0x010000 /sys/bus/pci/devices/0000:00:06.0/revision=0x00 -/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x710006d4 +/sys/bus/pci/devices/0000:00:06.0/virtio/host-features=0x71000ed4 /sys/class/dmi/id/bios_vendor=Bochs /sys/class/dmi/id/bios_date=01/01/2007 /sys/class/dmi/id/bios_version=Bochs Guest fingerprint changed for pc-1.0! Reported-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-21i82378: Remove bogus MMIO coalescingJan Kiszka1-1/+0
This MMIO area is an entry gate to legacy PC ISA devices, addressed via PIO over there. Quite a few of the PIO ports have side effects on access like starting/stopping timers that must be executed properly ordered /wrt the CPU. So we have to remove the coalescing mark. Acked-by: Hervé Poussineau <hpoussin@reactos.org> Acked-by: Andreas Färber <andreas.faerber@web.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-18pc: Fix RTC CMOS info on RAM for ram_size < 1MiBMarkus Armbruster1-13/+18
pc_cmos_init() always claims 640KiB base memory, and ram_size - 1MiB extended memory. The latter can underflow to "lots of extended memory". Fix both, and clean up some. Note: SeaBIOS currently requires 1MiB of RAM, and doesn't check whether it got enough. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18scsi: fix warningGerd Hoffmann1-0/+2
hw/scsi-bus.c:758: warning: ‘xfer’ may be used uninitialized in this function Isn't true, but older gcc versions (for example 4.1 as shipped in rhel5) are not clever enougth to figure, so sprinkle in a default: line to make them happy. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-18Avoid asprintf() which is not available on mingwGerd Hoffmann1-6/+2
Use g_strdup_printf() instead. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-16Allow QEMUMachine to override reset sequencingDavid Gibson1-0/+3
qemu_system_reset() function always performs the same basic actions on all machines. This includes running all the reset handler hooks, however the order in which these will run is not always easily predictable. This patch splits the core of qemu_system_reset() - the invocation of the reset handlers - out into a new qemu_devices_reset() function. qemu_system_reset() will usually call qemu_devices_reset(), but that can be now overriden by a new reset method in the QEMUMachine structure. Individual machines can use this reset method, if necessary, to perform any extra, machine specific initializations which have to occur before or after the bulk of the reset handlers. It's expected that the method will call qemu_devices_reset() at some point, but if the machine has really strange ordering requirements between devices resets it could even override that with it's own reset sequence (with great care, obviously). For a specific example of when this might be needed: a number of machines (but not PC) load images specified with -kernel or -initrd directly into the machine RAM before booting the guest. This mostly works at the moment, but to make this actually safe requires that this load occurs after peripheral devices are reset - otherwise they could have active DMAs in progress which would clobber the in memory images. Some machines (notably pseries) also have other entry conditions which need to be set up as the last thing before executing in guest space - some of this could be considered "emulated firmware" in the sense that the actions of the firmware are emulated directly by qemu rather than by executing a firmware image within the guest. When the platform's firmware to OS interface is sufficiently well specified, this saves time both in implementing the "firmware" and executing it. aliguori: don't unconditionally dereference current_machine Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-16pseries: Instantiate USB interface when requiredDavid Gibson1-0/+10
The pseries machine already supports the -vga std option, creating a graphics adapter. However, this is not very useful without being able to add a keyboard and mouse as well. This patch addresses this by adding a USB interface when requested, and automatically adding a USB keyboard and mouse when VGA is enabled. This is a stop gap measure to get usable graphics mode on pseries while waiting for Li Zhang's rework of USB options to go in after 1.2. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-08-15Merge remote-tracking branch 'agraf/ppc-for-upstream' into stagingAnthony Liguori28-206/+706
* agraf/ppc-for-upstream: (24 commits) openpic: Added BRR1 register pseries: Update SLOF firmware image pseries dma: DMA window params added to PHB and DT population changed pseries: Add PCI MSI/MSI-X support pseries: Add trace event for PCI irqs pseries: Export find_phb() utility function for PCI code pseries: added allocator for a block of IRQs pseries: Separate PCI RTAS setup from common from emulation specific PCI setup pseries: Rework irq assignment to avoid carrying qemu_irqs around pseries: Remove extraneous prints pseries: Update SLOF PPC: spapr: Remove global variable PPC: spapr: Rework VGA select logic xbzrle: fix compilation on ppc32 spapr: Add support for -vga option Add one new file vga-pci.h and cleanup on all platforms Revert "PPC: e500: Use new MPIC dt format" ppc: Fix bug in handling of PAPR hypercall exits PPC: e500: add generic e500 platform PPC: e500: split mpc8544ds machine from generic e500 code ...
2012-08-15Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori5-5/+6
* stefanha/trivial-patches: ivshmem, qdev-monitor: fix order of qerror parameters iov_send_recv(): Handle zero bytes case even if OS does not framebuffer: Fix spelling in comment (leight -> height) Spelling fix in comment (peripherans -> peripherals) docs: Fix spelling (propery -> property) trace: Fix "Qemu" -> "QEMU" cputlb.c: Fix out of date comment ehci: fix assertion typo Makefile: Avoid explicit list of directories in clean target
2012-08-15openpic: Added BRR1 registerBharat Bhushan1-0/+17
Linux mpic driver uses (changes may be in pipeline to get upstreamed soon) BRR1. This patch adds the support to emulate readonly FSL BRR1 register. Currently QEMU does not fully emulate any version on MPIC, so the MPIC Major number and Minor number are set to 0. Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries dma: DMA window params added to PHB and DT population changedAlexey Kardashevskiy5-28/+51
Previously the only PCI bus supported was the emulated PCI bus with fixed DMA window with start at 0 and size 1GB. As we are going to support PCI pass through which DMA window properties are set by the host kernel, we have to support DMA windows with parameters other than default. This patch adds: 1. DMA window properties to sPAPRPHBState: LIOBN (bus id), start, size of the window. 2. An additional function spapr_dma_dt() to populate DMA window properties in the device tree which simply accepts all the parameters and does not try to guess what kind of IOMMU is given to it. The original spapr_dma_dt() is renamed to spapr_tcet_dma_dt(). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Add PCI MSI/MSI-X supportAlexey Kardashevskiy3-4/+263
This patch implements MSI and MSI-X support for the pseries PCI host bridge. To do this it adds: * A "config_space_address to msi_table" map, since the MSI RTAS calls take a PCI config space address as an identifier. * A MSIX memory region to catch msi_notify()/msix_notiry() from virtio-pci and pass them to the guest via qemu_irq_pulse(). * RTAS call "ibm,change-msi" which sets up MSI vectors for a device. Note that this call may configure and return lesser number of vectors than requested. * RTAS call "ibm,query-interrupt-source-number" which translates MSI vector to interrupt controller (XICS) IRQ number. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix error case ndev < 0] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Add trace event for PCI irqsAlexey Kardashevskiy1-0/+2
This adds a trace event in the pseries PCI specific set_irq() function to assist in debugging. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: add trace.h include] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Export find_phb() utility function for PCI codeAlexey Kardashevskiy1-10/+21
The pseries PCI code makes use of an internal find_dev() function which locates a PCIDevice * given a (platform specific) bus ID and device address. Internally this needs to first locate the host bridge on which the device resides based on the bus ID. This patch exposes that host bridge lookup as a separate function, which we will need later in the MSI and VFIO code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: drop trace.h inclusion] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: added allocator for a block of IRQsAlexey Kardashevskiy2-0/+27
The patch adds a simple helper which allocates a consecutive sequence of IRQs calling spapr_allocate_irq for each and checks that allocated IRQs go consequently. The patch is required for upcoming support of MSI/MSIX on POWER. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Separate PCI RTAS setup from common from emulation specific PCI setupAlexey Kardashevskiy3-5/+12
Currently the RTAS functions for handling PCI are registered from the class init code for the PCI host bridge. That sort of makes sense now, but will break in the future when vfio gives us multiple types of host bridge for pseries (emulated and pass-through, at least). The RTAS functions will be common across all host bridge types (and will call out to different places internally depending on the type). So, this patch moves the RTAS registration into its own function called direct from the machine setup code. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Rework irq assignment to avoid carrying qemu_irqs aroundAlexey Kardashevskiy10-42/+50
Currently, the interfaces in the pseries machine code for assignment and setup of interrupts pass around qemu_irq objects. That was done in an attempt not to be too closely linked to the specific XICS interrupt controller. However interactions with the device tree setup made that attempt rather futile, and XICS is part of the PAPR spec anyway, so this really just meant we had to carry both the qemu_irq pointers and the XICS irq numbers around. This mess will just get worse when we add upcoming PCI MSI support, since that will require tracking a bunch more interrupt. Therefore, this patch reworks the spapr code to just use XICS irq numbers (roughly equivalent to GSIs on x86) and only retrieve the qemu_irq pointers from the XICS code when we need them (a trivial lookup). This is a reworked and generalized version of an earlier spapr_pci specific patch from Alexey Kardashevskiy. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix checkpath warning] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries: Remove extraneous printsDavid Gibson1-18/+0
The pseries machine prints several messages to stderr whenever it starts up and another whenever the vm is reset. It's not normal for qemu machines to do this though, so this patch removes them. We can put them back conditional on a DEBUG symbol if we really need them in future. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: spapr: Remove global variableAlexander Graf2-3/+3
Global variables are bad. Let's move spapr_has_graphics into the machine state struct. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: spapr: Rework VGA select logicAlexander Graf1-4/+9
When selecting our VGA adapter, we want to: * fail completely when we can't satisfy the user's request * support -nographic where no VGA adapter should be spawned This patch reworks the logic so we fulfill the two conditions above. Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15spapr: Add support for -vga optionzhlcindy@gmail.com1-1/+25
Also instanciate the USB keyboard and mouse when that option is used (you can still use -device to create individual devices without all the defaults) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> [agraf: remove USB bits] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15Add one new file vga-pci.h and cleanup on all platformszhlcindy@gmail.com11-8/+21
Functions pci_vga_init() and pci_cirrus_vga_init() are declared in pc.h. That prevents other platforms (e.g. sPAPR) to use them. This patch is to create one new file vga-pci.h and move the declarations to vga-pci.h, so that they can be shared by all platforms. This patch also cleans up on all platforms. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15Revert "PPC: e500: Use new MPIC dt format"Alexander Graf1-17/+14
This reverts commit 518c7fb44f2182cde943dc64f88cb2fd4e4ff6b5. It breaks new Linux guests with SMP, because IPIs get mapped to large vectors which our MPIC emulation does not implement. Conflicts: hw/ppc/e500.c
2012-08-15PPC: e500: add generic e500 platformScott Wood2-1/+61
This gives the kernel a paravirtualized machine to target, without requiring both sides to pretend to be targeting a specific board that likely has little to do with the host in KVM scenarios. This avoids the need to add new boards to QEMU, just to be able to run KVM on new CPUs. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: split mpc8544ds machine from generic e500 codeScott Wood4-51/+114
Currently the only mpc8544ds-ism that is factored out is toplevel compatible and model. In the future the generic e500 code is expected to become more generic. Signed-off-by: Scott Wood <scottwood@freescale.com> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: change internal references away from mpc8544dsScott Wood1-13/+14
No functional changes -- machine is still outwardly mpc8544ds. The references that are not changed contain mpc8544 hardware details that need to be parameterized if/when a different e500 platform wants to change them. Signed-off-by: Scott Wood <scottwood@freescale.com> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15PPC: e500: rename mpc8544ds into generic fileScott Wood2-9/+11
Rename the file (with no changes other than fixing up the header paths) in preparation for refactoring into a generic e500 platform. Also move it into the newly created ppc/ directory. Signed-off-by: Scott Wood <scottwood@freescale.com> Reviewed-by: Andreas Färber <afaerber@suse.de> [agraf: conditionalize on CONFIG_FDT] Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries pci: spapr_populate_pci_devices renamed to spapr_populate_pci_dtAlexey Kardashevskiy3-7/+7
spapr_populate_pci_devices() populates the device tree only with bus properties and has nothing to do with the devices on it as PCI BAR allocation is done by the system firmware (SLOF). New name - spapr_populate_pci_dt() - describes the functionality better. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15pseries pci: removed redundant busdevAlexey Kardashevskiy2-3/+2
The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alexander Graf <agraf@suse.de>
2012-08-15ivshmem, qdev-monitor: fix order of qerror parametersAlberto Garcia2-2/+3
Now that the QERR_ macros no longer contain a json dictionary, the order of some parameters needs to be fixed for them to appear correctly. Signed-off-by: Alberto Garcia <agarcia@igalia.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15framebuffer: Fix spelling in comment (leight -> height)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15Spelling fix in comment (peripherans -> peripherals)Stefan Weil1-1/+1
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-15ehci: fix assertion typoAlejandro Martinez Ruiz1-1/+1
Signed-off-by: Alejandro Martinez Ruiz <alex@securiforest.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2012-08-14kvmvapic: Disable if there is insufficient memoryJan Kiszka1-1/+3
We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14kvm: i8254: Finish time conversion fixJan Kiszka1-4/+10
0cdd3d1444 fixed reading back the counter load time from the kernel while assuming the kernel would always update its load time on writing the state. That is only true for channel 1, and so pit_get_channel_info returned wrong output pin states for high counter values. Fix this by applying the offset also on kvm_pit_put. Now we also need to update the offset when we write the state while the VM is stopped as it keeps on changing in that state. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-14kvm: i8254: Cache kernel clock offset in KVMPITStateJan Kiszka1-14/+24
To prepare the final fix for clock calibration issues with the in-kernel PIT, we want to cache the offset between vmclock and the clock used by the in-kernel PIT. So far, we only need to update it when the VM state changes between running and stopped because we only read the in-kernel PIT state while the VM is running. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2012-08-13Merge remote-tracking branch 'qmp/queue/qmp' into stagingAnthony Liguori1-0/+2
* qmp/queue/qmp: (48 commits) target-ppc: add implementation of query-cpu-definitions (v2) target-i386: add implementation of query-cpu-definitions (v2) qapi: add query-cpu-definitions command (v2) compiler: add macro for GCC weak symbols qapi: add query-machines command qapi: mark QOM commands stable qmp: introduce device-list-properties command qmp: add SUSPEND_DISK event qmp: qmp-events.txt: add missing doc for the SUSPEND event qmp: qmp-events.txt: put events in alphabetical order qmp: emit the WAKEUP event when the guest is put to run qmp: don't emit the RESET event on wakeup from S3 scripts: qapi-commands.py: qmp-commands.h: include qdict.h docs: writing-qmp-commands.txt: update error section error, qerror: drop QDict member qerror: drop qerror_table and qerror_format() error, qerror: pass desc string to error calls error: drop error_get_qobject()/error_set_qobject() qemu-ga: switch to the new error format on the wire qmp: switch to the new error format on the wire ...