[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 06/10] linux-user: init_guest_commpage: Add a commen
From: |
Luke Shumaker |
Subject: |
[Qemu-devel] [PATCH 06/10] linux-user: init_guest_commpage: Add a comment about size check |
Date: |
Thu, 28 Dec 2017 13:08:09 -0500 |
From: Luke Shumaker <address@hidden>
Signed-off-by: Luke Shumaker <address@hidden>
---
linux-user/elfload.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 22f2632dfa..b560f5d6fe 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -374,6 +374,11 @@ static int init_guest_commpage(unsigned long guest_base,
/* If the commpage lies within the already allocated guest space,
* then there is no way we can allocate it.
+ *
+ * You may be thinking that that this check is redundant because
+ * we already validated the guest size against MAX_RESERVED_VA;
+ * but if qemu_host_page_mask is unusually large, then
+ * test_page_addr may be lower.
*/
if (test_page_addr >= guest_base
&& test_page_addr < (guest_base + guest_size)) {
--
2.15.1
- [Qemu-devel] [PATCH 00/10] linux-user: Speed up guest space initialization on 32-bit ARM target, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 02/10] linux-user: Rename validate_guest_space => init_guest_commpage, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 06/10] linux-user: init_guest_commpage: Add a comment about size check,
Luke Shumaker <=
- [Qemu-devel] [PATCH 05/10] linux-user: init_guest_space: Clarify page alignment logic, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 04/10] linux-user: init_guest_space: Correctly handle guest_start in commpage initialization, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 03/10] linux-user: init_guest_space: Clean up if we can't initialize the commpage, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 08/10] linux-user: init_guest_space: Don't try to align if we'll reject it, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 10/10] linux-user: init_guest_space: Try to make ARM space+commpage continuous, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 01/10] linux-user: Use #if to only call validate_guest_space for 32-bit ARM target, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 07/10] linux-user: init_guest_space: Clean up control flow a bit, Luke Shumaker, 2017/12/28
- [Qemu-devel] [PATCH 09/10] linux-user: init_guest_space: Add a comment about search strategy, Luke Shumaker, 2017/12/28