WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: fs-backend on -unstable

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)

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel