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

Re: [PATCH 1/4] x86/PVH: de-duplicate mappings for first Mb of Dom0 memory

  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 1 Sep 2021 12:49:35 +0100
  • 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; bh=cKjO7PQGRNxGgIvaAymBw9Wc66auu2P0CgYv89Iupg4=; b=QBwBcrcwv/kk/NQ+wrBHuDoE7zNr/28C5XmKa/55gMcYTPcAnjUxCNaoG2nG+Pvx5sUBp1k4SRa8YasxjUCrAo78hrkFfdNPDBaoscE0k9/2HPs/K/4k4y9xyG9SbVrbKFZ/4E4mPIL0ftTtq3KsS2HiIdL8bdOVvZ87YFylEfnmiSCFOaSoYIlChOS9w1k7SBq/MVh7+fYGn3Zs/oObaLMCwAJ2r8xu8Oky/AZj6NkmYQqCO7dHcbyPSSsVq0ItOprT4OetvT9jSsVxO2YTD16Hdw3DTl0tAPycMfVyGryigTC6F3QjseMMH/zBL+7I388N4XMjuaRdNfArYyE8Mg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PPZbS1jOrRpOst6n+6nM+/o7uOL1PHvVU96Xn1xsOp7V6/xuFQWZLgU1xg1cFjEniKOOedkju+UIUNNJMh5vtdRH56wUU3x2mCkfuor/mgvx3kLvcs9xjlPSpJ/l653pm55ww272tFRlzfaoKmcgIPyxmtO0WUVoILsg9sZ2wHs0ljklugi1JddWC6ogo0ZgRcXDpTlyAiT3Tx3sNhE8ByXoL+pG/l8vMHZPI5OE+fndV4xZqjozjGLUgZV1AUJouvY8DWYBfHhVwUGZjaAfcHmoQMagbGrupJA/dVVC/ngjbxYrz3ABxu62deUnyqPvvQ9av9n0SkCgcBnE64SuRQ==
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 01 Sep 2021 11:49:53 +0000
  • Ironport-hdrordr: A9a23:8i7vcK0NYLSmBIeU/mjBLgqjBTJyeYIsimQD101hICG9Lfb3qy n+ppsmPEHP5Ar5OEtBpTiBUJPwJU80hqQFn7X5Wo3SIzUO2VHYUL2KiLGC/9SOIVyEygcw79 YHT0E6MqyMMbEYt7eI3ODbKadZ/DDvysnB7o2yvhQdL3AeV0gj1XYfNu/yKDwHeOAsP+tBKH Pz3Lsjm9PtQwVsUiztbUN1LtQr6ue72q7OUFojPVoK+QOOhTSn5PrTFAWZ5A4XV3dqza05+W bIvgTl7uH72svLiiP05iv21dB7idHhwtxMCIiljdUUECzljkKNaJ56U7OPkTgpqKWE6Uoskv PLvxA8Vv4Dqk/5TyWQm1/AygPg2DEh5zvLzkKZu2LqpYjDSDczG6N69M9kWyqcz3BlkMB30a pN0W7cnYFQFwn8kCP04MWNfw12l2KvyEBS1NI7vjh6a88zebVRpYsQ8Ad+C5EbBh/374ghDa 1HENzc3vBLalmXBkqp/FWH+ObcGUjbIy32BHTr4qeuomFrdTFCvgglLfUk7zM9HMlXcegd2w ysWZ4Y5o2nTactHOhA7ak6MJCK4sGke2OEDIuoGyWRKEgwAQOHl3fG2sRA2AiUQu1/8HITou WMbLoKjx98R6rRYff+lKGjtCq9GlmAYQ==
  • Ironport-sdr: Tt9abo8Jh6bH658YlIkLPZtE83hkPRUjbi68J1FQIjXHyvupdzQ97k/6MOLc/WCgito3LGKiIG 1NsRBVcjwaNxXNbAZDhSfPy6Iw0swWH4mb6C6nXyI49fieD09Jzk/LGfKGhkUBTSLAzmtJO9KK gmrBQ0FI6gynknTMTWvPUPXSZq8Lpf87XXQ6/CaE7DjI5+5YrQ2dM2+salV1AxkaICYgTVqix8 L27fhgILjctj+POvhFWi8BhhsCvfBlxMwRCkw6D+ACesd93Jh9lqRPWy35p363l1uhXpdokpW0 qyF2EbTliryKgiPVC/pYcaQf
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 31/08/2021 14:36, Jan Beulich wrote:
> On 31.08.2021 15:27, Andrew Cooper wrote:
>> On 31/08/2021 14:19, Jan Beulich wrote:
>>>>>> @@ -1095,6 +1101,17 @@ static int __init pvh_setup_acpi(struct
>>>>>>          nr_pages = PFN_UP((d->arch.e820[i].addr & ~PAGE_MASK) +
>>>>>>                            d->arch.e820[i].size);
>>>>>> +        /* Memory below 1MB has been dealt with by pvh_populate_p2m(). 
>>>>>> */
>>>>>> +        if ( pfn < PFN_DOWN(MB(1)) )
>>>>>> +        {
>>>>>> +            if ( pfn + nr_pages <= PFN_DOWN(MB(1)) )
>>>>>> +                continue;
>>>>>> +
>>>>>> +            /* This shouldn't happen, but is easy to deal with. */
>>>>> I'm not sure this comment is helpful.
>>>>> Under PVH, there is nothing special about the 1M boundary, and we can
>>>>> reasonably have something else here or crossing the boundary.
>>>> As long as we have this special treatment of the low Mb, the boundary
>>>> is meaningful imo. I'd see the comment go away when the handling in
>>>> general gets streamlined.
>>> I should have added: And as long as Dom0's E820 map gets cloned from
>>> the host's, which will necessarily consider the 1Mb boundary special.
>> Not when you're booting virtualised in the first place.
> You mean when Xen itself runs in PVH (not HVM) mode, and then in turn
> has a PVH Dom0? And if the underlying Xen has not in turn cloned
> the E820 from the host's? That's surely too exotic a case to warrant
> removing this comment. If you insist, I can mention that case as a
> possible exception.

It's a long way from exotic.

Also the magic surrounding the 1M boundary is disappearing on real
hardware with legacy BIOS support being dropped from platforms.

The comment is misleading and should be dropped.  The logic is still
perfectly clear given the outer comment.




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