VMX虚拟APIC中断

huangapple go评论50阅读模式
英文:

VMX virtual apic interrupt

问题

使用TPR阴影
虚拟化APIC访问
APIC寄存器虚拟化
虚拟中断传递
确认外部中断
外部中断退出
处理已发布中断

我已尝试使用vmcs guest interrupt status 0x810,但无法使其正常工作。
我的目标是将外部中断重定向到客户端。

英文:

How to send external interrupts to guest when following enabled:
Use TPR shadow
Virtualize APIC access
APIC register virtualization
Virtual-interrupt delivery
Acknowledge external interrupts
External interrupts exit
Process posted-interrupt

I've tried vmcs guest interrupt status 0x810, but couldn't make it work correctly.
My goal is to redirect external interrupts to guest.

答案1

得分: 1

要在启用虚拟中断传递时向客户机注入中断,请按照与处理已发布中断相似的步骤,如SDM卷3第30.6节“已发布中断处理”中所描述的步骤4、5和6。

这些步骤如下:

  1. 如果要注入到客户机的中断是由于收到物理中断而引发的,请发送EOI到物理APIC。
  2. 设置VIRR中对应于被注入的中断向量的位。
  3. 如果向量号大于RVI的先前值,则将RVI设置为该向量号。

CPU将在VM进入时执行挂起的虚拟中断的评估。

另请参阅SDM卷3第30.2节“虚拟中断的评估和传递”。

英文:

To inject an interrupt into the guest when virtual interrupt delivery is enabled, follow steps similar to those that the CPU performs when it processes a posted interrupt, as described in SDM volume 3, section 30.6, "Posted Interrupt Processing", steps 4, 5, and 6.

The steps are:

  1. If the interrupt being injected into the guest is due to receipt of a physical interrupt, send EOI to the physical APIC.
  2. Set the bit in VIRR corresponding to the interrupt vector being injected.
  3. Set RVI to the vector number, if it is greater than the prior value of RVI.

Evaluation of pending virtual interrupts will be performed by the CPU upon VM entry.

See also SDM volume 3, section 30.2, "Evaluation and Delivery of Virtual Interrupts".

huangapple
  • 本文由 发表于 2023年2月14日 05:22:24
  • 转载请务必保留本文链接:https://go.coder-hub.com/75441302.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定