summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-03-26Merge remote-tracking branch 'quintela/migration.next' into stagingAnthony Liguori1-0/+6
# By Peter Lieven (9) and others # Via Juan Quintela * quintela/migration.next: (22 commits) Use qemu_put_buffer_async for guest memory pages Add qemu_put_buffer_async Use writev ops if available Store the data to send also in iovec Update bytes_xfer in qemu_put_byte Add socket_writev_buffer function Add QemuFileWritevBuffer QemuFileOps migration: use XBZRLE only after bulk stage migration: do not search dirty pages in bulk stage migration: do not sent zero pages in bulk stage migration: add an indicator for bulk state of ram migration migration: search for zero instead of dup pages bitops: unroll while loop in find_next_bit() buffer_is_zero: use vector optimizations if possible cutils: add a function to find non-zero content in a buffer move vector definitions to qemu-common.h savevm: Fix bugs in the VMSTATE_VBUFFER_MULTIPLY definition savevm: Add VMSTATE_STRUCT_VARRAY_POINTER_UINT32 savevm: Add VMSTATE_FLOAT64 helpers savevm: Add VMSTATE_UINTTL_EQUAL helper ...
2013-03-26virtio-ccw: Queue sanity check for notify hypercall.Cornelia Huck1-0/+3
Verify that the virtio-ccw notify hypercall passed a reasonable value for queue. Cc: qemu-stable@nongnu.org Reported-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-03-26hw/qdev: Abort rather than ignoring errors adding device propertiesPeter Maydell1-3/+7
Instead of ignoring any errors that occur when adding properties to a new device in device_initfn(), check for them and abort if any occur. The most likely cause is accidentally adding a duplicate property, which is a programming error by the device author. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1364217314-7400-3-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26hw/qdev-properties.c: Improve diagnostic for setting property after realizePeter Maydell5-17/+43
Now we have error_setg() we can improve the error message emitted if you attempt to set a property of a device after the device is realized (the previous message was "permission denied" which was not very informative). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1364218844-7509-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: cleanup: remove qdev field.KONRAD Frederic2-3/+0
The qdev field is no longer needed. Just drop it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-11-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: cleanup: init and exit functions.KONRAD Frederic1-50/+10
This remove old init and exit function as they are no longer needed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-10-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: cleanup: use QOM casts.KONRAD Frederic2-21/+27
As the virtio-scsi-pci and virtio-scsi-s390 are switched to the new API, we can use QOM casts. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-9-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi-ccw: switch to new APIKONRAD Frederic2-13/+26
Here the virtio-scsi-ccw is modified for the new API. The device virtio-scsi-ccw extends virtio-ccw-device as before. It creates and connects a virtio-scsi during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi-s390: switch to the new API.KONRAD Frederic2-9/+27
Here the virtio-scsi-s390 is modified for the new API. The device virtio-scsi-s390 extends virtio-s390-device as before. It creates and connects a virtio-scsi during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi-pci: switch to new API.KONRAD Frederic2-60/+71
Here the virtio-scsi-pci is modified for the new API. The device virtio-scsi-pci extends virtio-pci. It creates and connects a virtio-scsi during the init. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: add the virtio-scsi device.KONRAD Frederic2-5/+85
Create virtio-scsi which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: moving host_features from properties to transport properties.KONRAD Frederic4-10/+17
host_features field is part of the transport device. So move all the host_features related properties into transport device. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: allocate cmd_vqs array separately.KONRAD Frederic2-4/+5
Allocate/Free the cmd_vqs array separately to have a fixed size device. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26virtio-scsi: don't use pointer for configuration.KONRAD Frederic2-8/+8
The configuration field must not be a pointer as it will be used for virtio-scsi properties. So *conf is replaced by conf. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Message-id: 1363875320-7985-2-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-26savevm: Add VMSTATE_UINTTL_EQUAL helperDavid Gibson1-0/+6
This adds an _EQUAL VMSTATE helper for target_ulongs, defined in terms of VMSTATE_UINT32_EQUAL or VMSTATE_UINT64_EQUAL as appropriate. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Juan Quintela <quintela@redhat.com>
2013-03-25VMXNET3 device implementationDmitry Fleytman4-0/+3223
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Yan Vugenfirer <yan@daynix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-25Packet abstraction for VMWARE network devicesDmitry Fleytman5-0/+1077
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Yan Vugenfirer <yan@daynix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-25Common definitions for VMWARE devicesDmitry Fleytman2-0/+258
Signed-off-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Yan Vugenfirer <yan@daynix.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-24Remove device_tree.o from hw/moxie/Makefile.objs.Anthony Green1-1/+0
Here's a fix for the build problem identified by Aurelien Jarno here: http://lists.gnu.org/archive/html/qemu-devel/2013-03/msg04177.html Signed-off-by: Anthony Green <green@moxielogic.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-03-23Add sample moxie systemAnthony Green2-0/+180
Signed-off-by: Anthony Green <green@moxielogic.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-03-23Merge branch 'for-upstream' of git://github.com/mwalle/qemuBlue Swirl4-3/+5
* 'for-upstream' of git://github.com/mwalle/qemu: configure: rename OpenGL feature to GLX configure: proper OpenGL/GLX probe target-lm32: use HELPER() macro target-lm32: flush tlb after clearing env target-lm32: remove dead code target-lm32: fix cmpgui and cmpgeui opcodes tests: tcg: lm32: add more test cases target-lm32: don't log cpu state in translation lm32_uart: fix receive buffering milkymist-uart: fix receive buffering lm32-dis: fix NULL pointer dereference target-lm32: fix debug memory access
2013-03-22Merge branch 'ppc-for-upstream' of git://github.com/agraf/qemuAurelien Jarno6-118/+94
* 'ppc-for-upstream' of git://github.com/agraf/qemu: (58 commits) target-ppc: Use NARROW_MODE macro for tlbie target-ppc: Use NARROW_MODE macro for addresses target-ppc: Use NARROW_MODE macro for comparisons target-ppc: Use NARROW_MODE macro for branches target-ppc: Fix add and subf carry generation in narrow mode target-ppc: Use QOM method dispatch for MMU fault handling target-ppc: Move ppc tlb_fill implementation into mmu_helper.c target-ppc: Split user only code out of mmu_helper.c mmu-hash64: Implement Virtual Page Class Key Protection mmu-hash*: Merge translate and fault handling functions mmu-hash*: Don't use full ppc_hash{32, 64}_translate() path for get_phys_page_debug() mmu-hash*: Correctly mask RPN from hash PTE mmu-hash*: Clean up real address calculation mmu-hash*: Clean up PTE flags update mmu-hash64: Factor SLB N bit into permissions bits mmu-hash*: Clean up permission checking mmu-hash32: Remove nx from context structure mmu-hash*: Don't update PTE flags when permission is denied mmu-hash32: Don't look up page tables on BAT permission error mmu-hash32: Cleanup BAT lookup ...
2013-03-22Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori5-7/+6
# By liguang (2) and others # Via Stefan Hajnoczi * stefanha/trivial-patches: qdev: remove redundant abort() gitignore: ignore more files Use proper term in TCG README serial: Fix debug format strings Fix typos and misspellings Advertise --libdir in configure --help output memory: fix a bug of detection of memory region collision MinGW: Replace setsockopt by qemu_setsocketopt
2013-03-22qdev: remove redundant abort()liguang1-2/+1
Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-22mmu-hash*: Add hash pte load/store helpersDavid Gibson1-19/+19
On real hardware the ppc hash page table is stored in memory; accordingly our mmu emulation code can read a hash page table in guest memory. But, when paravirtualized under PAPR, the real hash page table is in host memory, accessible to the guest only via hypercalls. We model this by also allowing the MMU emulation code to access a specially allocated hash page table outside the guest's memory image. At present these two options are implemented with some ugly conditionals at each access point in the mmu emulation code. In the implementation of the PAPR hypercalls, we assume the external hash table. This patch cleans things up by adding helpers to load and store from the hash table for both 32-bit and 64-bit hash mmus. The 64-bit versions handle both the in-guest-memory and outside guest memory cases. The 32-bit versions only handle the in-guest-memory case since no 32-bit systems can have an external hash table at present. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-03-22mmu-hash*: Add header file for definitionsDavid Gibson1-51/+19
Currently cpu.h contains a number of definitions relating to the 64-bit hash MMU. Some are used in the MMU emulation code, but some are only used in the spapr MMU management hcall implementations. This patch moves these definitions (except for a few that are needed more widely) into mmu-hash64.h header, shared between the MMU emulation code and the spapr hcall code. The MMU emulation code is also updated to actually use a number of those definitions in place of hard coded constants. Similarly, we add new analogous definitions to mmu-hash32.h and use those in place of many hard-coded constants in mmu-hash32.c Signed-off-by: David Gibson <david@gibson.dropbear.id.au> [agraf: fix 32-bit hosts] Signed-off-by: Alexander Graf <agraf@suse.de>
2013-03-22pseries: Move XICS initialization before cpu initializationDavid Gibson3-38/+34
Currently, the pseries machine initializes the cpus, then the XICS interrupt controller. However, to support the upcoming in-kernel XICS implementation we will need to initialize the irq controller before the vcpus. This patch makes the necesssary rearrangement. This means the xics init code can no longer auto-detect the number of cpus ("interrupt servers" in XICS terminology) and so we must pass that in explicitly from the platform code. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-03-22pseries: Remove "busname" property for PCI host bridgeDavid Gibson3-12/+24
Currently the "spapr-pci-host-bridge" device has a "busname" property which can be used to override the default assignment of qbus names for the bus subordinate to the PHB. We use that for the default primary PCI bus, to make libvirt happy, which expects there to be a bus named simply "pci". The default qdev core logic would name the bus "pci.0", and the pseries code would otherwise name it "pci@800000020000000" which is the name it is given in the device tree based on its BUID. The "busname" property is rather clunky though, so this patch simplifies things by just using a special case hack for the default PHB, setting busname to "pci" when index=0. 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>
2013-03-22pseries: Fix breakage in CPU QOM conversionDavid Gibson1-1/+1
Commit 259186a7d2f7184efc96ae99bc5658e6159f53ad "cpu: Move halted and interrupt_request fields to CPUState" broke the pseries machine. That's because it uses CPU() instead of ENV_GET_CPU() to convert from the global first_cpu pointer (still a CPUArchState) to a CPUState. This patch fixes the breakage. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
2013-03-22serial: Fix debug format stringsKevin Wolf1-2/+2
This fixes the build of hw/serial.c with DEBUG_SERIAL enabled. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-22Fix typos and misspellingsPeter Maydell3-3/+3
Fix various typos and misspellings. The bulk of these were found with codespell. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-03-20virtio-ccw, s390-virtio: Use generic virtio-blk macro.Cornelia Huck2-14/+2
Now that virtio-ccw and s390-virtio define all common properties for virtio-blk, we can switch to using the generic DEFINE_VIRTIO_BLK_PROPERTIES macro. CC: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-03-20s390-virtio, virtio-ccw: Add config_wce for virtio-blk.Cornelia Huck2-0/+2
There's no reason why we wouldn't want to make the cache mode configurable. Acked-by: Alexander Graf <agraf@suse.de> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-03-20virtio-ccw: Add missing blk chs properties.Cornelia Huck1-0/+1
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2013-03-19Merge remote-tracking branch 'kraxel/ipxe.2' into stagingAnthony Liguori6-7/+27
# By Gerd Hoffmann # Via Gerd Hoffmann * kraxel/ipxe.2: Switch to efi-enabled nic roms by default Add efi rom binaries Add Makefile rules to build nic rom binaries with efi support Update ipxe submodule to latest master Add Makefile rules to build nic rom binaries
2013-03-19virtio-blk: Do not segfault fault if failed to initialize dataplaneDunrong Huang1-1/+1
$ ~/usr/bin/qemu-system-x86_64 -enable-kvm -m 1024 -drive if=none,id=drive0,cache=none,aio=native,format=raw,file=/root/Image/centos-6.4.raw -device virtio-blk-pci,drive=drive0,scsi=off,x-data-plane=on,config-wce=on # make dataplane fail to initialize qemu-system-x86_64: -device virtio-blk-pci,drive=drive0,scsi=off,x-data-plane=on,config-wce=on: device is incompatible with x-data-plane, use config-wce=off *** glibc detected *** /root/usr/bin/qemu-system-x86_64: free(): invalid pointer: 0x00007f001fef12f8 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x7d776)[0x7f00153a5776] /root/usr/bin/qemu-system-x86_64(+0x2c34ec)[0x7f001cf5b4ec] /root/usr/bin/qemu-system-x86_64(+0x342f9a)[0x7f001cfdaf9a] /root/usr/bin/qemu-system-x86_64(+0x33694e)[0x7f001cfce94e] .................... (gdb) bt #0 0x00007f3bf3a12015 in raise () from /lib64/libc.so.6 #1 0x00007f3bf3a1348b in abort () from /lib64/libc.so.6 #2 0x00007f3bf3a51a4e in __libc_message () from /lib64/libc.so.6 #3 0x00007f3bf3a57776 in malloc_printerr () from /lib64/libc.so.6 #4 0x00007f3bfb60d4ec in free_and_trace (mem=0x7f3bfe0129f8) at vl.c:2786 #5 0x00007f3bfb68cf9a in virtio_cleanup (vdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio.c:900 #6 0x00007f3bfb68094e in virtio_blk_device_init (vdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio-blk.c:666 #7 0x00007f3bfb68dadf in virtio_device_init (qdev=0x7f3bfe0129f8) at /root/Develop/QEMU/qemu/hw/virtio.c:1092 #8 0x00007f3bfb50da46 in device_realize (dev=0x7f3bfe0129f8, err=0x7fff479c9258) at hw/qdev.c:176 ............................. In virtio_blk_device_init(), the memory which vdev point to is a static member of "struct VirtIOBlkPCI", not heap memory, and it does not get freed. So we shoule use virtio_common_cleanup() to clean this VirtIODevice rather than virtio_cleanup(), which attempts to free the vdev. This error was introduced by commit 05ff686536f408ba6e8426b1b54d25bd3379fda2 recently. Signed-off-by: Dunrong Huang <huangdr@cloud-times.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2013-03-18configure: rename OpenGL feature to GLXMichael Walle2-3/+3
As the probe now actually checks for the availability of GLX, rename it accordingly. The only user of this feature is the milkymist-tmu2 model. Signed-off-by: Michael Walle <michael@walle.cc>
2013-03-18lm32_uart: fix receive bufferingMichael Walle1-0/+1
Inform qemu-char when more input data can be received. Signed-off-by: Michael Walle <michael@walle.cc>
2013-03-18milkymist-uart: fix receive bufferingMichael Walle1-0/+1
Inform qemu-char when more input data can be received. Signed-off-by: Michael Walle <michael@walle.cc>
2013-03-18virtio-blk: cleanup: remove qdev field.KONRAD Frederic2-3/+1
The qdev field is no longer needed, just drop it. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-12-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk: cleanup: QOM castKONRAD Frederic2-20/+15
Use QOM casts inside virtio-blk. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-11-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk: cleanup: init and exit functions.KONRAD Frederic2-66/+21
As all virtio-blk-* are switched to the new API, we can remove the separate init/exit for the old API. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-10-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk-ccw switch to new API.KONRAD Frederic2-16/+31
Here the virtio-ccw-s390 is modified for the new API. The device virtio-ccw-s390 extends virtio-ccw-device as before. It creates and connects a virtio-ccw during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-9-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk-s390: switch to the new API.KONRAD Frederic2-12/+31
Here the virtio-blk-s390 is modified for the new API. The device virtio-blk-s390 extends virtio-s390-device as before. It creates and connects a virtio-blk during the init. The properties are not modified. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-8-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk-pci: switch to new API.KONRAD Frederic2-65/+71
Here the virtio-blk-pci is modified for the new API. The device virtio-blk-pci extends virtio-pci. It creates and connects a virtio-blk during the init. The properties are not changed. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-7-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk: add the virtio-blk device.KONRAD Frederic3-12/+115
Create virtio-blk which extends virtio-device, so it can be connected on virtio-bus. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-6-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-blk: don't use pointer for configuration.KONRAD Frederic2-5/+5
The configuration field must not be a pointer as it will be used for virtio-blk properties. So *blk is replaced by blk in VirtIOBlock structure. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1363624648-16906-5-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-pci: fix hot unplug.KONRAD Frederic1-12/+1
Hot unplug failed because it tried to free the virtio device two times. This fix the issue by removing the call to virtio_bus_destroy_device. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1363624648-16906-4-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio-x-bus: fix allow_hotplug assertion.KONRAD Frederic3-3/+3
This set allow_hotplug for each existing virtio-x-bus, allowing the refactored devices to be hot pluggable. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Message-id: 1363624648-16906-3-git-send-email-fred.konrad@greensocs.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-03-18virtio: make virtio device's structures public.KONRAD Frederic12-160/+159
These structures must be made public to avoid two memory allocations for refactored virtio devices. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1363624648-16906-2-git-send-email-fred.konrad@greensocs.com Changes V4 <- V3: * Rebased on current git. Changes V3 <- V2: * Style correction spotted by Andreas (virtio-scsi.h). * Style correction for virtio-net.h. Changes V2 <- V1: * Move the dataplane include into the header (virtio-blk). Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>