qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] target_phys_addr_t vs ram_addr_t


From: Sinha, Ani
Subject: [Qemu-devel] target_phys_addr_t vs ram_addr_t
Date: Fri, 2 Sep 2011 01:08:36 -0500
User-agent: Microsoft-MacOutlook/14.2.0.101115

Hi Folks :

I am trying to write a virtio driver and towards this end I am looking at
the qemu code. I am a little confused about a few things. Unfortunately,
the few comments in the code does not make it clear for me. So I am
wondering if any kind person on this mailing list would be able to help.

First off, what is the difference between target_phys_addr_t and
ram_addr_t? I believe the former is a virtual address within the guest but
what is the later? The comment says "address in ram (different from
physical address)" but is this the virtual address or the physical
address? Is this for guest or for host?

Secondly, in function cpu_physical_memory_map(), why is the length
parameter an address? If I look at the function virtqueue_map_sg(), the
sg.iov_len is defined as type size_t, which sounds like right. However,
this value is assigned to variable len which is of type
target_phys_addr_t. Is len an address or just a scalar value?

Lastly, in qemu_ram_ptr_length(), what is the length value? What does it
signify?

One more thing. It would really help guys like me if someone can add
comments regarding the various apis, what they do and what the parameters
mean in the code. I thought I'd suggest.

I am not in the mailing list. So please do a reply-all when responding.

Thanks in advance for help,
Ani


============================================================
The information contained in this message may be privileged
and confidential and protected from disclosure. If the reader
of this message is not the intended recipient, or an employee
or agent responsible for delivering this message to the
intended recipient, you are hereby notified that any reproduction,
dissemination or distribution of this communication is strictly
prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and
deleting it from your computer. Thank you. Tellabs
============================================================




reply via email to

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