[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 02/10] passthrough: split out x86 PCI code to x86/pci.c



>>> On 21.02.18 at 22:46, <wei.liu2@xxxxxxxxxx> wrote:
> Move the functions that reference x86 hvm data structures to its own
> file.  Rename pci_clean_dpci_irqs to arch_pci_clean_irqs.
> 
> There is still one location in that file which references
> arch.hvm_domain, but it is fine because ARM guest is HVM.
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Cc: Julien Grall <julien.grall@xxxxxxx>
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> 
> ARM doesn't select HAS_PCI, that's why ARM build is not broken by
> this. AIUI ARM will select HAS_PCI at some point, hence I only move
> the x86 bits.

The fact that this change doesn't actually affect ARM is again an
indication that the decision whether the code you move here is
x86-specific depends on what parts of PCI pass-through ARM is
actually going to want to (re-)use. I'd again prefer to take that
decision either when ARM actually implements that, or based on
the ARM folks clearly foreseeing that this code is not coming
close to anything they may want use.

> @@ -853,7 +804,7 @@ int pci_release_devices(struct domain *d)
>      int ret;
>  
>      pcidevs_lock();
> -    ret = pci_clean_dpci_irqs(d);
> +    ret = arch_pci_clean_irqs(d);

One note regarding the naming: I'd prefer if "dpci" remained part of
the name, unless you mean to get rid of it altogether from the code
base. That'll help (a little) with visually separating code pieces
belonging to the host side of PCI from those belonging to the
passed through side of it (granted - they aren't entirely independent
anyway).

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.