Received: by 10.223.185.116 with SMTP id b49csp8829932wrg; Fri, 2 Mar 2018 08:39:09 -0800 (PST) X-Google-Smtp-Source: AG47ELs//iaKSZarOaoEwTHH2+/MiWs0UvHTQ5PRzbikilb4aR8pPv30yi1mIPHMRYePYl7rCG++ X-Received: by 10.99.149.24 with SMTP id p24mr5011134pgd.122.1520008749873; Fri, 02 Mar 2018 08:39:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520008749; cv=none; d=google.com; s=arc-20160816; b=ax5HcDcSh5q/KLrLUSoExyf7xw1rNe1KeGqOUXGovaSF1Wza5RRwOGZEQ83km3X2c1 xe3CG1FLZ/CXxPrIbXu17dxWpPrZX0ZwEa/2ZUUSxeg5xAlh1BfxzUaxgh+qyqk77U+4 YpFlvGP54agNLGnTyxiIbEKBgEdD4SdBJEhi4SU+S3SG2hnmgQ2YPGk9bh1VUaM/xSAg tyQjOHX+y9Z7zXaxysylfR7h+/1cNCTx3IHQfmJgnSa0nkXSYzCuS9B+nHGLqd+tGDlx WL6Ngp+IEJnBamfoeCqNt5fsyMrgMJ5JpaRql0/mlUIG3nY+FiUIBjEbVYP3FKwa9fPZ g2Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=SAhN3KKey9lV6Zn4gIE+wQ2gk6HQPTcgUW7lkCzs8UM=; b=tSx6UM7CCIhMJWRyaWEH9uVfcQOERbJAJPsSvINLW1n2pJcZ0YryzDH8JsSXJjYNUP n2vAux3Jts40d31US/wCsFuyg16mu4eeFACQc1OmJqql2UvhS2lSkQ3WnQw4HUEMCB1h z/tzSxd/Q0Z4zio31rGVaSyF7zLZ9rptnVn0aPZR8Jb1Yi725Bu4kxglNnRidx2IkkOQ glBUZsSwa+RuZHV0Z3nr1OozevK7mdz8K3dEmOSGTSnfSVcUFK0MWL/oNSJhcGrKYkYA bd/ndHHHe6oHMC5TO2YvNAEkGc0u/qsJcXZhWZsfdHoOvdHijAQmU6Ucp7br7yFLIfe1 Z4/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=UpTF0abZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j4-v6si3722563plt.750.2018.03.02.08.38.55; Fri, 02 Mar 2018 08:39:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=UpTF0abZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936389AbeCBQSD (ORCPT + 99 others); Fri, 2 Mar 2018 11:18:03 -0500 Received: from mail-by2nam01on0044.outbound.protection.outlook.com ([104.47.34.44]:42045 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934083AbeCBQR5 (ORCPT ); Fri, 2 Mar 2018 11:17:57 -0500 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=SAhN3KKey9lV6Zn4gIE+wQ2gk6HQPTcgUW7lkCzs8UM=; b=UpTF0abZOE7oD+F+CouSrxx5PxHIpd8psSju4djNC+eFD3eSlzxGpid8ll4yU9Zb3LMXVrQ+8n9eJpPs3TIESk0xhl2P0TSnub7ipTSXp7sZ730s1zZPvrHFAnxtukLQ2C+liEAznkKmMTkCT0Ax2EL6R8q2Fgv3DvFKNNZFLNM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; Received: from linux-pyp0.amd.com (165.204.77.1) by BN6PR12MB1761.namprd12.prod.outlook.com (10.175.101.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.548.13; Fri, 2 Mar 2018 16:17:55 +0000 From: Babu Moger To: joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org Cc: babu.moger@amd.com, pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC 0/3] arch/x86/kvm: Introduce PLE(pause loop exit) logic in SVM Date: Fri, 2 Mar 2018 11:17:33 -0500 Message-Id: <1520007456-85293-1-git-send-email-babu.moger@amd.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR14CA0041.namprd14.prod.outlook.com (10.171.172.155) To BN6PR12MB1761.namprd12.prod.outlook.com (10.175.101.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c893d669-8345-4d92-540f-08d580592841 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020);SRVR:BN6PR12MB1761; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1761;3:X5vH/njUBzFbkqBBm2gur4Gdh7KCMAmg307l/zQ9O3/ywyn8+TguV+w13BIHSRcFn/wbLEueyqsbO5ZRJEUfs8LNsSz9SKzMHveTfDHWv5VO+yPtNcMQLolfQDlkm7NCTrWUPoQ7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bLjxiBicWQv8b2Ax3K6LwMHbXcy3+U5S1PfBHpuoBL7rPIta/ZRB2kGrrfJxaKrloG3ejHArIxj2l9kOIn8IQnxQj6scfFwx1IXl0wPN5AsXlBGfa9kEyBRZfSyWEU2HjVa+Z8nvTy/U+jVwQw+J3q/t/TCl1mJveCD0H46/81r/f3/Q/OhqOy7P/m/yiQMWD/iD7k0fRjyWLx6YqMlpg;4:DZHJzyDcDcHb/RsblXT5PKsfU8nqa4C89ytBEKdPbX9HDj/JAefEotFixWtgty4M7bIdoAqU5q+uHHUz9KDftS6w7nRP7BoNQq07aT0U8Lglve4vN5hMT7wdamudmRz5g5qD35+kOPB4gb9CstFEpbNuxMj1AFXUVUD+rkAKI59fHcfEDfjXGe2265Fs7n1Q10yzMeBds0Aa9Y7FSRwDH75vxXHw2mmHe6+WFxuYTTtpyAn0v+5/W96ORRfMlbDaBCOrZx9YVjprW6razgnO5w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040501)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(3231220)(944501161)(10201501046)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011);SRVR:BN6PR12MB1761;BCL:0;PCL:0;RULEID:;SRVR:BN6PR12MB1761; X-Forefront-PRVS: 05991796DF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(376002)(396003)(39380400002)(39860400002)(366004)(346002)(199004)(189003)(51416003)(386003)(53936002)(186003)(26005)(7696005)(6486002)(52116002)(16526019)(68736007)(6666003)(4720700003)(106356001)(16586007)(316002)(8936002)(50226002)(4326008)(5660300001)(36756003)(81166006)(86362001)(48376002)(50466002)(81156014)(2906002)(7736002)(3846002)(66066001)(105586002)(305945005)(8676002)(53416004)(47776003)(97736004)(6116002)(478600001)(72206003)(25786009);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1761;H:linux-pyp0.amd.com;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;BN6PR12MB1761;23:B7UOZE2gcH0XAdJNEwoHPaxG1kq4vsMWcKl/qQrU4?= =?us-ascii?Q?WkO4GeCTz/3Nb2UQ1Uz1cqfksEptzLnvNsqiTgX26mNFnhReCHrFdCidTfMf?= =?us-ascii?Q?y0qAyjgZdhVZmrxNNTzQTkg9G9h3SXoPIaNsgS74s4xxOvB2rg3q8FrBLSc1?= =?us-ascii?Q?lKu6pxTS7yrQiaE0zh3UpyOVcdPoewtNX8FFNZxdJny/t+mNUBqi9PxasH56?= =?us-ascii?Q?yxWdJHp7VnFY3jvoQcKoCIaMoO+KmjzsrOZfIvpcxlBiT6uMBjtcj2N/zbm0?= =?us-ascii?Q?Veg5Crp9CEyU3rx/h6yXjv1kPeg3+bji36VGzfmcrEvI7VcL4rQyvqTW53Yv?= =?us-ascii?Q?M75LmrRlW029g09/sZtce2JjYFk2k6WvDD1MnMLFhXirMZlr1NktEGiBOZbv?= =?us-ascii?Q?wBaPAbu3Q/Da0vGZx6E6RUQIVRIZkdpySJtT2K3JYgyVq7cUNbkUkcf6EcfZ?= =?us-ascii?Q?xHwqZQDZ1h2+GxOjd2gYigc41WTGfEdqjw71Qso3TZBGbAuVGukUBeQkgl9f?= =?us-ascii?Q?UmSnFSmV9ra9OrBg4THkioAbHMol1SEi8GhImPsNba9M3LH1stlENRVS3pl5?= =?us-ascii?Q?buEcEqUz2NaOXNa988ENg/ooV4+gNehU5l3P2eSYY4DGDQ1D2lHBhRIwazEZ?= =?us-ascii?Q?gQJjIXG9fYX1+oxiP17/bcYt7QZf0Otve660MPfWRFdqb92APZf5GjFsW7fA?= =?us-ascii?Q?ykKaTQwvZ4VpAAOmjMPp7bKR1m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AAdv+gREMuktiA3csf3TnvtEgmuZ0qYkM8W2t80w+Y4=;7:wnNOnMSSp1zB7H79yoGNeoYJRJdbnnVWEpJSAwP3YrMEN4WVkMVWWgSG5ON3QK26Yv8vPucTTrVahCbiA6of4ONN32Mk6IMmrMFsN9/8tEJsz/S6R/uTmsuMNCJsOurlHxU//7OwqFa+nMi5CdsnQuu6EiXXKkQmxpya7sUhqjU+xIOduxqCk3n6UC4JD2vzlciPR4FTB6M8M+CSVBGnRRhPxy8eND2H3X6H33kURT7vJTo5X3GOcRc+9Lv0zCRG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1761;20:D/uPjpjeqZpuQs5RWNQvxwixqHMIAne7J2miCJFPKxes8S1HeThX+eAUz6tz86cEWHjVIbZMiQ1M/PmaZ4GFPnqp9DttbPD21Wr7PnH17aS6jx+5IumS6TLlTeVYuuS02wrtetS+7GqkqXj6Dz4z/rj60uuR8kAcwoM1kO7oEN3+VtkJan8/sdncLg8Sj/HDHT8e5Zlqkx4YKNyAWAsmszOv+9i9K9cI0ZvWPxUaK3IwNzywRSFErM+COAI7eRCT X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Mar 2018 16:17:55.3443 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c893d669-8345-4d92-540f-08d580592841 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1761 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Started working on bringing the PLE(pause loop exit) logic from VMX to SVM. We noticed some improvements in certain cases where numerious pause is generated. Please take a look. If you have any suggestions to make things better, let me know. Babu Moger (3): arch/x86/kvm: SVM: Introduce pause filter threshold arch/x86/kvm: VMX: Bring the common code to header file arch/x86/kvm: SVM: Introduce pause loop exit logic in SVM arch/x86/include/asm/svm.h | 3 +- arch/x86/kvm/svm.c | 116 ++++++++++++++++++++++++++++++++++++++++++++- arch/x86/kvm/vmx.c | 53 ++++----------------- arch/x86/kvm/x86.h | 35 ++++++++++++++ 4 files changed, 162 insertions(+), 45 deletions(-) -- 1.8.3.1