Skip to contentSkip to conversation

Avoiding VmEntry/VmExit.

DISCUSSION Devdutt Patnaik 3 participants 5 messages Oct 29, 2007 – Oct 30, 2007

lore
Share & tools
lore
#0 lore raw

Hi All,

I am trying to provide services to guest VMs where I wish to run guest VMs in a loop.

I wish to use a core to schedule a guest VM, service it eg. execute an ISR etc and then return to the context of Xen on that core, so that I can then schedule the next VM on that core.
In doing all this, the goal is to avoid the calls to VMEntry and VMExit. Is there a workaround for this to be done or will I always have to face a VMExit to return to the Xen context on that core ?

Looking forward to some pointers.

Thanks,
Devdutt.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw

Is this for HVM? AFAIK you can't really avoid doing a VMexit from HVM guest mode if you want to get back to Xen: Xen just doesn't exist in the address space of the guest.

For PV guests, Xen is mapped into the address space so you basically just need to do a ring transition.

Cheers,
Mark

Quoted 14 lines

I am trying to provide services to guest VMs where I wish to run guest VMs in a loop.

I wish to use a core to schedule a guest VM, service it eg. execute an ISR etc and then return to the context of Xen on that core, so that I can then schedule the next VM on that core.
In doing all this, the goal is to avoid the calls to VMEntry and VMExit. Is there a workaround for this to be done or will I always have to face a VMExit to return to the Xen context on that core ?

Looking forward to some pointers.

Thanks,
Devdutt.

Signature · 4 lines
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
#2 lore raw

Yes, this is for HVM. On a related note, is there any bit in the VMCS region that will cause an IRET in the guest VM to trap into Xen so that I can then service another VM ?

Quoted 34 lines · Mark Williamson

Is this for HVM? AFAIK you can't really avoid doing a VMexit from HVM guest mode if you want to get back to Xen: Xen just doesn't exist in the address space of the guest.

For PV guests, Xen is mapped into the address space so you basically just need to do a ring transition.

Cheers,
Mark

Quoted 10 lines

I am trying to provide services to guest VMs where I wish to run guest VMs in a loop.

I wish to use a core to schedule a guest VM, service it eg. execute an ISR etc and then return to the context of Xen on that core, so that I can then schedule the next VM on that core.
In doing all this, the goal is to avoid the calls to VMEntry and VMExit. Is there a workaround for this to be done or will I always have to face a VMExit to return to the Xen context on that core ?

Quoted 4 lines

Looking forward to some pointers.

Thanks,
Devdutt.

--
Dave: Just a question. What use is a unicyle with no seat? And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

#3 lore raw

There is no such a bit in VMCS that indicates HVM guest's IRET should incur VMexit, though the "External-interrupt exiting" and "NMI exiting" may cause VMexit on HVM guest's IRET under certain conditions.

-- Dexuan

Quoted 4 lines · Devdutt Patnaik

Yes, this is for HVM. On a related note, is there any bit in the VMCS region that will cause an IRET in the guest VM to trap into Xen so that I can then service another VM ?

#4 lore raw
Quoted 4 lines · Dexuan

There is no such a bit in VMCS that indicates HVM guest's IRET should incur VMexit, though the "External-interrupt exiting" and "NMI exiting" may cause VMexit on HVM guest's IRET under certain conditions.

Sorry, they should be "Interrupt-window exiting" and "NMI-window exiting".

-- Dexuan

Quoted 4 lines
Quoted 3 lines · Devdutt Patnaik

Yes, this is for HVM. On a related note, is there any bit in the VMCS region that will cause an IRET in the guest VM to trap into Xen so that I can then service another VM ?