[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] x86/P2M: allow 2M superpage use for shadowed guests
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: George Dunlap <George.Dunlap@xxxxxxxxxx>
- Date: Fri, 24 Jun 2022 19:27:39 +0000
- Accept-language: en-US
- 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bsrzEX+WHrlrFoJN3ARiAkM3lVJAx9ElXP1C50OvT5w=; b=XbXRXGJ82PZNy7vnmyFS17VMVc7Zy+XQ2MssvgJ91x7hL7z+PCW8V87kC8/nk7FtW6MBR77Gol6pKyDcEWQCLFDhLWRMNvzryZOTJ9ovEgXuZMSFuEuJTTLgpywLxguYssedSoy5G8HOT17xWBbToFUYpcXL8NSYslhAREtHgP2D5OflJW6Y4Y8xEIm9ImDKqiDRvnIuJChmfGDmRHIQArPDpZTFzlNF3gn33V4Q0+dM/jxIWVaLqjKgvL/Vkou1tHIG1pJRaPoJ3XpR4ecWwMntswtUykpK2musgs0C0FV5HKof0YVvrRkGMyhU/eLApQhhTkMvgfma/MPHDsBBaA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DfqSO9xs6ohX0JsvXulV4IUzMwy9GtlqtmtlZnbRzmf45nUDhYgsZOGO5KYFVofVQ2hMvsHYxCunwN/Ozx1rrT5M8UuTJLGxg8ySaUbT4V0jdl/oke0rFgOq9RGIMJlpDp+VsgZTa6Na+5p0smSY4EkzYwr7ZTCK9hw7jOK3vsTSF+YpfmAWZjmsykhBp2PUUNBobCYFj4Vm41gDpv1+iCBJ/zL5fzoHKy0T2bU6vfay6L0mxsAKT09t+ExUZ+dUH55xPXTGrjmxj6QKmvyjz0WE3Yk/OBnxtt3UIjSvhVyYcmD3HmHjhmrMciavtdHmTCZcnDYU3kyM6RfvDEsqsg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "Tim (Xen.org)" <tim@xxxxxxx>
- Delivery-date: Fri, 24 Jun 2022 19:27:47 +0000
- Ironport-data: A9a23:1J2596CCf2aO5xVW/97iw5YqxClBgxIJ4kV8jC+esDiIYAhSlGxQk DNbHCvTJK7JMVJBSKkkPYnn8U4Ou5LTn9M2QFRtpXtkEy8Q9ZDLX4qTc0r6bniff5zIRRs94 s5EMYOaJps5RyOM/xz2OLW483Qg3vGCLlaQ5JYoHwgoLeMzYHtx2XqP4tIEv7OEoeRVIiuB5 4r785KPNACo0GUra28et6+J8x4z5/6p6D4RtAA0PaEXsAfSmUdOAcNEL8ldDZdZrqq4vAKeb 7yepF1s1jqBp3/BMvv8zvCjNBdirof6ZWBisFIPM0SZqkUE93ZaPpoTbqJGMx8J0WnRxLid9 f0W3XCOYVZxVkHzsLx1vylwS0mS6oUfpdcriVDm2SCi5xWun0nEmp2CP2lvVWEswc5lAHkmy BAtAGtlgiZvJQ6B6OnTpuFE3qzPJSRwVW8VkikIITrxVZ7KTX1fKkljCBAxMDoY36hz8fjii 8UxNAA+aySZfzlzEVoWAck3wf+huiDZfGgNwL6VjfJfD2n76iVUiOKoC/yMP9uASINSg1qSo X/A8yLhGBYGOdeDyD2DtHWxmuvImiC9U4UXfFG63qcy3BvPmSpOV1tKDzNXotHg4qK6c/1SL FYb92wCsK42/VSDRdjhRRyo5nWDu3bwXvIPT7ZltVzSm8I45S6SW0UUZzdoMuABj804Qhlw8 Xi4gvjQUGkHXLq9DCj1Gq2vhTG4NDURLGQCTTQZVgZD6N7myKkjgxSKQtt9HaqditzuBSq20 z2MtDI5hbgYkYgMzarT1U/DqyKhoN7OVAFdzhnWW0q14wU/Y5SqD7FE8nDe5PdEaZ2fF1CHt X1cwcyGtrhSV9eKiTCHR/gLEPex/fGZPTbAgFlpWZ486zCq/H3ldodViN1jGHpU3g8/UWeBS CfuVcl5vfe/4FPCgXdLXr+M
- Ironport-hdrordr: A9a23:jOJrAqxPAS72trJmZJcVKrPxgOskLtp133Aq2lEZdPULSKGlfp GV9sjziyWetN9IYgBapTiBUJPwIk80hqQFm7X5XI3SETUO3VHFEGgM1/qE/9SNIUzDH6tmpN 9dmstFeZHN5DpB/KDHCWCDer5OruVvsprY/Ns2pE0dLz2CHpsQizuRfTzrd3GeKjMnObMJUL 6nouZXrTupfnoaKu6hAGMeYuTFr9rX0Lr7fB8vHXccmUezpALtzIS/PwmT3x8YXT8K66wl63 L5nwvw4bjmm+2nyyXby3TY4/1t6ZrcI5p4dYyxY/ouW3fRYzWTFcFcsnq5zXQISdSUmRUXeR /30lAd1opImjXslyqO0GbQMkHboUoTAjnZuBClaDLY0LLEbSN/BMxbiY1DdBzFr0ImodFnya pOm3mUrpxNEHr77WzADnfzJmNXftrdmwtcrQc/tQ0obWIlUs4ZkaUPuEdOVJsQFiPz744qVO FoEcHH/f5TNVeXdWrQsGVjyMGlGi1bJGbNfmES/siOlzRGlnFwyEUVgMQZg3cb7Zo4D51J/f 7NPKhknKxHCsUWcaV+DuEcRtbfMB2HfTvcdGaJZVj3HqAOPHzA75bx/bUu/emvPIcFyZMj8a 6xJ2+wdVRCD34GJff+rKGjqCq9MVlVdQ6duf129tx+pqD2QqbtPGmKVE0u+vHQ1skiPg==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHX7O/bKX0sOdH9/0aIlntq4rv2Q61gJw0A
- Thread-topic: [PATCH 2/2] x86/P2M: allow 2M superpage use for shadowed guests
> On 9 Dec 2021, at 11:27, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> For guests in shadow mode the P2M table gets used only by software. The
> only place where it matters whether superpages in the P2M can be dealt
> with is sh_unshadow_for_p2m_change().
It’s easy to verify that this patch is doing what it claims to do; but whether
it’s correct or not depends on the veracity of this claim here. Rather than me
having to duplicate whatever work you did to come to this conclusion, can you
briefly explain why it’s true in a way that I can easily verify?
e.g., all other accesses to the p2m in the shadow code are via
get_gfn_[something](), which (because it’s in the p2m code) handles p2m
superpages correctly?
Everything else looks good here.
> That function has been capabale of
> handling them even before commit 0ca1669871f8a ("P2M: check whether hap
> mode is enabled before using 2mb pages") disabled 2M use in this case
> for dubious reasons ("potential errors when hap is disabled").
I’m glad the days of random patches being checked in without comment or
discussion are behind us...
-George
Attachment:
signature.asc
Description: Message signed with OpenPGP
|