[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH qom-cpu] HACKING: Document vaddr type usage
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH qom-cpu] HACKING: Document vaddr type usage |
Date: |
Mon, 22 Jul 2013 18:36:32 +0100 |
On 22 July 2013 18:32, Andreas Färber <address@hidden> wrote:
> Am 22.07.2013 19:27, schrieb Peter Maydell:
>> On 22 July 2013 17:36, Andreas Färber <address@hidden> wrote:
>>> Signed-off-by: Andreas Färber <address@hidden>
>>> ---
>>> HACKING | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/HACKING b/HACKING
>>> index e73ac79..d9dbb46 100644
>>> --- a/HACKING
>>> +++ b/HACKING
>>> @@ -42,6 +42,7 @@ ram_addr_t.
>>>
>>> Use target_ulong (or abi_ulong) for CPU virtual addresses, however
>>> devices should not need to use target_ulong.
>>> +Use vaddr for CPU virtual addresses in target-independent code.
>>
>> Here's my suggestion for this paragraph (ie to replace
>> both the "Use target_ulong..." and "Use vaddr" sentences
>> above):
>>
>> ===begin===
>> For CPU virtual addresses there are several possible types.
>> vaddr is the best type to use to hold a CPU virtual address
>> in target-independent code, including most devices. It is
>
> Thanks. What reason can you think of for using vaddr in a device?
I put that in because the existing text says "devices should
not need to use target_ulong" and they obviously shouldn't
use abi_ulong, leaving only vaddr if they want to play with
target virtual addresses. I agree that most devices shouldn't
care about virtual addresses at all, though, so it's probably
less confusing to just drop the ", including most devices" bit.
PS, I dunno if this amount of text needs a signoff, but you have my
Signed-off-by: Peter Maydell <address@hidden>
in case it matters.
-- PMM