xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v2 06/10] libxl: don't launch Qemu on Dom0 for Qdisk devices on driver domains
Date: Mon, 11 Nov 2013 13:10:27 +0100	[thread overview]
Message-ID: <1384171831-21275-7-git-send-email-roger.pau@citrix.com> (raw)
In-Reply-To: <1384171831-21275-1-git-send-email-roger.pau@citrix.com>

In libxl__need_xenpv_qemu check that the backend domain of the Qdisk
device is Dom0 before launching a Qemu instance in the toolstack
domain.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Cc: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
---
Changes since RFC:
 * Fetch and use domid instead of LIBXL_TOOLSTACK_DOMID (altough the
   function is only called on Dom0 right now).
---
 tools/libxl/libxl_dm.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 85a08af..b4798b8 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1354,6 +1354,7 @@ int libxl__need_xenpv_qemu(libxl__gc *gc,
         int nr_disks, libxl_device_disk *disks)
 {
     int i, ret = 0;
+    uint32_t domid;
 
     /*
      * qemu is required in order to support 2 or more consoles. So switch all
@@ -1379,8 +1380,11 @@ int libxl__need_xenpv_qemu(libxl__gc *gc,
     }
 
     if (nr_disks > 0) {
+        ret = libxl__get_domid(gc, &domid);
+        if (ret) goto out;
         for (i = 0; i < nr_disks; i++) {
-            if (disks[i].backend == LIBXL_DISK_BACKEND_QDISK) {
+            if (disks[i].backend == LIBXL_DISK_BACKEND_QDISK &&
+                disks[i].backend_domid == domid) {
                 ret = 1;
                 goto out;
             }
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2013-11-11 12:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 12:10 [PATCH v2 00/10] libxl: add driver domain backend daemon Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 01/10] libxl: Introduce nested async operations (nested ao) Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 02/10] libxl: create a local xenstore libxl and device-model dir for guests Roger Pau Monne
2013-11-11 15:24   ` Ian Jackson
2013-11-11 16:36     ` Roger Pau Monné
2013-11-12 15:03       ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 03/10] libxl: don't remove device frontend path from driver domains Roger Pau Monne
2013-11-11 12:10 ` [PATCH v2 04/10] libxl: synchronize device removal when using " Roger Pau Monne
2013-11-11 17:02   ` Ian Jackson
2013-11-14 10:37     ` Roger Pau Monné
2013-11-14 12:42       ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 05/10] libxl: remove the Qemu bodge for driver domain devices Roger Pau Monne
2013-11-15 17:09   ` Ian Jackson
2013-11-18 10:07     ` Roger Pau Monné
2013-11-18 11:26       ` Ian Jackson
2013-11-11 12:10 ` Roger Pau Monne [this message]
2013-11-15 17:11   ` [PATCH v2 06/10] libxl: don't launch Qemu on Dom0 for Qdisk devices on driver domains Ian Jackson
2013-11-11 12:10 ` [PATCH v2 07/10] libxl: add Qdisk backend launch helper Roger Pau Monne
2013-11-15 17:34   ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 08/10] xl: put daemonize code in it's own function Roger Pau Monne
2013-11-15 17:36   ` Ian Jackson
2013-11-11 12:10 ` [PATCH v2 09/10] libxl: revert 326a7b74 Roger Pau Monne
2013-11-15 17:37   ` Ian Jackson
2013-11-15 18:16     ` Ian Jackson
2013-11-15 18:22   ` Andrew Cooper
2013-11-11 12:10 ` [PATCH v2 10/10] libxl: add device backend listener in order to launch backends Roger Pau Monne
2013-11-15 17:54   ` Ian Jackson
2013-11-18 11:47     ` Roger Pau Monné
2013-11-18 14:22       ` Ian Jackson

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=1384171831-21275-7-git-send-email-roger.pau@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).