Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp32757ybp; Thu, 3 Oct 2019 14:20:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVUXzmaMAk1Oco2DE7oH2KDDj6uKp120l9QlZYglVQITW9ZghU8hHQqyZJW6PtRPx67Hfx X-Received: by 2002:aa7:c1d4:: with SMTP id d20mr11627495edp.223.1570137652927; Thu, 03 Oct 2019 14:20:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1570137652; cv=pass; d=google.com; s=arc-20160816; b=INioHm9KVyqwusARHokvHWLDmDown/znxx8RjOoGQ86vpZU7xBfx+UFw6gJVSBOEaK nVwS5dpCxXchUjUdLyewLAj0SHXQKhCaFlPj+k+AvhQgpLX0mrFRNY92SOvrO8c4sctd SluCFG3c2bFlb5rT7m/M8xU075twW9yxxzPGTeHuHL4jEDKB5rkzT/ABHWaJuH1ypYWo 8zaulA/otaq3c7GcMQVfmnOMhzbFnNbOzBkTbiufTDSuc6YSSk6Jv/PYzFERgCdg/Pkf 3iXfBGBd8zUWAX7kzxEDvPR0EUDJyaQkmAeJL/mX94R0t0UyL5McRSzxrn/SefRlnutx zwIw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=XykmkkuZiFPc1sAZo3nrIR4fnLv6b1zXkHkJqbpZlZ8=; b=hz0rEQjNj6FrnX/NYCkpO5xV0JY4jrbnycpfY2+PUUH86ZKgTMDuaSJ0Dzw2nfOiEY q8u/oL++O1x+QzltrECj1HGZCP1BbYHOYOHeJGZVri0QT48T6o7/Po9D9217CEtgPGyR 1g/DUoKxUwWBvgoihf36Pe21EavvEU6qM2WOUSDy0Ke2X4dIgJDWV2R6BF1Y+UUhyRfo 2Qcgp2gapeS0gqlwM8pUjK+b4BeAdrL50Z1HewMYD2DG2z2s2lYCZ9gZbvDCwExTm7KI MjCOsp/+H04ojMW4fugH3FcNaOXXHZdIjowWtHU20Cse/GLfNDKR+mY+ghksEa6jCX/C 59lQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b=Vta+9zqS; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 v14si723706ejw.436.2019.10.03.14.20.20; Thu, 03 Oct 2019 14:20:52 -0700 (PDT) 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=selector2-amdcloud-onmicrosoft-com header.b=Vta+9zqS; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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 S1732084AbfJCVRp (ORCPT + 99 others); Thu, 3 Oct 2019 17:17:45 -0400 Received: from mail-eopbgr730044.outbound.protection.outlook.com ([40.107.73.44]:46240 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727789AbfJCVRo (ORCPT ); Thu, 3 Oct 2019 17:17:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Xh1GUcGH7wot7Gn8TYnIg3uToFIZOrvndTaYyZtNb1qjTmgn4MpbGJbMbqWBfBMgkmrysjmzfqERl52KSGNldjW57+WxccIcktbDeS8F7nTj0HwOlckCFkGpPnWiCJNaOtlBOdOs3VP4oEETDHbtvNdQ1XY62Fj/mGlsA7t+zRPglESPiMi0Q9Xbv8S6cEskpiNXXvNUOw8RDd2PJcq93jvCdBSopPlKeSBRB/+k/8wdaKDvBy7h3irh9aq5sV4Me6umKRyE+3c3ByZqKrZCxRhy8sFXnr+euxa/C0iPkabblK7bU+lj/auF0cjGfUEhmfJGWguXXyneqGcc8q7Acw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XykmkkuZiFPc1sAZo3nrIR4fnLv6b1zXkHkJqbpZlZ8=; b=dbsnN2Yp7XYb9BZME+aqNIEhdfCMzt5mntZ8rVxSoVWaijUryEbmH1uvFUwLgigsQOP8XN+kiByJVw45tF3JRQaJHvSLCXKTCESfxl0uby795WaDhKa4ZT4gM4h4Jh6/fSOZCetq8Dy1IcTzaR5sUavBb42zm+utlePS1kb3C9oPHDFYZ5I18dav0rbAWgl45UazEkYvPGqi60/Qe79x9tto1ufpJHsLUTU6xbTBiei3VFf3lipKtJIn2EHcoMZtX9ahLp5O4KWzC7YqieVgt4Ke+S4i7KXx6uia0atLyItb2rnAPlVB7WMD1VfgktrFpNNNQBJwmLJGxqYxqG3zUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XykmkkuZiFPc1sAZo3nrIR4fnLv6b1zXkHkJqbpZlZ8=; b=Vta+9zqSCbM46rP75lk58TdSLXwr32HBcWB4bTG8AlhItj5b9OTfcvGIVBy/Gx/HgaCamR4bphmCH7zpLeMK6YvY4k3LVi3ucbr4ZqK6qIReQb6ywQMYs134YXOXNicnV4nIdpwzacH7y7FiGK4a+69TVFwuOR4zU8I+gNBq4H0= Received: from DM6PR12MB3163.namprd12.prod.outlook.com (20.179.104.150) by DM6PR12MB3211.namprd12.prod.outlook.com (20.179.105.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2305.20; Thu, 3 Oct 2019 21:17:42 +0000 Received: from DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::85b7:7456:1a67:78aa]) by DM6PR12MB3163.namprd12.prod.outlook.com ([fe80::85b7:7456:1a67:78aa%7]) with mapi id 15.20.2305.023; Thu, 3 Oct 2019 21:17:42 +0000 From: "Lendacky, Thomas" To: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Paolo Bonzini , =?iso-8859-2?Q?Radim_Kr=E8m=E1=F8?= , Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , "Singh, Brijesh" , David Rientjes Subject: [PATCH 0/5] SEV fixes and performance enhancements Thread-Topic: [PATCH 0/5] SEV fixes and performance enhancements Thread-Index: AQHVei/+m230dNdjaEiFD9na+UoMxQ== Date: Thu, 3 Oct 2019 21:17:42 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: git-send-email 2.17.1 x-clientproxiedby: SN6PR05CA0006.namprd05.prod.outlook.com (2603:10b6:805:de::19) To DM6PR12MB3163.namprd12.prod.outlook.com (2603:10b6:5:182::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Thomas.Lendacky@amd.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [165.204.78.1] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 107dc618-4be3-43c6-8d74-08d74847206b x-ms-office365-filtering-ht: Tenant x-ms-traffictypediagnostic: DM6PR12MB3211: x-ms-exchange-purlcount: 1 x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:873; x-forefront-prvs: 01792087B6 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(396003)(376002)(346002)(366004)(136003)(199004)(189003)(256004)(26005)(14444005)(386003)(6506007)(316002)(4744005)(36756003)(66446008)(71200400001)(71190400001)(5660300002)(66476007)(66556008)(64756008)(66946007)(66066001)(8936002)(2501003)(50226002)(7416002)(6512007)(6306002)(102836004)(81156014)(8676002)(2906002)(14454004)(81166006)(7736002)(4326008)(6436002)(305945005)(478600001)(966005)(25786009)(86362001)(476003)(2616005)(186003)(6486002)(54906003)(99286004)(110136005)(486006)(52116002)(3846002)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR12MB3211;H:DM6PR12MB3163.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7b2d93MzHyd29yRYfEtOAYt75dsFDFkF5hIk8qztgLHhaezbE34NsYrT59DJwkWQhDhOOjLJbCMrnMi7waTm1E2Ed+j1iLyx/6O4CmVNvvroFGzYLxh+0qWQBJl6jPDQXl9uRXJPbWsUPp0JIFfT2+2el5iBq6fUgNIYbugPOeXry1uIK99GLRoptPnf9qHLGG3KhOAFMvaSyLN2lZOhBwPWxjZYScy24tImQYbAPTl0UKabo0zoNrzRy82CHrX1dt/HCW0HbMQQt4KcScJ1RsFUGSYlg7lzT3c7doWghu3oByhsjgcMLVZBX47BBCHx2jqYB5iO34kqby8281USTupdmtROPqTnSNT+UA7/JG93q66fQn/d/wfXHLk0CXI5z4NIPY9UbSIzzSRpw6B72S0qXlGWgYEwZt7oo7JPmB3HTuH5uimTGn7JyZi6Xt+B86BaXztFUdkLp5RtlGXQ4w== Content-Type: text/plain; charset="iso-8859-2" Content-ID: <815C7A99E43A514B91700271E42C6B99@namprd12.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 107dc618-4be3-43c6-8d74-08d74847206b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Oct 2019 21:17:42.2230 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: wFxgXjsrqNtwe8CFWbCg9p3nuZVohk/ZIvb5UHwOdgcysUArcKYjJwIrVqU7O0cfjNOMuM9Mtb8ZpDvWVQHUPQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3211 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tom Lendacky This patch series provides fixes in the area of ASID assignment and VM deactivation. Additionally, it provides some performance enhancements by reducing the number of WBINVD/DF_FLUSH invocations that are made. Note: The third patch in the series modifies a file that is outside of the arch/x86/kvm directory. --- Patches based on https://git.kernel.org/pub/scm/virt/kvm/kvm.git next and commit: fd3edd4a9066 ("KVM: nVMX: cleanup and fix host 64-bit mode checks") Tom Lendacky (5): KVM: SVM: Serialize access to the SEV ASID bitmap KVM: SVM: Guard against DEACTIVATE when performing WBINVD/DF_FLUSH KVM: SVM: Remove unneeded WBINVD and DF_FLUSH when starting SEV guests KVM: SVM: Convert DEACTIVATE mutex to read/write semaphore KVM: SVM: Reduce WBINVD/DF_FLUSH invocations arch/x86/kvm/svm.c | 105 +++++++++++++++++++++++++++-------- drivers/crypto/ccp/psp-dev.c | 9 +++ 2 files changed, 92 insertions(+), 22 deletions(-) --=20 2.17.1