mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-28 08:02:54 +00:00
bhyve: don't crash when guest writes TPM int_enable register
FreeBSD's own TPM driver writes 0 to the INT_ENABLE register during attach, making sure interrupts are off. bhyve really shouldn't kill the VM when that happens just because it doesn't support TPM interrupts. Even if a guest was trying to enable interrupts, we should just ignore it like real TPM hardware would. Reviewed by: corvink MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D46562
This commit is contained in:
parent
d1d839d0b5
commit
2feea221b2
@ -337,6 +337,10 @@ tpm_crb_mem_handler(struct vcpu *vcpu __unused, const int dir,
|
||||
|
||||
break;
|
||||
}
|
||||
case offsetof(struct tpm_crb_regs, int_enable):
|
||||
/* No interrupt support. Ignore writes to int_enable. */
|
||||
break;
|
||||
|
||||
case offsetof(struct tpm_crb_regs, ctrl_start): {
|
||||
union tpm_crb_reg_ctrl_start start;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user