aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwspinlock
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-11-22 19:43:11 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2021-11-30 03:53:14 -0500
commit53b7ca1a359389276c76fbc9e1009d8626a17e40 (patch)
tree1897535502db60075d8d4d5830ea99e82620a691 /drivers/hwspinlock
parent37c4dbf337c5c2cdb24365ffae6ed70ac1e74d7a (diff)
downloadlinux-53b7ca1a359389276c76fbc9e1009d8626a17e40.tar.gz
KVM: x86: Use a stable condition around all VT-d PI paths
Currently, checks for whether VT-d PI can be used refer to the current status of the feature in the current vCPU; or they more or less pick vCPU 0 in case a specific vCPU is not available. However, these checks do not attempt to synchronize with changes to the IRTE. In particular, there is no path that updates the IRTE when APICv is re-activated on vCPU 0; and there is no path to wakeup a CPU that has APICv disabled, if the wakeup occurs because of an IRTE that points to a posted interrupt. To fix this, always go through the VT-d PI path as long as there are assigned devices and APICv is available on both the host and the VM side. Since the relevant condition was copied over three times, take the hint and factor it into a separate function. Suggested-by: Sean Christopherson <seanjc@google.com> Cc: stable@vger.kernel.org Reviewed-by: Sean Christopherson <seanjc@google.com> Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: David Matlack <dmatlack@google.com> Message-Id: <20211123004311.2954158-5-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'drivers/hwspinlock')
0 files changed, 0 insertions, 0 deletions