From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Stabellini Subject: Re: fs-backend on -unstable Date: Thu, 26 Mar 2009 10:21:01 +0000 Message-ID: <49CB570D.2000101@eu.citrix.com> References: <20090325180655.GA8031@const.famille.thibault.fr> <20090325181412.GJ13428@pimb.org> <20090325182013.GA13718@const.famille.thibault.fr> <20090325182501.GK13428@pimb.org> <20090325191730.GM13428@pimb.org> <20090325213833.GC13718@const.famille.thibault.fr> <20090325224157.GO13428@pimb.org> <49CAB50A.8040205@goop.org> <20090326000237.GP13428@pimb.org> <49CAC6B9.3020200@goop.org> <20090326001608.GQ13428@pimb.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090326001608.GQ13428@pimb.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Jody Belka Cc: Samuel Thibault , Jeremy Fitzhardinge , Xen-devel List-Id: xen-devel@lists.xenproject.org Jody Belka wrote: > Now, the stub domain isn't actually working for me anyway, even on > non-pvops0, but it is able to talk to the fs-backend at least. To show > what that looks like, I've attached a couple of emails I sent off-list. There are some known issues that affect stubdoms at the moment, since they involve some changes made on qemu upstream I am trying to find a solution there. However if you want to test the latest stubdoms you can try this patch, it works for me. --- diff --git a/hw/ide.c b/hw/ide.c index 7031ba1..a97c78b 100644 --- a/hw/ide.c +++ b/hw/ide.c @@ -1056,10 +1056,11 @@ static int dma_buf_prepare(BMDMAState *bm, int is_write) uint32_t addr; uint32_t size; } prd; - int l, len; + int l, len, n; void *mem; target_phys_addr_t l1; + n = s->nsector <= IDE_DMA_BUF_SECTORS ? s->nsector : IDE_DMA_BUF_SECTORS; qemu_iovec_init(&s->iovec, s->nsector / (TARGET_PAGE_SIZE/512) + 1); s->io_buffer_size = 0; for(;;) { @@ -1082,6 +1083,13 @@ static int dma_buf_prepare(BMDMAState *bm, int is_write) l = bm->cur_prd_len; if (l > 0) { l1 = l; + if (l1 > IDE_DMA_BUF_SECTORS * 512) + l1 = IDE_DMA_BUF_SECTORS * 512; + if (s->io_buffer_size + l1 > IDE_DMA_BUF_SECTORS * 512) { + l1 = IDE_DMA_BUF_SECTORS * 512 - s->io_buffer_size; + if (!l1) + return s->io_buffer_size != 0; + } mem = cpu_physical_memory_map(bm->cur_prd_addr, &l1, is_write); if (!mem) { break; @@ -1263,6 +1271,8 @@ static void ide_read_dma_cb(void *opaque, int ret) /* launch next transfer */ n = s->nsector; + if (n > IDE_DMA_BUF_SECTORS) + n = IDE_DMA_BUF_SECTORS; s->io_buffer_index = 0; s->io_buffer_size = n * 512; if (dma_buf_prepare(bm, 1) == 0) @@ -1412,6 +1422,8 @@ static void ide_write_dma_cb(void *opaque, int ret) } n = s->nsector; + if (n > IDE_DMA_BUF_SECTORS) + n = IDE_DMA_BUF_SECTORS; s->io_buffer_size = n * 512; /* launch next transfer */ if (dma_buf_prepare(bm, 0) == 0)