qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD


From: Warner Losh
Subject: Re: [PATCH] accel/tcg: Drop PAGE_RESERVED for CONFIG_BSD
Date: Tue, 20 Dec 2022 18:04:17 -0700



On Tue, Dec 20, 2022 at 4:22 PM Richard Henderson <richard.henderson@linaro.org> wrote:
On 12/20/22 14:09, Warner Losh wrote:
>
>
> On Sat, Dec 17, 2022 at 11:48 AM Richard Henderson <richard.henderson@linaro.org
> <mailto:richard.henderson@linaro.org>> wrote:
>
>     Make bsd-user match linux-user in not marking host pages
>     as reserved.  This isn't especially effective anyway, as
>     it doesn't take into account any heap memory that qemu
>     may allocate after startup.
>
>     Cc: Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>>
>     Signed-off-by: Richard Henderson <richard.henderson@linaro.org
>     <mailto:richard.henderson@linaro.org>>
>     ---
>
>     I started to simply fix up this code to match my user-only interval-tree
>     patch set, as L1_MAP_ADDR_SPACE_BITS gets removed from translate-all.c,
>     but then I decided to remove it all.
>
>
> I think this is fine. We already do a translation for addresses so marking this as 'reserved'
> doesn't help that much. We need to map memory into a contiguous guess-address-space,
> but the underlying host memory needn't be contiguous at all.
>
> I've not yet tested this, but would like to. What's your timeline on getting this done?

ASAP.  I want to remove...

>     -                    if (h2g_valid(endaddr)) {
>     -                        endaddr = h2g(endaddr);
>     -                        page_set_flags(startaddr, endaddr, PAGE_RESERVED);
>     -                    } else {
>     -#if TARGET_ABI_BITS <= L1_MAP_ADDR_SPACE_BITS

L1_MAP_ADDR_SPACE_BITS.

OK. I've tested this with both 32-bit and 64-bit binaries on a 64-bit host. It works both with the
incomplete upstream as well as our 'blitz' branch which is basically complete. I've not run our
full regression tests, though, but I suspect they will produce similar results before/after. My test
machine is missing a few things due to an incomplete package upgrade that I don't have the time
to sort out this evening.

And looking at things, I agree with the analysis: It's a pesky nop. At worst, if it does change something,
it's likely to change it for the better. And if not, I'll deal with that when I do my next round of upstreaming
after the first of the year.

So:

Reviewed-by: Warner Losh <imp@bsdimp.com>
Tested-by: Warner Losh <imp@bsdimp.com>

Warner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]