* [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
@ 2018-03-08 12:52 ` Igor Druzhinin
0 siblings, 0 replies; 8+ messages in thread
From: Igor Druzhinin @ 2018-03-08 12:52 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Igor Druzhinin, sstabellini, mst, paul.durrant, anthony.perard, pbonzini
This should help to avoid problems with accessing the device after
migration/resume without PV drivers. Older systems will acquire
the new record when migrated which should not change their state for
worse.
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
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 c093b34..ef22a03 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 = {
--
2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
2018-03-08 12:52 ` Igor Druzhinin
@ 2018-03-08 12:53 ` Paul Durrant
-1 siblings, 0 replies; 8+ messages in thread
From: Paul Durrant @ 2018-03-08 12:53 UTC (permalink / raw)
To: Igor Druzhinin, qemu-devel, xen-devel
Cc: sstabellini, Anthony Perard, mst, pbonzini
> -----Original Message-----
> From: Igor Druzhinin [mailto:igor.druzhinin@citrix.com]
> Sent: 08 March 2018 12:53
> To: qemu-devel@nongnu.org; xen-devel@lists.xenproject.org
> Cc: sstabellini@kernel.org; Paul Durrant <Paul.Durrant@citrix.com>; Anthony
> Perard <anthony.perard@citrix.com>; mst@redhat.com;
> pbonzini@redhat.com; Igor Druzhinin <igor.druzhinin@citrix.com>
> Subject: [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save
> state
>
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> 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 c093b34..ef22a03 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 = {
> --
> 2.7.4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
@ 2018-03-08 12:53 ` Paul Durrant
0 siblings, 0 replies; 8+ messages in thread
From: Paul Durrant @ 2018-03-08 12:53 UTC (permalink / raw)
To: qemu-devel, xen-devel
Cc: Anthony Perard, pbonzini, Igor Druzhinin, sstabellini, mst
> -----Original Message-----
> From: Igor Druzhinin [mailto:igor.druzhinin@citrix.com]
> Sent: 08 March 2018 12:53
> To: qemu-devel@nongnu.org; xen-devel@lists.xenproject.org
> Cc: sstabellini@kernel.org; Paul Durrant <Paul.Durrant@citrix.com>; Anthony
> Perard <anthony.perard@citrix.com>; mst@redhat.com;
> pbonzini@redhat.com; Igor Druzhinin <igor.druzhinin@citrix.com>
> Subject: [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save
> state
>
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
> ---
> 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 c093b34..ef22a03 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 = {
> --
> 2.7.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
2018-03-08 12:52 ` Igor Druzhinin
@ 2018-03-09 17:14 ` Anthony PERARD
-1 siblings, 0 replies; 8+ messages in thread
From: Anthony PERARD @ 2018-03-09 17:14 UTC (permalink / raw)
To: Igor Druzhinin
Cc: qemu-devel, xen-devel, sstabellini, paul.durrant, mst, pbonzini
On Thu, Mar 08, 2018 at 12:52:31PM +0000, Igor Druzhinin wrote:
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
@ 2018-03-09 17:14 ` Anthony PERARD
0 siblings, 0 replies; 8+ messages in thread
From: Anthony PERARD @ 2018-03-09 17:14 UTC (permalink / raw)
To: Igor Druzhinin
Cc: sstabellini, mst, qemu-devel, paul.durrant, pbonzini, xen-devel
On Thu, Mar 08, 2018 at 12:52:31PM +0000, Igor Druzhinin wrote:
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Thanks,
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
2018-03-08 12:52 ` Igor Druzhinin
` (2 preceding siblings ...)
(?)
@ 2018-03-11 21:05 ` Stefano Stabellini
-1 siblings, 0 replies; 8+ messages in thread
From: Stefano Stabellini @ 2018-03-11 21:05 UTC (permalink / raw)
To: Igor Druzhinin
Cc: sstabellini, mst, qemu-devel, paul.durrant, pbonzini,
anthony.perard, xen-devel
On Thu, 8 Mar 2018, Igor Druzhinin wrote:
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
Could you please explain what problems this patch is helping avoid? And
also how this patch is helping exactly?
Please add more concrete info.
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
> 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 c093b34..ef22a03 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 = {
> --
> 2.7.4
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH] xen-pvdevice: Introduce a simplistic xen-pvdevice save state
2018-03-08 12:52 ` Igor Druzhinin
` (3 preceding siblings ...)
(?)
@ 2018-03-11 21:05 ` Stefano Stabellini
-1 siblings, 0 replies; 8+ messages in thread
From: Stefano Stabellini @ 2018-03-11 21:05 UTC (permalink / raw)
To: Igor Druzhinin
Cc: qemu-devel, xen-devel, sstabellini, paul.durrant, anthony.perard,
mst, pbonzini
On Thu, 8 Mar 2018, Igor Druzhinin wrote:
> This should help to avoid problems with accessing the device after
> migration/resume without PV drivers. Older systems will acquire
> the new record when migrated which should not change their state for
> worse.
Could you please explain what problems this patch is helping avoid? And
also how this patch is helping exactly?
Please add more concrete info.
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
> 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 c093b34..ef22a03 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 = {
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 8+ messages in thread