Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbdHANge (ORCPT ); Tue, 1 Aug 2017 09:36:34 -0400 Received: from mail-by2nam03on0053.outbound.protection.outlook.com ([104.47.42.53]:44869 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751890AbdHANgR (ORCPT ); Tue, 1 Aug 2017 09:36:17 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Cc: brijesh.singh@amd.com, kvm@vger.kernel.org, thomas lendacky , rkrcmar@redhat.com, joro@8bytes.org, x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de, bp@suse.de Subject: Re: [PATCH v2 1/3] kvm: svm: Add support for additional SVM NPF error codes To: Paolo Bonzini References: <147992048887.27638.17559991037474542240.stgit@brijesh-build-machine> <147992049856.27638.17076562184960611399.stgit@brijesh-build-machine> <21b9f4db-f929-80f6-6ad2-6fa3b77f82c0@redhat.com> <98086274.371452.1501531542630.JavaMail.zimbra@redhat.com> From: Brijesh Singh Message-ID: <661faa8a-87af-743f-d3ea-b95ada0d7677@amd.com> Date: Tue, 1 Aug 2017 08:36:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <98086274.371452.1501531542630.JavaMail.zimbra@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR11CA0013.namprd11.prod.outlook.com (10.172.17.23) To SN1PR12MB0158.namprd12.prod.outlook.com (10.162.3.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ab1b8d21-3593-40ab-116c-08d4d8e24815 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0158;3:o6/Q27QqkgmQxqyU6RrlZzT+tHb8YfLCciffI8PdtG+RyBcPQmk8ZWVmlhP2un2hy+E1hqFsGVnNNBtpB99GePMfk9FgTWvFeovMW6nfA7HePP+9CVZH/5upYoq6S8nQNTSUHOTKtJocFRBRvzZk2xfJKNUSLRolDsL1Oy9W8GIf/IZu5svFC1j4dXHfWSC7O3OZLSHLCNUbftVZrgrJORysNsgwWYuUlV3eJJ8aOyvkShm6mcCfm+9CbddHhgk6WOF/UOS5xeyHb3G/71alctDPJ/MkIOds6WtG84IQ3wP8G3bzsPrgjvttvMIMnzEq8WNpBLdbD/gKGE+aXmNLaQBlnbvQU8fjhmzBnnFwd3IVBVhx0aRkulSKgb75/cNFgiHLx/gR0IxuVIzMjIy5ml44tj0sgrLYuRipnQd/jyT7QxFVOLwHCJqseu3AJuM/KHSRGffIWMySaB46B4keVEGkPyCgil7cbp/+HIuAvaLcz56M+RG7L5vBllGwE9j5veM4uz/7h2Iy8lyle4iiMpApHRa5w3BIgZtloHjfQun8CKa4/OCr2iEwgkxV7C80B2cy0h5FuiLucSA+ekbKDGw3C9QT3X/oxmIex2rVqnhQjGzgLjhPMh1vjo7d5BPOsTFCLCIQxnOvaDTDsp+l135PACnZPqk1rOdmjDeL9qWyEBE4iGN4Ld+IzhK+9pKDwUqXFM+qV9MLu5Brwcq8QYoAvaBxQpYPbF7GrRfqRTAcGPtkRQlZyos9ns3ziqdKWSExmnXMohtbhAAaJOWTe0/YSgKWiXFaws0j56ebkde3I4HzeDvfUBvxTqDQtStHDVyj1xU/3Fd/Rbn7lTgYeg== X-MS-TrafficTypeDiagnostic: SN1PR12M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2RHiLGTVQO1PsWYsInKMmmndxULnOTKYJIAINdLhygE3eQSCIJ5D3tQnmgzbtgiSP6jCsWmI6aacX24Vc0siUiKykAS8kxj6/YZM+/KiWr6P4ceSxZt X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123558100)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:SN1PR12MB0158;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:SN1PR12MB0158; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwMTU4OzQ6QzNXMnBUaFYwaVlWTHJHejdGTzE4WGFzejJz?= =?utf-8?B?M1VHM2owM2dFRXlwRzhmUG9WSGtQdHBTaFhKdkZaNXhBWVgxWGtZRnN0bjRL?= =?utf-8?B?MXhIdEI0NjNmZ1lPanhGdmRYSU1oYjlqU2RNRGtHcWxQT3QvUXhMdzBhVmE4?= =?utf-8?B?MkM0VlQxY0dZK1hVbm9DVXhZU09EUFA1TjkvWG9mWC91amNJLytsSDFjOGhp?= =?utf-8?B?dWFBaTNjWE1rRkxLTXM2SVp6RUtuQTgydWRKNnhlcGlqRWRFRTZaNmVmRnQ4?= =?utf-8?B?ZDI3TjFXZEZLQmpEcFhkU1dsRmJsTmgxR1N2ZUN1a2I1dVA0YTR4WGdBTTlI?= =?utf-8?B?RHlhWFZnREkrR3N3eHMxKy9vRXV2dlY4L241NCt4bENGN004WTdEMnNrUUE0?= =?utf-8?B?Z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8?B?empMWSt1R3U1WFRZeGxyZDJFUDJCQXV2NkNhZFc3WnJzU3lxYkE4S2FObldR?= =?utf-8?B?d0tUbVBNZG9yczYzWkRvcW5hZTVTRnlSTTlwa1J5Z24vaW5waDNTWHhtUVJk?= =?utf-8?B?YWpoT0pPV0MzbVdtTkZBTUlBanJlR0ZqdnN6V3Y4TGh1c1JWejU2QWRmcnky?= =?utf-8?B?SktkTTgvZmZXcTdzaFJsZzRFd3hZUStqeitYVFRQaWlHSzlOb2ZqdFRoOU51?= =?utf-8?B?bEZ3TFlWVVgxT0NFOERjM1hSNGVidz09?= X-Forefront-PRVS: 0386B406AA X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39400400002)(39410400002)(39860400002)(39840400002)(39450400003)(39850400002)(189002)(377454003)(199003)(24454002)(7736002)(50466002)(229853002)(4001350100001)(53546010)(36756003)(97736004)(90366009)(77096006)(6486002)(8676002)(7416002)(6666003)(5660300001)(2906002)(305945005)(68736007)(42186005)(93886004)(2950100002)(23676002)(6916009)(64126003)(65826007)(105586002)(33646002)(65806001)(31686004)(478600001)(66066001)(65956001)(76176999)(54356999)(25786009)(4326008)(81166006)(81156014)(106356001)(101416001)(7350300001)(50986999)(230700001)(47776003)(86362001)(38730400002)(53936002)(110136004)(83506001)(189998001)(6246003)(31696002)(6116002)(3846002)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN1PR12MB0158;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtTTjFQUjEyTUIwMTU4OzIzOkIwN3Q2R09GUEpScDBYWHNRWCtnZkJKaml6?= =?utf-8?B?TngwVGtzR3hnREVDdk9QYjgzZkRQUGVzRG9LN0EzZjFRVnVzd0dJanF6YUZk?= =?utf-8?B?Rk05OFk5YmNMcW5hZWlmemZ6Zlc1MC9EaFhmazV0aXBOam91bW9LK1NiemE1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nWIs5d4zqeiVO5bG62HOc0wLYBrHORBznqZ4exppjKq+hrWBsnOevIsv0m6lboDUWlWcIQ6WuYFABzbYGU9PdPklbafPVlbFIszc5yWWH9cwsvqc8gtbgN7SXRxHQfvaQWJFvzDE7K7hOLvKK42cZJquxQ9/1OVGYzY8PLDgPhZ1aNN4QONrRf8tbAau1KWfOAev2eXh+nygj3FGXXEovSdbbGf6CfloxaRkm+JERb7Sb8OAJ3EtdHVvIgY+2PmaE6Mn0TaPK5hJi0dq/iypD8sxBhraf6lG6b4bERk4y/JDlXOMWySI= X-Microsoft-Exchange-Diagnostics: 1;SN1PR12MB0158;20:rLqZQZBid5xDYRJrggqKJ2bkVgppWL75rDKaBUFdva7RoNclofg2n5z5VO5mkjm/a7uo9ulF2QYCAV7da00tn7auNeGi80R6KQHXRQqBbFLP1HH9Ret8L5macFxngJRL045AX0nXJ2KnXmrnDrW9ENeiljut1zC5/29qVf7jZvNLppfjylJ5oTWU1h5ISSq+FWFXXZjvRDy4vT+vwSxywYtkze0cMjTph6lZO9xgdiWiNdq+ppUITMERcm+zCcZE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Aug 2017 13:36:13.9113 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0158 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2590 Lines: 67 On 07/31/2017 03:05 PM, Paolo Bonzini wrote: > >>> There can be different cases where an L0->L2 shadow nested page table is >>> marked read only, in particular when a page is read only in L1's nested >>> page tables. If such a page is accessed by L2 while walking page tables >>> it will cause a nested page fault (page table walks are write accesses). >>> However, after kvm_mmu_unprotect_page you will get another page fault, >>> and again in an endless stream. >>> >>> Instead, emulation would have caused a nested page fault vmexit, I think. >> >> If possible could you please give me some pointer on how to create this use >> case so that we can get definitive answer. >> >> Looking at the code path is giving me indication that the new code >> (the kvm_mmu_unprotect_page call) only happens if vcpu->arch.mmu_page_fault() >> returns an indication that the instruction should be emulated. I would not >> expect that to be the case scenario you described above since L1 making a page >> read-only (this is a page table for L2) is an error and should result in #NPF >> being injected into L1. > > The flow is: > > hardware walks page table; L2 page table points to read only memory > -> pf_interception (code = > -> kvm_handle_page_fault (need_unprotect = false) > -> kvm_mmu_page_fault > -> paging64_page_fault (for example) > -> try_async_pf > map_writable set to false > -> paging64_fetch(write_fault = true, map_writable = false, prefault = false) > -> mmu_set_spte(speculative = false, host_writable = false, write_fault = true) > -> set_spte > mmu_need_write_protect returns true > return true > write_fault == true -> set emulate = true > return true > return true > return true > emulate > > Without this patch, emulation would have called > > ..._gva_to_gpa_nested > -> translate_nested_gpa > -> paging64_gva_to_gpa > -> paging64_walk_addr > -> paging64_walk_addr_generic > set fault (nested_page_fault=true) > > and then: > > kvm_propagate_fault > -> nested_svm_inject_npf_exit > maybe then safer thing would be to qualify the new error_code check with !mmu_is_nested(vcpu) or something like that. So that way it would run on L1 guest, and not the L2 guest. I believe that would restrict it avoid hitting this case. Are you okay with this change ? IIRC, the main place where this check was valuable was when L1 guest had a fault (when coming out of the L2 guest) and emulation was not needed. -Brijesh