* Tracking nested guest ioctl in L0 hypervisor
@ 2012-07-31 3:50 siddhesh phadke
2012-08-01 10:52 ` Nadav Har'El
0 siblings, 1 reply; 2+ messages in thread
From: siddhesh phadke @ 2012-07-31 3:50 UTC (permalink / raw)
To: kvm
I am trying to understand KVM code for nested virtualization and my
goal is to find whether an ioctl performed by L2 guest can be
intercepted in L0.
Hence just for experimental purpose I wrote an blank ioctl in L2
guest. When that ioctl is received by L1 KVM hypervisor ,it uses
kvm_hypercall0() mentioned in kvm_para.h to notify L0. Am I doing this
correct or is there any other method to do the same or I am completely
off the track?
Can anyone please help me with this?
Thank you
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Tracking nested guest ioctl in L0 hypervisor
2012-07-31 3:50 Tracking nested guest ioctl in L0 hypervisor siddhesh phadke
@ 2012-08-01 10:52 ` Nadav Har'El
0 siblings, 0 replies; 2+ messages in thread
From: Nadav Har'El @ 2012-08-01 10:52 UTC (permalink / raw)
To: siddhesh phadke; +Cc: kvm
On Mon, Jul 30, 2012, siddhesh phadke wrote about "Tracking nested guest ioctl in L0 hypervisor":
> I am trying to understand KVM code for nested virtualization and my
> goal is to find whether an ioctl performed by L2 guest can be
> intercepted in L0.
>
> Hence just for experimental purpose I wrote an blank ioctl in L2
> guest. When that ioctl is received by L1 KVM hypervisor ,it uses
> kvm_hypercall0() mentioned in kvm_para.h to notify L0. Am I doing this
> correct or is there any other method to do the same or I am completely
> off the track?
>
> Can anyone please help me with this?
Do you really mean an *ioctl* in L2 - which is just a system call in
L2 (and never intercepted by L0 or L1), or a *hypercall*? From the
mention of kvm_hypercall0() it sounds like you mean a hypercall.
As you can see in vmx.c, nested_vmx_exit_handled(), when L0 receives
a VMCALL exit (i.e., a hypercall) from L2, we return 1 - meaning that
we exit to L1 so that it can handle this hypercall.
I believe that this is this is the more sensible behavior, but if you
want L0 to handle hypercalls, you can, in the EXIT_REASON_VMCALL case
in that function, return 0, which would cause L0 to handle this exit.
--
Nadav Har'El | Wednesday, Aug 1 2012, 13 Av 5772
nyh@math.technion.ac.il |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Despite the cost of living, have you
http://nadav.harel.org.il |noticed how it remains so popular?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-01 11:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-31 3:50 Tracking nested guest ioctl in L0 hypervisor siddhesh phadke
2012-08-01 10:52 ` Nadav Har'El
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).