From patchwork Mon Sep 19 05:52:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 76500 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp794734qgf; Sun, 18 Sep 2016 22:56:08 -0700 (PDT) X-Received: by 10.36.135.66 with SMTP id f63mr988124ite.50.1474264568304; Sun, 18 Sep 2016 22:56:08 -0700 (PDT) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id w202si23907615itb.36.2016.09.18.22.56.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Sep 2016 22:56:08 -0700 (PDT) Received-SPF: neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@amdcloud.onmicrosoft.com; spf=neutral (google.com: 192.237.175.120 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blrWF-0004HL-LZ; Mon, 19 Sep 2016 05:53:31 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1blrWD-0004Gg-MO for xen-devel@lists.xen.org; Mon, 19 Sep 2016 05:53:29 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 84/96-03778-85D7FD75; Mon, 19 Sep 2016 05:53:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1WSf0gTYRjHe2+73SlbnVPb01DTlRjmT8oQJAi EEFNIELWC7GbndrCp3E2bpLFADU1CMkvFPzT9R42QRBtJhaLmLCuVMFESSlOXlSZl05DuvGn2 /vXl/Xyf5/s+Lw8pUy/jWpKxWhguhzbpFJ5yY+SRxPCM4pn0qNrPeGzLSrP8FEoY6NnAzqLzO Jujz7Vewo2VPW8VeYve1ubyL8iGXMoK5EnKqRIZLA0NYBXIg0RUJnybacRFoKZsGIw+HZGJQE HFgbNhmhC1D+UP7RUNhGiSUTcQVLkmkAi8qQQYfPlYLmo5FQx333Vv3auoJFh85cBFDVQAOAa rt7QHlQzzH0cEDymkJcF8x1HJ7gWOutmtNjIKoHdhQSaV6qCu26YQc4EqQ2B/cH/LpKZCYby/ VyGZkmFkaQiTTGsY3H6ygiRwGl4PDmGS3iSgpjlKMrkImHMuERIwQdub6+5OsXCz6Q+STH0Il kfs7mo/KO+vJCRQioP9fb17hkxYb4iX7luUMLnhcldPEbA4V4ZLn6SF73aH+8P8oKO2QV6Fgu t3DV6/a/BGhLWhEJ7hChgu/ESEnmMNRouZZk3h0VExEWaG52kDY6L1fERWrvkREjZhj3DsqMY W34cOkJjOV2W3fEhX79XnXi400rwxk8s3MXwf8iNJHag6rs6kq704xsBYs1mTsE7bGEilzkfV K2IVn0ebedYgoWEUpNWoGkVAicCYn7NTtr2IY8hf661CwkPUyjyGM7OW/7kTaUik81YRRUIXJ Ztj2enuFIIxIbi9fkoMttD/kNaGWpJ8D/f89tq0XikZDUmIZGPWHKNFKVXKVC9yIvliomOwQL FPr4mbvhP8ojTsYVpZ4KevGSeVLfeaxgM7AzpLimdrDi5m7Q8cPsbmdpWtTiZMX3PeCkyxlLS uHn9+TsM9w9d9U88QdV39YamHgtLY7MLWqPm0iqqxwp8XflW79D90ct5IR4fKOJ7+C8dL5puD AwAA X-Env-Sender: Suravee.Suthikulpanit@amd.com X-Msg-Ref: server-8.tower-206.messagelabs.com!1474264406!60034387!1 X-Originating-IP: [104.47.40.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 12800 invoked from network); 19 Sep 2016 05:53:27 -0000 Received: from mail-co1nam03on0074.outbound.protection.outlook.com (HELO NAM03-CO1-obe.outbound.protection.outlook.com) (104.47.40.74) by server-8.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 19 Sep 2016 05:53:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=pvjYRlgZMlr8Qivwgj8NpqNRtDLu1QZlRJa6+EnIKOs=; b=CIZe9ArZCeUgtAOHXqfdYTZtKBNzuD5XZjEd09P+QqMuGTXWIScKvDL7FTbwyA7OcIfi2lTH+aasn9N5RU/kBsEyicYAynyk0ShtiudqHyy3Un227NoueWlYY0ghF6DZJn+tK3iodc0ioMFpo3WgqlSwfuhg8GoNLd99Nuu+PK8= Received: from localhost.localdomain (114.109.128.54) by BN6PR12MB1442.namprd12.prod.outlook.com (10.172.24.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Mon, 19 Sep 2016 05:53:23 +0000 From: Suravee Suthikulpanit To: Date: Mon, 19 Sep 2016 00:52:43 -0500 Message-ID: <1474264368-4104-5-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1474264368-4104-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1474264368-4104-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: HK2PR02CA0002.apcprd02.prod.outlook.com (10.163.104.140) To BN6PR12MB1442.namprd12.prod.outlook.com (10.172.24.19) X-MS-Office365-Filtering-Correlation-Id: 34b522fd-5c64-4fb3-bf0b-08d3e0514577 X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1442; 2:eA9deRoVW21cPJ9jFbnFCYcERq2e6hyyGCGpEgEwhsZ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2A/5t2bfRUXNGQpTswL7nJyXWfg+MwmvQGv8UCs/bg1dFijT36P9f+ka99nA8II+FXdz8/1g91ebxfmgERbeuobwHlE05rdlEoNh8tk64zCuxw8Nte0B7l/RxJLWwS+A+t5oQdc8ybPPEq/pw5dy1mOyocPuWvtIwcA1O X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:BN6PR12MB1442; BCL:0; PCL:0; RULEID:; SRVR:BN6PR12MB1442; X-Forefront-PRVS: 0070A8666B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(2351001)(229853001)(5660300001)(81156014)(81166006)(33646002)(8666005)(8676002)(19580405001)(7846002)(5003940100001)(7736002)(19580395003)(77096005)(305945005)(110136003)(2950100001)(92566002)(105586002)(106356001)(101416001)(2906002)(586003)(86362001)(4326007)(6116002)(3846002)(42186005)(66066001)(97736004)(47776003)(50986999)(36756003)(76176999)(48376002)(50466002)(189998001)(68736007)(50226002)(7059030)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1442; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1442; 23:u9xsp2z3gudsSegQ7fhWCEEHEqKa2ol/LnnpSlttY?= =?us-ascii?Q?byn6X4zryNL/DMKXx3A2mnwY8HyL4dZUeRjVaWekOkuqATSCBOEDagU6VepO?= =?us-ascii?Q?e3xZVUgS9zKG+As/kiNi9DDx8Ecwx+ctGCHCnaU/xoLIhs3ylnzqMIFNrGaK?= =?us-ascii?Q?GH50eTV72Baf35wXe4MJX+tEOUzdMHfS1vjtsd1Pfpm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q1NKdzPFYZQDqJ6BI4wO SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1442; 20:uRpefsrKyDPhrzwjNugPrYCKKxKv0c4DPID8icwlPJcAITrO+ZG8hkCCE5I6BhRfGA8MQNzZ7gaYaAZa5eoitpvFolg4dmzAQSwoWYAw7smB1miXmGc9sp+CdPlsWa+WLb+qC6IlfY2oH0tMprxnv6o0Qf6I4RmPZtKk91VADhObxgeL0zPw4+JVEKquzjGmNyqxNu3CG1IcuQKnHeUjlnPLgdy/7wZQAMOvc8UgS27BTNPTYWrzChVIxnNVTS7A X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2016 05:53:23.0052 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1442 Cc: andrew.cooper3@citrix.com, Suravee Suthikulpanit , jbeulich@suse.com, sherry.hurwitz@amd.com Subject: [Xen-devel] [RFC PATCH 4/9] x86/SVM: Modify VMCB fields to add AVIC support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" Introduce AVIC-related VMCB fields. Signed-off-by: Suravee Suthikulpanit --- xen/include/asm-x86/hvm/svm/vmcb.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index bad2382..768e9fb 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -328,14 +328,15 @@ typedef union __packed struct { u64 tpr: 8; - u64 irq: 1; + u64 irq: 1; /* disabled for avic */ u64 rsvd0: 7; - u64 prio: 4; - u64 ign_tpr: 1; + u64 prio: 4; /* disabled for avic */ + u64 ign_tpr: 1; /* disabled for avic */ u64 rsvd1: 3; u64 intr_masking: 1; - u64 rsvd2: 7; - u64 vector: 8; + u64 rsvd2: 6; + u64 avic_enable: 1; + u64 vector: 8; /* disabled for avic */ u64 rsvd3: 24; } fields; } vintr_t; @@ -394,7 +395,8 @@ typedef union __packed uint32_t cr2: 1; /* debugctlmsr, last{branch,int}{to,from}ip */ uint32_t lbr: 1; - uint32_t resv: 21; + uint32_t avic: 1; + uint32_t resv: 20; } fields; } vmcbcleanbits_t; @@ -428,7 +430,8 @@ struct __packed vmcb_struct { u64 exitinfo2; /* offset 0x80 */ eventinj_t exitintinfo; /* offset 0x88 */ u64 _np_enable; /* offset 0x90 - cleanbit 4 */ - u64 res08[2]; + u64 avic_vapic_bar; /* offset 0x98 */ + u64 res08; /* offset 0xA0 */ eventinj_t eventinj; /* offset 0xA8 */ u64 _h_cr3; /* offset 0xB0 - cleanbit 4 */ lbrctrl_t lbr_control; /* offset 0xB8 */ @@ -437,7 +440,11 @@ struct __packed vmcb_struct { u64 nextrip; /* offset 0xC8 */ u8 guest_ins_len; /* offset 0xD0 */ u8 guest_ins[15]; /* offset 0xD1 */ - u64 res10a[100]; /* offset 0xE0 pad to save area */ + u64 avic_bk_pg_pa; /* offset 0xE0 */ + u64 res09a; /* offset 0xE8 */ + u64 avic_log_apic_id; /* offset 0xF0 */ + u64 avic_phy_apic_id; /* offset 0xF8 */ + u64 res09b[96]; /* offset 0x100 pad to save area */ svm_segment_register_t es; /* offset 1024 - cleanbit 8 */ svm_segment_register_t cs; /* cleanbit 8 */