[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/3] x86/HVM: permit CLFLUSH{,OPT} on execute-only code segments


  • To: Andrew Cooper <amc96@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 3 Dec 2021 12:55:58 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gVXn41K2c2U1kGH5e7upCj/T3lY72QTk8lKOWSWrFDY=; b=YKdCYMxeHqxHaWiItMiEODWFbgchR29nHb7eFjEZSEOHg1VC4PiyyLcw96m2hkCp2r3tcqNFDnaOjSP1itSbYp7P7o50hTDRL7+D8xbnBkOUSp7QBsN259a82T1Cv8hUMxXIw5xWiaN2lPy2TilscjkW9QY7h+YU89vzfuh0/6NQFUIBkOtta4G5UYfD2+EkEV6XQ3qfNl9p9Pq42iE29iop6bkKA+EG3H0WUmasMwlZ1FH/woBHmeGOdIyAV8i4HZtrJhjZNOtHJMEj1pvE/3ypmO8ObmToJnDLrbRywEta1C50LVDgBWbIhl0n7/1Mg4urwQW3DbVWbQfocFI0Ug==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LXpJYtAYhzw0CWJAq4mSvPzLrfq9+MEFpvGPsNfXmRQGAdCnhc8VY+57CHWE/DhWfjtQKVbdwsZQBA4sYYPhOJKH3kXBVOtjWywx28hJDVJQ6euVs/g4aoblWnLda4aaTdU2Cp5AFglXmWBgxDcvRKk62KLgYRFe3ZXbzgolZ5lB8zb1O3W1eZQXFaLh8JzCT27gXTuoG4k3zABKq05Hj+C4HwCO9/ZTII1zRb0KtO+5iSKRKf44vgGUeJY/NV5BH5oFPH7x31gkAmYcs3jNgV6GYrcKMkWVqFc2dQDMR9g2Ujz0k17l+cgfuwKvj6cs7QvZ2sqzc4arackn3AsCrg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>
  • Delivery-date: Fri, 03 Dec 2021 11:56:31 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 03.12.2021 12:48, Andrew Cooper wrote:
> On 03/12/2021 11:21, Jan Beulich wrote:
>> The SDM explicitly permits this, and since that's sensible behavior
>> don't special case AMD (where the PM doesn't explicitly say so).
> 
> APM explicitly says so too.
> 
> "The CLFLUSH instruction executes at any privilege level. CLFLUSH
> performs all the segmentation and paging checks that a 1-byte read would
> perform, except that it also allows references to execute-only segments."
> 
> and
> 
> "The CLFLUSHOPT instruction executes at any privilege level. CLFLUSHOPT
> performs all the segmentation and paging checks that a 1-byte read would
> perform, except that it also allows references to execute-only segments."

Somehow I didn't read further after the page table related paragraph,
perhaps on the assumption that like in the SDM it would be all in one
paragraph.

>> Fixes: 52dba7bd0b36 ("x86emul: generalize wbinvd() hook")
>> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> With the commit message tweaked, Reviewed-by: Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>.  Far less invasive than I was fearing.

Thanks. I've switched to simply saying "Both SDM and PM explicitly
permit this."

Jan




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.