[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2][4.17] EFI: don't convert memory marked for runtime use to ordinary RAM
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Thu, 6 Oct 2022 10:53:21 +0200
- 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fCEX1HvU2Ga04RZAVyxcK1anltVFxueHrwIcEl/AZOw=; b=Rde8T69qpyEo0v5jRlxFalnY/I6A7LNY1667xrlIWQEUNmbarC/sVJTDPgDUihOHjFr9fbStavUWJ1/lS9uCM0vhmtAvr9I7rjefr8TUNpjxunv7nsC/YYeBYcF5FgHTw2eAf/f5SeWdcDoTeNV8PMm1zfv7w5LiN8aak+tPb56rZj3ycSzx3sm8MPzOcTR2AJJzM5w+79814eErKPivRyLZwDfOpTjz8WQ545M+p7eXLG2ACZoQDDXBazlNQ9zKc10tG8MK18+M061wbGyKptxo0cQUOmRWUhHE2qPjzQyvkHSjQQR2zWYD30SHqiqv2CKdtP25qZa8JHrW9QK6KA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJ5XF0+kJNe1/HCBJFelN2tF8BjZgPOZocybNYD3AyV2L5FaN87/ADj8uEUHXV9UTUG8CDUtGDDGrP8e28we6QCZu1GkXF/6NHsI5C1igfBgYI5pE7+zC0ikoDJqYsE7ABYRA3waqcZDK044XuBxgssWNX4LC8zzCp98KVeIRMEhVU9mz7PoZtaskfYRu3k6W1hu7kyyQhr5rtqHPW3ePbsE14Io6z+wKy46Rgk8d7QXAiqBPd/kCtRN1NzSclBYNhxas7nB9kvwHtxFye6lw03OM/0iAGIMKbxg99pOLjYdeP9H4WdoYGp3/tS+NkE976kaBJ4aLrynMVIibMoNCA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.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: Thu, 06 Oct 2022 08:53:39 +0000
- Ironport-data: A9a23:UgR9Yqg7AmLZxBudx/1YhqiXX1619REKZh0ujC45NGQN5FlHY01je htvDzqFaKmLY2Pze9p1bNyxoE1X78OAyodhHVE/+HtjQngb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrSCYkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U4HUMja4mtC5AVmPa4T5TcyqlFOZH4hDfDpR5fHatE88t6SH 47r0Ly/92XFyBYhYvvNfmHTKxBirhb6ZGBiu1IOM0SQqkEqSh8ai87XAME0e0ZP4whlqvgqo Dl7WT5cfi9yVkHEsLx1vxC1iEiSN4UekFPMCSDXXcB+UyQq2pYjqhljJBheAGEWxgp4KVlE5 d8ndGgrUhC41svunoipFLJRlMt2eaEHPKtH0p1h5RfwKK9/BLzmHeDN79Ie2yosjMdTG/qYf 9AedTdkcBXHZVtIJ0sTD5U92uyvgxETcRUB8A7T+fVxvjeVlVMruFTuGIO9ltiiX8Jak1zev mvb12/4HgsbJJqUzj/tHneE1raVxHOmAdN6+LuQ6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GGPfI3kNg6diP22pqIJ9oEUfYCbcBFqEzsV4o6dS/Z2OLyoZx /8AuMTPxbZFxqfJW945XyBZ3BsEwhubCQ0gKdOZ7vcmLO9FqTa8srmTd30GJ3BVR4ZZ0KXOA pxYNG0HrQM0nyW
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu, Oct 06, 2022 at 10:40:56AM +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 it would be a bug if the Dom0 kernel tried
> to do so, bypassing Xen's memory management), hence that type's handling
Strictly speaking I don't think dom0 needs to bypass Xen's memory
management, just overwriting the page would be bad enough for runtime
services to not work correctly I would think.
> can be left alone.
>
> Fixes: bf6501a62e80 ("x86-64: EFI boot code")
> Fixes: facac0af87ef ("x86-64: EFI runtime code")
> Fixes: 6d70ea10d49f ("Add ARM EFI boot support")
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx> # Arm
> Tested-By: Luca Fancellu <luca.fancellu@xxxxxxx> # Arm
> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx> #arm
Acked-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Thanks, Roger.
|