Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751897AbdFISg7 (ORCPT ); Fri, 9 Jun 2017 14:36:59 -0400 Received: from mail-bn3nam01on0045.outbound.protection.outlook.com ([104.47.33.45]:8417 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751667AbdFISgw (ORCPT ); Fri, 9 Jun 2017 14:36:52 -0400 Authentication-Results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=amd.com; Subject: Re: [Xen-devel] [PATCH v6 10/34] x86, x86/mm, x86/xen, olpc: Use __va() against just the physical address in cr3 To: Andrew Cooper , Boris Ostrovsky , linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, linux-mm@kvack.org, iommu@lists.linux-foundation.org Cc: Brijesh Singh , Toshimitsu Kani , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Larry Woodman , Jonathan Corbet , Joerg Roedel , "Michael S. Tsirkin" , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , xen-devel , Paolo Bonzini References: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> <20170607191453.28645.92256.stgit@tlendack-t1.amdoffice.net> <4a7376fb-abfc-8edd-42b7-38de461ac65e@amd.com> <67fe69ac-a213-8de3-db28-0e54bba95127@oracle.com> <12c7e511-996d-cf60-3a3b-0be7b41bd85b@oracle.com> From: Tom Lendacky Message-ID: <9725c503-2e33-2365-87f5-f017e1cbe9b6@amd.com> Date: Fri, 9 Jun 2017 13:36:35 -0500 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.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.78.1] X-ClientProxiedBy: DM5PR16CA0036.namprd16.prod.outlook.com (10.172.42.150) To BN6PR12MB1139.namprd12.prod.outlook.com (10.168.226.141) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6PR12MB1139: X-MS-Office365-Filtering-Correlation-Id: 5c37b198-5600-4a97-fb59-08d4af6678e2 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1139;3:xoHGHI/QFgMFCiYCuczlirugd0lEESXmvjb7br2Ex9/kR1ncMH7P1pAbq5N3RepWuMfRvblprK9Q8pL6e2c8IFYt53q4tajqktkW5yQx0FmdpcLG1HzuZMxcjdhjvn2ow0jzL8fzsC8GIEmsbxoNtaHAGmPgz4th6Skc0Yoelu57as47hxE9ytV7Rp9QWE/N9GPKL7mNgt7yHRgZVpUbf4it3wIW7FWdXEKj/2GUCJ0tihph0zqyJ1IBlab4I3AXtz3x+lvjhIVguR0Y2F+n8edx1N4RRGL9GmLPfApOVN/7h9HGiGUtv7xu/Ii0vpQwUNwY29phu/lpcwNC4QeAcmwmlFs2g+mUwwuRM24rRUo=;25:p4RB9u+C4Z6noqdL5BgtCE7QTiy9gY9YPLZHQGmUSqhLsicU8BRHL/p48Sew4/dNbe+UB9v4ctU31V5oA9ZkKt8U9fYXDgedNd7iyU/v4EL34O7wdsq66slUkf0APpLd8vRlO1WvcynDce3OOGlFZyyv8wmnu2f2gYoO2+GxRymNpyk49wwvh1QcsOyNPiReg72Z8HR4CHmZZpLCd+xSSJN0FT0g8BsRaW4y74d1fM2xS94z7b2whL6YztE+VxjtmKm3NKwYf8FWvOkUqaUd8B5G2H7rFhd/aSieT3bgnuevsEt7puwF2O/Bar82Fs0sI4l/UJBUv999iOwMOFIzeTwIR8IkYCRnNsgAd44EVjQeGfrz5kDysJ31wL3ZGPGS3lqlZ54z8fCobJUBnRz9RiHt6S3tpDgUfHCpRFogKc+20A9bPcKUg4cCTxiCgtct37j6iEBq1066aITgkj2DcL54CcWykktYF8koqRkeV00= X-Microsoft-Exchange-Diagnostics: 1;BN6PR12MB1139;31:UKkOouyTUn6HUD5/nsRZ8fDhefPFTUfMRSPo475VPnFbrTPQGlAEJITgWs0iMFZbicvy2AdzXVhNtS2db3fhRgBHQwWHqo5rBV0du7CqbzHzpiO3RUvuRcDZugwX/AR6xhIrdDon9f96GonMIQm5NjyKweevx9ugRkU3AExlwqeuf8ibtiWdfxzjTuzlXlftWZlEh3CJbUehH4qY3lk74FecFoXD5arRyCEgPz8/Las=;20:+0wgJNuy387ZzHJXYgfBlLdVLu1znvh0qYtRSjp9YDtB9tY2hKzrFQqMXpgKwmVhveSxfZV9K7c2mVPPkgsGda03PH1GBQ+KuagiTG2N1sJulXj1+rzamRVaDLHuzUmwdOoX3dx7TcLjTe4Vg7XYTvQT6k3DTGO3gRfLiKlP3I/OZVhN5WeaU8qA++SgUdY0XyK1U9hlF1ZqvXV8K1BJtWiRkzquUsTbn83/Gx/V3OzEolxFNM1+PONwntkHzvfPYQmyDl7Xh5IrgXgKTkWYO/a7T/STzIvdVOgMKYHmJ3kQGsBqv7TMIPxE5HTr0ZpEQQZ19SM+3AZ54Sy0IVKjvyqScIvoDYwobwrYnYIL4pNoT309xJZEc0ztgrU+L+ZnRf3cDIHbm2SKGPY9t+ZxiuU3EAXeSWWS3DrhfMW+KRo8pXVyKPmJtLxDAq7iDD/4uhS/c1O58zAgYA7oWVMG0iDsImVpN/4Ak/IdU3cjKbad/LPkCVljq318FaFFy0fn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123562025)(20161123558100)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BN6PR12MB1139;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BN6PR12MB1139; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzQ6S2psNVhmVUhLQTl1REdQSFBPNURLTjYxeFhj?= =?utf-8?B?MGtCQUIrNmhCeERaS25paXVrek4vRUJONUxWNGU3VzBTSHRYcVBTaWZxalAx?= =?utf-8?B?S2ZaSFZUWlIwL0hjOEFBMzdCaVNlb0EyckFFeGU3TU40U2VJeDZCcHVEMHBM?= =?utf-8?B?MTZDbEVsa2VndTlBbXFJK2dWdmtTbnFhZUtMRW9wUUlCTzcycStOQUZrTElj?= =?utf-8?B?cDJMck0wQVY2bkpyRGlZRGROWUNITjQvWFJxVkJ3WkFlSlM4OWlWcU1Rc0hY?= =?utf-8?B?U0tNdnRmRE9UREs0ZG15Um9WUnhBcXlSY1l6ck1rY3o2OEZiYnc2enJVVGsr?= =?utf-8?B?RnVrT2FoYWpMMTVUQUNpeXRwRVdGMEJOR0ptU2FaaGwwRWZTR29lemZOMDNR?= =?utf-8?B?MXE1aDBnRmt4ZExmeU0zOWdqNUx5OHRwYmFJdCtpajE0OGVlbVRRQjNZcTFQ?= =?utf-8?B?L0o3M0R6eFpUaVRsU2dpWFNSYUtyRTI2VS96d0VOUDRIQkpNajg1dDBOWkVr?= =?utf-8?B?U1oyeTAyN1o3Mm9UWE1ac0Rsb05uRFN2dW9j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UmhZMllMQVN5RCs4U2E5cVNlamlmeFpJZU9uTUI0dG96?= =?utf-8?B?UldETUhJZVZKWUpxWnNRUkxnRThCS25NU1FjSkxsb0Y3cnlJbEN3cTlYUEVz?= =?utf-8?B?V2U2OHFuZ016bTNucitBZTJheU81aVR5dDVELzJHRWQyeUI2Z1NRbGk0MUdG?= =?utf-8?Q?L3MJ7Hxc+zbYZFosCSi?= X-Forefront-PRVS: 03333C607F X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(39860400002)(39840400002)(39410400002)(39450400003)(39400400002)(39850400002)(377454003)(24454002)(72206003)(64126003)(7736002)(305945005)(6666003)(478600001)(2950100002)(65806001)(230700001)(50986999)(229853002)(93886004)(31696002)(47776003)(54356999)(66066001)(65956001)(86362001)(76176999)(8676002)(3846002)(81166006)(2906002)(4326008)(25786009)(53546009)(5660300001)(3260700006)(42186005)(53936002)(31686004)(36756003)(65826007)(7406005)(33646002)(8666007)(7416002)(54906002)(189998001)(38730400002)(6246003)(23676002)(77096006)(90366009)(6486002)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:BN6PR12MB1139;H:[10.236.64.250];FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCTjZQUjEyTUIxMTM5OzIzOlFndkI2MEVtdnlweGlZUFRGS242Tzg4QXo5?= =?utf-8?B?SG5yb3NJaWx2WTBpRXFQakFlVHk2SWlWek02NmNnZXk0dHJxSEZDOHZhbGxW?= =?utf-8?B?ajdQRHhveGpqMVdiS3dXemY1aHZiSVRJN3FIYUdrS01YUnB3cjUveVlSL2pS?= =?utf-8?B?NkJvM0ZhMmJwbWVTdmFSU0R3NzhYeGEwZDh6czVZbU04cnNZWmhNYndrTnBm?= =?utf-8?B?N2pjWklXUWprVzJqNzltaDFEd3l0V0JTM0srNTg5cEd2M3JNa0E5V25RcHRQ?= =?utf-8?B?SmFKMnNlanhIRXJ0aE5uR094M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;BN6PR12MB1139;7:uBlXbyoU5SrZM+E7tst61S3MTECVlzjMKL3owTl0+wWpxLyhzkznPYaQHVBGq87eTVeKiSoD6brALiUiwwHsm8596NamPr9zRJz2yLX4SC4MWgAf+PqgM+5dLsuYOvC4mrEouCnwr/NrGKD7amEdumqCSplNj1HXdR51zIfN6NTTnomrU4IVqk0bdlV6kH0LTDMcBdAT2ReO2s9PVn00QWt1QS/gPt/9WWZko16sVLKjVkdjingUKcS+unHBgilUZlVfq1SoWefTXRCKvRG+VAuNmj5/8Non/9HVf2XAdDDS9p89C2Y850nwjitBycXigZ9MXgaZ2kprnrewX3RiyQ==;20:fuRn0D9diZqi3CjtTpO9kfoE1bTFALMTY4Ep4etcccW6jmNZ/vkNliMVw45SvhE+pTU/mqZGmfBsbS5M4xnn7pyzPzswetiyMoYzRAj2UszyJvRX17LFiLJ0SAuKWCvv4Pzfr+xnE5uwtsudHrjaiYMV74fV1EH6DfFcM86aqH02e64/+89VaksEhh5t1p9g4pkkg06Ur4Z/v/YG/iDBiFooY1zHxlZOzrA8LxM/U4WGofkE4AVTqGZRTbzjRSrE X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2017 18:36:39.2259 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1139 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1984 Lines: 49 On 6/8/2017 5:01 PM, Andrew Cooper wrote: > On 08/06/2017 22:17, Boris Ostrovsky wrote: >> On 06/08/2017 05:02 PM, Tom Lendacky wrote: >>> On 6/8/2017 3:51 PM, Boris Ostrovsky wrote: >>>>>> What may be needed is making sure X86_FEATURE_SME is not set for PV >>>>>> guests. >>>>> And that may be something that Xen will need to control through either >>>>> CPUID or MSR support for the PV guests. >>>> >>>> Only on newer versions of Xen. On earlier versions (2-3 years old) leaf >>>> 0x80000007 is passed to the guest unchanged. And so is MSR_K8_SYSCFG. >>> The SME feature is in leaf 0x8000001f, is that leaf passed to the guest >>> unchanged? >> Oh, I misread the patch where X86_FEATURE_SME is defined. Then all >> versions, including the current one, pass it unchanged. >> >> All that's needed is setup_clear_cpu_cap(X86_FEATURE_SME) in >> xen_init_capabilities(). > > AMD processors still don't support CPUID Faulting (or at least, I > couldn't find any reference to it in the latest docs), so we cannot > actually hide SME from a guest which goes looking at native CPUID. > Furthermore, I'm not aware of any CPUID masking support covering that leaf. > > However, if Linux is using the paravirtual cpuid hook, things are > slightly better. > > On Xen 4.9 and later, no guests will see the feature. On earlier > versions of Xen (before I fixed the logic), plain domUs will not see the > feature, while dom0 will. > > For safely, I'd recommend unilaterally clobbering the feature as Boris > suggested. There is no way SME will be supportable on a per-PV guest That may be too late. Early boot support in head_64.S will make calls to check for the feature (through CPUID and MSR), set the sme_me_mask and encrypt the kernel in place. Is there another way to approach this? > basis, although (as far as I am aware) Xen as a whole would be able to > encompass itself and all of its PV guests inside one single SME instance. Yes, that is correct. Thanks, Tom > > ~Andrew >