From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Juergen Gross <jgross@suse.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"julien@xen.org" <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>,
Anastasiia Lukianenko <Anastasiia_Lukianenko@epam.com>,
Oleksandr Andrushchenko <Oleksandr_Andrushchenko@epam.com>
Subject: Re: [PATCH] xen-pciback: allow compiling on other archs than x86
Date: Tue, 16 Nov 2021 10:45:43 +0000 [thread overview]
Message-ID: <ab6a44b3-6b56-191a-a653-ce5ace50975d@epam.com> (raw)
In-Reply-To: <CAMuHMdXEGtr5Js4QwyGBMLP_LzG8mk0Ovv9PiOpnU2-VVp+7dg@mail.gmail.com>
Hi, Geert!
On 16.11.21 11:36, Geert Uytterhoeven wrote:
> Hi Oleksandr,
>
> On Thu, Oct 28, 2021 at 8:15 AM Oleksandr Andrushchenko
> <andr2000@gmail.com> wrote:
>> From: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>>
>> Xen-pciback driver was designed to be built for x86 only. But it
>> can also be used by other architectures, e.g. Arm.
>>
>> Currently PCI backend implements multiple functionalities at a time,
>> such as:
>> 1. It is used as a database for assignable PCI devices, e.g. xl
>> pci-assignable-{add|remove|list} manipulates that list. So, whenever
>> the toolstack needs to know which PCI devices can be passed through
>> it reads that from the relevant sysfs entries of the pciback.
>> 2. It is used to hold the unbound PCI devices list, e.g. when passing
>> through a PCI device it needs to be unbound from the relevant device
>> driver and bound to pciback (strictly speaking it is not required
>> that the device is bound to pciback, but pciback is again used as a
>> database of the passed through PCI devices, so we can re-bind the
>> devices back to their original drivers when guest domain shuts down)
>> 3. Device reset for the devices being passed through
>> 4. Para-virtualised use-cases support
>>
>> The para-virtualised part of the driver is not always needed as some
>> architectures, e.g. Arm or x86 PVH Dom0, are not using backend-frontend
>> model for PCI device passthrough.
>>
>> For such use-cases make the very first step in splitting the
>> xen-pciback driver into two parts: Xen PCI stub and PCI PV backend
>> drivers.
>>
>> For that add new configuration options CONFIG_XEN_PCI_STUB and
>> CONFIG_XEN_PCIDEV_STUB, so the driver can be limited in its
>> functionality, e.g. no support for para-virtualised scenario.
>> x86 platform will continue using CONFIG_XEN_PCIDEV_BACKEND for the
>> fully featured backend driver.
>>
>> Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
>> Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
>> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
>> Reviewed-by: Juergen Gross <jgross@suse.com>
> Thanks for your patch, which is now commit a67efff28832a597
> ("xen-pciback: allow compiling on other archs than x86")
> in v5.16-rc1.
>
>> --- a/drivers/xen/Kconfig
>> +++ b/drivers/xen/Kconfig
>> @@ -181,10 +181,34 @@ config SWIOTLB_XEN
>> select DMA_OPS
>> select SWIOTLB
>>
>> +config XEN_PCI_STUB
>> + bool
>> +
>> +config XEN_PCIDEV_STUB
>> + tristate "Xen PCI-device stub driver"
>> + depends on PCI && !X86 && XEN
>> + depends on XEN_BACKEND
>> + select XEN_PCI_STUB
>> + default m
> Please note that this means "default y" if CONFIG_MODULES=n.
> Perhaps this should be "default m if MODULES" instead?
I don't really have strong opinion on this and will let Xen maintainers
speak: @Boris, @Juergen what's your preference here?
>
>> + help
>> + The PCI device stub driver provides limited version of the PCI
>> + device backend driver without para-virtualized support for guests.
>> + If you select this to be a module, you will need to make sure no
>> + other driver has bound to the device(s) you want to make visible to
>> + other guests.
>> +
>> + The "hide" parameter (only applicable if backend driver is compiled
>> + into the kernel) allows you to bind the PCI devices to this module
>> + from the default device drivers. The argument is the list of PCI BDFs:
>> + xen-pciback.hide=(03:00.0)(04:00.0)
>> +
>> + If in doubt, say m.
>> +
>> config XEN_PCIDEV_BACKEND
>> tristate "Xen PCI-device backend driver"
>> depends on PCI && X86 && XEN
>> depends on XEN_BACKEND
>> + select XEN_PCI_STUB
>> default m
>> help
>> The PCI device backend driver allows the kernel to export arbitrary
> Gr{oetje,eeting}s,
>
> Geert
Thank you,
Oleksandr
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
next prev parent reply other threads:[~2021-11-16 10:46 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 6:13 Oleksandr Andrushchenko
2021-10-28 14:39 ` Oleksandr Andrushchenko
2021-11-16 9:36 ` Geert Uytterhoeven
2021-11-16 10:45 ` Oleksandr Andrushchenko [this message]
2021-11-18 8:13 ` Juergen Gross
-- strict thread matches above, loose matches on Subject: below --
2021-09-17 13:01 Oleksandr Andrushchenko
2021-09-17 21:45 ` Stefano Stabellini
2021-09-20 5:23 ` Oleksandr Andrushchenko
2021-09-20 11:30 ` Juergen Gross
2021-09-20 11:38 ` Oleksandr Andrushchenko
2021-09-20 23:16 ` Stefano Stabellini
2021-09-21 4:51 ` Oleksandr Andrushchenko
2021-09-21 5:20 ` Juergen Gross
2021-09-21 5:51 ` Oleksandr Andrushchenko
2021-09-21 6:07 ` Juergen Gross
2021-09-21 6:38 ` Oleksandr Andrushchenko
2021-09-21 6:49 ` Juergen Gross
2021-09-21 7:00 ` Oleksandr Andrushchenko
2021-09-21 7:09 ` Juergen Gross
2021-09-21 7:16 ` Oleksandr Andrushchenko
2021-09-21 20:44 ` Stefano Stabellini
2021-09-22 9:06 ` Oleksandr Andrushchenko
2021-09-21 7:54 ` Juergen Gross
2021-09-21 8:01 ` Oleksandr Andrushchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ab6a44b3-6b56-191a-a653-ce5ace50975d@epam.com \
--to=oleksandr_andrushchenko@epam.com \
--cc=Anastasiia_Lukianenko@epam.com \
--cc=boris.ostrovsky@oracle.com \
--cc=geert@linux-m68k.org \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®