[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: "Tian, Kevin" <kevin.tian@xxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 17 Jun 2021 13:40:39 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.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=wd1VxetJ+fnJozp7KE+NdfZNJ6gI3wySJMPW5Cp+MTU=; b=aSdR+I0uzVOp90wJhPbFDsLibDFBEgeUtQ1fCWItdWuYIRb+9o0qitSqO9GWte0Vb4yNrMsUtHPIl99sw3fuXKGeWOD0Wio2EInIfAq7DquvWPJZYefeayLjTP7NNy8pX83YQrDRMPE27LbUlvK+zOBDHrWku5JZnF1I0vsztzX7jRaLY0ZJUrJ2UmZMGi1PeFXOGjSYMYwWOowzIJFlUXdbGPbN/K3TVcB5U4xc2Fj4NSAgOvJ8pFn6MFSdQ/0qAD6NkeamLGuhi87NSwUzLrRfZt/6U1DiuUwaTXIx6ZNg+2jGYUYQ5ctfsT4rawI31wl8KUmx5JQSUn8+3BSuow==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XKn4/e7oMUpFVP0pfySrlzdUlREtjYaCHSplLPCcx5VdO64cJQlOcd8Qkt9Y29BQg8ZRGQxAreK05L3HRE3P1eCdtrAB08j2smOeLURmxsfoQANJgswS8vClvqaDJfCF1HUcsd0kTjWoQlMBHTLFlFwBrgf/kPGSGN8HOqwz5IEa8J/5IjvlOVTMNGjwPoJxqx+Y/94xtQJbJnVdj0eixcGafJgwnAPeR89Gfx3iisVtBXPdCD4glBo7KXd63huoHn1HwQ4jE9C49QqYQsSdQeDdDuI0zri3TyppEqHCituZhWJO37ECHh0nex0hsZNuaxL4wqhbjoYGo1XETBYWqw==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Nakajima, Jun" <jun.nakajima@xxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, "Cooper, Andrew" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
- Delivery-date: Thu, 17 Jun 2021 11:40:53 +0000
- Ironport-hdrordr: A9a23:uBuWi6sNBiAUMAV29io57iqd7skDFdV00zEX/kB9WHVpm62j9/ xG+c5x6faaslsssR0b8+xoW5PgfZqjz/FICOAqVN+ftWLd1FdAQrsN0bff
- Ironport-sdr: WBQGKv6YHS42qTnRs3Sm4ChMIBPoR8IxkfL8RQQFh40XaAs5PxK8M1CIDTT31Fl8ePPVFWIdSc kjRO5ltD6ZCZMvSRtv72e/HRfv2+SoNj3yihtK05CEqMG0jBPc8eSE8eVM42he+7OoZzjedvWK NydlHy03wOiBVt8DvL1+sK6tTJ3QHhgXZ+hwizvECloZLRPMQqdhUl/ZN6nd8lWoosg3PTF/LQ 0+2FYAY4JQUUNkk+f5RCJ2m2KiuqBCiP4+T6aqyPt/8DQRPRCJ+ba1Qjy2ENRUCSli5pQWI+xN hrk=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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).
Thanks, Roger.
|