Skip to content

Commit

Permalink
KVM: SVM: Fix x2APIC Logical ID calculation for avic_kick_target_vcpu…
Browse files Browse the repository at this point in the history
…s_fast

For X2APIC ID in cluster mode, the logical ID is bit [15:0].

Fixes: 603ccef ("KVM: x86: SVM: fix avic_kick_target_vcpus_fast")
Cc: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20230106011306.85230-14-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Suravee Suthikulpanit authored and Paolo Bonzini committed Jan 13, 2023
1 parent a879a88 commit da3fb46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/svm/avic.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static int avic_kick_target_vcpus_fast(struct kvm *kvm, struct kvm_lapic *source

if (apic_x2apic_mode(source)) {
/* 16 bit dest mask, 16 bit cluster id */
bitmap = dest & 0xFFFF0000;
bitmap = dest & 0xFFFF;
cluster = (dest >> 16) << 4;
} else if (kvm_lapic_get_reg(source, APIC_DFR) == APIC_DFR_FLAT) {
/* 8 bit dest mask*/
Expand Down

0 comments on commit da3fb46

Please sign in to comment.