aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-12migration: Use normal VMStateDescriptions for SubsectionsJuan Quintela32-389/+253
We create optional sections with this patch. But we already have optional subsections. Instead of having two mechanism that do the same, we can just generalize it. For subsections we just change: - Add a needed function to VMStateDescription - Remove VMStateSubsection (after removal of the needed function it is just a VMStateDescription) - Adjust the whole tree, moving the needed function to the corresponding VMStateDescription Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-06-12migration: create savevm_stateJuan Quintela1-24/+29
This way, we will put savevm global state here, instead of lots of variables. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2015-06-12migration: Remove duplicated assignment of SETUP statusJuan Quintela1-3/+0
We assign the MIGRATION_STATUS_SETUP status in two places. Just in succession. Just remove the second one. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2015-06-12rdma: Fix qemu crash when IPv6 address is used for migrationPadmanabh Ratnakar1-0/+7
Qemu crashes when IPv6 address is specified for migration and access to any RDMA uverbs device available on the system is blocked using cgroups. Fix the crash by checking the return value of ibv_open_device routine. Signed-off-by: Meghana Cheripady <meghana.cheripady@avagotech.com> Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@avagotech.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-06-12arch_init: Clean up the duplicate variable 'len' defining in ram_load()zhanghailiang1-1/+0
There are two places that define 'len' variable, It's OK for compiling, but makes it difficult for reading. Remove the local one which defined in the inside 'while' loop. Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
2015-06-12migration: reduce include filesJuan Quintela2-39/+2
To make changes easier, with the copy, I maintained almost all include files. Now I remove the unnecessary ones on this patch. This compiles on linux x64 with all architectures configured, and cross-compiles for windows 32 and 64 bits. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2015-06-12migration: Add myself to the copyright list of both filesJuan Quintela2-0/+8
If anyone feels like adding himself to the list, just sent me a patch. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2015-06-12migration: move savevm.c inside migration/Juan Quintela4-4/+3
Now, everything is in place. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2015-06-12migration: move ram stuff to migration/ramJuan Quintela7-1591/+1643
For historic reasons, ram migration have been on arch_init.c. Just split it into migration/ram.c, the same that happened with block.c. There is only code movement, no changes altogether. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
2015-06-11Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell29-188/+1214
pc, acpi, virtio Most notably this includes virtio 1 patches Still not all devices converted, and not fully spec compliant, so disabled by default. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Thu Jun 11 12:53:08 2015 BST using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (42 commits) i386/acpi-build: fix PXB workarounds for unsupported BIOSes i386/acpi-build: more traditional _UID and _HID for PXB root buses vhost-scsi: move qdev properties into vhost-scsi.c virtio-9p-device: move qdev properties into virtio-9p-device.c virtio-serial-bus: move qdev properties into virtio-serial-bus.c virtio-rng: move qdev properties into virtio-rng.c virtio-scsi: move qdev properties into virtio-scsi.c virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIES virtio-net: move qdev properties into virtio-net.c virtio-input: emulated devices [pci] virtio-input: core code & base class [pci] pci: add PCI_CLASS_INPUT_* virtio-pci: fill VirtIOPCIRegions early. virtio-pci: drop identical virtio_pci_cap virtio-pci: move cap type to VirtIOPCIRegion virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_map virtio-pci: add virtio_pci_modern_region_map() virtio-pci: add virtio_pci_modern_regions_init() virtio-pci: add struct VirtIOPCIRegion for virtio-1 regions virtio-balloon: switch to virtio_add_feature ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-11Merge remote-tracking branch 'remotes/kraxel/tags/pull-sdl-20150611-1' into ↵Peter Maydell1-0/+4
staging sdl2: fix crash in handle_windowevent() when restoring the screen size # gpg: Signature made Thu Jun 11 08:57:38 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-sdl-20150611-1: sdl2: fix crash in handle_windowevent() when restoring the screen size Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-11hw/vfio/platform: replace g_malloc0_n by g_new0Eric Auger1-2/+1
g_malloc0_n() is introduced since glib-2.24 while QEMU currently requires glib-2.22. This may cause a link error on some distributions. Signed-off-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Gonglei <arei.gonglei@huawei.com> Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-11Merge remote-tracking branch 'remotes/spice/tags/pull-spice-20150611-1' into ↵Peter Maydell1-13/+13
staging spice: fix segfault in qemu_spice_create_update, ui_info tweaks. # gpg: Signature made Thu Jun 11 08:48:49 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/spice/tags/pull-spice-20150611-1: spice: ui_info tweaks spice-display: fix segfault in qemu_spice_create_update Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-11i386/acpi-build: fix PXB workarounds for unsupported BIOSesLaszlo Ersek1-4/+4
The patch apci: fix PXB behaviour if used with unsupported BIOS uses the following condition to see if a "PXB mem/IO chunk" has *not* been configured by the BIOS: (!range_base || range_base > range_limit) When this condition evaluates to true, said patch *omits* the corresponding entry from the _CRS. Later on the patch checks for the opposite condition (with the intent of *adding* entries to the _CRS if the "PXB mem/IO chunks" *have* been configured). Unfortunately, the condition was negated incorrectly: only the first ! operator was removed, which led to the nonsensical expression (range_base || range_base > range_limit) leading to bogus entries in the _CRS, and causing BSOD in Windows Server 2012 R2 when it runs on OVMF. The correct negative of the condition seen at the top is (range_base && range_base <= range_limit) Fix the expressions. Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-11i386/acpi-build: more traditional _UID and _HID for PXB root busesLaszlo Ersek1-3/+2
The ACPI specification permits the _HID and _UID objects to evaluate to strings. (See "6.1.5 _HID (Hardware ID)" and "6.1.12 _UID (Unique ID)" in the ACPI v6.0 spec.) With regard to related standards, the UEFI specification can also express a device address composed from string _HID and _UID identifiers, inside the Expanded ACPI Device Path Node. (See "9.3.3 ACPI Device Path", Table 49, in the UEFI v2.5 spec.) However, numeric (integer) contents for both _HID and _UID are more traditional. They are recommended by the UEFI spec for size reasons: [...] the ACPI Device Path node is smaller and should be used if possible to reduce the size of device paths that may potentially be stored in nonvolatile storage [...] External tools support them better (for example the --acpi_hid and --acpi_uid options of "efibootmgr" only take numeric identifiers). Finally, numeric _HID and _UID contents are existing practice in the QEMU source. This patch was tested with a Fedora 20 LiveCD and a preexistent Windows Server 2012 R2 guest. Using "acpidump" and "iasl" in the Fedora guest, we get, in the SSDT: > Scope (\_SB) > { > Device (PC04) > { > Name (_UID, 0x04) // _UID: Unique ID > Name (_HID, EisaId ("PNP0A03") /* PCI Bus */) // _HID: Hardware ID Cc: Marcel Apfelbaum <marcel@redhat.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-11Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20150611-1' into ↵Peter Maydell1-1/+12
staging gtk: don't exit early in case gtk init fails # gpg: Signature made Thu Jun 11 10:38:29 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-gtk-20150611-1: gtk: don't exit early in case gtk init fails Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-11gtk: don't exit early in case gtk init failsGerd Hoffmann1-1/+12
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2015-06-11spice: ui_info tweaksGerd Hoffmann1-9/+8
Use the new dpy_ui_info_supported function. Clarifies the control flow. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-11spice-display: fix segfault in qemu_spice_create_updateGerd Hoffmann1-4/+5
Although it is pretty unusual the stride for the guest image and the mirror image maintained by spice-display can be different. So use separate variables for them. https://bugzilla.redhat.com/show_bug.cgi?id=1163047 Cc: qemu-stable@nongnu.org Reported-by: perrier vincent <clownix@clownix.net> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-06-10Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20150610-1' into ↵Peter Maydell7-48/+1333
staging stdvga: factor out mmio subregion init virtio-gpu: add virtio gpu core code, 2d mode # gpg: Signature made Wed Jun 10 10:03:11 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-vga-20150610-1: virtio-gpu/2d: add virtio gpu core code virtio: update headers, add virtio-gpu (2d) stdvga: factor out mmio subregion init stdvga: pass VGACommonState instead of PCIVGAState stdvga: fix offset in pci_vga_ioport_read Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-06-10vhost-scsi: move qdev properties into vhost-scsi.cShannon Zhao2-10/+8
As only one place in vhost-scsi.c uses DEFINE_VHOST_SCSI_PROPERTIES, there is no need to expose it. Inline it into vhost-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-9p-device: move qdev properties into virtio-9p-device.cShannon Zhao2-5/+2
As only one place in virtio-9p-device.c uses DEFINE_VIRTIO_9P_PROPERTIES, there is no need to expose it. Inline it into virtio-9p-device.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-serial-bus: move qdev properties into virtio-serial-bus.cShannon Zhao2-4/+2
As only one place in virtio-serial-bus.c uses DEFINE_VIRTIO_SERIAL_PROPERTIES, there is no need to expose it. Inline it into virtio-serial-bus.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-rng: move qdev properties into virtio-rng.cShannon Zhao2-11/+7
As only one place in virtio-rng.c uses DEFINE_VIRTIO_RNG_PROPERTIES, there is no need to expose it. Inline it into virtio-rng.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-scsi: move qdev properties into virtio-scsi.cShannon Zhao2-15/+11
As only one place in virtio-scsi.c uses DEFINE_VIRTIO_SCSI_PROPERTIES and DEFINE_VIRTIO_SCSI_FEATURES, there is no need to expose them. Inline them into virtio-scsi.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-net.h: Remove unsed DEFINE_VIRTIO_NET_PROPERTIESShannon Zhao1-6/+1
Remove unsed DEFINE_VIRTIO_NET_PROPERTIES in virtio-net.h and delete a space typo. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-net: move qdev properties into virtio-net.cShannon Zhao2-26/+42
As only one place in virtio-net.c uses DEFINE_VIRTIO_NET_FEATURES, there is no need to expose it. Inline it into virtio-net.c to avoid wrongly use. Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-input: emulated devices [pci]Gerd Hoffmann2-0/+97
This patch adds virtio-pci support for the emulated virtio-input devices. Using them is as simple as adding "-device virtio-tablet-pci" to your command line. If you want add multiple devices but don't want waste a pci slot for each you can compose a multifunction device this way: qemu -device virtio-keyboard-pci,addr=0d.0,multifunction=on \ -device virtio-tablet-pci,addr=0d.1,multifunction=on Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-input: core code & base class [pci]Gerd Hoffmann2-0/+50
This patch adds the virtio-pci support bits for virtio-input-device. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10pci: add PCI_CLASS_INPUT_*Gerd Hoffmann1-0/+7
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: fill VirtIOPCIRegions early.Gerd Hoffmann2-41/+55
Initialize the modern bar and the VirtIOPCIRegion fields early, in realize. Also add a size field to VirtIOPCIRegion and variables for pci bars to VirtIOPCIProxy. This allows virtio-pci subclasses to change things before the device_plugged callback applies them. virtio-vga will use that to arrange regions in a way that virtio-vga is compatible to both stdvga (in vga mode) and virtio-gpu-pci (in pci mode). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: drop identical virtio_pci_capGerd Hoffmann1-13/+5
Now the three struct virtio_pci_caps are identical, lets drop two of them ;) Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: move cap type to VirtIOPCIRegionGerd Hoffmann2-4/+6
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: move virtio_pci_add_mem_cap call to virtio_pci_modern_region_mapGerd Hoffmann1-18/+10
Also fill offset and length automatically, from VirtIOPCIRegion->offset and region size. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: add virtio_pci_modern_region_map()Gerd Hoffmann2-6/+20
Add function to map modern virtio regions. Add offset to VirtIOPCIRegion. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: add virtio_pci_modern_regions_init()Gerd Hoffmann1-58/+59
Add init function for the modern pci regions, move over the init code. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: add struct VirtIOPCIRegion for virtio-1 regionsGerd Hoffmann2-13/+19
For now just place the MemoryRegion there, following patches will add more. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-balloon: switch to virtio_add_featureCornelia Huck1-1/+1
This was missed during the conversion of feature bit manipulation. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio_balloon: header updateMichael S. Tsirkin1-0/+6
add modern header Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: correctly set host notifiers for modern barJason Wang1-6/+25
Currently, during host notifier set. We only add eventfd for legacy bar, this is not correct since: - Non-transitional device does not have legacy bar, so qemu will crash since proxy->bar was not initialized. - Modern device uses modern bar and notify cap to notify the device, we should add eventfd for proxy->notify. So this patch fixes the above two issues by adding eventfd based on whether legacy or modern device were supported. Signed-off-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: make modern bar 64bit + prefetchableGerd Hoffmann1-1/+3
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: change & document virtio pci bar layout.Gerd Hoffmann1-6/+25
This patch adds variables for the pci bars (to get rid of the magic numbers in the code) and moves the modern virtio bar to region 4 so regions 2+3 are kept free. virtio-vga wants use them. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: make QEMU_VIRTIO_PCI_QUEUE_MEM_MULT smallerGerd Hoffmann1-1/+1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: add flags to enable/disable legacy/modernGerd Hoffmann2-13/+39
Add VIRTIO_PCI_FLAG_DISABLE_LEGACY and VIRTIO_PCI_FLAG_DISABLE_MODERN for VirtIOPCIProxy->flags. Also add properties for them. They can be used to disable modern (virtio 1.0) or legacy (virtio 0.9) modes. By default only legacy is advertized, modern will be turned on by default once all remaining spec compilance issues are addressed. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: switch to modern accessors for 1.0Michael S. Tsirkin1-6/+6
virtio 1.0 config space is in LE format for all devices, use modern wrappers when accessed through the 1.0 BAR. Reported-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio: add modern config accessorsMichael S. Tsirkin2-0/+105
virtio 1.0 defines config space as LE, as opposed to pre-1.0 which was native endian. Add API for transports to execute word/dword accesses in little endian format - will be useful for mmio and pci (byte access is also wrapped, for completeness). For simplicity, we still keep config in host native endian format, byteswap to LE on guest access. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio: generation counter supportMichael S. Tsirkin3-1/+3
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10virtio-pci: initial virtio 1.0 supportMichael S. Tsirkin2-0/+395
This is somewhat functional. With this, and linux driver from my tree, I was able to use virtio net as virtio 1.0 device for light browsing. At the moment, dataplane and vhost code is still missing. Based on Cornelia's virtio 1.0 patchset: Date: Thu, 11 Dec 2014 14:25:02 +0100 From: Cornelia Huck <cornelia.huck@de.ibm.com> To: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org Cc: rusty@rustcorp.com.au, thuth@linux.vnet.ibm.com, mst@redhat.com, Cornelia Huck <cornelia.huck@de.ibm.com> Subject: [PATCH RFC v6 00/20] qemu: towards virtio-1 host support Message-Id: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> which is itself still missing some core bits. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10linux-headers: add virtio_pciMichael S. Tsirkin2-0/+194
Easier than duplicating code. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
2015-06-10vhost: 64 bit featuresCornelia Huck4-18/+18
Make sure that all vhost interfaces use 64 bit features, as the virtio core does, and make sure to use ULL everywhere possible to be on the safe side. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>