syswrap: XEN_HVMOP_set_mem_type
    
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13927 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_syswrap/syswrap-xen.c b/coregrind/m_syswrap/syswrap-xen.c
index 07329ba..be8fe86 100644
--- a/coregrind/m_syswrap/syswrap-xen.c
+++ b/coregrind/m_syswrap/syswrap-xen.c
@@ -819,6 +819,13 @@
        PRE_XEN_HVMOP_READ(set_pci_link_route, isa_irq);
        break;
 
+   case VKI_XEN_HVMOP_set_mem_type:
+       PRE_XEN_HVMOP_READ(set_mem_type, domid);
+       PRE_XEN_HVMOP_READ(set_mem_type, hvmmem_type);
+       PRE_XEN_HVMOP_READ(set_mem_type, nr);
+       PRE_XEN_HVMOP_READ(set_mem_type, first_pfn);
+       break;
+
    default:
       bad_subop(tid, layout, arrghs, status, flags,
                 "__HYPERVISOR_hvm_op", op);
@@ -1352,6 +1359,7 @@
    case VKI_XEN_HVMOP_set_param:
    case VKI_XEN_HVMOP_set_isa_irq_level:
    case VKI_XEN_HVMOP_set_pci_link_route:
+   case VKI_XEN_HVMOP_set_mem_type:
       /* No output paramters */
       break;
 
diff --git a/include/vki/vki-xen-hvm.h b/include/vki/vki-xen-hvm.h
index 8659eb8..19ccbeb 100644
--- a/include/vki/vki-xen-hvm.h
+++ b/include/vki/vki-xen-hvm.h
@@ -26,6 +26,15 @@
 };
 typedef struct vki_xen_hvm_set_pci_link_route vki_xen_hvm_set_pci_link_route_t;
 
+#define VKI_XEN_HVMOP_set_mem_type 8
+struct vki_xen_hvm_set_mem_type {
+    vki_xen_domid_t  domid;
+    vki_uint16_t hvmmem_type;
+    vki_uint32_t nr;
+    vki_xen_uint64_aligned_t first_pfn;
+};
+typedef struct vki_xen_hvm_set_mem_type vki_xen_hvm_set_mem_type_t;
+
 #endif // __VKI_XEN_HVM_H
 
 /*--------------------------------------------------------------------*/