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

Re: [Xen-devel] Ring3 Hypercalls from HVM DomU



At 14:52 -0600 on 02 Dec (1322837525), Srujan Kotikela wrote:
> Hi,
> 
> I have created hypercalls that can be invoked from ring-3 by setting the
> ring-3 gate in xen. This works fine when I invoke the hypercall from Dom0.
> I want to invoke the same from a HVM DomU. But I keep getting the
> segmentation fault when I invoke the ring3_hyperacall from HVM DomU. Any
> ideas?
> 
> *The setting up gate is as follows:*
> _set_gate(idt_table+0x92, 14, 3, &hypercall);
> *
> The hypercall invoking code looks like this:*
> int ring3_hypercall(unsigned long va, int command)
> {
>     int ret;
> 
>     asm("int $0x92" : "=a"(ret) : "a"(40), "b"(va), "c"(command));

In a HVM guest this won't trap to the hypervisor.  You'll need to
replace it with something that causes a VMEXIT. 

The obvious candidate is VMCALL but that will just raise #UD from ring 3.  
You could try piggybacking on the CPUID intercept or something like that.

Tim.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.