[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: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 31 Aug 2021 15:36:51 +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; bh=aO4UVlAR/M4YcZaeu8MNVB0ARjt/arruUKju+BatGoo=; b=GItI8JdXjoG0HQdybaJ5kIc17geEQPEnEHyKZ0QKLsV6RIjE8OJCQ8REhIOmGn1yRZD9fGUaFmHzwaxHuQRR37x0MbAfJLL+ySB5l1xRvrsYN/3XzxjCNvccU9DhQ0DH432LGlFBBFCYFYmAKybTGDcUIlWwWkmiown3FHnPWOfYJFeJmZ1PWbhivvfecw/GLwXXRQIqJNTGiK1TQ/X5a7kPeu5tIHPzB1khVenxSt4AlwYBYm9a5FUnaLYqbNvTvtboxnpIEbXp9Ck1hazRJhxcIlb9rcPUkp/IGEOdX0k6WBpAQgx2LUVCovFMBK4NZkrpsfHoGLUxs6Kp2mR1aA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SA8opWEaqHuJhjhbQrOWqnOnC5PZxpS4D4xaWPSDoCnzzK9TbtlYs37UA51kU5ucWYdAUW8itjO9vX/bwi4cAG88ptvo8pdzWpn/IHyLe1ORrTukVDXdAJSf5gD2U07KFKZ7cMB/SXA0PVcJpSo6W/XD9A6S3j5QSQhGpspoLonj6cbOqPk7L95hnNhy8wZqLyOZEQoRrUGpE6w+9ujk8yq/68hA4dtIKtyuqkvFf13o1kImrDt+me1l81xJwKfBqbFFMzUJFHTRLHPWujjMQX9otKUB6UB/iPmaQbnU/wws4nijQe5dXGzmhESl2tWN1n5qM7vU1uIuM5HNWPOQYA==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 31 Aug 2021 13:37:04 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

Jan




 


Rackspace

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