iommu/amd: KVM: SVM: Infer IsRun from validity of pCPU destination
authorSean Christopherson <seanjc@google.com>
Wed, 11 Jun 2025 22:45:43 +0000 (15:45 -0700)
committerSean Christopherson <seanjc@google.com>
Mon, 23 Jun 2025 16:50:37 +0000 (09:50 -0700)
commit08d9ccdd1a5c75d7aca7ac3af56f723d780dd6ac
tree2c3d237eaeb78b12d926c762f7d6f380c7180b99
parent3be405e89f3daea23ddfcf6b6526ae44ce38dd9a
iommu/amd: KVM: SVM: Infer IsRun from validity of pCPU destination

Infer whether or not a vCPU should be marked running from the validity of
the pCPU on which it is running.  amd_iommu_update_ga() already skips the
IRTE update if the pCPU is invalid, i.e. passing %true for is_run with an
invalid pCPU would be a blatant and egregrious KVM bug.

Tested-by: Sairaj Kodilkar <sarunkod@amd.com>
Link: https://lore.kernel.org/r/20250611224604.313496-42-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/avic.c
drivers/iommu/amd/iommu.c
include/linux/amd-iommu.h