All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: xen-devel@lists.xen.org
Subject: how to assign resources exclusive to a single domU
Date: Thu, 26 Feb 2015 09:57:10 +0100	[thread overview]
Message-ID: <20150226085710.GA26441@aepfle.de> (raw)

While working on pvscsi support for libxl I noticed that assigning a
resource exclusivly to just a single domU via libxl will be a major
effort. Up to now libxl could rely on the fact that a resource can be
either shared or the backend deals with the attempt to share.

There are two cases in pvscsi:

 1) a single physical HST:CHN:TGT:LUN device must be assigned to just a
    single domU. While the (xenlinux) backend driver allows to assign
    the device to more than one domU the sharing can not work in
    practice.
 2) the xenlinux backend driver has two modes: emulation and raw. With
    raw mode the SCSI commands coming from domU will be passed directly
    to the physical device. I think its required to make sure that all
    devices connected to a physical scsi host must operate either
    entirely in raw mode or on emulation mode.

To handle both cases libxl could either assume that the admin is
responsible for proper configuration:
 - just one domU per physical device
 - if raw mode is enabled all devices on the physcial scsi host will be
   assigned to just one domU

Or libxl gets functionality to verify that two cases above are really
enforced. Doing that means that there has to be some global lock under
which the system state in xenstore is parsed and the to be assigned domU
configuration is compared:
 - are the physical devices already assigned
 - is the raw mode properly configured

In xend the case #1 was not handled. There is some code for case #2, I
have to check how complete the enforcement in xend was.

I wonder what should be done in my changes for libxl.

Olaf

             reply	other threads:[~2015-02-26  8:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26  8:57 Olaf Hering [this message]
2015-02-27  4:53 ` how to assign resources exclusive to a single domU Jürgen Groß
2015-02-27  8:19   ` Olaf Hering
2015-02-27 10:24     ` Ian Campbell

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=20150226085710.GA26441@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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 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.