[Lguest] PAE support
Matias Zabaljauregui
zabaljauregui at gmail.com
Fri Oct 17 09:50:38 EST 2008
Hello Rusty,
>> I started to look at kvm hypercalls code.
>> If you can give some hints about this issue, I can try to do it.
>
> Sure. The first step is to use the kvm_hypercall* functions in
> asm/kvm_para.h. I think that will come out as a UD trap (trap 6) into the
> host, which will then have to check the ringlevel == GUEST_PL, check the
> instruction sequence was really a vmcall, then run the hypercall like normal.
ok, with your explanation I was able to get to the point where hcall
function (in lguest_hcall.h) is like this
hcall(unsigned long call,
unsigned long arg1, unsigned long arg2, unsigned long arg3)
{
kvm_hypercall3(call, arg2, arg3, arg1);
return call;
}
and it works.
Now, what would be the next step ?
We can easily replace hcall() calls with the corresponding
kvm_hypercallX (X depending on the arguments count).
But, we have a lot of lazy_hcall() invocations, no matter the amount
of arguments.
So I guess we could write lazy_callX() variants, where X is the the
arguments count or
just call kvm_hypercall3(call, arg2, arg3, arg1) from lazy_call() and
forget about the number
of arguments (which is exactly what actual code does).
thanks
Matias
--
http://cern.ch/matias
More information about the Lguest
mailing list