qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 09/19] exec.c: Use cpu_get_phys_page_attrs_de


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2 09/19] exec.c: Use cpu_get_phys_page_attrs_debug
Date: Mon, 11 Jan 2016 15:04:55 +0000

On 11 January 2016 at 14:59, Paolo Bonzini <address@hidden> wrote:
> On 11/01/2016 15:18, Peter Maydell wrote:
>> That's what the call to cpu_get_phys_page_attrs_debug() does:
>> it fills in the MemTxAttrs :secure and :user fields, and then
>> cpu_asidx_from_attrs() uses the returned attributes to pick
>> the right address space. (cpu_get_phys_page_attrs_debug()
>> only fills in attribute fields it knows about, which is why
>> we pass it an empty attrs struct to start with.)
>
> Oops, that's not clear from the documentation in patch 4. But if that
> was the case, shouldn't cpu_get_phys_page_attrs_debug leave *attrs
> completely alone when using the fallback?
>
> I think it's clearer if you pass uninitialized MemTxAttrs to
> cpu_get_phys_page_attrs_debug, assuming you can do it.  I can see why
> the current semantics make sense for helper.c's get_phys_addr, but I
> think they are confusing for the topmost function call.

Yes, I think you're right (and the doc comment I wrote for
cpu_get_phys_page_attrs_debug agrees ;-)).

thanks
-- PMM



reply via email to

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