Skip to contentSkip to conversation

libxc: move migration_stream's definition to xenguest.h

PATCH Superseded Wen Congyang 2 participants 3 messages Mar 8, 2016

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxc: move migration_stream's definition to xenguest.h

xc_save_domain()'s parameter use this type, so it should be public.

---
 tools/libxc/include/xenguest.h | 10 ++++++++++
 tools/libxc/xc_sr_common.h     | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
tools/libxc/include/xenguest.h +5 -0
index affc42b..888536e 100644
@@ -238,4 +238,9 @@ xen_pfn_t *xc_map_m2p(xc_interface *xch,
                       unsigned long max_mfn,
                       int prot,
                       unsigned long *mfn0);
+
+typedef enum {
+    MIG_STREAM_NONE, /* plain stream */
+    MIG_STREAM_REMUS,
+} migration_stream;
 #endif /* XENGUEST_H */
tools/libxc/xc_sr_common.h +0 -10
index 66f595f..e7568b5 100644
@@ -180,16 +180,6 @@ struct xc_sr_context
 
     xc_dominfo_t dominfo;
 
-    /*
-     * migration stream
-     * 0: Plain VM
-     * 1: Remus
-     */
-    enum {
-        MIG_STREAM_NONE, /* plain stream */
-        MIG_STREAM_REMUS,
-    } migration_stream;
-
     union /* Common save or restore data. */
     {
         struct /* Save data. */
Signature · 8 lines
2.5.0



_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#1 lore raw
Quoted 2 lines · Wen Congyang

xc_save_domain()'s parameter use this type, so it should be public.

xc_domain_save() currently uses an int, which also needs fixing.

Quoted 2 lines

Does this even compile? You have removed a variable without any replacement.

Quoted 10 lines
---
 tools/libxc/include/xenguest.h | 10 ++++++++++
 tools/libxc/xc_sr_common.h     | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
tools/libxc/include/xenguest.h +0 -0
index affc42b..888536e 100644

tools/libxc/include/xenguest.h xen_pfn_t *xc_map_m2p(xc_interface *xch, · line 245

Quoted 8 lines
tools/libxc/include/xenguest.h +5 -0
@@ -238,4 +238,9 @@ xen_pfn_t *xc_map_m2p(xc_interface *xch,
                       unsigned long max_mfn,
                       int prot,
                       unsigned long *mfn0);
+
+typedef enum {
+    MIG_STREAM_NONE, /* plain stream */
+    MIG_STREAM_REMUS,
+} migration_stream;

This typedef should be beside xc_domain_save() as that is where it is intended to be used. It also needs xc_ prefixes as it is part of the public interface, and a typedef wants a _t suffix.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#2 lore raw
Quoted 5 lines · Andrew Cooper
Quoted 2 lines · Wen Congyang

xc_save_domain()'s parameter use this type, so it should be public.

xc_domain_save() currently uses an int, which also needs fixing.

OK. Will fix it in the next version.

Quoted 6 lines
Quoted 3 lines

Does this even compile? You have removed a variable without any replacement.

Yes, I compile it. The variable is not used.

Quoted 15 lines
Quoted 15 lines
---
 tools/libxc/include/xenguest.h | 10 ++++++++++
 tools/libxc/xc_sr_common.h     | 10 ----------
 2 files changed, 10 insertions(+), 10 deletions(-)
tools/libxc/include/xenguest.h +1 -0
index affc42b..888536e 100644
@@ -238,4 +238,9 @@ xen_pfn_t *xc_map_m2p(xc_interface *xch,
                       unsigned long max_mfn,
                       int prot,
                       unsigned long *mfn0);
+
Quoted 8 lines

tools/libxc/include/xenguest.h xen_pfn_t *xc_map_m2p(xc_interface *xch, · line 245

Quoted 4 lines
tools/libxc/include/xenguest.h +4 -0
+typedef enum {
+    MIG_STREAM_NONE, /* plain stream */
+    MIG_STREAM_REMUS,
+} migration_stream;

This typedef should be beside xc_domain_save() as that is where it is intended to be used. It also needs xc_ prefixes as it is part of the public interface, and a typedef wants a _t suffix.

OK. Will fix it in the next version.

Thanks
Wen Congyang

Quoted 6 lines

~Andrew

.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel