qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emu


From: Paul Durrant
Subject: Re: [PATCH v7 26/51] hw/xen: Add xen_evtchn device for event channel emulation
Date: Tue, 17 Jan 2023 11:06:55 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

On 17/01/2023 11:02, David Woodhouse wrote:
On Tue, 2023-01-17 at 10:56 +0000, Paul Durrant wrote:

I'm just having a hard time seeing why passing 0 to
xen_evtchn_set_callback_param() does anything useful...

+    switch (param >> CALLBACK_VIA_TYPE_SHIFT) {
+    case HVM_PARAM_CALLBACK_TYPE_VECTOR: {
+        struct kvm_xen_hvm_attr xa = {
+            .type = KVM_XEN_ATTR_TYPE_UPCALL_VECTOR,
+            .u.vector = (uint8_t)param,
+        };

HVM_PARAM_CALLBACK_TYPE_VECTOR is 2 AFAICT, so it won't hit that case.
Also, you appear to be passing the unshifted param to kernel anyway.

What is the call trying to achieve?

Zero is HVM_PARAM_CALLBACK_TYPE_GSI, with GSI==0. It's basically
disabling event channel delivery for the new kernel.


AFAICT it is doing nothing at this point. Unless I am going insane it results in this codepath:

+    default:
+        ret = -ENOSYS;
+        break;
+    }
+
+    if (!ret) {
+        s->callback_param = param;
+        s->evtchn_in_kernel = in_kernel;
+    }

So it doesn't result in any cleanup. What am I missing?

  Paul



reply via email to

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