From patchwork Sat Dec 31 05:46:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9492621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 36BFD60416 for ; Sat, 31 Dec 2016 05:50:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23B6822689 for ; Sat, 31 Dec 2016 05:50:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 152CC25250; Sat, 31 Dec 2016 05:50:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 73B4522689 for ; Sat, 31 Dec 2016 05:50:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCW8-0004NE-93; Sat, 31 Dec 2016 05:47:44 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCW7-0004MM-03 for xen-devel@lists.xen.org; Sat, 31 Dec 2016 05:47:43 +0000 Received: from [85.158.139.211] by server-17.bemta-5.messagelabs.com id 4F/BA-12366-D7647685; Sat, 31 Dec 2016 05:47:41 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrBKsWRWlGSWpSXmKPExsWSoa/krFvjlh5 h8L5X2GLJx8UsDoweR3f/ZgpgjGLNzEvKr0hgzVg8Zy57wQyhiv0/d7I1MM7g72Lk5GARaGGW 2D7fD8RmFIiXeHd/ASuILSTQyCTx7QsTiM0mYC3xas4ddhBbREBWYnXXHCCbi4NZ4CGjxMmXq 8CKhAXcJZ7vPMgIMVRVYtqmX2ANvAK+EhOm9IMNlRCQkzh5bDKYzQkU/3vtDFA9B9AyH4mOz8 EQ5YISJ2c+YQGxmQUkJA6+eMEM0aokMXNbAxuE3c4osXp9FsSdWhKXjxyEivtKzH/0jhHGvjF hKhvInRICK9kk3s64xQrhXGKTmP14DVRVjsSsz/fYQY6QEPCUOL/NBaJmCpPEtQ8voLofskoc e/kDaoWMxP2TV6AmvWaVuDn/HzvEC/ESv+Y4Q9Ss4JOY/U4eomYNm8Tuo9PYIEEkJfF+x0lGC FtGYsOMOSwTGFVnIXl7FpK3FzAyrWJUL04tKkst0rXUSyrKTM8oyU3MzNE1NDDVy00tLk5MT8 1JTCrWS87P3cQITAUMQLCDcW2r8yFGSQ4mJVFeS8vUCCG+pPyUyozE4oz4otKc1OJDjBocHAI v16y+wCjFkpefl6okwfvCJT1CSLAoNT21Ii0zB5isYEolOHiURHjlXIHSvMUFibnFmekQqVOM ilLivD9A+gRAEhmleXBtsAR5iVFWSpiXEegoIZ6C1KLczBJU+VeM4hyMSsK8miDjeTLzSuCmv wJazAS0WC0nGWRxSSJCSqqB0bhv/Z9mzgA7pirzP16aTr/MTkvMuxb7UnyVxUMjralpx31EuS uLVhy+PbFfUVzz9ropH7edXfM7R8f07crMrr97nu9bYH594h43lblras4WRyVb389pn+zMdpl pb1VtRLzfvGt7Olnei61ofcyR/fObatHNjdzh9SGVecs+m62LvtS+3n9rtBJLcUaioRZzUXEi AKfVH4GLAwAA X-Env-Sender: Suravee.Suthikulpanit@amd.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1483163257!77628005!1 X-Originating-IP: [104.47.34.67] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 62648 invoked from network); 31 Dec 2016 05:47:39 -0000 Received: from mail-by2nam01on0067.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.67) by server-7.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 31 Dec 2016 05:47:39 -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=bV5eBeHH55uZB1XYGDv1gEJNceVxQbmUeXXqv1DCtwA=; b=zu5dAf4VcB2Svd1qSpeOu1+F4iDhPVnuU8cQafIK8BZWiy5Zm092BYh3JRyAz5QidX9C1Kf77DbwcOUIC96PqGyhYV9J7XspH8RNxA4JVYGsElom+LRjhIWCHwquBX6RNXcDOQ7Wk53DgDof2bzOKUOg1DzFCli6ZNvnKdvHn68= Received: from localhost.localdomain (114.109.128.54) by MWHPR12MB1453.namprd12.prod.outlook.com (10.172.55.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.789.14; Sat, 31 Dec 2016 05:47:28 +0000 From: Suravee Suthikulpanit To: Date: Fri, 30 Dec 2016 23:46:00 -0600 Message-ID: <1483163161-2402-10-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483163161-2402-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1483163161-2402-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-Originating-IP: [114.109.128.54] X-ClientProxiedBy: PS1PR0601CA0058.apcprd06.prod.outlook.com (10.167.43.154) To MWHPR12MB1453.namprd12.prod.outlook.com (10.172.55.22) X-MS-Office365-Filtering-Correlation-Id: 9867bdb5-a98d-4587-f86c-08d43140864d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 3:u2eFTqS22GGY8QxFHyXSgKcO6UxW3bPEsGa8W/BxTsKEbRU4FrNRd88MmfCGtOWC5eUApbayVKr9hpCJ3z34Dkp0MBaYBH/Z6AwrOtkYVgowv+gXsRQEMFc+Po53CpVBRpsG53Y10zQRUQWO6g5SUYXAmcrSU6VfmlAkKrg9wof2c4HN4HkgKQLvaReEsVt7EKcF/OnZUZe9XOYL1Nu9pSqIbU6nZmCUeuVF9CVLFkIaLWEnerjnFr7Vhg6dpTmw9Pbn6TLX2JTAzClTLRlSIg==; 25:vEnOcRkTXMqNHpJ6ozqCc4mXWr1aPnTUGLakuHmuCu+NCSv+uyUrVEflYB1lv6k0YCL6eZfQ9de/g4oji8v2Z8D2BnO09hCfWGSBTWKqElbn78YuLAailKnuFVtMXErxl58hV9/9SDPHVki2tlpwk4pvYVEiCQfLfWQrub42nn8wjpD/w/ljVFUpt0QcZ1wG5c3jUHaS8x/59UEuNfzxJQ2IE18vMjVVp+WQXFDmaZ3yN1hwCo1bfbUdsje49qNkWdSWWEj4xF1BZbmwvhNW9UoqnS0Nq8nVINYb+XaP6B+fGMv6OcZNFMKeaHRQzeMUAPC5t6bGp9H5MFgxDEaAE2IqgaJ6AGqO62tKw0BdkvC2sLk1oYWzOoNMXXabq9yO8lo5Xgl2iISVshmeToODx8SLo9P/ywHui3OdWc4VdwCNhNUN5OaZUUHk3iLwiVa+d1WOXgwvfOYykU3dMitG8w== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 31:rfd0qozRPRY3xcxfO8+ITNOK0UUYl+ET/fg9Se+1dlVCOu3ojfwz/NQ+9Zo+9skmlZqgQM4zLDIGdPElaioNwybDAamqG8XtsVWpQy9ZQDXrkoUU2Hsqwub3T3ZG8ylFQjf5Q0os3syqgRNX4bLqobn6Lf2un9JjtENp3jeQTeQ9q6kCHmu+3S+HwvHMjWaPA4+hrrBlL8YIJLUSaeOQzRzGQFLcMdbJorDZNeToPNOrrvXCNY5PurrOBPYDsHqft0RmGNtTwlrN2PKMXNLZtA==; 20:OdL0F2WKUu6WXrN+7PxEw4dp3xiU+QR+q2IAKebX4eXsCAGltn9Om7VF6fcbIcMa5gOU2VFApijFbEMM1K4OJ5qfh779VWJN9BEC2XCbvAv0K4gsm/LLaHRXAI9KsHM2P7An1jgbtz7i3y+5FlRISUcuRVo6O7wpbunIuxPyS6g+cC/t93bFK6m+1uSfhCYj8uzaSKEraiuaAuyF132i3PQK5js1d6RqhB8GyRZNhdNGrOZIT+cO9evV1+1VaXwXCsl+vdbOjKjO2qlqrWcBuF6YsLzLi9okBtcL9HFe6YzkugaRZf/DeCcJXXS2uiJwFWDr6Slgqgovr2Qnh6f6sP7+DzotU2SFottIWC4Z6qiNC3MoLjgYPJnGKQMUFDmN+SXgrRz9YpfRk5KEtarlcPjXSbi/zjqJqWdyvQBaWFuqW8ipgKSlLggKTSytM8eNqjOdv9kmrsPHmfKqQaYWEkLVf8IbE7WTCfdnOGXa4+zpMyGBpRaoEDZoVo4QnX13 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110)(146099531331640); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6055026)(6041248)(20161123562025)(20161123560025)(20161123564025)(20161123555025)(6072148); SRVR:MWHPR12MB1453; BCL:0; PCL:0; RULEID:; SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 4:xH+ub1W8nGMFjPhn5OVL0himxVDFtbmEmrtUJDxMZ0p2mDFGHJhTwOZVOSO9MN2K7ZVlIClLQ0162Zfmgp2lE5ICTXiLbP0DbGXLsSB12yAzORwavvexAiAXlXflQ3Z+TLu0/MgLvb+/36SC1MZJxm2m9P1HuUTf11lKcGkOmqTGg1QKBqdsQRnCwKeTHzXAY1tUOdnU22ZTbfOIVNU5/4XnajyQIFZ4EMiRVoVDS6VaEEaI75uaQHtfh8aVz68wJvAcrUwllS0DXKtSphQtox85rgruTC3iXdS5SpbYB5/SO1He0UBPsmyGQURdk1r7mzs2SP0zrpmKtKIh/bgXy9Dzd4ZgLYMq+xFEo+egfO924fioiQNq7RCdVeCvDFVtpaTsKCOzX1xjx5p9a6ll8MWGv7LfxiwF0PmBmPR3P3ynuKu4Ms37yPAkEp1aG95bRntXdM0OHR+00yZkNaFuaKo7nAcexjwtPGyNGTO5AJEbcCKaVlOpXZmMzhj/eXk/C7jg8nmRXbZHVu6Hen484LLlyOa267Q1Lw37iIjPQnzH6wx34CQwAPLRnMoEeU3nNKlL/VUbp82F2+Xd7nHrb95XlVxNKR1M8bDoZkoa1CFZTHEa/b8FzZsQTDIhruKwNWRQy8cREJNUr0IM2GTnOBIJjzc8cIha5uAfakWfORQ= X-Forefront-PRVS: 0173C6D4D5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(39860400002)(39840400002)(39850400002)(39410400002)(39450400003)(199003)(189002)(92566002)(68736007)(4326007)(25786008)(105586002)(48376002)(50466002)(81166006)(101416001)(305945005)(110136003)(7736002)(5003940100001)(8676002)(2351001)(3846002)(36756003)(106356001)(50986999)(6116002)(8666007)(81156014)(189998001)(42186005)(2950100002)(33646002)(76176999)(97736004)(575784001)(66066001)(47776003)(54906002)(6666003)(86362001)(38730400001)(5660300001)(2906002)(6486002)(6506006)(6916009)(50226002)(6512006)(52103001)(158003001)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR12MB1453; 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; MWHP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f4L1Ep5laTHxYHL4cyFBswbPIy8XfsIz4y/oQ5ayvzllgOrQu79/mkU5lUhBK X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2016 05:47:28.8981 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1453 Cc: Jan Beulich , andrew.cooper3@citrix.com, Suravee Suthikulpanit , sherry.hurwitz@amd.com, boris.ostrovsky@oracle.com Subject: [Xen-devel] [PATCH v2 09/10] x86/SVM: Hook up miscellaneous AVIC functions 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" X-Virus-Scanned: ClamAV using ClamSMTP Hook up virtual_intr_delivery_enabled and deliver_posted_intr functions when AVIC is enabled. Signed-off-by: Suravee Suthikulpanit Cc: Konrad Rzeszutek Wilk Cc: Jan Beulich Cc: Boris Ostrovsky --- xen/arch/x86/hvm/svm/svm.c | 26 +++++++++++++++++++++----- xen/include/asm-x86/hvm/svm/avic.h | 3 +++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 922f48f..7c0cda0 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1438,6 +1438,11 @@ static int svm_cpu_up(void) return 0; } +static inline int svm_avic_enabled(void) +{ + return svm_avic; +} + const struct hvm_function_table * __init start_svm(void) { bool_t printed = 0; @@ -1472,16 +1477,27 @@ const struct hvm_function_table * __init start_svm(void) P(cpu_has_svm_decode, "DecodeAssists"); P(cpu_has_pause_filter, "Pause-Intercept Filter"); P(cpu_has_tsc_ratio, "TSC Rate MSR"); - P(cpu_has_svm_avic, "AVIC"); -#undef P - - if ( !printed ) - printk(" - none\n"); svm_function_table.hap_supported = !!cpu_has_svm_npt; svm_function_table.hap_capabilities = HVM_HAP_SUPERPAGE_2MB | ((cpuid_edx(0x80000001) & 0x04000000) ? HVM_HAP_SUPERPAGE_1GB : 0); + if ( !cpu_has_svm_avic ) + svm_avic = 0; + + if ( svm_avic ) + { + svm_function_table.deliver_posted_intr = svm_avic_deliver_posted_intr; + svm_function_table.virtual_intr_delivery_enabled = svm_avic_enabled; + P(cpu_has_svm_avic, "AVIC (enabled)"); + } + else + P(cpu_has_svm_avic, "AVIC (disabled)"); +#undef P + + if ( !printed ) + printk(" - none\n"); + return &svm_function_table; } diff --git a/xen/include/asm-x86/hvm/svm/avic.h b/xen/include/asm-x86/hvm/svm/avic.h index 1676e01..5be3e76 100644 --- a/xen/include/asm-x86/hvm/svm/avic.h +++ b/xen/include/asm-x86/hvm/svm/avic.h @@ -41,4 +41,7 @@ void svm_avic_vmexit_do_incomp_ipi(struct cpu_user_regs *regs); void svm_avic_vmexit_do_noaccel(struct cpu_user_regs *regs); void svm_avic_deliver_posted_intr(struct vcpu *v, u8 vector); + +void setup_avic_dump(void); + #endif /* _SVM_AVIC_H_ */