Bring an overly enthusiastic KASSERT inline with the Intel SDM.
Reviewed by: neel
This commit is contained in:
parent
4099be8dca
commit
a026dc3fcb
@ -1258,12 +1258,28 @@ vmx_inject_interrupts(struct vmx *vmx, int vcpu, struct vlapic *vlapic)
|
||||
/* Ask the local apic for a vector to inject */
|
||||
if (!vlapic_pending_intr(vlapic, &vector))
|
||||
return;
|
||||
|
||||
/*
|
||||
* From the Intel SDM, Volume 3, Section "Maskable
|
||||
* Hardware Interrupts":
|
||||
* - maskable interrupt vectors [16,255] can be delivered
|
||||
* through the local APIC.
|
||||
*/
|
||||
KASSERT(vector >= 16 && vector <= 255,
|
||||
("invalid vector %d from local APIC", vector));
|
||||
} else {
|
||||
/* Ask the legacy pic for a vector to inject */
|
||||
vatpic_pending_intr(vmx->vm, &vector);
|
||||
}
|
||||
|
||||
KASSERT(vector >= 32 && vector <= 255, ("invalid vector %d", vector));
|
||||
/*
|
||||
* From the Intel SDM, Volume 3, Section "Maskable
|
||||
* Hardware Interrupts":
|
||||
* - maskable interrupt vectors [0,255] can be delivered
|
||||
* through the INTR pin.
|
||||
*/
|
||||
KASSERT(vector >= 0 && vector <= 255,
|
||||
("invalid vector %d from INTR", vector));
|
||||
}
|
||||
|
||||
/* Check RFLAGS.IF and the interruptibility state of the guest */
|
||||
rflags = vmcs_read(VMCS_GUEST_RFLAGS);
|
||||
|
Loading…
x
Reference in New Issue
Block a user