[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH][4.17] EFI: don't convert memory marked for runtime use to ordinary RAM
- To: Julien Grall <julien@xxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 10 Oct 2022 08:20:48 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=G8uhotMRLEWevni8/P/wrPFXh2RFR72AYYIlNtVhUnw=; b=IMk3EyFCK9+VfzVQ7jZSyKJfilwQcBipxs0JKN2Ff49mwx99l0c88Oz9l6y8wadhuNh7YTjBGVMBCaXXi6JkD6NdoSuR9uRz974yCgz8zb7OoVnWRNt5lDycT9gMPc+1yE43OI40janrmS0sS4eyxFLFf9hk1JaeFJRQYM1OnrHlYojJZFrvWB2lOZimO4BaIAmIrMljTi/k+m4JJqMwwWx8NAT93SqaA9l8c20vYBTZj1xEDvOBL0ggaakQ3WFzCfS3GiZSI3rAjh+h6iYPr60e0s8o1D9tNuEL2UVOYBySrSLSGKrODBi9Pz4JvPeF/P4XC0QEN3nhznqLHcvdIg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DKGdVrUIlGHSC0xUXrbY9eAsx1oUB957ET5pAyvv+zea3uE8jox208G/wwXTeTkJ3HTOHdBy9Jazl4aJTlTgCpzs8v/F03SXVZbucOBBuIh3iPNOeeZvgoAkIqWrwd0Oa1pBA/mBfIMRjw4jEkco21Qfij3R81cKxcXQERJdkmRFuEM0mg1beG9qyqNO59veHnomT9UrrrDFfhkaQf6d83cGN6+OEiwm9lkXjm/c3yU5vuhjR7qPxwmC2/YI9BmpOwbI/hiR8I7XgpdJAvAQFXQKfBGoL38zfOp1cpTIl1PFmpM0+gmUK6Vx4hePgUHsiuP3tIb+SmZjaSA2JKrrHQ==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
- Delivery-date: Mon, 10 Oct 2022 06:20:55 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 08.10.2022 21:08, Julien Grall wrote:
> On 06/10/2022 15:11, Jan Beulich wrote:
>>> ... the space cannot become ordinary RAM, then such a precaution
>>> wouldn't be necessary. After all hiding EfiACPIReclaimMemory from
>>> Dom0 just because it can't be mapped WB wouldn't be very nice
>>> either. I guess I'll submit v2 with this part of the change left
>>> as it was.
>>
>> And while already in the process of committing the patch I came to
>> realize that if the WB conditional isn't supposed to move, isn't
>> the change done for Arm then wrong as well? Shouldn't it then be
>>
>> if ( !(desc_ptr->Attribute & EFI_MEMORY_RUNTIME) &&
>> (desc_ptr->Attribute & EFI_MEMORY_WB) &&
>> (desc_ptr->Type == EfiConventionalMemory ||
>> ...
>>
>> leaving the EfiACPIReclaimMemory case entirely unaffected by the
>> change?
>
> IIUC, the concern is the region EfiACPIReclaimMemory could have the attribute
> EFI_MEMORY_RUNTIME. Is that correct?
Yes, ...
> Given that the memory is reclaimable, I am not sure why it can also have this
> atribute set (to me it means the opposite).
... at least on x86 all sorts of strange/bogus type/attribute combinations
have been observed.
Jan
> But I guess for hardening purpose it would be better to use the version you
> just suggested.
>
> Bertrand, Stefano, what do you think?
>
> Cheers,
>
|