From patchwork Mon Aug 22 23:23:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 9294715 X-Patchwork-Delegate: herbert@gondor.apana.org.au 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 2C457607D0 for ; Mon, 22 Aug 2016 23:40:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DEBA28B18 for ; Mon, 22 Aug 2016 23:40:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11EA628B1B; Mon, 22 Aug 2016 23:40:26 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA60128B1A for ; Mon, 22 Aug 2016 23:40:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756635AbcHVXkG (ORCPT ); Mon, 22 Aug 2016 19:40:06 -0400 Received: from mail-cys01nam02on0044.outbound.protection.outlook.com ([104.47.37.44]:53664 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756876AbcHVXj0 (ORCPT ); Mon, 22 Aug 2016 19:39:26 -0400 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=7+1yTOAVX8QilAiQ2qwUaPW5hiXjFjQy3KkYPFuwGHc=; b=4ZKSmXLJEEzqb5rjdaiWpePbO+rG0skvk3JGQyquTwfzYv54VlsVGtbm213NLlRYkKigmwlK+WJOXpqRU0zaUPclBUfa9mqDQIdNQ0iev4TB6I9b2Uq6vIibHrnGlj9VFJQfo0A30V3vi2Q8voEJhmjL7/1xEd4zwEFA8YYWRbU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [127.0.1.1] (165.204.77.1) by CY1PR12MB0666.namprd12.prod.outlook.com (10.163.238.151) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.21; Mon, 22 Aug 2016 23:23:46 +0000 Subject: [RFC PATCH v1 01/28] kvm: svm: Add support for additional SVM NPF error codes From: Brijesh Singh To: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Date: Mon, 22 Aug 2016 19:23:44 -0400 Message-ID: <147190822443.9523.7814744422402462127.stgit@brijesh-build-machine> In-Reply-To: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> References: <147190820782.9523.4967724730957229273.stgit@brijesh-build-machine> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY1PR08CA0030.namprd08.prod.outlook.com (10.163.94.168) To CY1PR12MB0666.namprd12.prod.outlook.com (10.163.238.151) X-MS-Office365-Filtering-Correlation-Id: 1f31b6b8-dfb5-46d8-c3ab-08d3cae35e91 X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0666; 2:KshNItI/pnNCIjFr7Y/NUiwX02kxaFp7m7Jb0fcIAdZgzzIswGyeEZn9oa1HDgx1SZHbnWfoZcdzyc+mFnhUrpfFg3rD0AVNOyXbwY0GKy5xP7eFJY1qFXfLXFMeOeZynQ/PRqOLG6r8bQSciDijnMli2TXy9KMGRZ1zGQoTp/5NXSM/D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Jgbt4rl3NJ6IAfCE1j/N4EqOLAKeXl7ZkQVv4WpxFRfRFN/wJhFCSTv3oBsKvjLYjZz7CctOPNPAKoMeZ3sFTYaNfWC+CiAGSgopRdm0kzAsgVwQWssJKSqPnRNQWDMUze2Qw4rUZRyA6x236KFSmIOQMStSs0f2B0Har76nb8BDvRi/a3LgTfl4pK+OWoBQapZVLFvBo5ahRS0QHSaFbDOQKnGORM+5ZcBGNYLn5IndWua1xlfHdduTmHleWvde6f184i9MhSCuUvN/pC4C6YVzyTaBmUeMfauCXbPzrqJh9GDW30+X3MAOjffFz+Qdghgx6bVpBMwz1K4auoi9iIqzg+4h4v 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:CY1PR12MB0666; BCL:0; PCL:0; RULEID:; SRVR:CY1PR12MB0666; X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0666; 4:7t9KPXni64mliFrqdtvazKhXUGrfDFKRZz4LCghZG0j34BmuLK2DjSICfkEH6ER7tI0QU0BnweecY9vwcJm7Gz0tBkLCsgqevfSaTejiX+F7OID+j7HK/Bu8si4vV7zNik0x3liQFzHzP6WFfa5Q26iDMCbxINtajmk2TJAEoZdLJl6UFIpAuo8LZKQlXkukRd9BL5rIb1u10XHYrpytht+xleo4xtBkLKTGWPK5VUnbwILdE0e2WsEDN8z9f/AYNnLqKM9YtrtGSldrCvLNMmEzDHuO0oXF2CHtgiW0+1L+DpWbI1Qev7qvLPbtyqmIJLV0SYY36UGd36cfFNaMfJPnKyiadanXnJIDsSBy8cYp8e5Az6whxL7adJUNKsR7kb3fqQCo3gEPGp1T5Vorienz6I0Wrhf1P7fRaUUzDTe6U/CqV7GUy6zjXUKxWw9g X-Forefront-PRVS: 00429279BA X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(107886002)(2906002)(77096005)(33646002)(2950100001)(230700001)(83506001)(7406005)(6116002)(103116003)(92566002)(106356001)(47776003)(586003)(3846002)(7416002)(81156014)(4001350100001)(189998001)(81166006)(8676002)(33716001)(97736004)(50466002)(50986999)(54356999)(76176999)(23676002)(7846002)(101416001)(5660300001)(86362001)(2201001)(7736002)(66066001)(305945005)(5001770100001)(229853001)(68736007)(105586002)(9686002)(19580395003)(19580405001)(42186005)(921003)(2101003)(1121003)(217873001)(83996005); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR12MB0666; H:[127.0.1.1]; 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: =?utf-8?B?MTtDWTFQUjEyTUIwNjY2OzIzOlRnUVVWUTJWdG9qelRaa01pY0pEaG82YmVw?= =?utf-8?B?OVR5Umh2WEVrZTRidU44cjZycVB6SEcyWDR0dlNETHlHVEJzY2QrOVhWVjlZ?= =?utf-8?B?Q1kvVkp0QkYxTlA3dmpOOVJIcHQvU1hpSVlGTXFCYXRVRFpVWlQ1QlFOcnJj?= =?utf-8?B?dmlIQjhWQW0wUnhWVkhtZ2pickQzZnE3a2RtTVlUd28vb1pBazdyQk80ekdO?= =?utf-8?B?YjBMKzZ6Qko1L2hFQk5WZjYzeXZrd3A3MTlNWGxVMmw0YkF0eTRHTllvSDky?= =?utf-8?B?QVEwWURHZEVZdXp1bytubm9peUtjNmg4VmVsK3VmUi9YSENXNVJqcmlMck1D?= =?utf-8?B?V0RJTkVzTmI4UDZ1RjBRK08weW50T3IxbGYxY2dNVEFUZ2FGNlRabDU5VDJh?= =?utf-8?B?V2VNOWZ4ZEdZVnBub3Yrd2tLMUhPOHh4Rko5eC9KTXY3LzZDSEhoc3oxSFA2?= =?utf-8?B?QiswcHBtTXRsMCt3NXlTTW5LK3VOUmN0S0hFbHVYKzNHM1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zG+nKGZZOUkD86F50+T6TYbiYjlQF2xs5JjyM4qQVNiDWDvCtXqY3TZ8=; 7:1FcSFRlovDfBV/qpqlRrUclM7Kg+CaOW09CBvGc92Vnju3Dm9ymzn2ZCuawNkt99QAXtxJd6FNuq4/4LRWVH+d3PUS5eS2OhzdGBRZdGnHqos65r2YpYd6eHJ5FIkems8aB2AUpJ5/4rNAnA7uNfHFAaL26CGXKG7EiaPmLK1jZ7USe1dGJKylorG3VBJ8ZlQ3FrsdJAbHhmf74F37HRX/9dfWMZjNqMzKGbmGwz18nw57dheE7jKjQXG3xX8d2K SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR12MB0666; 20:Bw9pvnLvvP4EeKHCR34BhbZ4Vu30m+z96lHfshjAiwL9jvQB+pAhu51BYkBI/Ohxhx3FQBqerCspjM/ulz5e0IBoPzUqXrK5tTxjHWwc3UwcUL3iqcJ8nZ6uAjfYXiUIiZ/3E226151njlVylPyZqQo9xudHL+u5wvehHaz3IxSU3g1U3O8ABcBRh6mxK56eG8eAm+v2KjEmkeVuV6dfb1bQxLceJXMGtYlgcw2a0c4NdgH4v2d0bPoVJZoQXAIy X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Aug 2016 23:23:46.8428 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0666 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Tom Lendacky AMD hardware adds two additional bits to aid in nested page fault handling. Bit 32 - NPF occurred while translating the guest's final physical address Bit 33 - NPF occurred while translating the guest page tables The guest page tables fault indicator can be used as an aid for nested virtualization. Using V0 for the host, V1 for the first level guest and V2 for the second level guest, when both V1 and V2 are using nested paging there are currently a number of unnecessary instruction emulations. When V2 is launched shadow paging is used in V1 for the nested tables of V2. As a result, KVM marks these pages as RO in the host nested page tables. When V2 exits and we resume V1, these pages are still marked RO. Every nested walk for a guest page table is treated as a user-level write access and this causes a lot of NPFs because the V1 page tables are marked RO in the V0 nested tables. While executing V1, when these NPFs occur KVM sees a write to a read-only page, emulates the V1 instruction and unprotects the page (marking it RW). This patch looks for cases where we get a NPF due to a guest page table walk where the page was marked RO. It immediately unprotects the page and resumes the guest, leading to far fewer instruction emulations when nested virtualization is used. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/kvm_host.h | 11 ++++++++++- arch/x86/kvm/mmu.c | 20 ++++++++++++++++++-- arch/x86/kvm/svm.c | 2 +- 3 files changed, 29 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index c51c1cb..3f05d36 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -191,6 +191,8 @@ enum { #define PFERR_RSVD_BIT 3 #define PFERR_FETCH_BIT 4 #define PFERR_PK_BIT 5 +#define PFERR_GUEST_FINAL_BIT 32 +#define PFERR_GUEST_PAGE_BIT 33 #define PFERR_PRESENT_MASK (1U << PFERR_PRESENT_BIT) #define PFERR_WRITE_MASK (1U << PFERR_WRITE_BIT) @@ -198,6 +200,13 @@ enum { #define PFERR_RSVD_MASK (1U << PFERR_RSVD_BIT) #define PFERR_FETCH_MASK (1U << PFERR_FETCH_BIT) #define PFERR_PK_MASK (1U << PFERR_PK_BIT) +#define PFERR_GUEST_FINAL_MASK (1ULL << PFERR_GUEST_FINAL_BIT) +#define PFERR_GUEST_PAGE_MASK (1ULL << PFERR_GUEST_PAGE_BIT) + +#define PFERR_NESTED_GUEST_PAGE (PFERR_GUEST_PAGE_MASK | \ + PFERR_USER_MASK | \ + PFERR_WRITE_MASK | \ + PFERR_PRESENT_MASK) /* apic attention bits */ #define KVM_APIC_CHECK_VAPIC 0 @@ -1203,7 +1212,7 @@ void kvm_vcpu_deactivate_apicv(struct kvm_vcpu *vcpu); int kvm_emulate_hypercall(struct kvm_vcpu *vcpu); -int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code, +int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u64 error_code, void *insn, int insn_len); void kvm_mmu_invlpg(struct kvm_vcpu *vcpu, gva_t gva); void kvm_mmu_new_cr3(struct kvm_vcpu *vcpu); diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a7040f4..3b47a5d 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -4512,7 +4512,7 @@ static void make_mmu_pages_available(struct kvm_vcpu *vcpu) kvm_mmu_commit_zap_page(vcpu->kvm, &invalid_list); } -int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u32 error_code, +int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u64 error_code, void *insn, int insn_len) { int r, emulation_type = EMULTYPE_RETRY; @@ -4531,12 +4531,28 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u32 error_code, return r; } - r = vcpu->arch.mmu.page_fault(vcpu, cr2, error_code, false); + r = vcpu->arch.mmu.page_fault(vcpu, cr2, lower_32_bits(error_code), + false); if (r < 0) return r; if (!r) return 1; + /* + * Before emulating the instruction, check if the error code + * was due to a RO violation while translating the guest page. + * This can occur when using nested virtualization with nested + * paging in both guests. If true, we simply unprotect the page + * and resume the guest. + * + * Note: AMD only (since it supports the PFERR_GUEST_PAGE_MASK used + * in PFERR_NEXT_GUEST_PAGE) + */ + if (error_code == PFERR_NESTED_GUEST_PAGE) { + kvm_mmu_unprotect_page(vcpu->kvm, gpa_to_gfn(cr2)); + return 1; + } + if (mmio_info_in_cache(vcpu, cr2, direct)) emulation_type = 0; emulate: diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1e6b84b..d8b9c8c 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -1935,7 +1935,7 @@ static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value) static int pf_interception(struct vcpu_svm *svm) { u64 fault_address = svm->vmcb->control.exit_info_2; - u32 error_code; + u64 error_code; int r = 1; switch (svm->apf_reason) {