1
0
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:
Hans Rosenfeld 2024-09-09 10:41:31 +02:00 committed by Corvin Köhne
parent d1d839d0b5
commit 2feea221b2
No known key found for this signature in database
GPG Key ID: D854DA56315E026A

View File

@ -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;