x86/vPCI: tolerate (un)masking a disabled MSI-X entry
authorJan Beulich <jbeulich@suse.com>
Thu, 21 Jan 2021 15:18:06 +0000 (16:18 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 21 Jan 2021 15:18:06 +0000 (16:18 +0100)
commit5f9b0f90ee7dcc96ffbb5e0c8d284aeb89d7495d
tree2e76b6e5b8388a4e91d6946d0992c96724ab66ef
parenta514c5ef5bda0da4020b22037d921b845a151116
x86/vPCI: tolerate (un)masking a disabled MSI-X entry

None of the four reasons causing vpci_msix_arch_mask_entry() to get
called (there's just a single call site) are impossible or illegal prior
to an entry actually having got set up:
- the entry may remain masked (in this case, however, a prior masked ->
  unmasked transition would already not have worked),
- MSI-X may not be enabled,
- the global mask bit may be set,
- the entry may not otherwise have been updated.
Hence the function asserting that the entry was previously set up was
simply wrong. Since the caller tracks the masked state (and setting up
of an entry would only be effected when that software bit is clear),
it's okay to skip both masking and unmasking requests in this case.

Fixes: d6281be9d0145 ('vpci/msix: add MSI-X handlers')
Reported-by: Manuel Bouyer <bouyer@antioche.eu.org>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Tested-by: Manuel Bouyer <bouyer@antioche.eu.org>
master commit: 04b090366ca59e8a75837c822df261a8d0bd1a30
master date: 2021-01-05 13:17:54 +0100
xen/arch/x86/hvm/vmsi.c