All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Jody Belka <lists-xen@pimb.org>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
	Jeremy Fitzhardinge <jeremy@goop.org>,
	Xen-devel <xen-devel@lists.xensource.com>
Subject: Re: fs-backend on -unstable
Date: Thu, 26 Mar 2009 10:21:01 +0000	[thread overview]
Message-ID: <49CB570D.2000101@eu.citrix.com> (raw)
In-Reply-To: <20090326001608.GQ13428@pimb.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)

  reply	other threads:[~2009-03-26 10:21 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090325165439.GH13428@pimb.org>
     [not found] ` <20090325171822.GY5737@const.bordeaux.inria.fr>
     [not found]   ` <20090325175037.GI13428@pimb.org>
     [not found]     ` <20090325180655.GA8031@const.famille.thibault.fr>
     [not found]       ` <20090325181412.GJ13428@pimb.org>
     [not found]         ` <20090325182013.GA13718@const.famille.thibault.fr>
     [not found]           ` <20090325182501.GK13428@pimb.org>
     [not found]             ` <20090325191730.GM13428@pimb.org>
     [not found]               ` <20090325213833.GC13718@const.famille.thibault.fr>
2009-03-25 22:41                 ` fs-backend on -unstable Jody Belka
2009-03-25 22:49                   ` Jeremy Fitzhardinge
2009-03-26  0:02                     ` Jody Belka
2009-03-26  0:05                       ` Jeremy Fitzhardinge
2009-03-26  0:16                         ` Jody Belka
2009-03-26 10:21                           ` Stefano Stabellini [this message]
2009-03-26 12:18                             ` Boris Derzhavets
2009-03-26 13:27                             ` Jody Belka
2009-03-26 18:57                               ` Jeremy Fitzhardinge
2009-03-26 21:18                                 ` Jody Belka
2009-03-26 22:03                                   ` Jeremy Fitzhardinge
2009-03-26 22:41                               ` Jody Belka
2009-03-26  8:32                         ` Boris Derzhavets
2009-03-26 18:39                           ` Jeremy Fitzhardinge
2009-03-27 10:28                             ` Boris Derzhavets
2009-03-26 14:54                         ` Failure to setup VNC at CentOS 5.2 PV DomU at Xen Unstable ( 2.6.29-rc8 kernel) Boris Derzhavets
2009-03-26 16:14                           ` Boris Derzhavets
2009-03-27 23:21                             ` Jeremy Fitzhardinge
2009-03-28  8:41                               ` Boris Derzhavets
2009-03-28 10:18                                 ` Boris Derzhavets
2009-03-28 11:45                                   ` Boris Derzhavets
2009-03-28 18:25                                     ` Boris Derzhavets

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49CB570D.2000101@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=jeremy@goop.org \
    --cc=lists-xen@pimb.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.