From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Virtio Queries Date: Mon, 13 Apr 2009 16:26:42 +0300 Message-ID: <49E33D92.20807@redhat.com> References: <3D9CB4061D1EB3408D4A0B910433453C030298F073@inbmail01.lsi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: "Kumar, Venkat" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:45644 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbZDMN0s (ORCPT ); Mon, 13 Apr 2009 09:26:48 -0400 In-Reply-To: <3D9CB4061D1EB3408D4A0B910433453C030298F073@inbmail01.lsi.com> Sender: kvm-owner@vger.kernel.org List-ID: 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