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

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 11:53 +, Paul Durrant wrote: > On 17/01/2023 11:24, David Woodhouse wrote: > > On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: > > > On 17/01/2023 11:02, David Woodhouse wrote: > > > > On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: > > > > > > > > > > I'm

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

2023-01-17 Thread Paul Durrant
On 17/01/2023 11:24, David Woodhouse wrote: On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: On 17/01/2023 11:02, David Woodhouse wrote: On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: I'm just having a hard time seeing why passing 0 to xen_evtchn_set_callback_param() does

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

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 11:06 +, Paul Durrant wrote: > On 17/01/2023 11:02, David Woodhouse wrote: > > On Tue, 2023-01-17 at 10:56 +, Paul Durrant wrote: > > > > > > I'm just having a hard time seeing why passing 0 to > > > xen_evtchn_set_callback_param() does anything useful... > > > > >

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

2023-01-17 Thread Paul Durrant
On 17/01/2023 11:02, David Woodhouse wrote: On Tue, 2023-01-17 at 10:56 +, 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

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

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 10:56 +, 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

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

2023-01-17 Thread Paul Durrant
On 17/01/2023 10:23, David Woodhouse wrote: On Tue, 2023-01-17 at 10:00 +, Paul Durrant wrote: @@ -712,6 +717,11 @@ static int kvm_xen_soft_reset(void)    CPUState *cpu;    int err; +    err = xen_evtchn_set_callback_param(0); Doesn't this always result in -ENOSYS? Hm?

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

2023-01-17 Thread David Woodhouse
On Tue, 2023-01-17 at 10:00 +, Paul Durrant wrote: > > > @@ -712,6 +717,11 @@ static int kvm_xen_soft_reset(void) > >    CPUState *cpu; > >    int err; > >    > > +    err = xen_evtchn_set_callback_param(0); > > Doesn't this always result in -ENOSYS? Hm? Even at this point in the

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

2023-01-17 Thread Paul Durrant
On 16/01/2023 21:57, David Woodhouse wrote: From: David Woodhouse Include basic support for setting HVM_PARAM_CALLBACK_IRQ to the global vector method HVM_PARAM_CALLBACK_TYPE_VECTOR, which is handled in-kernel by raising the vector whenever the vCPU's vcpu_info->evtchn_upcall_pending flag is

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

2023-01-16 Thread David Woodhouse
From: David Woodhouse Include basic support for setting HVM_PARAM_CALLBACK_IRQ to the global vector method HVM_PARAM_CALLBACK_TYPE_VECTOR, which is handled in-kernel by raising the vector whenever the vCPU's vcpu_info->evtchn_upcall_pending flag is set. Signed-off-by: David Woodhouse ---