From b5e5f60de37bb6f71bc34ecb989c31ef5c834272 Mon Sep 17 00:00:00 2001
From: Vikram Garhwal <vikram.garhwal@amd.com>
Date: Tue, 31 Jan 2023 21:46:43 +0000
Subject: [PATCH 8/8] hw: arm: Add grant mapping.

Add support for grant mapping and change qemu machine name to xenpvh.

Signed-off-by: Vikram Garhwal <vikram.garhwal@amd.com>
Acked-by: Stefano Stabellini <stefano.stabellini@amd.com>
---
 hw/arm/xen_arm.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/hw/arm/xen_arm.c b/hw/arm/xen_arm.c
index 4ac425a3c5..392bed7367 100644
--- a/hw/arm/xen_arm.c
+++ b/hw/arm/xen_arm.c
@@ -35,7 +35,7 @@
 #include "sysemu/tpm.h"
 #include "hw/xen/arch_hvm.h"
 
-#define TYPE_XEN_ARM  MACHINE_TYPE_NAME("xenpv")
+#define TYPE_XEN_ARM  MACHINE_TYPE_NAME("xenpvh")
 OBJECT_DECLARE_SIMPLE_TYPE(XenArmState, XEN_ARM)
 
 static MemoryListener xen_memory_listener = {
@@ -115,6 +115,9 @@ static void xen_init_ram(MachineState *machine)
         DPRINTF("Initialized region xen.ram.hi: base 0x%llx size 0x%lx\n",
                 GUEST_RAM1_BASE, ram_size[1]);
     }
+
+    DPRINTF("init grant ram mapping for XEN\n");
+    ram_grants = *xen_init_grant_ram();
 }
 
 void arch_handle_ioreq(XenIOState *state, ioreq_t *req)
-- 
2.25.1

