本文将介绍Passthrough IPI技术。

了解这项技术之前,需要读者对posted interrupt有深刻的理解。

1. Idea

Exposing the PI_DESC and msr.icr to guest. When sending a IPI, set the PIR of destination VCPU’s PI_DESC from guest directly and write the ICR with notification vector and destination PCPU which are got from hypervisor.
This mechanism only handle the normal IPI. For SIPI/NMI/INIT, still goes to legacy way but which write a new msr instead msr.icr.

2. Steps

3. Pros and cons

It can achieve huge performance improvement.

However it may increase the risk in the system since the guest could decide to send IPI to any processor. It’s OK in private cloud only.

4. Implementation

代码的解析可以参考kvm performance optimization technologies, part one


参考资料:

  1. KVM: X86: implement Passthrough IPI
  2. Minimizing VMExits in Private Cloud by Aggressive PV IPI and Passthrough Timer
  3. kvm performance optimization technologies, part one
  4. Directvisor: virtualization for bare-metal cloud