xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too
authorMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Mon, 14 Nov 2022 10:31:08 +0000 (11:31 +0100)
committerJuergen Gross <jgross@suse.com>
Mon, 14 Nov 2022 12:29:10 +0000 (13:29 +0100)
commit5e29500eba2aa19e1323df46f64dafcd4a327092
tree6b0d93c2b731c3b1ba0c540c0ba779854b753edc
parentda36a2a76b01b210ffaa55cdc2c99bc8783697c5
xen-pciback: Allow setting PCI_MSIX_FLAGS_MASKALL too

When Xen domain configures MSI-X, the usual approach is to enable MSI-X
together with masking all of them via the config space, then fill the
table and only then clear PCI_MSIX_FLAGS_MASKALL. Allow doing this via
QEMU running in a stub domain.

Previously, when changing PCI_MSIX_FLAGS_MASKALL was not allowed, the
whole write was aborted, preventing change to the PCI_MSIX_FLAGS_ENABLE
bit too.

Note the Xen hypervisor intercepts this write anyway, and may keep the
PCI_MSIX_FLAGS_MASKALL bit set if it wishes to. It will store the
guest-requested state and will apply it eventually.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Link: https://lore.kernel.org/r/20221114103110.1519413-1-marmarek@invisiblethingslab.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xen-pciback/conf_space_capability.c