From: Wei Liu Subject: Re: [v11][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy Date: Wed, 22 Jul 2015 16:01:11 +0100 Message-ID: <20150722150111.GB16933@zion.uk.xensource.com> References: <1437528607-19315-1-git-send-email-tiejun.chen@intel.com> <1437528607-19315-10-git-send-email-tiejun.chen@intel.com> <21935.38246.446842.418001@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <21935.38246.446842.418001@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: wei.liu2@citrix.com, Ian Campbell , Stefano Stabellini , xen-devel@lists.xen.org, Tiejun Chen , David Scott List-Id: xen-devel@lists.xenproject.org On Wed, Jul 22, 2015 at 02:06:46PM +0100, Ian Jackson wrote: > Tiejun Chen writes ("[v11][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy"): > > This patch passes rdm reservation policy to xc_assign_device() so the policy > > is checked when assigning devices to a VM. > > Wei, as you know, I am double-checking the acks on this series. > > You acked v4. But v11 is slightly different. Your ack was retained > and my subject line search did not turn up any authority for that. > > The v* message by the submitter says: > > > v5: > > > > * Fix the flag field as "0" to DT device > > Below is the diff between > * staging (bc299d01) + Jan's v12 + v11 02.. + the relevant patch from v4 > * staging (bc299d01) + Jan's v12 + v11 02.. + the relevant patch from v8 > > Please ack/nack. > > Thanks, > Ian. > The changes below are due to change in prerequisite patch xen/passthrough: extend hypercall to support rdm reservation policy deleted some two #defines. Jan was happy with that change so I'm happy with this change. In any case, this is a domctl. We have the liberty of fixing it up whenever we like. So Acked-by: Wei Liu > diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c > index 1dfadb0..69e6d8f 100644 > --- a/tools/libxc/xc_domain.c > +++ b/tools/libxc/xc_domain.c > @@ -1794,8 +1794,11 @@ int xc_assign_dt_device( > > domctl.u.assign_device.dev = XEN_DOMCTL_DEV_DT; > domctl.u.assign_device.u.dt.size = size; > - /* DT doesn't own any RDM. */ > - domctl.u.assign_device.flag = XEN_DOMCTL_DEV_NO_RDM; > + /* > + * DT doesn't own any RDM so actually DT has nothing to do > + * for any flag and here just fix that as 0. > + */ > + domctl.u.assign_device.flag = 0; > set_xen_guest_handle(domctl.u.assign_device.u.dt.path, path); > > rc = do_domctl(xch, &domctl); > diff --git a/tools/ocaml/libs/xc/xenctrl_stubs.c b/tools/ocaml/libs/xc/xenctrl_stubs.c > index 317bf75..b7de615 100644 > --- a/tools/ocaml/libs/xc/xenctrl_stubs.c > +++ b/tools/ocaml/libs/xc/xenctrl_stubs.c > @@ -1173,9 +1173,7 @@ CAMLprim value stub_xc_domain_test_assign_device(value xch, value domid, value d > } > > static int domain_assign_device_rdm_flag_table[] = { > - XEN_DOMCTL_DEV_NO_RDM, > XEN_DOMCTL_DEV_RDM_RELAXED, > - XEN_DOMCTL_DEV_RDM_STRICT, > }; > > CAMLprim value stub_xc_domain_assign_device(value xch, value domid, value desc, > diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c > index ff4adb3..c8380d1 100644 > --- a/tools/python/xen/lowlevel/xc/xc.c > +++ b/tools/python/xen/lowlevel/xc/xc.c > @@ -615,7 +615,8 @@ static int next_bdf(char **str, int *seg, int *bus, int *dev, int *func, > } > else > { > - *flag = XEN_DOMCTL_DEV_RDM_STRICT; > + /* O means we take "strict" as our default policy. */ > + *flag = 0; > *str = NULL; > } > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel