]> xenbits.xensource.com Git - xen.git/commit
x86/vMSI-X: honor all mask requests
authorJan Beulich <jbeulich@suse.com>
Tue, 14 Apr 2015 14:50:35 +0000 (16:50 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 14 Apr 2015 14:50:35 +0000 (16:50 +0200)
commit70a3cbb8c9cb17a61fa25c48ba3d7b44fd059c90
tree25b5f7cb4eacba7aac902844d7a0918aa0f437d1
parent881d6bf2d16a7d6a900d7de8ae83d1e8eb2f3f3b
x86/vMSI-X: honor all mask requests

Commit 74fd0036de ("x86: properly handle MSI-X unmask operation from
guests") didn't go far enough: it fixed an issue with unmasking, but
left an issue with masking in place: Due to the (late) point in time
when qemu requests the hypervisor to set up MSI-X interrupts (which is
where the MMIO intercept gets put in place), the hypervisor doesn't
see all guest writes, and hence shouldn't make assumptions on the state
the virtual MSI-X resources are in. Bypassing the rest of the logic on
a guest mask operation leads to

[00:04.0] pci_msix_write: Error: Can't update msix entry 1 since MSI-X is already enabled.

which surprisingly enough doesn't lead to the device not working
anymore (I didn't dig in deep enough to figure out why that is). But it
does prevent the IRQ to be migrated inside the guest, i.e. all
interrupts will always arrive in vCPU 0.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/vmsi.c