qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC PATCH 13/21] i386/xen: implement HYPERVISOR_hvm_op


From: Philippe Mathieu-Daudé
Subject: Re: [RFC PATCH 13/21] i386/xen: implement HYPERVISOR_hvm_op
Date: Mon, 5 Dec 2022 23:13:22 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 5/12/22 18:31, David Woodhouse wrote:
From: Joao Martins <joao.m.martins@oracle.com>

This is when guest queries for support for HVMOP_pagetable_dying.

Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
  target/i386/xen.c | 18 ++++++++++++++++++
  1 file changed, 18 insertions(+)

diff --git a/target/i386/xen.c b/target/i386/xen.c
index 5d2d8a7e00..38d4cae3d0 100644
--- a/target/i386/xen.c
+++ b/target/i386/xen.c
@@ -17,6 +17,7 @@
#include "standard-headers/xen/version.h"
  #include "standard-headers/xen/memory.h"
+#include "standard-headers/xen/hvm/hvm_op.h"
#define PAGE_OFFSET 0xffffffff80000000UL
  #define PAGE_SHIFT     12
@@ -181,6 +182,20 @@ static int kvm_xen_hcall_memory_op(struct kvm_xen_exit 
*exit,
      return err ? HCALL_ERR : 0;
  }
+static int kvm_xen_hcall_hvm_op(struct kvm_xen_exit *exit,
+                                int cmd, uint64_t arg)
+{
+    switch (cmd) {
+    case HVMOP_pagetable_dying: {
+            exit->u.hcall.result = -ENOSYS;
+            return 0;
+        }
+    }

Could it be helpful to have a trace event here, or log a GUEST_ERROR?

+    exit->u.hcall.result = -ENOSYS;
+    return HCALL_ERR;
+}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]