Skip to contentSkip to conversation

kvm running on core1 wants guest os on core2 to execute a pre-defined program

DISCUSSION zhangzhi 2 participants 2 messages Feb 17, 2013 KVM

lore
Share & tools
lore

zhangzhi

author
#0 lore raw

I have been studying some stuff about KVM and sincerely hope that someone is willing to reply to this mail.
As we know, If physical NIC interrupt is received on physical CPU 0 which is in root mode and the hypervisor determines that this is a network packet targeted to the emulated NIC for a VM at the same time this VM is running a user program in guest mode on physical CPU 1.
My question is:
At this time can hypervisor running on CPU 0 *actively* interrupt VM and make it run the corresponding interrupt handler to handle the incoming network data packet? CPU 1 which is running a user program is not supposed to vm-exit considering the performance effect, so I can not use the inter-processor interrupt(IPI) to cause the CPU1 to leave guest mode and exit to the hypervisor.

If anyone knows, please tell me.
Thanks a lot !

Best regards,
henry

#1 lore raw
Quoted 4 lines · zhangzhi

I have been studying some stuff about KVM and sincerely hope that someone is willing to reply to this mail.
As we know, If physical NIC interrupt is received on physical CPU 0 which is in root mode and the hypervisor determines that this is a network packet targeted

Quoted 9 lines

to the emulated NIC for a VM at the same time this VM is running a user program in guest mode on physical CPU 1.
My question is:
At this time can hypervisor running on CPU 0 *actively* interrupt VM and make it run the corresponding interrupt handler to handle the incoming network data packet? CPU 1 which is running a user program is not supposed to vm-exit considering the performance effect, so I can not use the inter-processor interrupt(IPI) to cause the CPU1 to leave guest mode and exit to the hypervisor.

With current generation of CPUs you will have to use IPI to make CPU1 vmexit and inject interrupt on the next vmentry. Future CPU will allow to inject interrupt into a running guest without vmexit. On Intel this is called "posted interrupts".

--
Gleb.