[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: Stefano Stabellini <sstabellini@xxxxxxxxxx>
- From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Date: Tue, 11 Oct 2022 07:52:02 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; 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=+++nReco2zvuoEaFP+dp8pLVLMN5kLeKXds4nuY0d04=; b=nzgFefO+RUOY6e9UZpya6wd0MqKMqjwdOZijdT2ivsk7uECVuKA/xXajTotRq+UU+iUL/qjBcXU5tHaEYUEnaekVAgPFFhBvyiK9rPFW7LquTjYyeO7sVt/BxvKOaFuHZkORPVfruDbxS8qNNnGZnD0FNYy7Lsqpd9jbPekQ8KmeWyyzW07InmhFin/Qgyo5ElwIJyVpJktxXZPX3sOj6WgwV+JEwYnmsuVKiA6xb+BSP1xcjcYzkJsE1/vJR5MoO/I9skFB25YFwrTUy9lJT/zuQRGwnmkpSqlND1xdWchZ5f9g6k3B7+ynE1tWcgpvYZBiGirLz5+VIzS64MbYuw==
- 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=+++nReco2zvuoEaFP+dp8pLVLMN5kLeKXds4nuY0d04=; b=PCH17v8Hq+PXmEZ6zHL2iwMoLCuNEu6oMjA9VIV44XmbTLsggnA6rM1LRriimDhG2rOBNEhtTgFPB2qM7nreOsZgC4U4zDY9ZT5xWTsiEFroAkBRu9okrBWfjjutPJKwf/bXbgvIDpG9SJTc42qMjmuzs0H2/KSCXAm586IV7EbnfYe2mdQUf0p0R1CR749OuToab7KwPARTUaIf4vgtcwYzRJpjISz89MWkw/xXVE1PpCwq6E8ai88O+6exKFAk/iSab2YUE7LlSNL1H7K0w/1F1T8tINLV63WXL1qOIQNoWBWWazhtGtYpDTxhAXGtku4X5MPOPzqfsSeGPSkLSQ==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Fc8UrCRe9RhtXjGtbFZlm3dHqalIwN4sfL35yTJ+OdOe5pd/QlIqCgBIxeD0v5BvNga+21vLvR4nsUVLDyx8DesahP1yFugb3/to7YkbaWriuO61aFwj2FxyNqyHQdWwenqJsbahW655IyWoVG1SHwShROu3OYnLEelOGbwfvdNt4myQeRlirKCLFU1jTIg7Bq2PNXYBAdOalwzA9PMpoTNmVPp1aPiO+MHxdnkV3gZIOIrTtmIvWw65tizR0zvfZBtTFPmHapnIcv9T0aShoUkwSJrMjFWmHPbUXqu8B74+Bk9Rj7sDrGgHoLKD8/PYTKpMIe8EbstWXZngSsZjXA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W06vR8WffKJQDlJ0S+6J3yfO2sfLeTdVofO0Yx/VYEwZmLl2vSHbMcfLTqh0QtDv5c5fYKTzIuGnnA7HCWaIaV9TpgfSWZWyMFIfotKJbcTeIDQPBfjg+nw/SKmYaEjC96j5jT6msqVlvuMryoitlNwcxizBkUBVXWR6ST1nFWpOtMLmlJaIpK7LRfcQi04MZLRdu5VUxOJ3dwJUei55YQcdWfLcY4Jhq6SkQXLZm+bXB/+8/9ajGlVzWLCu6ewBIln14R1QdaY9+JxnAqDXYHyRdSLy08oS5VR8hswwt308gnhcSBgba9pV+rws/YWMN35sW1fmunzG33PZhVScbw==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "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>
- Delivery-date: Tue, 11 Oct 2022 07:52:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHY1KFdAull5ChokkeaXft6EPXQra337WuAgAZ9tQCAATqNgIAAE7eAgABoeoCAAPMPAIAAXMKAgAN3ooCAAk5MAIABJ2UAgACEbQA=
- Thread-topic: [PATCH][4.17] EFI: don't convert memory marked for runtime use to ordinary RAM
Hi,
> On 11 Oct 2022, at 00:58, Stefano Stabellini <sstabellini@xxxxxxxxxx> wrote:
>
> On Mon, 10 Oct 2022, Jan Beulich wrote:
>> 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.
>
> Yeah... it is a good idea to be able to cope with strange and bogus
> firmware tables as it is known to happen
I agree with that but if we make an assumption that something is bogus, we
should at least warn the user if possible.
Bertrand
|