|
|
|
|
|
|
|
|
|
|
xen-ia64-devel
Re: [Xen-ia64-devel] Enabling hypercalls from VT-i domain
Le Mercredi 02 Août 2006 12:34, DOI Tsunehisa a écrit :
> Hi all,
>
> My name is Tsunehisa Doi.
>
> We are porting Steven Smith's para drivers for full-VM to IPF.
> In the xen-unstable.hg (cs: 10883-10885), it's enabling the hypercall
> from HVM domain. Thus, I will post the enabling patch for IPF. This
> patch includes:
>
> + cleanup the hypercall handling code for VT-i domain
> - delete the dead code in vmx_hypercall.c and vmx_ivt.S
> - the code is not used now, I think.
> * It's called with `break 0x1100' instruction. (current 0x1000)
> * The hypercall table for VT-i domain doesn't match the
> hypercall number.
> * The register used for hypercall are different with current
> version. (r16-r20 vs. r2,r4-r18)
> + enabling hypercalls from VT-i domain
> - modify the checker to permit hypercalls from VT-i domain.
>
> Thanks,
> - Tsunehisa Doi
Hi and welcome!
diff -r aafdb9899c41 -r e8de7b1474c0 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c Wed Aug 02 17:48:27 2006 +0900
+++ b/xen/arch/ia64/xen/hypercall.c Wed Aug 02 17:52:43 2006 +0900
@@ -319,7 +319,7 @@ ia64_hypercall (struct pt_regs *regs)
/* Hypercalls are only allowed by kernel.
Kernel checks memory accesses. */
- if (privlvl != 2) {
+ if ((regs->cr_ipsr & IA64_PSR_VM) ? (privlvl != 0) : (privlvl != 2)) {
/* FIXME: Return a better error value ?
Reflection ? Illegal operation ? */
regs->r8 = -1;
You'd better to use the VMX_DOMAIN macro here.
I think you'd better not to call ia64_hypercall from VTi side if cpl != 0.
Tristan.
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
|
|
|
|