From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 20/24] xen/passthrough: Extend XEN_DOMCTL_assign_device to support DT device Date: Thu, 29 Jan 2015 11:40:43 +0000 Message-ID: <54CA1C3B.9050602@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-21-git-send-email-julien.grall@linaro.org> <54BE2F520200007800056D85@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGnTF-0003w6-MW for xen-devel@lists.xenproject.org; Thu, 29 Jan 2015 11:41:13 +0000 Received: by mail-wi0-f174.google.com with SMTP id n3so24923472wiv.1 for ; Thu, 29 Jan 2015 03:41:12 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini , Jan Beulich Cc: Wei Liu , ian.campbell@citrix.com, tim@xen.org, Ian Jackson , stefano.stabellini@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On 29/01/15 10:29, Stefano Stabellini wrote: >>> - seg = domctl->u.assign_device.machine_sbdf >> 16; >>> - bus = (domctl->u.assign_device.machine_sbdf >> 8) & 0xff; >>> - devfn = domctl->u.assign_device.machine_sbdf & 0xff; >>> + seg = machine_sbdf >> 16; >>> + bus = (machine_sbdf >> 8) & 0xff; >>> + devfn = machine_sbdf & 0xff; >> >> If you fiddle with these, please make them use at least PCI_BUS() >> and PCI_DEVFN2() (we don't have a matching macro for retrieving >> the segment). > > Maybe we should? I could add one. Regards, -- Julien Grall