From patchwork Sat Dec 31 05:46:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 9492623 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 523D760416 for ; Sat, 31 Dec 2016 05:50:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4142D22689 for ; Sat, 31 Dec 2016 05:50:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 362E625250; Sat, 31 Dec 2016 05:50:06 +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 AC0C622689 for ; Sat, 31 Dec 2016 05:50:05 +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 1cNCWE-0004Pt-Gv; Sat, 31 Dec 2016 05:47:50 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cNCWD-0004PM-AE for xen-devel@lists.xen.org; Sat, 31 Dec 2016 05:47:49 +0000 Received: from [85.158.139.211] by server-15.bemta-5.messagelabs.com id 2C/54-06501-48647685; Sat, 31 Dec 2016 05:47:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPKsWRWlGSWpSXmKPExsWSoa/krNvslh5 hcOeXnsWSj4tZHBg9ju7+zRTAGMWamZeUX5HAmrF9+3GmguNKFTOuVTcwPpbqYuTiYBFoYZaY cf09axcjJwejQLzEu/sLWEESQgKNTBINj36xgCTYBKwlXs25ww5iiwjISqzumsMOUsQs8JBR4 uTLVUwgCWGgou7btxlBbBYBVYlPDa/ApvIK+Eq8eHwBbJCEgJzEyWOTweKcQPG/184A1XMAbf OR6PgcDFEuKHFy5hOwcmYBCYmDL14wQ7QqSczc1sAGYbczSqxenwViCwloSVw+chAq7ivxb8l 0Fhj7xoSpbCB3SgicZZLYuWo+lHOOTWLZnU9QziU2iZZLXWBXSAjkSPz+UQphekqc3+YCUTKF SeLahxdQ9Q9ZJfa828IOsUJG4v7JK6wQiQ42iTMbD0O9Ey/xa44zRPwMn8TVnglQRWvYJO4+n 80GCS8pifc7TjJOYFSbheTvWUj+XsDItIpRozi1qCy1SNfQUi+pKDM9oyQ3MTNH19DAVC83tb g4MT01JzGpWC85P3cTIzAh1DMwMO5gfNTvd4hRkoNJSZTX0jI1QogvKT+lMiOxOCO+qDQntfg QowwHh5IE7wuX9AghwaLU9NSKtMwcYGqCSUtw8CiJ8Mq5AqV5iwsSc4sz0yFSpxgVpcR5G0H6 BEASGaV5cG2wdHiJUVZKmJeRgYFBiKcgtSg3swRV/hWjOAejkjDva5ApPJl5JXDTXwEtZgJar JaTDLK4JBEhJdXAmF2164bhp6v33qa1qbKv3nVV1VHOY67Jk4rFWT0JG9Zc2pqUYdu9P7/Nk1 XUbbX7et3/uuv/8/9/0H8oNOTouiWebLktnRqvoji9elexXdYzexItoFYcK2xy+sglwaBXk/9 n91j7y852WrJwFoNsswC7seujgyflWDbd01x77mB3X9cLa29FJZbijERDLeai4kQA/dLrToID AAA= X-Env-Sender: Suravee.Suthikulpanit@amd.com X-Msg-Ref: server-15.tower-206.messagelabs.com!1483163266!63792569!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 14572 invoked from network); 31 Dec 2016 05:47:47 -0000 Received: from mail-by2nam01on0067.outbound.protection.outlook.com (HELO NAM01-BY2-obe.outbound.protection.outlook.com) (104.47.34.67) by server-15.tower-206.messagelabs.com with AES256-SHA256 encrypted SMTP; 31 Dec 2016 05:47:47 -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=DAV3wa4Fzzchjnb5nVjkrLXswj4PcIbkXw1N4GfxZCA=; b=axivjaP91XEx2Z4FzOcc6G3KUljHQ4Vo9T+AZVgQg25+loNNTAPFn8jQP+aVj+gz6rj69XpzAwt6sVUjUG8eYEe81HGgPl4TlzOJPk0drsP68U231iBKFNwS6uELfTM5FJkgLhpEjG0zasbAxjd4Kn/x2/T6ZSXtyp7b0X0gp74= 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:37 +0000 From: Suravee Suthikulpanit To: Date: Fri, 30 Dec 2016 23:46:01 -0600 Message-ID: <1483163161-2402-11-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: b62e7ba4-f638-4084-a517-08d431408b59 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:MWHPR12MB1453; X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 3:CezMjganDi9xB2K1axAmeYd7TzOiQtqkh5hrnH2TyjqCpzBMyVjtbPv9mxHyapYwb3YWLYlFOus4JEZWTkldsrwD1DILVzi9Oem3N+SqxBM44nuM1M3eaT5UZVeT5DaqP23PYav0U2rNCsg5qKMr5SOcYQKWosZ+6gcMOCwB+2xvgWZYvO9gG28zHzwE3MRA/ouKkwk9130heP5xkBsulTbMs1vlUAug82DBU40BgcEd6xk9390nasJxAk3pagwFBEwwC5gtV8meph9lH26QPQ== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 25:TP2pVvxZmWSqAZm7uIs+lHJLE6UEZhtanz2mRVBd43p0Gsr8QpgDzCNVD88xmQr78ui0Gk+EThEwIYbWwHDVklocWXLoMd2C0aLNmHP+757/eDnDeVRz9fmIO24/Ud5wyOa98za5wrz+1k8UJNF0R78fyR1nsofjQqkCNkx2B0q79qujvzl6VnN2bOaRoOhfilH0g17L6Yj7BTfuXoiNusvnzJd8VqhBfebztyXxYv/j40W6n82+StD49I5l9UifOKeCm9wVlsspR+9k85JqW2HrVopNjj2A5oklISO5oFdn6qtftPoNovIQRYjeOVHvotYfBbDGb2/GzXQ11KgZSt+zsuUvy55nPAFeC76KcKemnNiDb1ZP7Zn5ofz/8A6RJa+gRmrU5d6aZLSGgwgpM9FViai6lXhCvSnvzCVlOAh1dMAIiPNSLRmypjx1sct965IUF5Cty19ExKBZ3IIbJGumQ0eiV7XMb3JuBy6CChvv2q+YNTjYB6rmixCc/TrNyKxyAw1ije6uZqBKv5PtjdNsyLFacr39e2Ag6VbO2m1JWHVMGxhcg3XIvFHpNNpCHdILX/oFpLRT2SWVMUZCethmRgVn2zzJVfTYtfS73UIhFJ6mY6VsGmchWmrcum5Xa+TUTMWH/udewLfW6weNwkIiqsRZAV6KuLP0KXdeZbIYGBbtcdeIwuuEZK28SHn8W4Ar5vudukaX47ycv3VS2VN+RYJvEiIoLA2/rlMV+W4evt9epofzACqCAK3pM1DqI079G2TOmnHN/av4Xn4BMA== X-Microsoft-Exchange-Diagnostics: 1; MWHPR12MB1453; 31://iKYICcANgRYVtbQXBvh7gNVG0DYHWZPSiHTKxpoptaeNjHKPLVKhUbKV8nKD2Ymg85XKfhMF4O/xhFDAg8hqKwUno4S3y1hkb0usdTw8fuSyCAKlmkzwGu/buZyKJ2QcJuaFD5KjoDmaJXxI48z01YagkRWnlKICiWhAbeEDloz2L8fOhnGEk2s36R1oFTyrbxSvKad4SZJDL5towj+RCz6wzVGLZvmwvEZGJ3AyeJf2ibM7C/A2uMSbV9gKNZIdB/LHgJwbLG83lvFk4KZg==; 20:imqqYAAR1kpbCCdyKu5UKpoV/Hh/8RzRN9dmKU+IHhzxPH7qqlxNyDZDmyU6IawIXcAVBHTkvX9vcy3grBDFkOtUJf45ZmF8Ajuz/0h8a6/Bu2lVQQW4+CmlGJVsCB8hdT9LcJEMqd2spOM/JawHhEqf3KLgq6+fOUQWfYcmCFv4c0j3WoaJUOIRmGvpL+QqM7essx1nIe9Yop9xf7qNloc/Jhv6jrNcwtI3Sy/+3o9v/+kOnsph3Q50zJJAQcXQmW/OpnUICGdTQkS1ZfPMYkZ/l72VXCTodXKX+Ix5W47MFfR/M4KVd20pGOTPe88KSTRfeS9NKvQUtj+7K3R0JPHfAvlx7g5zDtUUpg8kdsXDb9r0PlFVjkIxVQ1XGx6U6vE1BGzKbWRFbWgQf5v2cEXl42Lq4lKyw7wkM9V4+bUe0znsFHd9FuiZk/R7BWBg9Pfabk4+QEVoTFcsnXSNnWjHtmDo+AKSR5F2Fi27f3d3bP9s72+niE+44yQ1F400 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:0uos80e4n0TGbkkY9k214u6SGS/IKL4AdoLR6gQ4ieDti8tfNRoUwsIzWvKar8bCz7c1UBkLpfm6ZslUtNloRDJwOz+pidPguE6wDVyhXDTuCT4xaogJ14mGKSwR5ML6cyQ4TBp0cbE2w7QZkk42h/LDfCWYcSnO2pTtEbMqNu0jsaJ+DdXsoeTaw1CIIDPb0wMFppz3sqRQ9neZ1d/rc1Y8J6DkCCiFLm7W08rkDWDgzV2NlOO1mFIS3puJ2VKZRHhH3nEQe15g9c62Lcy1JZj8LBXsukb/RzQS12o7MWcx31Qn+sYelvpYxg1PXm1P6lNWyqxOUs2cAmMYV6+wa5jJv+Ph9+TA0mAYjoi9WcteHMNqhQzKWLHUJuCxTpBVlTR7Pv45dawFMvH181WTGot4W5W6AJpd/A9K8RGOsYYXJJfldJwc5p36d/XWHUIEmYrOyGmR4Bhe9aqYqErXeUQrKqffeMNfzBFmaFen2U0VGzLXQAEBXXNCw8VAxpKZKxtdjCrGnqRAR7guI4aVeRTisYBveusz4fhjFGv3S0s8svQNu+PgSGGhtCGdj2f/M3uaNf2ulF79LUnT8X+k0AIj/iFyguGhmju5qpHGuN1+PTs2vIMslukh4zr1q3RV4fsubLGNEiLs0hCOAqsJICYeWn8yU6qCpJMHZ64dE2s= X-Forefront-PRVS: 0173C6D4D5 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(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)(217873001)(969003)(989001)(999001)(1009001)(1019001); 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; MWHPR12MB1453; 23:blkXHMoV+hZE1SSf+L4Swmz5A2G9XSzLfcUv/QNmo?= =?us-ascii?Q?vA1SWhpJ7tGs7iLd2f2KXYDwkidgt6tnx72tqHOAd0jk6PQ63SOBICfO++mT?= =?us-ascii?Q?tjzxh8hQB9qvz2WXvhdtFEO2mZnC0N4fO2DQGn1aZuj6dPWfgrQtEYHo6sC/?= =?us-ascii?Q?swBCQADNHVq9pUTD1j/WS+WZVvTpiw5OrrBmCsxl6XdcS60UOBcz3TDWOyoP?= =?us-ascii?Q?EUSptQIcfS4Ho6xzQGpDcfNh3IS9SFOXY/vUcaXTMdR7Z56OKZORqHe19ach?= =?us-ascii?Q?und+unob5SHKQR8Z/hSQDzNbG9viwWbVwGtBpeHOERrfF+wRSEzMVL0PgIzz?= =?us-ascii?Q?i2TukPNUb3gygVe3QIL2yfdzFM1Au0UG1CHzGdBLFHedn78Qi8yCPeTqgTa8?= =?us-ascii?Q?lXKBmpO0F6OK1L7jpxM+tzJOkQStSoGGBR4WHlJ6L/ehbbZrYUpEHipeAKX2?= =?us-ascii?Q?zoMT8V960wuvefrov61CvzAd3ud7ZD+j5+Ob0qpUHscvR+ymMFfyagLCQR0v?= =?us-ascii?Q?fJ4iJbeIaprZPBRGqTbp0mRzzfebeqyD/pPTVsT0T0RI2WkxrfBSWfDAh+lH?= =?us-ascii?Q?K5P3JAIhf2SSMZjRVFdJ1Z5p03PGzF2T0rKZvo3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f36GytBWlEHYJt7V+6bw8eOzAjpO5SUPC+1HzpevNbQHWPAo7bSWEjFtnuSF7F+WkFxhCAVNsgob3zX4q7Lre6eekn8FQ7NwLeRQRQlTiulgh6YZPSOh2Pis9PhLkpkM59JwfHEe+taLElJtc8d7fgZW/cg+nG4Q==; 20:Po6wjV4FB4reqjS6mulp/Yag39CxRAygoWGgbgl4uLcAp5U/4o3eoiLhVbZ5sJVkohNwf/p7NNCJa2Iqr4ozUvWksaBKK/+7h0eYxUEl85b9vKI68M3r9fdqymApfXN72z5RgFtk6SVTP0wYcm8oMTHHDeBgR070SLx9sz25USPcvgGDp8cMlNnHriuklAlJSYW3Qi+uk9BJJ49AcwW6acn4CP8QLPKhR4p/7nGSPi2eKfI6FDXo3OIQZZN4euga X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Dec 2016 05:47:37.3722 (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 10/10] x86/SVM: Add AMD AVIC key handler 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 Adding new key-handler "j" for dumping AVIC-related information. Here is an example of per-domain statistics being dumped. *********** SVM AVIC Statistics ************** >>> Domain 1 <<< VCPU 0 * incomp_ipi = 3110 * noaccel = 236475 * post_intr = 116176 * doorbell = 715 VCPU 1 * incomp_ipi = 2565 * noaccel = 233061 * post_intr = 115765 * doorbell = 771 ************************************** Signed-off-by: Suravee Suthikulpanit Cc: Konrad Rzeszutek Wilk Cc: Jan Beulich Cc: Boris Ostrovsky --- xen/arch/x86/hvm/svm/avic.c | 48 ++++++++++++++++++++++++++++++++++++++ xen/arch/x86/hvm/svm/svm.c | 1 + xen/include/asm-x86/hvm/svm/vmcb.h | 6 +++++ 3 files changed, 55 insertions(+) diff --git a/xen/arch/x86/hvm/svm/avic.c b/xen/arch/x86/hvm/svm/avic.c index faa5e45..1aea724 100644 --- a/xen/arch/x86/hvm/svm/avic.c +++ b/xen/arch/x86/hvm/svm/avic.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include @@ -320,6 +321,8 @@ void svm_avic_vmexit_do_incomp_ipi(struct cpu_user_regs *regs) u32 id = vmcb->exitinfo2 >> 32; u32 index = vmcb->exitinfo2 && 0xFF; + curr->arch.hvm_svm.cnt_avic_incomp_ipi++; + switch ( id ) { case AVIC_INCMP_IPI_ERR_INVALID_INT_TYPE: @@ -580,6 +583,8 @@ void svm_avic_vmexit_do_noaccel(struct cpu_user_regs *regs) u32 offset = vmcb->exitinfo1 & 0xFF0; u32 rw = (vmcb->exitinfo1 >> 32) & 0x1; + curr->arch.hvm_svm.cnt_avic_noaccel++; + switch ( offset ) { case APIC_ID: @@ -654,16 +659,59 @@ void svm_avic_deliver_posted_intr(struct vcpu *v, u8 vec) if ( vlapic_test_and_set_vector(vec, &vlapic->regs->data[APIC_IRR]) ) return; + v->arch.hvm_svm.cnt_avic_post_intr++; /* * If vcpu is running on another cpu, hit the doorbell to signal * it to process interrupt. Otherwise, kick it. */ if ( v->is_running && (v != current) ) + { wrmsrl(AVIC_DOORBELL, cpu_data[v->processor].apicid); + v->arch.hvm_svm.cnt_avic_doorbell++; + } else vcpu_kick(v); } +static void avic_dump(unsigned char ch) +{ + struct domain *d; + struct vcpu *v; + + printk("*********** SVM AVIC Statistics **************\n"); + + rcu_read_lock(&domlist_read_lock); + + for_each_domain ( d ) + { + if ( !is_hvm_domain(d) ) + continue; + printk(">>> Domain %d <<<\n", d->domain_id); + for_each_vcpu ( d, v ) + { + printk("\tVCPU %d\n", v->vcpu_id); + printk("\t* incomp_ipi = %u\n", + v->arch.hvm_svm.cnt_avic_incomp_ipi); + printk("\t* noaccel = %u\n", + v->arch.hvm_svm.cnt_avic_noaccel); + printk("\t* post_intr = %u\n", + v->arch.hvm_svm.cnt_avic_post_intr); + printk("\t* doorbell = %u\n", + v->arch.hvm_svm.cnt_avic_doorbell); + } + } + + rcu_read_unlock(&domlist_read_lock); + + printk("**************************************\n"); + +} + +void __init setup_avic_dump(void) +{ + register_keyhandler('j', avic_dump, "dump SVM AVIC", 1); +} + /* * Local variables: * mode: C diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 7c0cda0..b8861d8 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1456,6 +1456,7 @@ const struct hvm_function_table * __init start_svm(void) } setup_vmcb_dump(); + setup_avic_dump(); svm_feature_flags = (current_cpu_data.extended_cpuid_level >= 0x8000000A ? cpuid_edx(0x8000000A) : 0); diff --git a/xen/include/asm-x86/hvm/svm/vmcb.h b/xen/include/asm-x86/hvm/svm/vmcb.h index 9abf077..e2b810e 100644 --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -552,6 +552,12 @@ struct arch_svm_struct { struct avic_phy_apic_id_ent *avic_last_phy_id; u32 avic_last_ldr; + + /* AVIC Statistics */ + u32 cnt_avic_incomp_ipi; + u32 cnt_avic_noaccel; + u32 cnt_avic_post_intr; + u32 cnt_avic_doorbell; }; struct vmcb_struct *alloc_vmcb(void);