Hi Everyone,
Its true that Hypervisor inserts interrupt in the virtual machine.
But, GICv4 also tells that it supports direct injection of virtual interrupts which means that, interrupt can be inserted directly to VM from Redistributor without involvement of Hypervisor.
Indicated by Register : ICH_VTR_EL2
Field : nV4
If this field bit is:
0 - Supports Direct Injection of Virtual Interrupts
1 - Does not Support Direct Injection of Virtual Interrupts.
So, from above statement can you please help me in understanding about,
- In what scenarios does this direct injection of Virtual Interrupts happen..?
- Is that okay, if Hypervisor is not updated about the virtual interrupt and virtual interrupt is directly inserted from Redistributor to VM.
- Can you also please tell me what is the advantage of having this feature.
Above doubts arose as per my understanding on reading GICv4 Document. If i am missing any clarity please excuse & suggest me. I am happy to take anything.
Thanks in advance,
Rakesh.
From this i can understand that during DIVL HYPERVISOR is not at all involved.
Just for clarity, DIVL doesn't remove the hypervisor entirely. It's the hypervisor which sets up the mapping between physical events and virtual interrupts, and handles scheduling. DIVL means we don't need to re-enter the hypervisor to forward a virtual interrupt.
- But, my doubt is that, do we need to update any of the hypervisor registers during DIVL.- This question arose as I have gone through the below descriptions in ARM GICv4 Doc.============================================================8.4.8 ICH_VMCR_EL2, Interrupt Controller Virtual Machine Control RegisterThe ICH_VMCR_EL2 characteristics are:PurposeEnables the hypervisor to save and restore the virtual machine view of the GIC state.============================================================- It is said that, Register Fields of this register are ALIAS of the Respective Register field bits ICV_*_EL1.
- But, my doubt is that, do we need to update any of the hypervisor registers during DIVL.
- This question arose as I have gone through the below descriptions in ARM GICv4 Doc.
============================================================
8.4.8 ICH_VMCR_EL2, Interrupt Controller Virtual Machine Control Register
The ICH_VMCR_EL2 characteristics are:
Purpose
Enables the hypervisor to save and restore the virtual machine view of the GIC state.
- It is said that, Register Fields of this register are ALIAS of the Respective Register field bits ICV_*_EL1.
In order to context switch between vCPUs, the hypervisor needs to be able save/restore vCPU state. This includes the state of the virtual CPU Interface (ICV registers).
The way this is done is by having aliasing between the ICV (vCPU view) and ICH (Hypervisor).
- Does this mean that Hypervisor registers are always updated.?
It depends on how you think about it. You could think of it as a write to ICV updating ICH, or a read/write to ICH accessing the state of ICV. But either way, at the point you enter the hypervisor the ICH registers will have an up to date view of the vCPU state.
This makes me clear.
Thanks alot martin for sparing your valuable time for me.
Thanks,