[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 12/14] tools/libxl: read from config if passing through primary GPU
On Wed, 2014-07-02 at 20:42 +0200, Arianna Avanzini wrote: > This commit adds a new option available for any domU libxl > configuration that allows the user to specify if one of the > VGA adapters passed through to the domain is the primary one. > This way, libxl can arrange the correct I/O-memory access > permission for its stubdomain. How does this differ from the existing gfx_passthru option? It doesn't look like anything here consumes the setting so I can't guess. > Signed-off-by: Arianna Avanzini <avanzini.arianna@xxxxxxxxx> > Cc: Dario Faggioli <dario.faggioli@xxxxxxxxxx> > Cc: Paolo Valente <paolo.valente@xxxxxxxxxx> > Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxxxxx> > Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx> > Cc: Jan Beulich <JBeulich@xxxxxxxx> > Cc: Keir Fraser <keir@xxxxxxx> > Cc: Tim Deegan <tim@xxxxxxx> > Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Cc: Eric Trudeau <etrudeau@xxxxxxxxxxxx> > Cc: Viktor Kleinik <viktor.kleinik@xxxxxxxxxxxxxxx> > --- > docs/man/xl.cfg.pod.5 | 7 +++++++ > tools/libxl/libxl.h | 7 +++++++ > tools/libxl/libxl_create.c | 1 + > tools/libxl/libxl_types.idl | 3 ++- > tools/libxl/xl_cmdimpl.c | 2 ++ > 5 files changed, 19 insertions(+), 1 deletion(-) > > diff --git a/docs/man/xl.cfg.pod.5 b/docs/man/xl.cfg.pod.5 > index 025df27..07f9723 100644 > --- a/docs/man/xl.cfg.pod.5 > +++ b/docs/man/xl.cfg.pod.5 > @@ -601,6 +601,13 @@ More information about Xen gfx_passthru feature is > available > on the XenVGAPassthrough L<http://wiki.xen.org/wiki/XenVGAPassthrough> > wiki page. > > +=item B<gfx_passthru_primary=BOOLEAN> > + > +If set to true, indicates that one of the GPUs passed through to the > +domain is the primary one; therefore allows to the domain's stubdoman > +access permissions for the VGA framebuffer. Note that this option > +defaults to true. Under what circumstances would I set it to false? Is this purely a stubdom related flag or does it affect non-stub qemu too? > + > =item B<ioports=[ "IOPORT_RANGE", "IOPORT_RANGE", ... ]> > > Allow guest to access specific legacy I/O ports. Each B<IOPORT_RANGE> > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > index ce0d2c2..c59b3c7 100644 > --- a/tools/libxl/libxl.h > +++ b/tools/libxl/libxl.h > @@ -84,6 +84,13 @@ > #define LIBXL_HAVE_FIRMWARE_PASSTHROUGH 1 > > /* > + * LIBXL_HAVE_GFX_PASSTHROUGH_PRIMARY indicates that the user must Not must, can. It's a defbool so they can (and normally will) just accept the default. > + * specify in the domain configuration whether one of the passthru > + * VGA devices is the primary one. > + */ > +#define LIBXL_HAVE_GFX_PASSTHROUGH_PRIMARY 1 > + > +/* > * LIBXL_HAVE_DOMAIN_NODEAFFINITY indicates that a 'nodemap' field > * (of libxl_bitmap type) is present in libxl_domain_build_info, > * containing the node-affinity for the domain. > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > index b5506b1..a44c42a 100644 > --- a/tools/libxl/libxl_create.c > +++ b/tools/libxl/libxl_create.c > @@ -349,6 +349,7 @@ int libxl__domain_build_info_setdefault(libxl__gc *gc, > libxl_defbool_setdefault(&b_info->u.hvm.nographic, false); > > libxl_defbool_setdefault(&b_info->u.hvm.gfx_passthru, false); > + libxl_defbool_setdefault(&b_info->u.hvm.gfx_passthru_primary, true); > > break; > case LIBXL_DOMAIN_TYPE_PV: > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index e37e579..754e89d 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -367,7 +367,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ > ("sdl", libxl_sdl_info), > ("spice", > libxl_spice_info), > > - ("gfx_passthru", libxl_defbool), > + ("gfx_passthru", > libxl_defbool), > + ("gfx_passthru_primary", > libxl_defbool), > > ("serial", string), > ("boot", string), > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 513b404..98b5a6e 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -1645,6 +1645,8 @@ skip_vfb: > xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, > 0); > xlu_cfg_get_defbool(config, "gfx_passthru", > &b_info->u.hvm.gfx_passthru, 0); > + xlu_cfg_get_defbool(config, "gfx_passthru_primary", > + &b_info->u.hvm.gfx_passthru_primary, 0); > xlu_cfg_replace_string (config, "serial", &b_info->u.hvm.serial, 0); > xlu_cfg_replace_string (config, "boot", &b_info->u.hvm.boot, 0); > xlu_cfg_get_defbool(config, "usb", &b_info->u.hvm.usb, 0); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |