[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v11 6/6] introduce a 'passthrough' configuration option to xl.cfg...
> -----Original Message----- > From: Anthony PERARD <anthony.perard@xxxxxxxxxx> > Sent: 13 September 2019 17:29 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Jan Beulich <jbeulich@xxxxxxxx>; > Christian Lindig > <christian.lindig@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Wei Liu > <wl@xxxxxxx>; Andrew > Cooper <Andrew.Cooper3@xxxxxxxxxx>; George Dunlap <George.Dunlap@xxxxxxxxxx>; > Julien Grall > <julien.grall@xxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; > Stefano Stabellini > <sstabellini@xxxxxxxxxx>; Tim (Xen.org) <tim@xxxxxxx>; David Scott > <dave@xxxxxxxxxx>; Volodymyr > Babchuk <Volodymyr_Babchuk@xxxxxxxx>; Roger Pau Monne <roger.pau@xxxxxxxxxx> > Subject: Re: [PATCH v11 6/6] introduce a 'passthrough' configuration option > to xl.cfg... > > On Fri, Sep 13, 2019 at 11:58:26AM +0100, Paul Durrant wrote: > > diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h > > index 12545130df..e4b9c539b6 100644 > > --- a/tools/libxl/libxl.h > > +++ b/tools/libxl/libxl.h > > @@ -415,6 +415,15 @@ > > */ > > #define LIBXL_HAVE_BUILDINFO_IOMMU_MEMKB 1 > > > > +/* > > + * LIBXL_HAVE_CREATEINFO_PASSTHROUGH indicates that > > + * libxl_domain_create_info has a passthrough field (which is a > > + * libxl_passthrough enumeration) that indicates whether device pass- > > + * through is enabled for the domain and, if so, whether the IOMMU and > > + * HAP page tables may be shared or not. > > + */ > > +#define LIBXL_HAVE_CREATEINFO_PASSTHROUGH 1 > > + > > /* > > * libxl ABI compatibility > > * > > diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c > > index 59dbcb50a0..6b7702db17 100644 > > --- a/tools/libxl/libxl_create.c > > +++ b/tools/libxl/libxl_create.c > > @@ -578,6 +578,15 @@ int libxl__domain_make(libxl__gc *gc, > > libxl_domain_config *d_config, > > libxl_defbool_val(info->oos) ? 0 : XEN_DOMCTL_CDF_oos_off; > > } > > > > + LOG(DETAIL, "passthrough: %s", > > + libxl_passthrough_to_string(info->passthrough)); > > + > > + if (info->passthrough != LIBXL_PASSTHROUGH_DISABLED) > > + create.flags |= XEN_DOMCTL_CDF_iommu; > > + > > + if (info->passthrough == LIBXL_PASSTHROUGH_SYNC_PT) > > + create.iommu_opts |= XEN_DOMCTL_IOMMU_no_sharept; > > + > > /* Ultimately, handle is an array of 16 uint8_t, same as uuid */ > > libxl_uuid_copy(ctx, (libxl_uuid *)&create.handle, &info->uuid); > > > > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > > index d52c63b6b0..22f05711e3 100644 > > --- a/tools/libxl/libxl_types.idl > > +++ b/tools/libxl/libxl_types.idl > > @@ -263,6 +263,12 @@ libxl_vkb_backend = Enumeration("vkb_backend", [ > > (2, "LINUX") > > ]) > > > > +libxl_passthrough = Enumeration("passthrough", [ > > + (0, "disabled"), > > + (1, "sync_pt"), > > + (2, "share_pt"), > > + ]) > > + > > # > > # Complex libxl types > > # > > So, with this changes, when libvirt is rebuilt against a newer libxl, > guest with pass-through devices won't work anymore? > (That is, without modification of libvirt.) Yes, that's a good point. I'll add an extra hunk to default passthrough to enabled unless it is otherwise set by the toolstack. Paul > > -- > Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |