From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [RFC][PATCH 08/13] tools: extend xc_assign_device() to support rdm reservation policy Date: Thu, 14 May 2015 15:04:24 +0800 Message-ID: <555448F8.70405@intel.com> References: <1428657724-3498-1-git-send-email-tiejun.chen@intel.com> <1428657724-3498-9-git-send-email-tiejun.chen@intel.com> <55351DBC0200007800073CA6@mail.emea.novell.com> <55507A24.8020708@intel.com> <5550A63B0200007800078E0D@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5550A63B0200007800078E0D@mail.emea.novell.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: Jan Beulich Cc: tim@xen.org, kevin.tian@intel.com, wei.liu2@citrix.com, ian.campbell@citrix.com, andrew.cooper3@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, stefano.stabellini@citrix.com, yang.z.zhang@intel.com List-Id: xen-devel@lists.xenproject.org On 2015/5/11 18:53, Jan Beulich wrote: >>>> On 11.05.15 at 11:45, wrote: >> On 2015/4/20 21:39, Jan Beulich wrote: >>>>>> On 10.04.15 at 11:21, wrote: >>>> --- a/tools/libxc/xc_domain.c >>>> +++ b/tools/libxc/xc_domain.c >>>> @@ -1654,13 +1654,15 @@ int xc_domain_setdebugging(xc_interface *xch, >>>> int xc_assign_device( >>>> xc_interface *xch, >>>> uint32_t domid, >>>> - uint32_t machine_sbdf) >>>> + uint32_t machine_sbdf, >>>> + uint32_t flag) >>>> { >>>> DECLARE_DOMCTL; >>>> >>>> domctl.cmd = XEN_DOMCTL_assign_device; >>>> domctl.domain = domid; >>>> domctl.u.assign_device.machine_sbdf = machine_sbdf; >>>> + domctl.u.assign_device.sbdf_flag = flag; >>> >>> The previous patch needs to initialize this field, in order to not pass >>> random input to the hypervisor. Using the ..._TRY value here >>> intermediately (until this patch gets applied) would seem the right >>> approach. >>> >> >> If I'm correct, looks I should introduce a little of change in previous >> patch, >> >> diff --git a/xen/drivers/passthrough/pci.c b/xen/drivers/passthrough/pci.c >> index 250d1e4..0bcfd87 100644 >> --- a/xen/drivers/passthrough/pci.c >> +++ b/xen/drivers/passthrough/pci.c >> @@ -1513,7 +1513,7 @@ int iommu_do_pci_domctl( >> { >> u16 seg; >> u8 bus, devfn; >> - u32 flag; >> + u32 flag = XEN_DOMCTL_PCIDEV_RDM_TRY; > > Provided that constant is available already at that point (I didn't Yes, both that definition and this usage are in the previous patch. Thanks Tiejun > check); if it isn't, you'd probably want to go with plain zero. > > Jan > >