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

Re: [PATCH 3/3] x86/ept: force WB cache attributes for grant and foreign maps


  • To: Roger Pau Monné <roger.pau@xxxxxxxxxx>, "Tian, Kevin" <kevin.tian@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Jun 2021 13:57:34 +0200
  • 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-SenderADCheck; bh=U3DAWlMsVTted9ih7e+HT8GUOf6oiGB1hE39lPwO7dE=; b=OOmnE/vrUBtsAv2fheWlOYSiB6d82sKk/hHQjCs8kyf1h6FDy9JTaQFAIAf13tHcZeJPTyldwurB3zRJfqD09hpJpMqrbYTStxz1aQlDiFks+Hbp4bQj6+C0X6PmCmxVZ+g4+mcc0W3jqdrRXV4ugGBoU7AnsYZwXWOK6ODpPjHSuu9VGSZw7u1PLoZhz2p2QhVmuxgv8xOtlUa742QBDceCPTslGayz69i6nBfiK1nhAtZekUe6bquFeVv8oMgqiiS/oVjGslLKY27k2gU1wDLSRaLxDWf3ctTN2jkV+qSPfUjQZq5k4YOl4x4Yf0ybUvaHY0TSnQTXTV1ck/sdJQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Nen8VcGgLQZVuOQxJeeD3ATwgKbdiHTuT+0mrsLIJlc5Of/flu0bPhRT9oE+RZYa+q3mG7kTl/YsSQu27eImv1AmR3zMfcs4sJcvFnj59oYCNCvoyS8QxQWxAZ84k/Vk/23nBSnOVcV4+Cq6otu+5pAGbzCaFjs4+t6alWQyU3Y5h94cqUSdhacR6F1HWZnbfWAhOX9d8hVGgshark+0z/8mfmJEY5QRWi0ehKbacCFX5BCnuLhd2nzND7XsxessS8RtCkeVTJYeRTQfaabdOPG2lN36FQdlZTHoVY2r/xchc9jJ917V38wTGUB3/21KpA/pzZvITxjLhaDYbieCUQ==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Thu, 17 Jun 2021 11:57:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.06.2021 13:40, Roger Pau Monné wrote:
> On Thu, Jun 17, 2021 at 09:31:28AM +0000, Tian, Kevin wrote:
>>> From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
>>> Sent: Saturday, May 29, 2021 1:40 AM
>>>
>>> Force WB type for grants and foreign pages. Those are usually mapped
>>> over unpopulated physical ranges in the p2m, and those ranges would
>>> usually be UC in the MTRR state, which is unlikely to be the correct
>>> cache attribute. It's also cumbersome (or even impossible) for the
>>> guest to be setting the MTRR type for all those mappings as WB, as
>>> MTRR ranges are finite.
>>>
>>> Note that on AMD we cannot force a cache attribute because of the lack
>>> of ignore PAT equivalent, so the behavior here slightly diverges
>>> between AMD and Intel (or EPT vs NPT/shadow).
>>>
>>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>
>> Reviewed-by: Kevin Tian <kevin.tian@xxxxxxxxx>
>>
>> btw incorrect cache attribute brings functional/performance problem. 
>> it'd be good to explain a bit why this problem doesn't hurt AMD in the 
>> commit msg...
> 
> What about re-writing the last commit paragraph as:
> 
> Note that this is not an issue on AMD because WB cache attribute is
> already set on grants and foreign mappings in the p2m and MTRR types
> are ignored. Also on AMD Xen cannot force a cache attribute because of
> the lack of ignore PAT equivalent, so the behavior here slightly
> diverges between AMD and Intel (or EPT vs NPT/shadow).

I'll try to remember to swap this in when committing.

Jan




 


Rackspace

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