Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Razvan Cojocaru
On 08/04/16 22:03, Bread Cutter wrote: > My workaround for now is just something like > > int mode = hvm_guest_x86_mode(curr); > > uint32_t eax = regs->eax; > > > +if(eax == 0xFACE) { > +hvm_event_guest_request(); > +return 1; > +} > + > > switch ( mode

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Bread Cutter
My workaround for now is just something like int mode = hvm_guest_x86_mode(curr); uint32_t eax = regs->eax; +if(eax == 0xFACE) { +hvm_event_guest_request(); +return 1; +} + switch ( mode ) { case 8: This way I don't have to worry about if it's

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Jan Beulich
>>> On 04.08.16 at 11:32, wrote: > On 04/08/16 08:23, Jan Beulich wrote: > On 03.08.16 at 23:00, wrote: >>> On 08/03/16 23:44, Andrew Cooper wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -5194,8

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Jan Beulich
>>> On 04.08.16 at 11:24, wrote: > On 04/08/16 08:13, Jan Beulich wrote: > On 03.08.16 at 22:44, wrote: >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -5194,8 +5194,14 @@ int hvm_do_hypercall(struct cpu_user_regs

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Andrew Cooper
On 04/08/16 08:23, Jan Beulich wrote: On 03.08.16 at 23:00, wrote: >> On 08/03/16 23:44, Andrew Cooper wrote: >>> --- a/xen/arch/x86/hvm/hvm.c >>> +++ b/xen/arch/x86/hvm/hvm.c >>> @@ -5194,8 +5194,14 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) >>>

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Andrew Cooper
On 04/08/16 08:13, Jan Beulich wrote: On 03.08.16 at 22:44, wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -5194,8 +5194,14 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) >> switch ( mode ) >> { >> case 8: >>

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Jan Beulich
>>> On 03.08.16 at 23:00, wrote: > On 08/03/16 23:44, Andrew Cooper wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -5194,8 +5194,14 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) >> switch ( mode ) >> { >> case 8:

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-04 Thread Jan Beulich
>>> On 03.08.16 at 22:44, wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -5194,8 +5194,14 @@ int hvm_do_hypercall(struct cpu_user_regs *regs) > switch ( mode ) > { > case 8: > +if ( eax == __HYPERVISOR_hvm_op && >

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-03 Thread Andrew Cooper
On 03/08/2016 22:00, Razvan Cojocaru wrote: > On 08/03/16 23:44, Andrew Cooper wrote: >> On 03/08/2016 21:37, Bread Cutter wrote: >>> Hello all, >>> >>> I'm writing an executable that runs inside of a guest, and I planned >>> to use vmcall to talk to a tool running in Dom0, using the vm_event >>>

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-03 Thread Razvan Cojocaru
On 08/03/16 23:44, Andrew Cooper wrote: > On 03/08/2016 21:37, Bread Cutter wrote: >> Hello all, >> >> I'm writing an executable that runs inside of a guest, and I planned >> to use vmcall to talk to a tool running in Dom0, using the vm_event >> API. It didn't work, and looking through the code,

Re: [Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-03 Thread Andrew Cooper
On 03/08/2016 21:37, Bread Cutter wrote: > Hello all, > > I'm writing an executable that runs inside of a guest, and I planned > to use vmcall to talk to a tool running in Dom0, using the vm_event > API. It didn't work, and looking through the code, the first thing > hvm_do_hypercall() does is

[Xen-devel] HVMOP_guest_request_vm_event only works from guest in ring0

2016-08-03 Thread Bread Cutter
Hello all, I'm writing an executable that runs inside of a guest, and I planned to use vmcall to talk to a tool running in Dom0, using the vm_event API. It didn't work, and looking through the code, the first thing hvm_do_hypercall() does is check if the guest is in ring0. If not, it returns