Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752247AbdGaNaZ (ORCPT ); Mon, 31 Jul 2017 09:30:25 -0400 Received: from mail-by2nam03on0041.outbound.protection.outlook.com ([104.47.42.41]:48644 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752217AbdGaNaT (ORCPT ); Mon, 31 Jul 2017 09:30:19 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Cc: brijesh.singh@amd.com, thomas.lendacky@amd.com, 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 , kvm@vger.kernel.org References: <147992048887.27638.17559991037474542240.stgit@brijesh-build-machine> <147992049856.27638.17076562184960611399.stgit@brijesh-build-machine> From: Brijesh Singh Message-ID: Date: Mon, 31 Jul 2017 08:30:11 -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: 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: MWHPR15CA0042.namprd15.prod.outlook.com (10.173.226.156) To BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f140723e-eaa9-4435-6a96-08d4d818486e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0146;3:jNk5J7NCXGNKU7NrOD6SUu69jaUxXpS2IjmiOx+3eT3XU+vnfFZRqamDRry67SrePf68D0tyRIwS6gh+SemWkXuPaJYEEUM5yjGZk78hSxTQUVmGafme69H3OzuBdNPar6dHtvQ6SqsGNm7e6ubN52En0x/2yraXmx/GilZSQkShidITcOCc7nMcgAIlKIoz6d4lQtQ26xBp/GsZOsLrvs/zCd4we0onnAXhKmIuRVb2LrWmiPAIwXG5jccRLPfJP9o3w4Rpsfa2UDJF2VX+YgI5gE21naWamzuXuo1S+tWbpYVUYxbrYxLG/eWBuvaS5RNpUygKQ5/o7L4jqKMBcnfecEiwam4amsU6ojpnBBwph7g2geKkBvSRW7dyzKvibzy02C2GC7GO4Ql0eMu4+0h9/wVVCKLWHheCRpkwE1JEYXTezyqk6aBhfL+JraPlmxLaWSeq6KYd/o/koiEqjnziYjBuEwZyNmhiQtFbiZhNd3nv9hOMD9FMjOLzzcui3USO1B5Q4g98n2XGjT19tGzQnEw0Ye1hjq5bxakoRDySUPCwF6alafRmUCjR2M6er3Njgji5XM4b+la+9ZxmGVApJy6RvPrEQS1eJvmAo1Ej20eoy3xz/ooRq2zkpV2aIEiTOymUTsCifqYmcaotKsEr/Cg8iiZq3qJXsh3tucc29tnC1lh/IZeYo/WL4xo5JLkUX8yyDvo9qbxc/FefJI3Wavhj8WFiDanWximaRjr7SDeOk2X2vicSVPjputGCOSaqvxWFOWFX/INnA6wKm4qnH77MGFUE1zFzkDKq5N990c8OAyyVmYSKdnANKbiPTmwhMxVDlIX0A7yn8vGxsA== X-MS-TrafficTypeDiagnostic: BY2PR12MB0146: X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0146;25:8imzyfZNx2g7CGL4kK+1sbbmzJbCKpZsBwCGA3kjB7NAvzopdvphXBvxASPcBnj8h28paAyhrT2cI1FYkPJa4ZEXBvXIg9Z61SkVIroISIg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X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123560025)(20161123562025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR12MB0146;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjEyTUIwMTQ2OzQ6UzhQQmJHZ2VCR1g1c1paOUZWWVRQbzJmaUx1?= =?utf-8?B?dklLTEtrOXl0YkFCaGR3K1VqMDVYRHdoU05tV0lUaER1ZlQ0QnVSSnFBZnlS?= =?utf-8?B?RE5HMW5YU2tMaEtYTUlEaWp1MG8xWnFBN0Z0Wkk2cFh6SERhM01vNmdyMjZX?= =?utf-8?B?cExtZ1ROT1VBQnZxWTZrQURmS3g1SmJKU0dCUmxDejd3Y1NReEpud3ZvUXpo?= =?utf-8?B?TkRaOHRtNWo2ZjJBdE9HL3NldG5lWlgvbHB4a2RrU20xenRIYmg3Wld0Nm5X?= =?utf-8?B?c1gvN3V2ZXJISzQ4Z00rTFVHd0o4TjU1MDRXM3RXSXp5RmVQOEhoWXpvb1F5?= =?utf-8?B?V0ZSWHdnSWlEWi8zWHhDNExaTmlCdjBOR0tCcTdmdEI5T3NUWDZMd21zNlBU?= =?utf-8?B?SkVWdUJqNFFRd1F3aFM4ZDBCYWRiZUNBM2M1YVlxNHlZVjRJZ2JxZVowMWtQ?= =?utf-8?B?NlV5b0t6emtNUmRNVHFBVllFOGNRTlZVZHNWUU53V21QaUJicXNULzdUMHBF?= =?utf-8?B?MG1Mc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25UVEVF?= =?utf-8?B?MlIxZmgzSFR0cUhZWmhFTXVqeVlTY2FiV2NKN2NjVnl2dzR2eERQWGx2U0J1?= =?utf-8?B?cVVXOEswTWkxaWVyT0RPOHhBNmNaUHFLbmE1S2tvWmhBMHBiOFBGQ080R3R5?= =?utf-8?B?WHM3SUJyVDVmZXRTYkVtTXdIUlBaUT09?= X-Forefront-PRVS: 03853D523D X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6049001)(6009001)(39450400003)(39850400002)(39400400002)(39860400002)(39840400002)(39410400002)(189002)(199003)(377454003)(24454002)(189998001)(25786009)(81166006)(50466002)(42186005)(106356001)(105586002)(478600001)(7736002)(7350300001)(36756003)(31686004)(305945005)(54356999)(47776003)(101416001)(76176999)(50986999)(38730400002)(33646002)(6246003)(83506001)(81156014)(8676002)(68736007)(2906002)(110136004)(53936002)(66066001)(65956001)(65806001)(86362001)(229853002)(31696002)(5660300001)(90366009)(6666003)(4326008)(23676002)(3846002)(6116002)(7416002)(64126003)(97736004)(230700001)(65826007)(2950100002)(77096006)(4001350100001)(6486002)(53546010)(217873001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0146;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTJQUjEyTUIwMTQ2OzIzOnUzUUxlU0pYeVNSYUF5UWJnM0U5R1NmK2ds?= =?utf-8?B?Y0hSanQ1K1ExY3BSU1BkcHdiY1AreXRYUjZmdXNCOHlYWTU4cUEyOFp6NEhE?= =?utf-8?B?c3lwWllMbGlHS2hLZVJ4OUNGZ3E5QXRydyt5aXduZVZCSUxPR2h4NVpCRVRr?= =?utf-8?B?blNwWHc2VGVCdTB6RDc4VnIycDlWWFEweE1PRTNpNm5vcmVRZmhQcjMrbE93?= =?utf-8?B?SXhHOFN5SWtMeDVFczh2UmhYVmZRam1aVnc1TG0ya1pqYkxV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pfcf7NkNBK0c3TCFQIx6BVDwz9Hx/eO20ezGNA4xxIpp/ZjIcfxs7BKU7VkdS7WP0WT9HApixpSbhCSHJRxsMkohTxeZU2+xt+j6YhmxJkEvGlDuqn8Q68eawJ2x/fTmo8gFbFBcuBhKrN8zjtRemfc= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0146;20:5aasUMRigA31xbwn12X6PNL8GijiL1SHTMlwH+joYpMJbVRmDWjJgg26SV1Ju6BUThjSxeX/esmDhzPdL8MD0ZjrL4FBhe0DIGUBKIn9QIMMoqqEl2P5qhX5GDABXzlgZl3Ng0bPwRSzkSlQFTToWTlR2lqOlJRS8KtV9Vqx2SOTIP99eOLNK/6To/0fSABbK+9F6CWy7oAPL1bEV9f9rtCXSmgHjVUg9moquF2dVqs3tHVRZwgtQCvm9AqkeiCo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jul 2017 13:30:15.8811 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1443 Lines: 39 Hi Paolo, On 07/27/2017 11:27 AM, Paolo Bonzini wrote: > On 23/11/2016 18:01, Brijesh Singh wrote: >> >> + /* >> + * 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; >> + } > > > What happens if L1 is mapping some memory that is read only in L0? That > is, the L1 nested page tables make it read-write, but the L0 shadow > nested page tables make it read-only. > > Accessing it would cause an NPF, and then my guess is that the L1 guest > would loop on the failing instruction instead of just dropping the write. > Not sure if I am able to follow your use case. Could you please explain me in bit detail. The purpose of the code above was really for when we resume from the L2 guest back to the L1 guest. The L1 page tables are marked RO when in the L2 guest (for shadow paging) as I recall, so when we come back to the L1 guest, it can get a fault since its page tables are not marked writeable at L0 as they need to be. -Brijesh