|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 RFC 10/14] tools/libxc: x86 HVM common code
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxxx>
Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
---
tools/libxc/saverestore/common.h | 1 +
tools/libxc/saverestore/common_x86_hvm.c | 39 ++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
create mode 100644 tools/libxc/saverestore/common_x86_hvm.c
diff --git a/tools/libxc/saverestore/common.h b/tools/libxc/saverestore/common.h
index bb21e01..7ba9c4f 100644
--- a/tools/libxc/saverestore/common.h
+++ b/tools/libxc/saverestore/common.h
@@ -245,6 +245,7 @@ struct context
};
extern struct common_ops common_ops_x86_pv;
+extern struct common_ops common_ops_x86_hvm;
extern struct save_ops save_ops_x86_pv;
diff --git a/tools/libxc/saverestore/common_x86_hvm.c
b/tools/libxc/saverestore/common_x86_hvm.c
new file mode 100644
index 0000000..3701add
--- /dev/null
+++ b/tools/libxc/saverestore/common_x86_hvm.c
@@ -0,0 +1,39 @@
+#include "common.h"
+
+static bool x86_hvm_pfn_is_valid(const struct context *ctx, xen_pfn_t pfn)
+{
+ return true;
+}
+
+static xen_pfn_t x86_hvm_pfn_to_gfn(const struct context *ctx, xen_pfn_t pfn)
+{
+ return pfn;
+}
+
+static void x86_hvm_set_gfn(struct context *ctx, xen_pfn_t pfn,
+ xen_pfn_t gfn)
+{
+ /* no op */
+}
+
+static void x86_hvm_set_page_type(struct context *ctx, xen_pfn_t pfn,
xen_pfn_t type)
+{
+ /* no-op */
+}
+
+struct common_ops common_ops_x86_hvm = {
+ .pfn_is_valid = x86_hvm_pfn_is_valid,
+ .pfn_to_gfn = x86_hvm_pfn_to_gfn,
+ .set_gfn = x86_hvm_set_gfn,
+ .set_page_type = x86_hvm_set_page_type,
+};
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
--
1.7.10.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |