[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 01/15] xen-pvdevice: Introduce a simplistic xen-pvdev
From: |
Stefano Stabellini |
Subject: |
[Qemu-devel] [PULL 01/15] xen-pvdevice: Introduce a simplistic xen-pvdevice save state |
Date: |
Mon, 21 May 2018 12:34:50 -0700 |
From: Igor Druzhinin <address@hidden>
This should help to avoid problems with accessing the device after
migration/resume without PV drivers by migrating its PCI configuration
space state. Without an explicitly defined state record it resets
every time a VM migrates which confuses the OS and makes every
access to xen-pvdevice MMIO region to fail. PV tools enable some
logic to save and restore PCI configuration state from within the VM
every time it migrates which basically hides the issue.
Older systems will acquire the new record when migrated which should
not change their state for worse.
Signed-off-by: Igor Druzhinin <address@hidden>
Reviewed-by: Paul Durrant <address@hidden>
Acked-by: Anthony PERARD <address@hidden>
Signed-off-by: Stefano Stabellini <address@hidden>
---
hw/i386/xen/xen_pvdevice.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/i386/xen/xen_pvdevice.c b/hw/i386/xen/xen_pvdevice.c
index f748823..a146f18 100644
--- a/hw/i386/xen/xen_pvdevice.c
+++ b/hw/i386/xen/xen_pvdevice.c
@@ -71,6 +71,16 @@ static const MemoryRegionOps xen_pv_mmio_ops = {
.endianness = DEVICE_LITTLE_ENDIAN,
};
+static const VMStateDescription vmstate_xen_pvdevice = {
+ .name = "xen-pvdevice",
+ .version_id = 1,
+ .minimum_version_id = 1,
+ .fields = (VMStateField[]) {
+ VMSTATE_PCI_DEVICE(parent_obj, XenPVDevice),
+ VMSTATE_END_OF_LIST()
+ }
+};
+
static void xen_pv_realize(PCIDevice *pci_dev, Error **errp)
{
XenPVDevice *d = XEN_PV_DEVICE(pci_dev);
@@ -120,6 +130,7 @@ static void xen_pv_class_init(ObjectClass *klass, void
*data)
k->class_id = PCI_CLASS_SYSTEM_OTHER;
dc->desc = "Xen PV Device";
dc->props = xen_pv_props;
+ dc->vmsd = &vmstate_xen_pvdevice;
}
static const TypeInfo xen_pv_type_info = {
--
1.9.1
- [Qemu-devel] [PULL 00/15] xen-20180521-tag, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 04/15] xen_pt: Present the size of 64 bit BARs correctly, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 01/15] xen-pvdevice: Introduce a simplistic xen-pvdevice save state,
Stefano Stabellini <=
- [Qemu-devel] [PULL 11/15] xen_backend: add an emulation of grant copy, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 05/15] xen-hvm: create separate function for ioreq server initialization, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 03/15] configure: Add explanation for --enable-xen-pci-passthrough, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 08/15] xen_backend: add grant table helpers, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 10/15] xen: remove other open-coded use of libxengnttab, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 09/15] xen_disk: remove open-coded use of libxengnttab, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 12/15] xen_disk: remove use of grant map/unmap, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 07/15] xen: add a meaningful declaration of grant_copy_segment into xen_common.h, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 13/15] xen_backend: make the xen_feature_grant_copy flag private, Stefano Stabellini, 2018/05/21
- [Qemu-devel] [PULL 02/15] xen/pt: use address_space_memory object for memory region hooks, Stefano Stabellini, 2018/05/21