[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: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 4 Oct 2022 12:23:23 +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=cAlwGqefZuBiR8QpS89lDHhkc9FFi0V4EjZysqqlx/8=; b=YBue28xVPwQtRjjPAHiEbfOFEywZrQVXuttWE1mn7Fg/vG+MI8GSPigH5yyGkBP9bEGpTPXBWOLanF5+agG5UgGtqhuqo8gAl13plWmy8Qc/AJfpRV3q8NabWjv3LJ9Ak+mz1TkM0Wif1UIT7Ad4nrTvDUX2FYqaFb6jpp2IH09NfGifgorcelCo3k1GFVVIeQE3Ptow9nhXiOfXQE+VV3irzlZ+bZAgbBSubTVuafPTfeIyekenlLhti7hJbGu1KMZiVcYg90Jt9goW5buag7TasIEkz98kSKJlf+xI/7CbDqM4sthxwCHzMMY2ZrL4GiB8CrJYLZw3zswiUsEfkw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iKia2ESymRHCJ2YbiONAccijoMAofr1Zg8hjH6crBcac2mL2W6a7mvR1asZ+MDekOVLXo11mhSMy5Gf9S/vPDODjSx8kd2Qv1Vsid1RdaNHrDVfUDQS4kjJGe6GhF4+eHNVE67QgKlfTfwLaueStfWd7w7D+Kv1aHVZ7krA/TVDRaZFvZaWWnMixBgeshBkKuSLY8KcA2feNKMRJMjbCNreEvAKcNeWHPTJNWwOgq3N+UUK+aZH+6sBIwM/vMfhtcFp07o3M19SIHlEeq0AbX8ARszGwsWDjHWr08OHgEnqw8VZDz2nQtUh322n7l0DNqHqisLnID5eTdXdQ+aeQ8A==
  • 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>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <volodymyr_babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Henry Wang <Henry.Wang@xxxxxxx>
  • Delivery-date: Tue, 04 Oct 2022 10:23:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 04.10.2022 11:33, Roger Pau Monné wrote:
> On Tue, Oct 04, 2022 at 10:06:36AM +0200, Jan Beulich wrote:
>> On 30.09.2022 16:28, Roger Pau Monné wrote:
>>> On Fri, Sep 30, 2022 at 09:50:40AM +0200, Jan Beulich wrote:
>>>> efi_init_memory() in both relevant places is treating EFI_MEMORY_RUNTIME
>>>> higher priority than the type of the range. To avoid accessing memory at
>>>> runtime which was re-used for other purposes, make
>>>> efi_arch_process_memory_map() follow suit. While on x86 in theory the
>>>> same would apply to EfiACPIReclaimMemory, we don't actually "reclaim"
>>>> E820_ACPI memory there and hence that type's handling can be left alone.
>>>
>>> What about dom0?  Should it be translated to E820_RESERVED so that
>>> dom0 doesn't try to use it either?
>>
>> I'm afraid I don't understand the questions. Not the least because I
>> think "it" can't really mean "dom0" from the earlier sentence.
> 
> Sorry, let me try again:
> 
> The memory map provided to dom0 will contain E820_ACPI entries for
> memory ranges with the EFI_MEMORY_RUNTIME attributes in the EFI memory
> map.  Is there a risk from dom0 reclaiming such E820_ACPI ranges,
> overwriting the data needed for runtime services?

How would Dom0 go about doing so? It has no control over what we hand
to the page allocator - it can only free pages which were actually
allocated to it. E820_ACPI and E820_RESERVED pages are assigned to
DomIO - Dom0 can map and access them, but it cannot free them.

Jan



 


Rackspace

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