qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC PATCH v2 19/22] i386/xen: implement HVMOP_set_evtchn_upcall_vec


From: Paul Durrant
Subject: Re: [RFC PATCH v2 19/22] i386/xen: implement HVMOP_set_evtchn_upcall_vector
Date: Mon, 12 Dec 2022 15:52:23 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1

On 09/12/2022 09:56, David Woodhouse wrote:
From: Ankur Arora <ankur.a.arora@oracle.com>

The HVMOP_set_evtchn_upcall_vector hypercall sets the per-vCPU upcall
vector, to be delivered to the local APIC just like an MSI (with an EOI).

This takes precedence over the system-wide delivery method set by the
HVMOP_set_param hypercall with HVM_PARAM_CALLBACK_IRQ. It's used by
Windows and Xen (PV shim) guests but normally not by Linux.

Signed-off-by: Ankur Arora <ankur.a.arora@oracle.com>
Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
[dwmw2: Rework for upstream kernel changes and split from HVMOP_set_param]
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
  target/i386/cpu.h        |  1 +
  target/i386/kvm/kvm.c    |  7 ++++
  target/i386/machine.c    |  4 ++-
  target/i386/trace-events |  1 +
  target/i386/xen.c        | 69 +++++++++++++++++++++++++++++++++++++---
  target/i386/xen.h        |  1 +
  6 files changed, 77 insertions(+), 6 deletions(-)

[snip]
+static bool kvm_xen_hcall_hvm_op(struct kvm_xen_exit *exit, X86CPU *cpu,
                                   int cmd, uint64_t arg)
  {
+    int ret = -ENOSYS;
      switch (cmd) {
+    case HVMOP_set_evtchn_upcall_vector:
+            ret = kvm_xen_hcall_evtchn_upcall_vector(exit, cpu,
+                                                     exit->u.hcall.params[0]);
+            break;
      case HVMOP_pagetable_dying:
-            exit->u.hcall.result = -ENOSYS;
-            return true;
+            ret = -ENOSYS;
+            break;

Handling HVMOP_pagetable_dying could now be folded in as a foot-note since it's a rather uninteresting relic of shadow paging. But otherwise...

Reviewed-by: Paul Durrant <paul@xen.org>




reply via email to

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