svn commit: r350560 - head/sys/amd64/vmm/io
Konstantin Belousov
kib at FreeBSD.org
Sat Aug 3 16:57:15 UTC 2019
Author: kib
Date: Sat Aug 3 16:57:14 2019
New Revision: 350560
URL: https://svnweb.freebsd.org/changeset/base/350560
Log:
bhyve: Ignore MSI/MSI-X interrupts sent to non-active vCPUs in
physical destination mode.
This is mostly a nop, because the vmm initializes all vCPUs up to
vm_maxcpus, so even if the target CPU is not active, lapic/vlapic code
still has the valid data to use. As John notes, dropping such
interrupts more closely matches the real harware, which ignores all
interrupts for not started APs.
Reviewed by: jhb
admbugs: 837
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Modified:
head/sys/amd64/vmm/io/vlapic.c
Modified: head/sys/amd64/vmm/io/vlapic.c
==============================================================================
--- head/sys/amd64/vmm/io/vlapic.c Sat Aug 3 16:56:44 2019 (r350559)
+++ head/sys/amd64/vmm/io/vlapic.c Sat Aug 3 16:57:14 2019 (r350560)
@@ -838,7 +838,8 @@ vlapic_calcdest(struct vm *vm, cpuset_t *dmask, uint32
*/
CPU_ZERO(dmask);
vcpuid = vm_apicid2vcpuid(vm, dest);
- if (vcpuid < vm_get_maxcpus(vm))
+ amask = vm_active_cpus(vm);
+ if (vcpuid < vm_get_maxcpus(vm) && CPU_ISSET(vcpuid, &amask))
CPU_SET(vcpuid, dmask);
} else {
/*
More information about the svn-src-head
mailing list