Re: [RFC PATCH v2 10/22] i386/xen: handle guest hypercalls

2022-12-12 Thread Paolo Bonzini
On 12/9/22 10:56, David Woodhouse wrote: +static bool __kvm_xen_handle_exit(X86CPU *cpu, struct kvm_xen_exit *exit) No double underscores in userspace. +{ +uint16_t code = exit->u.hcall.input; + +if (exit->u.hcall.cpl > 0) { +exit->u.hcall.result = -EPERM; +return true

Re: [RFC PATCH v2 10/22] i386/xen: handle guest hypercalls

2022-12-12 Thread David Woodhouse
On Mon, 2022-12-12 at 14:11 +, Paul Durrant wrote: > On 09/12/2022 09:56, David Woodhouse wrote: > > From: Joao Martins < > > joao.m.mart...@oracle.com > > > > > > > This means handling the new exit reason for Xen but still > > crashing on purpose. As we implement each of the hypercalls > > we

Re: [RFC PATCH v2 10/22] i386/xen: handle guest hypercalls

2022-12-12 Thread Paul Durrant
On 09/12/2022 09:56, David Woodhouse wrote: From: Joao Martins This means handling the new exit reason for Xen but still crashing on purpose. As we implement each of the hypercalls we will then return the right return code. Signed-off-by: Joao Martins [dwmw2: Add CPL to hypercall tracing, dis