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

KVM: x86: SVM: fix avic spec based definitions again

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



commit 0dacc3df
Author: Maxim Levitsky <mlevitsk@redhat.com>
Date:   Tue Mar 22 19:24:45 2022 +0200

    KVM: x86: SVM: fix avic spec based definitions again

    Due to wrong rebase, commit
    4a204f78 ("KVM: SVM: Allow AVIC support on system w/ physical APIC ID > 255")

    moved avic spec #defines back to avic.c.

    Move them back, and while at it extend AVIC_DOORBELL_PHYSICAL_ID_MASK to 12
    bits as well (it will be used in nested avic)

Signed-off-by: default avatarMaxim Levitsky <mlevitsk@redhat.com>
    Message-Id: <20220322172449.235575-5-mlevitsk@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>

RHEL-only:
        No upstream merge conflict in RHEL, just merging the rest of
        the changes.

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
parent 56f6ef3e
No related branches found
No related tags found
No related merge requests found
......@@ -222,7 +222,7 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
/* AVIC */
#define AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK (0xFF)
#define AVIC_LOGICAL_ID_ENTRY_GUEST_PHYSICAL_ID_MASK (0xFFULL)
#define AVIC_LOGICAL_ID_ENTRY_VALID_BIT 31
#define AVIC_LOGICAL_ID_ENTRY_VALID_MASK (1 << 31)
......@@ -230,9 +230,11 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
#define AVIC_PHYSICAL_ID_ENTRY_BACKING_PAGE_MASK (0xFFFFFFFFFFULL << 12)
#define AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK (1ULL << 62)
#define AVIC_PHYSICAL_ID_ENTRY_VALID_MASK (1ULL << 63)
#define AVIC_PHYSICAL_ID_TABLE_SIZE_MASK (0xFF)
#define AVIC_PHYSICAL_ID_TABLE_SIZE_MASK (0xFFULL)
#define AVIC_DOORBELL_PHYSICAL_ID_MASK (0xFF)
#define AVIC_DOORBELL_PHYSICAL_ID_MASK GENMASK_ULL(11, 0)
#define VMCB_AVIC_APIC_BAR_MASK 0xFFFFFFFFFF000ULL
#define AVIC_UNACCEL_ACCESS_WRITE_MASK 1
#define AVIC_UNACCEL_ACCESS_OFFSET_MASK 0xFF0
......@@ -253,8 +255,6 @@ enum avic_ipi_failure_cause {
#define AVIC_MAX_PHYSICAL_ID_COUNT 0xff
#define AVIC_HPA_MASK ~((0xFFFULL << 52) | 0xFFF)
#define VMCB_AVIC_APIC_BAR_MASK 0xFFFFFFFFFF000ULL
struct vmcb_seg {
u16 selector;
......
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