Re: [Qemu-devel] [PATCH 10/10] linux-user: init_guest_space: Try to make ARM space+commpage continuous

2018-03-20 Thread Luke Shumaker
On Fri, 02 Mar 2018 09:13:12 -0500, Peter Maydell wrote: > On 28 December 2017 at 18:08, Luke Shumaker wrote: > > +guest_full_size = > > +(0x0f00 & qemu_host_page_mask) + qemu_host_page_size; ^ > I think this is probably m

Re: [Qemu-devel] [PATCH 00/10] linux-user: Speed up guest space initialization on 32-bit ARM target

2018-02-08 Thread Luke Shumaker
Ping. On Thu, 28 Dec 2017 13:08:03 -0500, Luke Shumaker wrote: > > From: Luke Shumaker > > The goal of this patchset is to fix > https://bugs.launchpad.net/qemu/+bug/1740219 > > The gist is that the current linear search for an acceptable address > range is a bad str

Re: [Qemu-devel] [PATCH 00/10] linux-user: Speed up guest space initialization on 32-bit ARM target

2018-01-15 Thread Luke Shumaker
Ping for code review? -- Happy hacking, ~ Luke Shumaker

[Qemu-devel] [PATCH 09/10] linux-user: init_guest_space: Add a comment about search strategy

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 4 1 file changed, 4 insertions(+) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 1b7583d659..7736ea2c3a 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1936,6 +1936,10

[Qemu-devel] [PATCH 10/10] linux-user: init_guest_space: Try to make ARM space+commpage continuous

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker At a fixed distance after the usable memory that init_guest_space maps, for 32-bit ARM targets we also need to map a commpage. The normal init_guest_space logic doesn't keep this in mind when searching for an address range. If !host_start, then try to find a big conti

[Qemu-devel] [PATCH 04/10] linux-user: init_guest_space: Correctly handle guest_start in commpage initialization

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker init_guest_commpage needs to check if the mapped space, which ends at real_start+real_size overlaps with where it needs to put the commpage, which is (assuming sane qemu_host_page_size) guest_base + 0x000, where guest_base is real_start - guest_start. [guest_base

[Qemu-devel] [PATCH 05/10] linux-user: init_guest_space: Clarify page alignment logic

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker There are 3 parts to this change: - Add a comment showing the relative sizes and positions of the blocks of memory - introduce and use new aligned_{start,size} instead of adjusting real_{start_size} - When we clean up (on failure), munmap(real_start, real_size

[Qemu-devel] [PATCH 01/10] linux-user: Use #if to only call validate_guest_space for 32-bit ARM target

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Instead of defining a bogus validate_guest_space that always returns 1 on targets other than 32-bit ARM, use #if blocks to only call it on 32-bit ARM targets. This makes the "normal" flow control clearer. Signed-off-by: Luke Shumaker --- linux-user/elfl

[Qemu-devel] [PATCH 07/10] linux-user: init_guest_space: Clean up control flow a bit

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Instead of doing if (check1) { if (check2) { success; } } retry; Do a clearer if (!check1) { goto try_again; } if (!check2) { goto try_again

[Qemu-devel] [PATCH 08/10] linux-user: init_guest_space: Don't try to align if we'll reject it

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker If the ensure-alignment code gets triggered, then the "if (host_start && real_start != current_start)" check will always trigger, so save 2 syscalls and put that check first. Note that we can't just switch to using MAP_FIXED for that check, b

[Qemu-devel] [PATCH 03/10] linux-user: init_guest_space: Clean up if we can't initialize the commpage

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker We'll just exit with an error anyway, so it doesn't really matter, but it is cleaned up in all of the other places were we error out. Signed-off-by: Luke Shumaker --- linux-user/elfload.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/elfload.c b/

[Qemu-devel] [PATCH 00/10] linux-user: Speed up guest space initialization on 32-bit ARM target

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker The goal of this patchset is to fix https://bugs.launchpad.net/qemu/+bug/1740219 The gist is that the current linear search for an acceptable address range is a bad strategy when the reason we didn't get a good address on the first try is that we've having proble

[Qemu-devel] [PATCH 06/10] linux-user: init_guest_commpage: Add a comment about size check

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker Signed-off-by: Luke Shumaker --- 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

[Qemu-devel] [PATCH 02/10] linux-user: Rename validate_guest_space => init_guest_commpage

2017-12-28 Thread Luke Shumaker
From: Luke Shumaker init_guest_commpage is a much more honest description of what the function does. validate_guest_space not only suggests that the function has no side-effects, but also introduces confusion as to why it is only needed on 32-bit ARM targets. Signed-off-by: Luke Shumaker