All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [Qemu-devel] [Xen-devel] [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models
Date: Fri, 23 Mar 2012 13:55:59 +0000	[thread overview]
Message-ID: <1332510959.30916.50.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <4F6C7554.5080706@citrix.com>

On Fri, 2012-03-23 at 13:06 +0000, Julien Grall wrote:
> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> >> index 413a1a6..7e48817 100644
> >> --- a/tools/libxl/libxl_types.idl
> >> +++ b/tools/libxl/libxl_types.idl
> >> @@ -37,6 +37,7 @@ libxl_domain_type = Enumeration("domain_type", [
> >>   libxl_device_model_version = Enumeration("device_model_version", [
> >>       (1, "QEMU_XEN_TRADITIONAL"), # Historical qemu-xen device model (qemu-dm)
> >>       (2, "QEMU_XEN"),             # Upstream based qemu-xen device model
> >> +    (3, "MULTIPLE_QEMU_XEN"),    # Handle multiple dm
> >>      
> > Isn't this implicit in the provision or otherwise of num_dms?
> >    
> Sorry but I don't understand the question.

What I mean is can't you tell that the user wants multiple qemus from
the fact that domain_config.num_dms is non-zero (or >1, whichever it
is)?

> > What are name and path? I guess path is something to do with xenstore
> > but isn't that also internal to the libxl<->dm interface not something
> > the caller of libxl need be aware of?
> >    
> The path is the binary path

Are these supposed to supersede libxl_domain_build_info.device_model ?

> and the name is just a string append to the log filename.

This could be internal to libxl I expect.

> > I'm not sure what syntax "pcis", "mmios" and "pios" are going to have
> > but I expect that this would be better represent as actual
> > datastructures rather than encoding it as a string.
> >
> > How are toolstack supposed to know the values for e.g. pcis?
> >    
> For the moment pcis are describe as bdf for instance: 00:01.1
> and mmios/pios as range (0x10-0x20 or just 0x19).

And how does the toolstack know what values to use? How does it decide
that BDF 00:01.1 is something it wants to move into a different DM?

> > All in all this seems like a very raw/low-level interface. Can libxl not
> > expose something a bit more meaningful to toolstack authors? For example
> > if we consider emulated disk controllers then perhaps the options are
> >        * Handled by the "primary" dm
> >        * Handled by a single disaggregated dm
> >        * Handled by multiple disaggregated dm's (one per disk controller)
> > Similarly for other classes or emulated device. Or maybe this should be
> > a flag on those actual devices (e.g. in libxl_device_FOO)?
> >    
> 
> I have not really ideas about that. The first solution that comes
> in my mind is to bind each device with the device model name.
> 
> But in this case, we need to modify QEMU to launch only a subset
> of hardware and find a way to said which QEMU will emulate the
> "basic" hardware (keyboard, mouse, piix, ...).
> Moreover, who will allocate the bdf ? The toolstack ?

I don't know. It's (currently) not the toolstack AFAIK, I guess it is
either the lower level libraries (libxl, libxc) or the device model
itself.

I think this needs figuring out before we can decide what a sensible
libxl interface for for describing which device is emulated by which dm
looks like.

What I want to avoid is the situation where there is something deep in
the bowels of Xen which defines (or even hardcodes) the property that
BDF X:Y.Z corresponds the some device or other and then require that the
upper level tool stack (or, worse, the user) then has to encode that
magic knowledge as a string in the configuration.

> >> +
> >>   # Instances of libxl_file_reference contained in this struct which
> >>   # have been mapped (with libxl_file_reference_map) will be unmapped
> >>   # by libxl_domain_build/restore. If either of these are never called
> >> @@ -289,6 +299,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> >>                                          ("usbdevice",        string),
> >>                                          ("soundhw",          string),
> >>                                          ("xen_platform_pci", libxl_defbool),
> >> +                                       ("max_servers",     integer),
> >>      
> > As a toolstack author how do I decide what number to use here?
> >    
> The max_servers variables is used to compute the additionnal special pages.
> So the max_servers indicates the maximum servers that we want to spawn.

We already know this from num_dms, don't we?

Ian.

WARNING: multiple messages have this Message-ID (diff)
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: Julian Pidancet <julian.pidancet@citrix.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefano Stabellini <Stefano.Stabellini@eu.citrix.com>
Subject: Re: [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models
Date: Fri, 23 Mar 2012 13:55:59 +0000	[thread overview]
Message-ID: <1332510959.30916.50.camel@zakaz.uk.xensource.com> (raw)
In-Reply-To: <4F6C7554.5080706@citrix.com>

On Fri, 2012-03-23 at 13:06 +0000, Julien Grall wrote:
> >> diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
> >> index 413a1a6..7e48817 100644
> >> --- a/tools/libxl/libxl_types.idl
> >> +++ b/tools/libxl/libxl_types.idl
> >> @@ -37,6 +37,7 @@ libxl_domain_type = Enumeration("domain_type", [
> >>   libxl_device_model_version = Enumeration("device_model_version", [
> >>       (1, "QEMU_XEN_TRADITIONAL"), # Historical qemu-xen device model (qemu-dm)
> >>       (2, "QEMU_XEN"),             # Upstream based qemu-xen device model
> >> +    (3, "MULTIPLE_QEMU_XEN"),    # Handle multiple dm
> >>      
> > Isn't this implicit in the provision or otherwise of num_dms?
> >    
> Sorry but I don't understand the question.

What I mean is can't you tell that the user wants multiple qemus from
the fact that domain_config.num_dms is non-zero (or >1, whichever it
is)?

> > What are name and path? I guess path is something to do with xenstore
> > but isn't that also internal to the libxl<->dm interface not something
> > the caller of libxl need be aware of?
> >    
> The path is the binary path

Are these supposed to supersede libxl_domain_build_info.device_model ?

> and the name is just a string append to the log filename.

This could be internal to libxl I expect.

> > I'm not sure what syntax "pcis", "mmios" and "pios" are going to have
> > but I expect that this would be better represent as actual
> > datastructures rather than encoding it as a string.
> >
> > How are toolstack supposed to know the values for e.g. pcis?
> >    
> For the moment pcis are describe as bdf for instance: 00:01.1
> and mmios/pios as range (0x10-0x20 or just 0x19).

And how does the toolstack know what values to use? How does it decide
that BDF 00:01.1 is something it wants to move into a different DM?

> > All in all this seems like a very raw/low-level interface. Can libxl not
> > expose something a bit more meaningful to toolstack authors? For example
> > if we consider emulated disk controllers then perhaps the options are
> >        * Handled by the "primary" dm
> >        * Handled by a single disaggregated dm
> >        * Handled by multiple disaggregated dm's (one per disk controller)
> > Similarly for other classes or emulated device. Or maybe this should be
> > a flag on those actual devices (e.g. in libxl_device_FOO)?
> >    
> 
> I have not really ideas about that. The first solution that comes
> in my mind is to bind each device with the device model name.
> 
> But in this case, we need to modify QEMU to launch only a subset
> of hardware and find a way to said which QEMU will emulate the
> "basic" hardware (keyboard, mouse, piix, ...).
> Moreover, who will allocate the bdf ? The toolstack ?

I don't know. It's (currently) not the toolstack AFAIK, I guess it is
either the lower level libraries (libxl, libxc) or the device model
itself.

I think this needs figuring out before we can decide what a sensible
libxl interface for for describing which device is emulated by which dm
looks like.

What I want to avoid is the situation where there is something deep in
the bowels of Xen which defines (or even hardcodes) the property that
BDF X:Y.Z corresponds the some device or other and then require that the
upper level tool stack (or, worse, the user) then has to encode that
magic knowledge as a string in the configuration.

> >> +
> >>   # Instances of libxl_file_reference contained in this struct which
> >>   # have been mapped (with libxl_file_reference_map) will be unmapped
> >>   # by libxl_domain_build/restore. If either of these are never called
> >> @@ -289,6 +299,7 @@ libxl_domain_build_info = Struct("domain_build_info",[
> >>                                          ("usbdevice",        string),
> >>                                          ("soundhw",          string),
> >>                                          ("xen_platform_pci", libxl_defbool),
> >> +                                       ("max_servers",     integer),
> >>      
> > As a toolstack author how do I decide what number to use here?
> >    
> The max_servers variables is used to compute the additionnal special pages.
> So the max_servers indicates the maximum servers that we want to spawn.

We already know this from num_dms, don't we?

Ian.

  reply	other threads:[~2012-03-23 13:56 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 15:59 [Qemu-devel] [XEN][RFC PATCH 00/15] QEMU disaggregation Julien Grall
2012-03-22 15:59 ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 01/15] hvm: Modify interface to support multiple ioreq server Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23  8:18   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-23  8:18     ` Jan Beulich
2012-03-26 12:32     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-26 12:53       ` Jan Beulich
2012-03-26 12:53       ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-26 12:32     ` Julien Grall
2012-03-23 11:33   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:33     ` Ian Campbell
2012-04-12 19:33     ` [Xen-devel] " Julien Grall
2012-04-02 17:12   ` [Qemu-devel] " Ian Jackson
2012-04-02 17:12     ` Ian Jackson
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 02/15] hvm: Add functions to handle ioreq servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 03/15] hvm-pci: Handle PCI config space in Xen Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23  8:29   ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-23  8:29     ` Jan Beulich
2012-03-26 12:20     ` Julien Grall
2012-03-26 12:20     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-26 12:52       ` Jan Beulich
2012-03-26 12:52       ` [Qemu-devel] [Xen-devel] " Jan Beulich
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 04/15] hvm: Change initialization/destruction of an hvm Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 05/15] hvm: Modify hvm_op Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-04-26 17:50   ` Christian Limpach
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 06/15] hvm-io: IO refactoring with ioreq server Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 07/15] hvm-io: send invalidate map cache to each registered servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 08/15] hvm-io: Handle server in buffered IO Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 09/15] xc: Add the hypercall for multiple servers Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:37   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:37     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 10/15] xc: Add argument to allocate more special pages Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:39   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:39     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 11/15] xc: Fix python build Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:39   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:39     ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 12/15] xl: Add interface to handle multiple device models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-23 11:47   ` [Qemu-devel] [Xen-devel] " Ian Campbell
2012-03-23 11:47     ` Ian Campbell
2012-03-23 13:06     ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-23 13:06       ` Julien Grall
2012-03-23 13:55       ` Ian Campbell [this message]
2012-03-23 13:55         ` Ian Campbell
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 13/15] xl-qmp: add device model id to qmp function Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 14/15] xl-parsing: Parse the new option device_models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-04-02 17:11   ` [Qemu-devel] [Xen-devel] " Ian Jackson
2012-04-02 17:11     ` Ian Jackson
2012-04-03 10:05     ` [Qemu-devel] " Stefano Stabellini
2012-04-03 10:05       ` Stefano Stabellini
2012-04-03 13:31       ` [Qemu-devel] " Ian Jackson
2012-04-03 13:31         ` Ian Jackson
2012-04-03 13:54         ` [Qemu-devel] " Julien Grall
2012-04-03 13:54           ` Julien Grall
2012-04-03 14:02           ` [Qemu-devel] [Xen-devel] " Ian Jackson
2012-04-03 14:02             ` Ian Jackson
2012-04-03 14:16             ` [Qemu-devel] [Xen-devel] " Stefano Stabellini
2012-04-03 14:16               ` Stefano Stabellini
2012-04-03 14:23               ` [Qemu-devel] " Ian Jackson
2012-04-03 14:23                 ` Ian Jackson
2012-03-22 15:59 ` [Qemu-devel] [XEN][RFC PATCH 15/15] xl: Launch and destroy all device models Julien Grall
2012-03-22 15:59   ` Julien Grall
2012-03-22 16:59 ` [Qemu-devel] [Xen-devel] [XEN][RFC PATCH 00/15] QEMU disaggregation Tim Deegan
2012-03-22 16:59   ` Tim Deegan
2012-03-23 13:44   ` [Qemu-devel] [Xen-devel] " Julien Grall
2012-03-23 13:44     ` Julien Grall

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=1332510959.30916.50.camel@zakaz.uk.xensource.com \
    --to=ian.campbell@citrix.com \
    --cc=Stefano.Stabellini@eu.citrix.com \
    --cc=julian.pidancet@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=qemu-devel@nongnu.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.