* Virtio Queries
@ 2009-04-09 15:43 Kumar, Venkat
2009-04-13 11:07 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Kumar, Venkat @ 2009-04-09 15:43 UTC (permalink / raw)
To: kvm@vger.kernel.org
Hi, I am a few questions on Virtio, Hope somebody clarifies them
1. What is the address type that is put inside the vring descriptor in the virt queue while placing a request? Is it the guest virtual address or guest physical address?
2. If it is Guest physical address, how qemu converts it to its virtual address before processing the buffer?
3. How does qemu interact with guest once it receives the buffers from the virt queue for doing the IO?
Thx,
Venkat
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Virtio Queries
2009-04-09 15:43 Virtio Queries Kumar, Venkat
@ 2009-04-13 11:07 ` Avi Kivity
2009-04-13 13:11 ` Kumar, Venkat
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2009-04-13 11:07 UTC (permalink / raw)
To: Kumar, Venkat; +Cc: kvm@vger.kernel.org
Kumar, Venkat wrote:
> Hi, I am a few questions on Virtio, Hope somebody clarifies them
>
> 1. What is the address type that is put inside the vring descriptor in the virt queue while placing a request? Is it the guest virtual address or guest physical address?
>
Guest physical address. Guest virtual addresses change meanings from
time to time.
> 2. If it is Guest physical address, how qemu converts it to its virtual address before processing the buffer?
>
See the logic in cpu_physical_memory_rw() and cpu_physical_memory_map().
> 3. How does qemu interact with guest once it receives the buffers from the virt queue for doing the IO?
>
qemu advanced the ring indexes, and notifies the guest by sending an
interrupt when the requests are completed.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Virtio Queries
2009-04-13 11:07 ` Avi Kivity
@ 2009-04-13 13:11 ` Kumar, Venkat
2009-04-13 13:26 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Kumar, Venkat @ 2009-04-13 13:11 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm@vger.kernel.org
> 2. If it is Guest physical address, how qemu converts it to its virtual address before processing the buffer?
>
See the logic in cpu_physical_memory_rw() and cpu_physical_memory_map().
==> Thanks for the reply. Are these the functions which convert the Guest physical addresses to qemu Virtual addresses? If yes, I did not find any routine calling these functions in the Virtio block IO flow. May be I missed it. Can you please point me to the code where Qemu's backend virtio driver is taking the SGE from the virt ring descriptor after it gets a notification from the guest and converting it to a qemu virtual address before calling "read or write" system calls.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Virtio Queries
2009-04-13 13:11 ` Kumar, Venkat
@ 2009-04-13 13:26 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2009-04-13 13:26 UTC (permalink / raw)
To: Kumar, Venkat; +Cc: kvm@vger.kernel.org
Kumar, Venkat wrote:
>> 2. If it is Guest physical address, how qemu converts it to its virtual address before processing the buffer?
>>
>>
>
> See the logic in cpu_physical_memory_rw() and cpu_physical_memory_map().
>
> ==> Thanks for the reply. Are these the functions which convert the Guest physical addresses to qemu Virtual addresses?
Yes.
> If yes, I did not find any routine calling these functions in the Virtio block IO flow. May be I missed it. Can you please point me to the code where Qemu's backend virtio driver is taking the SGE from the virt ring descriptor after it gets a notification from the guest and converting it to a qemu virtual address before calling "read or write" system calls.
>
It's in hw/virtio.c, see virtqueue_pop().
virtio-blk.c will issue the actual read or write (via
bdrv_aio_{read,write}v()).
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-13 13:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-09 15:43 Virtio Queries Kumar, Venkat
2009-04-13 11:07 ` Avi Kivity
2009-04-13 13:11 ` Kumar, Venkat
2009-04-13 13:26 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox