Commit graph

10284 commits

Author SHA1 Message Date
Andreas Färber 74e075f6fb strongarm: QOM cast cleanup for StrongARMPICState
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:27 +02:00
Andreas Färber 7df7f67ae1 stellaris: QOM cast cleanup for stellaris_adc_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:27 +02:00
Andreas Färber d94a40156b stellaris: QOM cast cleanup for stellaris_i2c_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:27 +02:00
Andreas Färber 8ef1d3947e stellaris: QOM cast cleanup for gptm_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 73e9d965dd spitz: QOM cast cleanup for SpitzKeyboardState
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 7eb8104a9c spitz: QOM cast cleanup for SLNANDState
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 6050ed5fb9 pxa2xx_pic: QOM cast cleanup for PXA2xxPICState
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 922bb317e4 pxa2xx_gpio: QOM cast cleanup for PXA2xxGPIOInfo
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 5354c21ef9 pxa2xx: QOM cast cleanup for PXA2xxI2CState
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 548c6f188e pxa2xx: QOM cast cleanup for PXA2xxRTCState
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 12a828041c pxa2xx: QOM cast cleanup for PXA2xxSSPState
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 3bdf5327c9 musicpal: QOM cast cleanup for musicpal_key_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 7012d4b46b musicpal: QOM cast cleanup for musicpal_gpio_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 5952b01cf8 musicpal: QOM cast cleanup for mv88w8618_flashcfg
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber 4adc8541d9 musicpal: QOM cast cleanup for mv88w8618_pit_state
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:26 +02:00
Andreas Färber c7bd0fd945 musicpal: QOM cast cleanup mv88w8618_pic_state
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:19 +02:00
Andreas Färber 2cca58fdc2 musicpal: QOM cast cleanup for musicpal_lcd_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Andreas Färber a77d90e68a musicpal: QOM cast cleanup for mv88w8618_eth_state
Introduce type constant and use QOM casts.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Stefan Weil 2c79fed33b musicpal: Fix typo in name of local function
The misspelling was spotted by Andreas Färber.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Andreas Färber 91b646264e integratorcp: QOM cast cleanup for icp_pic_state
Introduce type constant and use QOM cast.
Fix indentation.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Andreas Färber 257ec289b2 integratorcp: QOM cast cleanup for integratorcm_state
Rename to IntegratorCMState, introduce type constant and use QOM cast.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Andreas Färber 426533faed highbank: QOM cast cleanup for HighbankRegsState
Add type constant and use QOM casts.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:18 +02:00
Andreas Färber 936230a713 armv7m: QOM cast cleanup for BitBandState
Introduce TYPE_* constant and use QOM cast.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:06 +02:00
Andreas Färber bcb34c7a61 imx_ccm: QOM cast cleanup
Introduce type constant and use QOM casts.

Acked-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 5ff94a61c4 imx_avic: QOM cast cleanup
Introduce type constant, use QOM casts and prepare SysBus initfn for QOM
realize by resolving SysBusDevice vs. DeviceState "dev" name conflict.

Acked-by: Peter Chubb <peter.chubb@nicta.com.au>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 01774ddbcf tcx: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 5d7a11e438 pl110: QOM'ify pl110, pl110_versatile and pl111
Let pl110_versatile and pl111 inherit from pl110 and use PL110() cast;
set their version index in an instance_init.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Set version PL110 explicitly, suggested by Hu Tao; fixed inheritence]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 513960eaae pl110: Rename pl110_state to PL110State
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 54df97bb0c milkymist-vgafb: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:05 +02:00
Andreas Färber 56299135f5 milkymist-tmu2: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:06:02 +02:00
Andreas Färber 66c2de562f jazz_led: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:59 +02:00
Andreas Färber 0f31aa8625 g364fb: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field and
prepare for QOM realize.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber f27321aa3a exynos4210_fimd: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber af073cd9de onenand: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field and
prepare for QOM realize.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber b354f03c5c pl041: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber baae672597 pl041: Rename pl041_state to PL041State
Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Split off renaming from QOM cast changes]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber 922cc6010e milkymist-ac97: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:58 +02:00
Andreas Färber 9e3f8599fc audio/marvell_88w8618: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 21:05:47 +02:00
Andreas Färber f9e7419039 cs4231: QOM cast cleanup
Introduce a type constant, use QOM casts and rename the parent field.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:48 +02:00
Andreas Färber 24bf6c1f2a xilinx_uartlite: QOM cast cleanups
Introduce type constant and use QOM casts.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:45 +02:00
Andreas Färber 144712ca14 xilinx_uartlite: Rename xlx_uartlite to XilinxUARTLite
Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:41 +02:00
Andreas Färber b85423fe75 etraxfs_ser: QOM cast cleanups
Rename etrax_serial to ETRAXSerial, introduce type constant and use QOM
casts.

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:33 +02:00
Andreas Färber bcb7575068 pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types
Move PCIEPort's "port" property to the new type, same for "aer_log_max".
Move PCIESlot's "chassis" and "slot" properties to the new type.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:24 +02:00
Andreas Färber 5315dc78d0 pci-bridge/i82801b11: Rename parent field
Rename it to avoid accidental use.

Reviewed-by: Don Koch <dkoch@verizon.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:45:13 +02:00
Andreas Färber 57524e14cf pci-bridge-dev: QOM parent field cleanup
Rename it to avoid accidental use.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Don Koch <dkoch@verizon.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:44:56 +02:00
Andreas Färber f055e96bd4 pci-bridge: Turn PCIBridge into abstract QOM type
Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.

Reviewed-by: Don Koch <dkoch@verizon.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:44:47 +02:00
Andreas Färber 45c0a675f9 arm11mpcore: QOM cast cleanups for mpcore_rirq_state
Introduce a type constant, use QOM casts, rename the parent field and
prepare for QOM realize.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:44:02 +02:00
Andreas Färber 56fc028166 arm11mpcore: QOM cast cleanups for ARM11MPCorePriveState
Introduce a type constant, use QOM casts and rename the parent field.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:42:02 +02:00
Andreas Färber 97da11d857 cpu/a15mpcore: QOM cast cleanup
Introduce type constant and cast macro and rename A15MPPrivState::busdev
field to parent_obj to enforce its use.

Prepares for QOM realize.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-07-29 20:42:00 +02:00
Andreas Färber 68653fd671 timer/arm_mptimer: QOM cast cleanup
Introduce type constant and cast macro and rename
ARMMPTimerState::busdev to enforce its use.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-07-29 20:41:59 +02:00
Andreas Färber 5126fec766 cpu/a9mpcore: QOM casting cleanup
Introduce type constant and cast macro and enforce its use by
renaming A9MPPrivState::busdev field to parent_obj.

Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
2013-07-29 20:41:54 +02:00
Andreas Färber f6c11d5644 ide: Introduce abstract QOM type for PCIIDEState
Needed for QOM casts.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:41:49 +02:00
Peter Crosthwaite 02a9594b4f ide/piix: QOM casting sweep
Use standard QOM cast macro. Remove usage of DO_UPCAST() and
direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:41:42 +02:00
Andreas Färber 19d46d711d fdc: Fix inheritence for SUNW,fdtwo
Since commit dd3be74207 SUNW,fdtwo's
initfn (realizefn since 940194c236)
was using SYSBUS_FDC() cast. This uses type sysbus-fdc rather than
SUNW,fdtwo.

Fix this by letting SUNW,fdtwo and sysbus-fdc both inherit from an
abstract type base-sysbus-fdc.

This allows to consolidate realizefns by using instance_init functions.
Clean up variable names and variable order while at it.

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Hu Tao <hutao@cn.fujitsu.com>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-29 20:41:13 +02:00
Anthony Liguori eddbf0ab9d Merge remote-tracking branch 'stefanha/block' into staging
# By Stefan Hajnoczi (4) and others
# Via Stefan Hajnoczi
* stefanha/block:
  dataplane: refuse to start if device is already in use
  dataplane: enable virtio-blk x-data-plane=on live migration
  migration: fix spice migration
  migration: notify migration state before starting thread
  block: Repair the throttling code.
  gluster: Add image resize support

Message-id: 1375112172-24863-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 11:33:48 -05:00
Marcel Apfelbaum 125ee0ed9c devices: Associate devices to their logical category
The category will be used to sort the devices displayed in
the command line help.

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Message-id: 1375107465-25767-4-git-send-email-marcel.a@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
Marcel Apfelbaum 949fc82314 hw: import bitmap operations in qdev-core header
Made small tweaks in code to prevent compilation issues
when importing qemu/bitmap.h in qdev-core

Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Message-id: 1375107465-25767-2-git-send-email-marcel.a@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
Alexey Kardashevskiy dbd94f8e4a spapr-vscsi: fix SOLNT bit in SRP_RSP
The driver calculates SOLNT bit from UCSOLNT and  SCSOLNT bits from
the request. The iu pointer has a type of srp_iu* which points to a union,
so cmd and rsp overlap. As the vscsi_send_rsp function calls
memset(iu, 0, sizeof(rsp)), it clears first 36 bytes of both cmd and rsp
so cmd.sol_not is always zero at the moment of calculating rsp.sol_not.

This fixes the bug.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1375073319-17488-1-git-send-email-aik@ozlabs.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
Anthony Liguori c04d6cfa3f xics: rename types to be sane and follow coding style
Basically, in HW the layout of the interrupt network is:

     - One ICP per processor thread (the "presenter"). This contains the
    registers to fetch a pending interrupt (ack), EOI, and control the
    processor priority.

     - One ICS per logical source of interrupts (ie, one per PCI host
    bridge, and a few others here or there). This contains the per-interrupt
    source configuration (target processor(s), priority, mask) and the
    per-interrupt internal state.

    Under PAPR, there is a single "virtual" ICS ... somewhat (it's a bit
    oddball what pHyp does here, arguably there are two but we can ignore
    that distinction). There is no register level access. A pair of firmware
    (RTAS) calls is used to configure each virtual interrupt.

    So our model here is somewhat the same. We have one ICS in the emulated
    XICS which arguably *is* the emulated XICS, there's no point making it a
    separate "device", that would just be gross, and each VCPU has an
    associated ICP.

Yet we call the "XICS" struct icp_state and then the ICPs
'struct icp_server_state'.  It's particularly confusing when all of the
functions have xics_prefixes yet take *icp arguments.

Rename:

  struct icp_state -> XICSState
  struct icp_server_state -> ICPState
  struct ics_state -> ICSState
  struct ics_irq_state -> ICSIRQState

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1374175984-8930-12-git-send-email-aliguori@us.ibm.com
[aik: added ics_resend() on post_load]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
Alexey Kardashevskiy e68cb8b4fa pseries: savevm support with KVM
At present, the savevm / migration support for the pseries machine will not
work when KVM is enabled.  That's because KVM manages the guest's hash page
table in the host kernel, so qemu has no visibility of it.  This patch
fixes this by using new kernel interfaces to extract and reinsert the
guest's hash table during the migration process.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Message-id: 1374175984-8930-11-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
David Gibson 1112cf94c8 pseries: savevm support for PCI host bridge
This adds the necessary support for saving the state of the PAPR virtual
PCI host bridge (or host bridges).

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374175984-8930-10-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:09 -05:00
David Gibson 4be21d561d pseries: savevm support for pseries machine
This adds the necessary pieces to implement savevm / migration for the
pseries machine.  The most complex part here is migrating the hash
table - for the paravirtualized pseries machine the guest's hash page
table is not stored within guest memory, but externally and the guest
accesses it via hypercalls.

This patch uses a hypervisor reserved bit of the HPTE as a dirty bit
(tracking changes to the HPTE itself, not the page it references).
This is used to implement a live migration style incremental save and
restore of the hash table contents.

Normally a hash table is 16MB but it can get bigger depending on how
much RAM the guest has. Due to its nature, updates to it are random so
the live migration style is used for it.

In addition it adds VMStateDescription information to save and restore
the (few) remaining pieces of state information needed by the pseries
machine.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374175984-8930-9-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
David Gibson 1168ec7da1 pseries: savevm support for PAPR virtual SCSI
This patch adds the necessary support for saving the state of the PAPR VIO
virtual SCSI device. This also saves and restores active SCSI requests.

[aik: implemented vscsi_req save/restore]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1374175984-8930-8-git-send-email-aliguori@us.ibm.com
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
Alexey Kardashevskiy 8ca8a17c9a pseries: rework PAPR virtual SCSI
The patch reimplements handling of indirect requests in order to
simplify upcoming live migration support.
- all pointers (except SCSIRequest*) were replaces with integer
indexes and offsets;
- DMA'ed srp_direct_buf kept untouched (ie. BE format);
- vscsi_fetch_desc() is added, now it is the only place where
descriptors are fetched and byteswapped;
- vscsi_req struct fields converted to migration-friendly types;
- many dprintf()'s fixed.

This also removed an unused field 'lun' from the spapr_vscsi device
which is assigned, but never used.  So, remove it.

[David Gibson: removed unused 'lun']
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1374175984-8930-7-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
Anthony Liguori a83000f5e3 spapr-tce: make sPAPRTCETable a proper device
Model TCE tables as a device that's hooked up as a child object to
the owner.  Besides the code cleanup, we get a few nice benefits:

1) free actually works now (it was dead code before)

2) the TCE information is visible in the device tree

3) we can expose table information as properties such that if we
   change the window_size, we can use globals to keep migration
   working.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Message-id: 1374175984-8930-6-git-send-email-aliguori@us.ibm.com
[dwg: pseries: savevm support for PAPR TCE tables]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[alexey: ppc kvm: fix to compile]
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
David Gibson db1b58e937 pseries: savevm support for PAPR VIO logical tty
This patch adds the necessary VMStateDescription information to support
savevm/loadvm for the spapr_tty (PAPR logical serial) device.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374175984-8930-5-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
David Gibson 686fefe483 pseries: savevm support for PAPR VIO logical lan
This patch adds the necessary VMStateDescription information to support
savevm/loadvm for the spapr_llan (PAPR logical lan) device.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374175984-8930-4-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
David Gibson b368a7d864 pseries: savevm support for VIO devices
This patch adds helpers to allow PAPR VIO devices to save state common
to all VIO devices during savevm.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374175984-8930-3-git-send-email-aliguori@us.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 10:37:08 -05:00
Stefan Hajnoczi b0f2027cde dataplane: refuse to start if device is already in use
Dataplane must check whether a block device is in use before launching
the dataplane thread.  This is necessary since the thread does not
synchronize with the main loop and I/O requests could cause corruption.

One example is when a drive is added and a block job is started before
hotplugging the virtio-blk-pci adapter.  In this case we must not use
dataplane mode.

Cc: qemu-stable@nongnu.org
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-29 17:19:15 +02:00
Stefan Hajnoczi 84db52d059 dataplane: enable virtio-blk x-data-plane=on live migration
Although the dataplane thread does not cooperate with dirty memory
logging yet it's fairly easy to temporarily disable dataplane during
live migration.  This way virtio-blk can live migrate when
x-data-plane=on.

The dataplane thread will restart after migration is cancelled or if the
guest resuming virtio-blk operation after migration completes.

Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-29 17:19:07 +02:00
Anthony Liguori fdc43322c9 Merge remote-tracking branch 'sstabellini/xen-130729' into staging
# By Paul Durrant (1) and Stefano Stabellini (1)
# Via Stefano Stabellini
* sstabellini/xen-130729:
  Xen PV Device
  xen_disk: support "direct-io-safe" backend option

Message-id: 1375096790-12815-1-git-send-email-stefano.stabellini@eu.citrix.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-29 07:30:31 -05:00
Paul Durrant 8fbab3b62a Xen PV Device
Introduces a new Xen PV PCI device which will act as a binding point for
PV drivers for Xen.
The device has parameterized vendor-id, device-id and revision to allow to
be configured as a binding point for any vendor's PV drivers.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2013-07-29 11:13:44 +00:00
Stefano Stabellini 454ae734f1 xen_disk: support "direct-io-safe" backend option
Support backend option "direct-io-safe".  This is documented as
follows in the Xen backend specification:

 * direct-io-safe
 *      Values:         0/1 (boolean)
 *      Default Value:  0
 *
 *      The underlying storage is not affected by the direct IO memory
 *      lifetime bug.  See:
 *        http://lists.xen.org/archives/html/xen-devel/2012-12/msg01154.html
 *
 *      Therefore this option gives the backend permission to use
 *      O_DIRECT, notwithstanding that bug.
 *
 *      That is, if this option is enabled, use of O_DIRECT is safe,
 *      in circumstances where we would normally have avoided it as a
 *      workaround for that bug.  This option is not relevant for all
 *      backends, and even not necessarily supported for those for
 *      which it is relevant.  A backend which knows that it is not
 *      affected by the bug can ignore this option.
 *
 *      This option doesn't require a backend to use O_DIRECT, so it
 *      should not be used to try to control the caching behaviour.

Also, BDRV_O_NATIVE_AIO is ignored if BDRV_O_NOCACHE, so clarify the
default flags passed to the qemu block layer.

The original proposal for a "cache" backend option has been dropped
because it was believed too wide, especially considering that at the
moment the backend doesn't have a way to tell the toolstack that it is
capable of supporting it.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2013-07-29 11:03:48 +00:00
Christian Borntraeger 5c8ded6ef5 s390/ipl: Fix boot order
The latest ipl code adaptions collided with some of the virtio
refactoring rework. This resulted in always booting the first
disk. Let's fix booting from a given ID.
The new code also checks for command lines without bootindex to
avoid random behaviour when accessing dev_st (==0).

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2013-07-29 12:02:00 +02:00
Aurelien Jarno 461bdb3414 Merge branch 'trivial-patches' of git://git.corpit.ru/qemu
* 'trivial-patches' of git://git.corpit.ru/qemu:
  target-mips: Remove assignment to a variable which is never used
  misc: Use g_assert_not_reached for code which is expected to be unreachable
  qemu-options: mention C-a h in the -nographic doc
  misc: Fix new typos in comments and strings
  linux-user: correct argument number for sys_mremap and sys_splice
  PPC: dbdma: macio: Fix format specifiers (build regression)
  watchdog: Remove break after exit
  exec: Remove env from list of poisoned names
  hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
  timer: make timers_state static
  aes: Remove unused code (NDEBUG, u16)
2013-07-29 09:03:23 +02:00
Aurelien Jarno f05d4d94d6 mips_malta: fix copy of the 0x1fc00000 region
Copy the whole 0x1fe000000 region into 0x1fc00000, independently of the
loaded BIOS size. This fix the MIPS make check tests.

Reported-by: Andreas Färber <afaerber@suse.de>
Tested-by: Andreas Färber <afaerber@suse.de>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-29 07:48:09 +02:00
James Hogan 05b3274b6b hw/mips: align initrd to 64KB to avoid kernel error
The Linux kernel can be configured to use 64KB pages, but it also
requires initrd to be page aligned. Therefore, to be safe, align the
initrd to 64KB using a new INITRD_PAGE_MASK rather than
TARGET_PAGE_MASK.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-29 00:27:35 +02:00
Paul Burton ea0a4f3441 pflash_cfi01: duplicate status byte from bits 23:16 for 32bit reads
The firmware commonly used with MIPS Malta boards (YAMON) reads the
status of the pflash with a 32bit memory access. On real hardware
this results in the status byte being mirrored in the upper 16 bits
of the read value. For example if the status byte is represented by
SS then the hardware reads 0x00SS00SS. The YAMON firmware compares the
status against 32bit values expecting the mirrored value and fails
without it.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:59:23 +02:00
Paul Burton 35c648078a mips_malta: generate SMBUS EEPROM data
The malta contains 2 EEPROMs, one containing SPD data for the SDRAM and
another containing board information such as serial number and MAC
address. These are both exposed via the PIIX4 SMBUS. Generating this
data and providing it to smbus_eeprom_init will allow YAMON to read a
serial number for the board and prevent it from warning that the EEPROM
data is invalid.

We already have the contents of the SPD EEPROM which are exposed via
FPGA I2C accesses, this is provided as part of the SMBUS EEPROM data
too for consistency.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:59:23 +02:00
Paul Burton 1817f56a83 mips_malta: cap BIOS endian swap length at 0x3e0000 bytes
This preserves the final sector of the pflash which is used by YAMON to
hold environment variables. If the endianness of the environment data
is swapped then YAMON will fail to load environment variables from
pflash.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:59:23 +02:00
Paul Burton 02bccc7796 mips_malta: generate SPD EEPROM data at runtime
The SPD EEPROM specifies the amount of memory present in the system and
thus its correct contents can only be known at runtime. Calculating
parts of the data on init allows the data to accurately reflect the
amount of target memory present and allow YAMON to boot with an
arbitrary amount of SDRAM.

Where possible the SPD data will favor indicating 2 banks of SDRAM
rather than 1. For example the default 128MB of target memory will be
represented as 2x64MB banks rather than 1x128MB bank. This allows
versions of MIPS BIOS code (such as YAMON 2.22 and older) to boot
despite a bug preventing them from handling a single bank of SDRAM with
the Galileo GT64120 system controller emulated by QEMU.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:59:22 +02:00
Paul Burton a427338b22 mips_malta: correct reading MIPS revision at 0x1fc00010
Rather than modifying the BIOS code at its original location, copy it
for the 0x1fc00000 region & modify the copy. This means the original
ROM code is correctly readable at 0x1e000010 whilst the MIPS revision
is readable at 0x1fc00010.

Additionally the code previously operated on target memory which would
later be overwritten by the BIOS image upon CPU reset if the -bios
argument was used to specify the BIOS image. This led to the written
MIPS revision being lost. Copying using rom_copy when -bios is used
fixes this issue.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:53:35 +02:00
Paul Burton a2b8813d62 mips_malta: fix BIOS endianness swapping
If the target is little endian (mipsel) then the BIOS image endianness
is swapped so that the big endian BIOS binaries commonly produced can be
loaded correctly.

When using the -bios argument the BIOS is loaded using
load_image_targphys, however this doesn't perform the load to target
memory immediately. Instead it loads the BIOS file into a struct Rom
which will later be written to target memory upon reset. However the
endianness conversion was being performed before this, on init, and
operating on the target memory which at this point is blank & will later
be overwritten by the (big endian) BIOS image. Correct this by operating
on the data referenced by struct Rom rather than the target memory when
the -bios argument is used.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 19:18:07 +02:00
Andreas Färber cba5cb67be mips_malta: QOM cast cleanup
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-07-28 18:57:47 +02:00
Stefan Weil dfc6f86567 misc: Use g_assert_not_reached for code which is expected to be unreachable
The macro g_assert_not_reached is a better self documenting replacement
for assert(0) or assert(false).

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-27 11:22:54 +04:00
Stefan Weil 52f350227f misc: Fix new typos in comments and strings
All these typos were found by codespell.

sould -> should
emperical -> empirical
intialization -> initialization
successfuly -> successfully
gaurantee -> guarantee

Fix also another error (before before) in the same context.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-27 11:22:54 +04:00
Stefan Weil 04dd125942 PPC: dbdma: macio: Fix format specifiers (build regression)
Fix a number of warnings for 32 bit builds (tested on MingW and Linux):

  CC    hw/ide/macio.o
qemu/hw/ide/macio.c: In function 'pmac_ide_atapi_transfer_cb':
qemu/hw/ide/macio.c:134:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
qemu/hw/ide/macio.c: In function 'pmac_ide_transfer_cb':
qemu/hw/ide/macio.c:215:5: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'int64_t' [-Werror=format]
qemu/hw/ide/macio.c:222:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
qemu/hw/ide/macio.c:264:9: error: format '%lx' expects argument of type 'long unsigned int', but argument 3 has type 'hwaddr' [-Werror=format]
cc1: all warnings being treated as errors
make: *** [hw/ide/macio.o] Error 1

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Acked-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-27 11:22:54 +04:00
Stefan Weil f6019e5fad watchdog: Remove break after exit
This was dead code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-27 11:22:54 +04:00
Stefan Weil 80cba1b71e hw/9pfs: Fix potential memory leak and avoid reuse of freed memory
The leak was reported by cppcheck.

Function proxy_init also calls g_free for ctx->fs_root.
Avoid reuse of this memory by setting ctx->fs_root to NULL.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-27 11:22:54 +04:00
Mark Cave-Ayland b96919e068 sun4m: add display width and height to the firmware configuration
Currently the graphics resolution for TCX is fixed at 1024x768, however
other framebuffers are capable of supporting additional resolutions.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
CC: Anthony Liguori <aliguori@us.ibm.com>
CC: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-26 16:56:50 -05:00
Anthony Liguori b142d79328 Merge remote-tracking branch 'jliu/or32' into staging
# By Jia Liu
# Via Jia Liu
* jliu/or32:
  target-openrisc: Free typename in openrisc_cpu_class_by_name
  hw/openrisc: Use stderr output instead of qemu_log
  hw/openrisc: Indent typo

Message-id: 1374576458-22808-1-git-send-email-proljc@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-26 13:04:07 -05:00
Paolo Bonzini d2f5ea9704 pc-testdev: add I/O port to test memory.c auto split/combine
The ports at 0xe8..0xeb have impl.min/max_access_size == 1, so
that memory accesses are split and combined by the memory core.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-29-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini 2b8fbcd870 sparc64: unbreak
... by making apb a subclass of TYPE_PCI_HOST_BRIDGE.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-21-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:28 -05:00
Paolo Bonzini b23ea25f50 sh4: unbreak r2d
... by making sh_pci a subclass of TYPE_PCI_HOST_BRIDGE.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-20-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini b332d24a8e mips: degrade BIOS error to warning
No free MIPS BIOS is available, so it makes little sense to quit.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-19-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 504054357b pc-testdev: remove useless cpu_to_le64/le64_to_cpu
So far the device was only used on little-endian machines.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-18-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini b7faba7163 pc-testdev: support 8 and 16-bit accesses to 0xe0
This will let us use the testdev to test endianness.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-17-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 61fcb62862 isa_mmio: delete
It is not used anymore.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-15-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 0a70e094cd ebus: do not use isa_mmio
This is untested, because ebus does not have a libqos module.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-14-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 5519ad0c24 sparc64: remove indirection for I/O port access
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-13-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini e37b80faa6 mips_fulong2e: do not use isa_mmio
This board is little-endian, but still isa_mmio should die. :)

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-12-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini bdb75c7987 mipssim: do not use isa_mmio
Untested, this board does not support PCI so it cannot run endianness-test.
It should fix endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-11-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 6850150217 ppc440_bamboo: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-10-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini ee77854fa5 mips_malta: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-9-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini 3959496874 mips_r4k: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-8-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:27 -05:00
Paolo Bonzini f51100cc51 mips_jazz: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-7-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 921f8040d3 prep: fix I/O port endianness
Do not swap endianness here, it will happen during cpu_{in,out}{b,w,l}.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-6-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Alexey Kardashevskiy 66aab867ce spapr_pci: remove indirection for I/O port access
This fixes endianness bugs in I/O port access.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-5-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 2b1096e02d ppc_newworld: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-4-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:26 -05:00
Paolo Bonzini 7d52857ea5 ppc_oldworld: do not use isa_mmio
This fixes endianness bugs in I/O port access.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-3-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:25 -05:00
Paolo Bonzini 4759ab6b2d sh4: do not use isa_mmio
This fixes endianness bugs in I/O port access (for sh4eb).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Message-id: 1374501278-31549-2-git-send-email-pbonzini@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-25 08:12:25 -05:00
Anthony Liguori 3988982c82 QOM CPUState refactorings
* Fix NULL pointer dereference in gdbstub
 * Introduce vaddr type
 * Introduce CPUClass::set_pc()
 * Introduce CPUClass::synchronize_from_tb()
 * Introduce CPUClass::get_phys_page_debug()
 * Introduce CPUClass::memory_rw_debug()
 * Move singlestep_enabled and gdb_regs fields out of CPU_COMMON
 * Adopt CPUState in more APIs
 * Propagate CPUState in gdbstub
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.19 (GNU/Linux)
 
 iQIcBAABAgAGBQJR7dNJAAoJEPou0S0+fgE/R8IQAKByM7NGK9JCbMuuZgLzbtib
 J1t6cpdn6ghD/qTNUoC6TuCLB0XHlFenfHtLSC9uqMXZPX1i6UZIo2yRA69X2IEu
 NjUU6LdoduEYL0jBkZeBSvx1SgMVwiabR6kvQorpEzmJWXQdRav8aNCQuGEgvIcb
 sv8kA6Jwh0+S4HJm3gGMs/wBSSeVpP3SUB14RiZESIFQpOovP+i1Qs8qTtclYf4j
 P3qxwoUCJy0S9ayQ6bGJKTbVkY4oCgZHQzDJ09rRT3KM0SMto/cfmlks2zynbeak
 6RXa7iJ8UO4AyxcL37Va5QfVx+EKeu6TpMPxEEFqqgoxac9p4QPspvMmCv6XM4Ul
 TGldagWXHnyN9R5p/w6xMWoKizBE2AUPZh/N8CHI0zAvmaz0pfsiOotVEfs5lbi6
 B5At9lgikagLV43Usi090xOIa3sVL5N+lqxm8PB6UlWbdpFPSBU6Vgx9UBbQniAd
 eB0SP5BUaqM5pkoCHXprrOyCLs3rkEflS1/o1jd+LxH1czQXruns1bEKal/PW22m
 a4TmDQd4X0IvgcziJzo5TuwR4cqQWc5REr2M+EnyMsb0oT5bdCoDZc9oSz+uOW3I
 Qs5hMjs2mG1192heO6HF5YwFzv5RT2POXLtjM+eW72zN4uMrOiIsXU+neQUyWb20
 4+RywuU7mCFOX70UisL9
 =AkgR
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'afaerber/tags/qom-cpu-for-anthony' into staging

QOM CPUState refactorings

* Fix NULL pointer dereference in gdbstub
* Introduce vaddr type
* Introduce CPUClass::set_pc()
* Introduce CPUClass::synchronize_from_tb()
* Introduce CPUClass::get_phys_page_debug()
* Introduce CPUClass::memory_rw_debug()
* Move singlestep_enabled and gdb_regs fields out of CPU_COMMON
* Adopt CPUState in more APIs
* Propagate CPUState in gdbstub

# gpg: Signature made Mon 22 Jul 2013 07:50:17 PM CDT using RSA key ID 3E7E013F
# gpg: Can't check signature: public key not found

# By Andreas Färber (21) and others
# Via Andreas Färber
* afaerber/tags/qom-cpu-for-anthony: (24 commits)
  linux-user: Use X86CPU property to retrieve CPUID family
  gdbstub: Change gdb_register_coprocessor() argument to CPUState
  cpu: Move gdb_regs field from CPU_COMMON to CPUState
  gdbstub: Change GDBState::{c,g}_cpu and find_cpu() to CPUState
  cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()
  exec: Change cpu_memory_rw_debug() argument to CPUState
  cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
  gdbstub: Change gdb_{read,write}_register() argument to CPUState
  gdbstub: Change gdb_handlesig() argument to CPUState
  gdbstub: Change syscall callback argument to CPUState
  kvm: Change kvm_{insert,remove}_breakpoint() argument to CPUState
  cpu: Change cpu_single_step() argument to CPUState
  gdbstub: Update gdb_handlesig() and gdb_signalled() Coding Style
  cpu: Move singlestep_enabled field from CPU_COMMON to CPUState
  target-alpha: Copy implver to DisasContext
  target-alpha: Copy singlestep_enabled to DisasContext
  cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()
  target-unicore32: Implement CPUClass::set_pc()
  target-moxie: Implement CPUClass::set_pc()
  target-m68k: Implement CPUClass::set_pc()
  ...
2013-07-23 10:57:04 -05:00
Jia Liu 4284c0517b hw/openrisc: Use stderr output instead of qemu_log
We should use stderr output instead of qemu_log in order to output ErrMsg
onto the screen.

Signed-off-by: Jia Liu <proljc@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2013-07-23 18:31:24 +08:00
Jia Liu 68f1282882 hw/openrisc: Indent typo
Indent typo.

Signed-off-by: Jia Liu <proljc@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
2013-07-23 18:30:09 +08:00
Andreas Färber f17ec444c3 exec: Change cpu_memory_rw_debug() argument to CPUState
Propagate X86CPU in kvmvapic for simplicity.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 02:41:33 +02:00
Andreas Färber 00b941e581 cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook
Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd().

Prepares for changing cpu_memory_rw_debug() argument to CPUState.

Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa)
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 02:41:33 +02:00
Hu Tao 52785d9951 isa-bus: Drop isabus_bridge_init() since it does nothing
This works since commit 4ce5dae88e.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Edited]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao f5ba752371 ioapic: Use QOM realize for ioapic
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Tweaked error message]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao c118d44b6a kvmvapic: Use QOM realize
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed variable]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 913bc63844 kvm/clock: Use QOM realize for kvmclock
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 726887ef44 hpet: Use QOM realize for hpet
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Avoided SYS_BUS_DEVICE() in loop]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Andreas Färber caad4eb345 scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()
Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline()
return an Error**. Prepare qdev initfns for QOM realize error model.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Andreas Färber 22d6aa03fd megasas: Legacy command line handling fix
Only apply legacy command line handling when the device has not been
hot-plugged. Propagate failure of legacy command line handling.

Cc: qemu-stable@nongnu.org
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao b09318cac6 scsi/esp: Use QOM realize for scsi esp
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Drop sysbus_esp_init()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 563839557c fw_cfg: Use QOM realize for fw_cfg
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Moved sysbus_init_mmio() to instance_init, renamed variable]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 7acb423fcf ahci: Use QOM realize for ahci
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Avoided repeated SYS_BUS_DEVICE() casts]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao da3bd64234 pflash_cfi02: Use QOM realize for pflash_cfi02
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao e40b5f3e0e pflash_cfi01: Use QOM realize for pflash_cfi01
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed argument]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Andreas Färber a3ef7a61e3 fdc: Improve error propagation for QOM realize
Rename fdctrl_init_common() to fdctrl_realize_common() and let
fdctrl_connect_drives() propagate an Error through it.

Reviewed-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 940194c236 fdc: Use QOM realize for fdc
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed SysBusDevice variable]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 98bdc0d7ff kvm/clock: QOM'ify some more
Introduce type constant and avoid FROM_SYSBUS().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao 02f9a6f5da hpet: QOM'ify some more
Introduce type constant, avoid FROM_SYSBUS().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field and renamed variable]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:35 +02:00
Hu Tao a71c7ec529 scsi/esp: QOM'ify some more
Introduce type constant and avoid DO_UPCAST().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 2ce92a1102 fwcfg: QOM'ify some more
Use type constant if possible and avoid DO_UPCAST().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao b3b162c3cf ahci: QOM'ify some more
Introduce type constant and avoid DO_UPCAST().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 3509c396d2 pflash-cfi02: QOM'ify some more
Introduce type constant and replace FROM_SYSBUS().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao f1b44f0e41 pflash-cfi01: QOM'ify some more
Introduce type constant and replace FROM_SYSBUS().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao dd3be74207 fdc: QOM'ify some more
Introduce type constant and avoid DO_UPCAST(), container_of(),
and use DEVICE() to avoid accessing parent qdev directly.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Renamed parent field and avoided repeated SYS_BUS_DEVICE() casts]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 62d92e432f q35: Use QOM realize for q35 host bridge
And split off MemoryRegion initialization into instance_init.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao ce88812f57 q35: Use type-safe cast instead of direct access of parent dev
And remove variables if possible.

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Converted remaining access and renamed to parent_obj]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao a3560fbf01 i440fx-pcihost: Use QOM realize for i440fx-pcihost
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 2aedfa4649 i440fx: Use type-safe cast instead of direct access of parent dev
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Converted remaining accesses and renamed to parent_obj]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 457215ec6a ohci: Use QOM realize for OHCI
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Hu Tao 1aa0c0c748 ohci: QOM'ify some more
Introduce type constant and avoid DO_UPCAST().

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
[AF: Avoid remaining OHCIPCIState::pci_dev uses, rename parent fields]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Andreas Färber dc4aa51ba8 xen/xen_platform: QOM parent field cleanup
Replace direct uses of PCIXenPlatformState::pci_dev field with QOM casts
and rename it to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Peter Crosthwaite 51a3fe996b xen/xen_platform: QOM casting sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Dropped opaque casts]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Andreas Färber b7578eaadd misc/ivshmem: QOM parent field cleanup
Replace direct uses of IVShmemState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Peter Crosthwaite eb3fedf3d4 misc/ivshmem: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Simplified casts and converted two more DO_UPCAST()s]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Andreas Färber af21c74039 display/vmware_vga: QOM parent field cleanup
Replace direct uses of pci_vmsvga_state_s::card with QOM casts and
rename it to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Peter Crosthwaite 39d4598763 display/vmware_vga: QOM casting sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST() and
direct -> style casting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Renamed to TYPE_VMWARE_VGA and VMWARE_VGA()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Andreas Färber 6d27a4099e misc/pci-testdev: QOM parent field cleanup
Replace direct uses of PCITestDevState::dev with QOM casts and rename it
to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:34 +02:00
Peter Crosthwaite 40108d0a6d misc/pci-testdev: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Replaced another DO_UPCAST()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 6a6b5580bd acpi/piix4: QOM parent field cleanup
Replace direct uses of PIIX4PMState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 74e445f649 acpi/piix4: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 0d3aea5603 ide/ich: QOM parent field cleanup
Replace direct uses of AHCIPCIState::card with QOM casts and rename it
to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite fd58922cf4 ide/ich: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Renamed to TYPE_ICH9_AHCI and used typedef in pci_ich9_reset()]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 4e5dcc774a scsi/esp-pci: QOM parent field cleanup
Replace direct uses of PCIESPState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 3a15effe00 scsi/esp-pci: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 52190c1e0a scsi/megasas: QOM parent field cleanup
Replace direct uses of MegasasState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite c79e16ae04 scsi/megasas: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 725eec7043 scsi/lsi53c895a: QOM parent field cleanup
Replace direct uses of LSIState::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 71186c867c scsi/lsi53c895a: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 9b7d3334d0 usb/hcd-xhci: QOM parent field cleanup
Replace direct uses of XHCIState::pci_dev with QOM casts and rename it
to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 37034575d2 usb/hcd-xhci: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Dropped usb_xhci_init() DeviceState argument and renamed variable]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 1f8c794685 net/pcnet-pci: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
[AF: Renamed parent field, renamed from PC_NET to PCNET]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber 88a411a8a0 net/rtl8139: QOM parent field cleanup
Replace direct uses of RTL8139State::dev with QOM casts and rename it to
parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 3925751588 net/rtl8139: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Andreas Färber b08340d52b net/e1000: QOM parent field cleanup
Replace direct uses of E1000State::dev field with QOM casts and rename
it to parent_obj.

Acked-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Crosthwaite 567a3c9e7f net/e1000: QOM Upcast Sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST()
and direct -> style upcasting.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:33 +02:00
Peter Maydell 6783ecf144 hw: Avoid use of QOM type name macros in VMStateDescriptions
The name field in a VMStateDescription is part of the migration state
versioning, so changing it will break migration.  It's therefore a
bad idea to use a QOM typename macro to initialize it, because in
general we're free to rename QOM types as part of code refactoring
and cleanup.  For the handful of devices that were doing this by
mistake, replace the QOM typenames with the corresponding literal
strings.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
[AF: Use TYPE_PVSCSI for TypeInfo instead]
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-07-23 00:37:32 +02:00
Anthony Liguori 549c272b3c arm-devs queue
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJR7RnMAAoJEDwlJe0UNgze9BQP/iuj/QKrw71vrMMCHlrzqjRc
 WXNaGkGHGaRw1r1X/XSiEqI3Ti2frHhsJ+annso4Q3forfGCbnB1Qaqvs/KzQW09
 KQBK3b2AZ9m4b35ZpZYpmbNaIS60XVV1VVB9tshXKJgyYObGlHRWj8MpepSrl3Rr
 texchdyNgZnqCS7Ep6oxzaR2bLqcr1Mi8+NG4dLJfw/z8BREPasQfxOYQoKxDVKV
 Cg2gd31ZAVzqJXtUuwdtkuM7JddfOnGk/MfDkZEBFhQ/fnRE5GSGYTuOHQp9hYdt
 bKnJbT0tqorP5+xg4dzVTqOJ+TsWm+ZfQrzQzkWSM34msYSoohCsF3/BA3xkF3/9
 6iE4ZfHrM6R/XO3A61NbtE9CvhFq9YsLPq7TcAAEzapBFXZlQAGCbZNJlGqn72p1
 XSTFwB02c2+gOXhhUtCwh0OKVbX79J99TQkBR1bEXr3C0yokxa0bIy7kJy+X2+vF
 NOMzoWhEteylZn18tvDfjPCXXzO4kJ8+3sYtvyYAWRadG1QcCq+8xMwUgcVQgmnM
 3TO2r+i4Cs+Ut9m6krW3P3ctL4cCoZj4bDqOu/8Fd7OVBK6u6LtXwej6LoiIDSPD
 3D2Bns65EhEZVucoObgNxG2h+JFLcLm3qRKY51VxD0lJh4Nn90jo317I43FHWONe
 HZZqqO8yPPf7LG/QGTzA
 =AvPS
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130722' into staging

arm-devs queue

# gpg: Signature made Mon 22 Jul 2013 06:38:52 AM CDT using RSA key ID 14360CDE
# gpg: Can't check signature: public key not found

# By Peter Maydell (8) and Soren Brinkmann (2)
# Via Peter Maydell
* pmaydell/tags/pull-arm-devs-20130722:
  hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot header
  hw/loader: Support ramdisk with u-boot header
  vexpress: Add virtio-mmio transports
  vexpress: Make VEDBoardInfo extend arm_boot_info
  arm/boot: Allow boards to modify the FDT blob
  virtio: Implement MMIO based virtio transport
  virtio: Support transports which can specify the vring alignment
  virtio: Add support for guest setting of queue size
  arm/boot: Use qemu_devtree_setprop_sized_cells()
  device_tree: Add qemu_devtree_setprop_sized_cells() utility functions

Message-id: 1374493427-3254-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22 10:14:24 -05:00
Anthony Liguori a20bd9eec3 Merge remote-tracking branch 'mjt/trivial-patches' into staging
# By Michael Tokarev (2) and others
# Via Michael Tokarev
* mjt/trivial-patches:
  doc: monitor multiplexing rewording
  block/m25p80: Update Micron entries
  Fix command example in qemu.sasl
  slirp: remove mbuf(m_hdr,m_dat) indirection
  linux-user: declare sys_futex to have 6 arguments

Message-id: 1374225073-12959-1-git-send-email-mjt@msgid.tls.msk.ru
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22 10:13:49 -05:00
Anthony Liguori 5447a9afc4 Merge remote-tracking branch 'stefanha/block' into staging
# By Peter Lieven (5) and others
# Via Stefan Hajnoczi
* stefanha/block:
  block/raw: add .bdrv_get_info
  block: fix bdrv_read_unthrottled()
  cpus: Let vm_stop[_force_state]() always flush block devices
  block-migration: efficiently encode zero blocks
  block/raw: add bdrv_co_write_zeroes
  block: add bdrv_write_zeroes()
  block: fix vvfat error path for enable_write_target
  QEMUBH: make AioContext's bh re-entrant
  dataplane: sync virtio.c and vring.c virtqueue state
  gluster: Add discard support for GlusterFS block driver.
  gluster: Use pkg-config to configure GlusterFS block driver

Message-id: 1374223132-29107-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22 10:13:34 -05:00
Anthony Liguori 293706dd68 Merge remote-tracking branch 'rth/axp-next' into staging
# By Richard Henderson
# Via Richard Henderson
* rth/axp-next:
  pc-bios: Update palcode-clipper
  target-alpha: Move alarm to vm_clock

Message-id: 1374161033-11449-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22 10:13:27 -05:00
Anthony Liguori 90c66f587c Merge remote-tracking branch 'stefanha/tracing' into staging
# By Markus Armbruster
# Via Stefan Hajnoczi
* stefanha/tracing:
  trace-events: Fix up source file comments
  trace-events: Drop unused events
  milkymist-minimac2: Fix minimac2_read/_write tracepoints
  slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints
  cleanup-trace-events.pl: New

Message-id: 1374119369-26496-1-git-send-email-stefanha@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-22 10:13:15 -05:00
Soren Brinkmann fd76663e3f hw/arm: Use 'load_ramdisk()' for loading ramdisks w/ U-Boot header
The load_ramdisk function is used to load ramdisk featuring a U-Boot
header.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373323202-17083-3-git-send-email-soren.brinkmann@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-22 12:01:37 +01:00
Soren Brinkmann 84aee0deae hw/loader: Support ramdisk with u-boot header
Introduce 'load_ramdisk()' which can load "normal" ramdisks and ramdisks
with a u-boot header.
To enable this and leverage synergies 'load_uimage()' is refactored to
accomodate this additional use case.

Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373323202-17083-2-git-send-email-soren.brinkmann@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-22 12:00:56 +01:00
Peter Maydell c8a07b355d vexpress: Add virtio-mmio transports
Add some virtio-mmio transports to the vexpress board model,
together with a modify_dtb hook which adds them to the device
tree so that the kernel will probe for them. We put them
in a reserved area of the address map.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-9-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:47 +01:00
Peter Maydell cef04a26e7 vexpress: Make VEDBoardInfo extend arm_boot_info
Make the VEDBoardInfo struct extend arm_boot_info; this will
allow us to get at the VEDBoardInfo information inside callbacks
from arm/boot code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-8-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:47 +01:00
Peter Maydell 3b1cceb8b5 arm/boot: Allow boards to modify the FDT blob
Add a callback hook in arm_boot_info to allow board models to
modify the device tree blob if they need to. (The major expected
use case is to add virtio-mmio nodes for virtio-mmio transports
that exist in QEMU but not in the hardware.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-7-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:47 +01:00
Peter Maydell 4b52530be9 virtio: Implement MMIO based virtio transport
Add support for the generic MMIO based virtio transport.

This patch includes some fixes for bugs spotted by
Ying-Shiuan Pan <yspan@itri.org.tw>.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1373977512-28932-6-git-send-email-peter.maydell@linaro.org
[Fred changes: updated to new virtio-bus mechanisms]
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
[PMM changes:
 * fixed trivial makefile conflict
 * removed unused int_enable
 * host_features doesn't need migrating
 * reset guest accessible state in the reset function
 * minor style fixes like extra blank lines
 * RAZ/WI if there's no backend
 * made transport size 0x200, in line with kvmtool
 * set has_variable_vring_alignment
]
2013-07-19 12:58:47 +01:00
Peter Maydell 6ce69d1c77 virtio: Support transports which can specify the vring alignment
Support virtio transports which can specify the vring alignment
(ie where the guest communicates this to the host) by providing
a new virtio_queue_set_align() function. (The default alignment
remains as before.)

Transports which wish to make use of this must set the
has_variable_vring_alignment field in their VirtioBusClass
struct to true; they can then change the alignment via
virtio_queue_set_align().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-5-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:46 +01:00
Peter Maydell e63c0ba1bc virtio: Add support for guest setting of queue size
The MMIO virtio transport spec allows the guest to tell the host how
large the queue size is. Add virtio_queue_set_num() function which
implements this in the QEMU common virtio support code.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1373977512-28932-4-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:46 +01:00
Peter Maydell 70976c41c1 arm/boot: Use qemu_devtree_setprop_sized_cells()
Replace the opencoded assembly of the reg property array for the
/memory node with a call to qemu_devtree_setprop_sized_cells().

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 1373977512-28932-3-git-send-email-peter.maydell@linaro.org
2013-07-19 12:58:46 +01:00
Ed Maste f5aac8e07f block/m25p80: Update Micron entries
- Split 32Mb and 256Mb parts into a11 and a13 variants.
- Add the 4K sector flag to the 128Mb parts.  (These entries were taken from
  the Linux kernel list, which is missing the flag.)
- Fill out the table of sizes with entries for 64Mb parts.

Prodded by Peter Crosthwaite.

Signed-off-by: Ed Maste <emaste@freebsd.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-07-19 12:52:03 +04:00
Stefan Hajnoczi 9154b02c53 dataplane: sync virtio.c and vring.c virtqueue state
Load the virtio.c state into vring.c when we start dataplane mode and
vice versa when stopping dataplane mode.  This patch makes it possible
to start and stop dataplane any time while the guest is running.

This will eventually allow us to go back to QEMU main loop for
bdrv_drain_all() and live migration.  In the meantime, this patch makes
the dataplane lifecycle more robust but should make no visible
difference.  It may be useful in the virtio-net dataplane effort.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-19 12:29:21 +08:00
Richard Henderson 19e0cbb82f target-alpha: Move alarm to vm_clock
Basing the alarm off the rtc_clock was silly.  It leads to horrible
spinning in the guest after being suspended and resumed, as it tries
to catch up with lost ticks.

This requires adding an accessor for reading the vm_clock too.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2013-07-18 06:44:55 -07:00
Anthony Liguori 28199c48ed vfio: enhanced VGA quirks + AER error containment
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQIcBAABAgAGBQJR5x0qAAoJECObm247sIsim6oP/0n8kUWulJ5v4YUhG6qfpj4e
 5m4PsTUxCCPHjQCeGpooCynMI7qI3fcLTHzZsEY6UrF9wBkPwr0Yjq6lup4tIZt9
 O0USvRAJQHTe/htKfnz3I5yZeRlzlavmuyAqHVJbBTKMBNmCb3omm3U+GnonUb8q
 7SGNF9+NzM+5+O9OjsL7JrShkr7FMuzGR4W5nlKoQdcUyjJpqEYwa2Gmt52atLsn
 EqGOwVi7LCQAileb1j65yWsr71Y7qvz+h8gV1TQi+zdxw09ix64lzZahcZAcgdrn
 X4RSlqQs1PbmW+ddbXj+LmeH4UdNRlimp3gCdsSaDmqmnlPlT0IcVHaJdDgv/6Ea
 SuAPf2GeuRCpHzmfBFNFvmbHus6VWpad4K63L3bXKrwiNwX9hFodpCAH8HfNusff
 szxiF5DM+1+DcpOKUd9g+/t5LChV5n2RYUWABV54UcqTUkeUy0qNpAFLiinsaL3L
 +oAHJtP+ejf3Hbs2ccygvxU8BeWH64MojGxrBgY2Yj5kfWCxEdOjS9X2iWXS9NLt
 ZdFdwH6JQ/LIfyDfE8igVFdCnH4hoA4PzG5Bzi4SZx76uW+ZGRvSaQ8kOgCMP8jq
 6MS2hu4KUMdVNnf2w8IcnoliFK3/y1kxcEbl+0hasKoyf7/7tlLDajKSi7a7DVZ7
 +r7GqWMsLDi4wzYAKMBr
 =pxjI
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'awilliam/tags/vfio-for-qemu-1.6' into staging

vfio: enhanced VGA quirks + AER error containment

# gpg: Signature made Wed 17 Jul 2013 05:39:38 PM CDT using RSA key ID 3BB08B22
# gpg: Can't check signature: public key not found

# By Alex Williamson (1) and Vijay Mohan Pandarathil (1)
# Via Alex Williamson
* awilliam/tags/vfio-for-qemu-1.6:
  vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices
  vfio-pci: VGA quirk update

Message-id: 20130717224939.4763.87264.stgit@bling.home
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:14:22 -05:00
Anthony Liguori e9acb8cea9 pci,net,pc enhancements
This includes some fixes and enhancements that accumulated in my tree:
 pci fixes by dkoch, virtio-net enhancements by akong and mst,
 and a fix for xen pc by mst.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.13 (GNU/Linux)
 
 iQEcBAABAgAGBQJR5meNAAoJECgfDbjSjVRp24IIAMOkxbb85FJ323G/x5cQBzA/
 gjFDmvB6geIMBorX1YZRnIM+RFhx+mkXtBTu2raWVTNTt5G2u3vAQQWW2zSiOTBL
 gH4BhzJnUoqLHOydWql2MsGS7DMQo4Fq8OnzRBkZ119AEEqNMad1w2LykwFWs4ra
 k3bsPNCZM+ZNiLMWtQLOcD3FYvoiISinqFd81KOnxvDiT90rczk4dLWqjv8smNif
 WqZ7aCD1hGJ5yD7JI2YjCbhVvu4F7tBK+fWkT/O3oYslh/o241lyxUriOXMKdKML
 04sNXa5eWue9cOKlbo1G+yfFwFg1JDsAMe/Usg0KXz1MMK91wiWE763ESPbFBK0=
 =P+pr
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'mst/tags/for_anthony' into staging

pci,net,pc enhancements

This includes some fixes and enhancements that accumulated in my tree:
pci fixes by dkoch, virtio-net enhancements by akong and mst,
and a fix for xen pc by mst.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

# gpg: Signature made Wed 17 Jul 2013 04:44:45 AM CDT using RSA key ID D28D5469
# gpg: Can't check signature: public key not found

# By Don Koch (2) and others
# Via Michael S. Tsirkin
* mst/tags/for_anthony:
  pc: don't access fw cfg if NULL
  virtio-net: add feature bit for any header s/g
  net: add support of mac-programming over macvtap in QEMU side
  pci: fix BRDIGE typo
  pci-bridge: update mappings for migration/restore

Message-id: 1374054430-21966-1-git-send-email-mst@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-18 08:12:47 -05:00
Markus Armbruster 0ece9671fd milkymist-minimac2: Fix minimac2_read/_write tracepoints
Broken in milkymist-minimac.c from the start (commit 0742454),
faithfully moved to milkymist-minimac2.c (commit 57aa265).

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Markus Armbruster f3a64b8c89 slavio_misc: Fix slavio_led_mem_readw/_writew tracepoints
Broken since they got added in commit 97bf485.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-07-18 11:44:42 +08:00
Vijay Mohan Pandarathil 7b4b0e9eda vfio: QEMU-AER: Qemu changes to support AER for VFIO-PCI devices
Add support for error containment when a VFIO device assigned to a KVM
guest encounters an error. This is for PCIe devices/drivers that support AER
functionality. When the host OS is notified of an error in a device either
through the firmware first approach or through an interrupt handled by the AER
root port driver, the error handler registered by the vfio-pci driver gets
invoked. The qemu process is signaled through an eventfd registered per
VFIO device by the qemu process. In the eventfd handler, qemu decides on
what action to take. In this implementation, guest is brought down to
contain the error.

The kernel patches for the above functionality has been already accepted.

This is a refresh of the QEMU patch which was reviewed earlier.
http://marc.info/?l=linux-kernel&m=136281557608087&w=2
This patch has the same contents and has been built after refreshing
to latest upstream and after the linux headers have been updated in qemu.

	- Create eventfd per vfio device assigned to a guest and register an
          event handler

	- This fd is passed to the vfio_pci driver through the SET_IRQ ioctl

	- When the device encounters an error, the eventfd is signalled
          and the qemu eventfd handler gets invoked.

	- In the handler decide what action to take. Current action taken
          is to stop the guest.

Signed-off-by: Vijay Mohan Pandarathil <vijaymohan.pandarathil@hp.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-07-15 15:49:49 -06:00
Alex Williamson 39360f0b91 vfio-pci: VGA quirk update
Turns out all the suspicions for AMD devices were correct, everywhere
we read a BAR address that the address matches the config space offset,
there's full access to PCI config space.  Attempt to generalize some
helpers to allow quirks to easily be added for mirrors and windows.
Also fill in complete config space for AMD.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2013-07-15 15:48:11 -06:00
Anthony Liguori 2562becfc1 Merge remote-tracking branch 'cohuck/virtio-ccw-upstr' into staging
# By Dominik Dingel
# Via Cornelia Huck
* cohuck/virtio-ccw-upstr:
  virtio-ccw: Enable x-data-plane for virtio-ccw-blk

Message-id: 1373903207-27085-1-git-send-email-cornelia.huck@de.ibm.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-15 14:02:41 -05:00
Anthony Liguori 1750d019ce arm-devs queue
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABCAAGBQJR5BsIAAoJEDwlJe0UNgzemaIP/1XIep/THEP6D3X96uJ21u3y
 8aVGlkkZMwPSmLm9kN6EuU8C4dwxRIVI/0QewUySdsQApiWUdes+ypeMdckgnyzi
 j/DxiGpFlqs3U4y778ELHGv7//8Mmfy1vkBY35q3tFS8+DXIwe78Dryvd+uhFb4W
 X2m0rKME145RQBiG59/P2aEYj3VTJbyjRPye0U97k7LuP3I4uW4HFxM5H6pJce8O
 /Mb4Llqtigx+MZPrI4oFrZMpHIVmn6o4VHK3TpF0vpXZGng9x5qrB9VgPwDV2O1P
 eW/RKVZFZgL91y8xSZUS1jQKzqQfJz9CjdNp+md+t14X4bRbaAZC5nNQPM7lT7nM
 xroOgEWeISRKekulhpNxE9lVI1mRo9BBPLQR1MsdQMEqMZrnGVmJaaUHAclbJVec
 YIdP2QZ+Q2WLgiz+nKlGnvQxlNEJA+0g1fGL0VHbG1J1eo6MmCbAvq/IEklH0b0y
 a0yj7yAdvmdco7Xp6bC/lPtnyS5hoFYXu3aLrCsfR/NL93P7FAP9DlL7P3hlGOMB
 mHqchMP8IDtp/fquH0AAO0D0Uh6imXR6rGDwm8yo0vud2032pIcEYNhD+J+ot7DA
 I/zL9l5r8FAg0mhzKblIWM7itV5+TXZDJ/T3ThzlhalzhNCrby/SAfmnQ/hpj+sM
 ctqNJZLG7aay+HPCStPk
 =c35i
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'pmaydell/tags/pull-arm-devs-20130715' into staging

arm-devs queue

# gpg: Signature made Mon 15 Jul 2013 10:53:44 AM CDT using RSA key ID 14360CDE
# gpg: Can't check signature: public key not found

# By Peter Maydell (4) and others
# Via Peter Maydell
* pmaydell/tags/pull-arm-devs-20130715:
  ARM/highbank: add support for Calxeda ECX-2000 / Midway
  ARM/highbank: prepare for adding similar machines
  hw/arm/vexpress: Add alias for flash at address 0 on A15 board
  hw/dma/omap_dma: Fix bugs with DMA requests above 32
  sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
  hw/cpu/a15mpcore: Correct default value for num-irq
  char/cadence_uart: Fix reset for unattached instances

Message-id: 1373904095-27592-1-git-send-email-peter.maydell@linaro.org
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-15 14:02:12 -05:00
Anthony Liguori a34001fab5 Merge remote-tracking branch 'rth/axp-next' into staging
# By Richard Henderson
# Via Richard Henderson
* rth/axp-next:
  hw/alpha: Use SRM epoch
  hw/alpha: Drop latch_tmp hack
  exec: Support 64-bit operations in address_space_rw
  hw/alpha: Don't machine check on missing pci i/o
  hw/alpha: Don't use get_system_io

Message-id: 1373840171-25556-1-git-send-email-rth@twiddle.net
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-07-15 14:00:57 -05:00
Michael S. Tsirkin d26d9e14c1 pc: don't access fw cfg if NULL
commit f8c457b88d
     "pc: pass PCI hole ranges to Guests"
broke Xen as it has no fw_cfg.
Check for this configuration and boil out.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2013-07-15 21:26:32 +03:00
Amos Kong b1be42803b net: add support of mac-programming over macvtap in QEMU side
Currently macvtap based macvlan device is working in promiscuous
mode, we want to implement mac-programming over macvtap through
Libvirt for better performance.

Design:
 QEMU notifies Libvirt when rx-filter config is changed in guest,
 then Libvirt query the rx-filter information by a monitor command,
 and sync the change to macvtap device. Related rx-filter config
 of the nic contains main mac, rx-mode items and vlan table.

This patch adds a QMP event to notify management of rx-filter change,
and adds a monitor command for management to query rx-filter
information.

Test:
 If we repeatedly add/remove vlan, and change macaddr of vlan
 interfaces in guest by a loop script.

Result:
 The events will flood the QMP client(management), management takes
 too much resource to process the events.

 Event_throttle API (set rate to 1 ms) can avoid the events to flood
 QMP client, but it could cause an unexpected delay (~1ms), guests
 guests normally expect rx-filter updates immediately.

 So we use a flag for each nic to avoid events flooding, the event
 is emitted once until the query command is executed. The flag
 implementation could not introduce unexpected delay.

There maybe exist an uncontrollable delay if we let Libvirt do the
real change, guests normally expect rx-filter updates immediately.
But it's another separate issue, we can investigate it when the
work in Libvirt side is done.

Michael S. Tsirkin: tweaked to enable events on start
Michael S. Tsirkin: fixed not to crash when no id
Michael S. Tsirkin: fold in patch:
   "additional fixes for mac-programming feature"
Amos Kong: always notify QMP client if mactable is changed
Amos Kong: return NULL list if no net client supports rx-filter query

Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2013-07-15 21:23:08 +03:00
Dominik Dingel bf72d89f0a virtio-ccw: Enable x-data-plane for virtio-ccw-blk
Add property x-data-plane to virtio-ccw-blk devices.

Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-07-15 17:39:04 +02:00
Andre Przywara b25a83f053 ARM/highbank: add support for Calxeda ECX-2000 / Midway
The Calxeda ECX-2000 chip (aka. Midway) is model-wise quite similar
to the Highbank. The most prominent difference is the Cortex-A15 CPU
core in it, together with the associated core peripherals.

Add a new ARM machine type called "midway".
Move the L2 cache controller device into the Highbank specific part,
since Midway does not have (and need) it.

Signed-off-by: Andre Przywara <andre.przywara@calxeda.com>
Message-id: 1373026897-12085-3-git-send-email-andre.przywara@calxeda.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-07-15 16:25:57 +01:00