From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: 'virtio DMA to IO ram' error Date: Thu, 01 Jan 2009 18:45:51 +0200 Message-ID: <495CF33F.3090503@redhat.com> References: <18C018878FB0244EB71B7FE328978A320FB0095E@rrsmsx503.amr.corp.intel.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: "Passera, Pablo R" Return-path: Received: from mx2.redhat.com ([66.187.237.31]:34607 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755827AbZAAQpz (ORCPT ); Thu, 1 Jan 2009 11:45:55 -0500 In-Reply-To: <18C018878FB0244EB71B7FE328978A320FB0095E@rrsmsx503.amr.corp.intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Passera, Pablo R wrote: > Hi everybody, > > I am trying to implement a new virtio device. I have implemented the new device in Qemu and I also have the correspondent virtio driver in the guest. But when I get data in the device and I try to put that into the virtqueue using virtqueue_pop, the qemu instance crash showing the error 'virtio DMA to IO ram'. This is in the virtio_map_gpa function in virtio.c. Does anyone knows what this means? > > Here is the code from virtio_map_gpa > . > . > static void *virtio_map_gpa(target_phys_addr_t addr, size_t size) > { > ram_addr_t off; > target_phys_addr_t addr1; > > off = cpu_get_physical_page_desc(addr); > if ((off & ~TARGET_PAGE_MASK) != IO_MEM_RAM) { > fprintf(stderr, "virtio DMA to IO ram 1\n"); > exit(1); > } > In means the virtio buffers point to memory that is not RAM, but is some memory-mapped I/O range or pehaps unmapped. I suggest printing the physical addresses both in the guest and in qemu; something is likely garbled. -- error compiling committee.c: too many arguments to function