[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1455285574-27892-3-git-send-email-suravee.suthikulpanit@amd.com>
Date: Fri, 12 Feb 2016 20:59:27 +0700
From: Suravee Suthikulpanit <suravee.suthikulpanit@....com>
To: <joro@...tes.org>, <alex.williamson@...hat.com>, <gleb@...nel.org>,
<pbonzini@...hat.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<wei@...hat.com>, <sherry.hurwitz@....com>,
Suravee Suthikulpanit <suravee.suthikulpanit@....com>,
Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
Subject: [PART1 RFC 2/9] svm: Introduce new AVIC VMCB registers
Introduce new AVIC VMCB registers. Also breakdown int_ctl register
into bit-field for ease of use.
Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@....com>
---
arch/x86/include/asm/svm.h | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 6136d99..db5d7af 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -67,10 +67,24 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
u32 asid;
u8 tlb_ctl;
u8 reserved_2[3];
- u32 int_ctl;
+ union { /* Offset 0x60 */
+ u32 int_ctl;
+
+ struct __attribute__ ((__packed__)) {
+ u32 v_tpr : 8,
+ v_irq : 1,
+ reserved_3 : 7,
+ v_intr_prio : 4,
+ v_ign_tpr : 1,
+ reserved_4 : 3,
+ v_intr_masking : 1,
+ reserved_5 : 6,
+ avic_enable : 1;
+ };
+ };
u32 int_vector;
u32 int_state;
- u8 reserved_3[4];
+ u8 reserved_6[4];
u32 exit_code;
u32 exit_code_hi;
u64 exit_info_1;
@@ -78,17 +92,22 @@ struct __attribute__ ((__packed__)) vmcb_control_area {
u32 exit_int_info;
u32 exit_int_info_err;
u64 nested_ctl;
- u8 reserved_4[16];
+ u64 avic_vapic_bar;
+ u8 reserved_7[8];
u32 event_inj;
u32 event_inj_err;
u64 nested_cr3;
u64 lbr_ctl;
u32 clean;
- u32 reserved_5;
+ u32 reserved_8;
u64 next_rip;
u8 insn_len;
u8 insn_bytes[15];
- u8 reserved_6[800];
+ u64 avic_bk_page; /* Offset 0xe0 */
+ u8 reserved_9[8]; /* Offset 0xe8 */
+ u64 avic_log_apic_id; /* Offset 0xf0 */
+ u64 avic_phy_apic_id; /* Offset 0xf8 */
+ u8 reserved_10[768];
};
--
1.9.1
Powered by blists - more mailing lists