Skip to content
Snippets Groups Projects
Commit 32c1c915 authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov
Browse files

KVM: x86: Bug the VM if an accelerated x2APIC trap occurs on a "bad" reg

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2119111



commit 70c8327c
Author: Sean Christopherson <seanjc@google.com>
Date:   Thu Aug 4 23:50:28 2022 +0000

    KVM: x86: Bug the VM if an accelerated x2APIC trap occurs on a "bad" reg

    Bug the VM if retrieving the x2APIC MSR/register while processing an
    accelerated vAPIC trap VM-Exit fails.  In theory it's impossible for the
    lookup to fail as hardware has already validated the register, but bugs
    happen, and not checking the result of kvm_lapic_msr_read() would result
    in consuming the uninitialized "val" if a KVM or hardware bug occurs.

    Fixes: 1bd9dfec ("KVM: x86: Do not block APIC write for non ICR registers")
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
    Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220804235028.1766253-1-seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent ef56ab09
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment