mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-15 06:44:58 +00:00
hv:Use exception vector MACRO instead of hardcode
Now use hardcode when inject GP/NMI to guest, replace it with MACRO. Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
parent
975484a304
commit
ccc1c25e88
@ -210,7 +210,9 @@ static int vcpu_do_pending_gp(__unused struct vcpu *vcpu)
|
|||||||
/* GP vector = 13 */
|
/* GP vector = 13 */
|
||||||
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
|
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
|
||||||
VMX_INT_INFO_VALID |
|
VMX_INT_INFO_VALID |
|
||||||
((VMX_INT_TYPE_HW_EXP | EXCEPTION_ERROR_CODE_VALID) <<8) | 13);
|
((VMX_INT_TYPE_HW_EXP | EXCEPTION_ERROR_CODE_VALID) << 8) |
|
||||||
|
IDT_GP);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +359,7 @@ int acrn_do_intr_process(struct vcpu *vcpu)
|
|||||||
if (bitmap_test_and_clear(ACRN_REQUEST_NMI, pending_intr_bits)) {
|
if (bitmap_test_and_clear(ACRN_REQUEST_NMI, pending_intr_bits)) {
|
||||||
/* Inject NMI vector = 2 */
|
/* Inject NMI vector = 2 */
|
||||||
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
|
exec_vmwrite(VMX_ENTRY_INT_INFO_FIELD,
|
||||||
VMX_INT_INFO_VALID | (VMX_INT_TYPE_NMI << 8) | 2);
|
VMX_INT_INFO_VALID | (VMX_INT_TYPE_NMI << 8) | IDT_NMI);
|
||||||
|
|
||||||
/* Intel SDM 10.8.1
|
/* Intel SDM 10.8.1
|
||||||
* NMI, SMI, INIT, ExtINT, or SIPI directly deliver to CPU
|
* NMI, SMI, INIT, ExtINT, or SIPI directly deliver to CPU
|
||||||
|
Loading…
Reference in New Issue
Block a user