cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

xjtudso
Journeyman III

About INTR intercept in the XEN HVM with SVM

How does xen intercept the phyical INTR

Hi, guys.

In XEN VMM, when running a guest with SVM support, the vmm excutes clgi to mask the interrupt and excutes stgi when guest exit.(in the code arch/x86/hvm/Svm/entry.S)

So, when the guest is running, the physical interrupt is masked. How can xen catch the INTR signal when the physical interrupt dispached during the excution of the guest?

 

Thanks.

Tags (1)
0 Likes
1 Reply
ozone
Journeyman III

Re: About INTR intercept in the XEN HVM with SVM

GIF is implicitly cleared (interrupts are unmasked) by vmrun and implicitly set with #VMEXIT.

AMD64 Architecture Programmer's Manual Volume 2: System Programming, 15.5.1, Loading Guest State, p. 450:


After all guest state is loaded, and intercepts and other control bits are set up, the processor reenables interrupts by setting GIF to 1


AMD64 Architecture Programmer's Manual Volume 2: System Programming, 15.6, #VMEXIT, p. 452:


Disables interrupts by clearing the GIF, so that after the #VMEXIT, VMM software can complete the state switch atomically.


#svm

0 Likes