xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Bertrand Marquis <Bertrand.Marquis@arm.com>
Cc: Michal Orzel <Michal.Orzel@arm.com>,
	Rahul Singh <Rahul.Singh@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Andre Przywara <Andre.Przywara@arm.com>,
	Christian Lindig <christian.lindig@citrix.com>,
	David Scott <dave@recoil.org>, Ian Jackson <iwj@xenproject.org>,
	Wei Liu <wl@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH v5 07/11] xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag
Date: Wed, 13 Oct 2021 16:28:49 +0200	[thread overview]
Message-ID: <YWbtIfMZYWR/3hnT@MacBook-Air-de-Roger.local> (raw)
In-Reply-To: <9C5C0FE2-67EA-4CD7-893B-82C156F5F77A@arm.com>

On Wed, Oct 13, 2021 at 12:11:30PM +0000, Bertrand Marquis wrote:
> Hi Roger,
> 
> > On 13 Oct 2021, at 11:56, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > 
> > On Wed, Oct 13, 2021 at 09:36:01AM +0000, Bertrand Marquis wrote:
> >> Hi Roger,
> >> 
> >>> On 13 Oct 2021, at 09:30, Roger Pau Monné <roger.pau@citrix.com> wrote:
> >>> 
> >>> On Tue, Oct 12, 2021 at 12:38:35PM +0200, Michal Orzel wrote:
> >>>> Hi Roger,
> >>>> 
> >>>> On 11.10.2021 11:27, Roger Pau Monné wrote:
> >>>>> On Wed, Oct 06, 2021 at 06:40:33PM +0100, Rahul Singh wrote:
> >>>>>> Introduce XEN_DOMCTL_CDF_vpci flag to enable VPCI support in XEN.
> >>>>>> Reject the use of this new flag for x86 as VPCI is not supported for
> >>>>>> DOMU guests for x86.
> >>>>> 
> >>>>> I don't like this approach, XEN_DOMCTL_CDF_vpci should be set for x86
> >>>>> PVH dom0, like we do for any other CDF flags when Xen builds dom0.
> >>>>> 
> >>>>> Things like PVH vs PV get translated into CDF flags by create_dom0,
> >>>>> and processed normally by the sanitise_domain_config logic, vPCI
> >>>>> should be handled that way.
> >>>>> 
> >>>>> Do you think you could see about fixing this?
> >>>>> 
> >>>>> Thanks, Roger.
> >>>>> 
> >>>> 
> >>>> I have one question about this fix.
> >>>> If I set XEN_DOMCTL_CDF_vpci for dom0 pvh in create_dom0, then in
> >>>> sanitise_domain_config or arch_sanitise_domain_config I have no
> >>>> knowledge on whether I am dom0 or not. I can check if I'm PVH but not if dom0.
> >>>> This would be needed to add a warning if this flag is set but we are not dom0 pvh.
> >>>> 
> >>>> Any ideas?
> >>> 
> >>> I've just realized this is more wrong that I thought. vPCI is
> >>> signaled on x86 in xen_arch_domainconfig.emulation_flags, so
> >>> introducing a top level option for it without removing the arch
> >>> specific one is wrong, as then on x86 we have a duplicated option.
> >>> 
> >>> Then I'm also not sure whether we want to move it from
> >>> emulation_flags, it seems like the more natural place for it to live
> >>> on x86.
> >>> 
> >>> If we really want to make vPCI a CDF option we must deal with the
> >>> removal of XEN_X86_EMU_VPCI, or else you could introduce an arch
> >>> specific flag for vPCI on Arm.
> >> 
> >> First issue that we have here is that there is no emulation_flags right now on arm.
> > 
> > You don't explicitly need an emulation_flags field, you could add a
> > uint8_t vpci or some such to xen_arch_domainconfig for Arm if you
> > don't think there's a need to select more emulation. That's up to Arm
> > folks.
> 
> One way or an other it is still changing the interface.

Well, I don't want to sound rude, but you already changed the
interface first and very recently by introducing CDF_vpci. Complaining
that you don't want to change it anymore just after that seems
slightly weird.

> > 
> >> So I think there are 2 solutions:
> >> 
> >> - introduce PHYSCAP. The problem here is that it is not a physical capacity and
> >> I think that will hit us in the future for example if we want to use vpci for VIRTIO
> >> even if there is not physical PCI on the platform.
> > 
> > Hm, PHYSCAP is a bit weird, for example Xen signals shadow paging
> > support using PHYSCAP which doesn't depend on any hardware feature.
> > 
> > I think you could signal vPCI regardless of whether the underlying
> > platform has PCI devices or not, as vPCI is purely a software
> > component.
> 
> But in the x86 case this is something not supported in all cases and actually only by dom0 pvh.
> So having something like that defined as a PHYSCAP is a bit weird.

Well, even if vPCI was fully supported on x86 for both domU and dom0
it would only apply to PVH and maybe HVM guests, but classic PV will
never get vPCI. It's kind of trying to create a PV guest with HAP
support.

One option would be to defer the introduction of the CDF_vpci flag
until the vpci work has been finished - then we could decide if the
current code can also be used by x86 so maybe it could be enabled for
both arches, and there would be no problem in setting the PHYSCAP.

> >> I think the second solution is the right one but it cannot be done so near from the
> >> feature freeze.
> >> 
> >> The CDF flag as introduced right now is not creating any issue and will be used once
> >> the emulation flag will be introduce. We will be able at this stage to set this properly
> >> also on x86 (for dom0 pvh).
> >> Moreover keeping it will allow to continue to merge the remaining part of the PCI
> >> passthrough which are otherwise not possible to be done as they are dependent on this flag.
> >> 
> >> Can we agree on keep the DOMCTL_CDF_vpci flag and introduce the emulation
> >> flag on Arm after 4.16 release ?
> > 
> > If vPCI for Arm on 4.16 is not going to be functional, why so much
> > pressure in pushing those patches so fast? I understand the need to
> > remove stuff from the queue, but I don't think it's worth the cost of
> > introducing a broken interface deliberately on a release.
> 
> We did not push that fast, those have been on the mailing list for a while (this is the 5th version of the serie).
> PCI passthrough is a big change requiring lots of patches and we decided to push it piece by piece to make
> the review easier.

First version of this patch I have on my inbox is from 23rd of
September, that's less than 3 weeks ago.

> > 
> > I think we need to at least settle on whether we want to keep
> > CDF_vpci or use an arch specific signal mechanism in order to decide
> > what to do regarding the release.
> 
> Agree and I have no definitive idea on this so but switching will require to revert the patch adding CDF_vpci
> and change the subsequent patches.

I think it's fair to expect changes to the interface when things are
reviewed, that's part of the review process, changes to subsequent
patches can be painful, but we have all been there and dealt with
them.

I'm not saying we must remove the CDF_vpci flag. I have to admit I was
fine using emulation_flags, but I could also be fine using CDF_vpci if
the x86 side is fixed and XEN_X86_EMU_VPCI is removed.

Thanks, Roger.


  parent reply	other threads:[~2021-10-13 14:29 UTC|newest]

Thread overview: 190+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 17:40 [PATCH v5 00/11] PCI devices passthrough on Arm Rahul Singh
2021-10-06 17:40 ` [PATCH v5 01/11] xen/arm: xc_domain_ioport_permission(..) not supported on ARM Rahul Singh
2021-10-11 11:47   ` Roger Pau Monné
2021-10-11 12:11     ` Bertrand Marquis
2021-10-11 13:20       ` Roger Pau Monné
2021-10-11 13:40         ` Bertrand Marquis
2021-10-11 13:57           ` Roger Pau Monné
2021-10-11 14:16             ` Bertrand Marquis
2021-10-11 16:32               ` Roger Pau Monné
2021-10-11 17:11                 ` Bertrand Marquis
2021-10-12  8:29                   ` Jan Beulich
2021-10-12  8:41                     ` Bertrand Marquis
2021-10-12  9:32                       ` Jan Beulich
2021-10-12  9:38                         ` Oleksandr Andrushchenko
2021-10-12 10:01                           ` Jan Beulich
2021-10-12 10:06                             ` Oleksandr Andrushchenko
2021-10-12 10:20                               ` Jan Beulich
2021-10-12 10:41                                 ` Bertrand Marquis
2021-10-12 10:44                                   ` Jan Beulich
2021-10-12 14:53                                   ` Ian Jackson
2021-10-12 16:15                                     ` Bertrand Marquis
2021-10-12 16:29                                       ` Ian Jackson
2021-10-12 20:42                                         ` Stefano Stabellini
2021-10-13  8:07                                           ` Roger Pau Monné
2021-10-13 11:52                                             ` Ian Jackson
2021-10-13  8:02                                       ` Roger Pau Monné
2021-10-13 12:02                                         ` Ian Jackson
2021-10-12  9:40                         ` Bertrand Marquis
2021-10-12 10:03                           ` Jan Beulich
2021-10-11 14:16           ` Oleksandr Andrushchenko
2021-10-06 17:40 ` [PATCH v5 02/11] xen/arm: Add PHYSDEVOP_pci_device_(*add/remove) support for ARM Rahul Singh
2021-10-07  0:05   ` Stefano Stabellini
2021-10-07 12:58     ` Jan Beulich
2021-10-21  9:28   ` xen/arm: Missing appropriate locking for the IOMMU (WAS Re: [PATCH v5 02/11] xen/arm: Add PHYSDEVOP_pci_device_(*add/remove) support for ARM) Julien Grall
2021-10-21 13:15     ` Bertrand Marquis
2021-10-21 13:47       ` Julien Grall
2021-10-21 13:52         ` Bertrand Marquis
2021-10-06 17:40 ` [PATCH v5 03/11] xen/arm: Add cmdline boot option "pci-passthrough = <boolean>" Rahul Singh
2021-10-07  8:27   ` Jan Beulich
2021-10-07  8:32     ` Rahul Singh
2021-10-07 12:59   ` Jan Beulich
2021-10-06 17:40 ` [PATCH v5 04/11] xen/arm: PCI host bridge discovery within XEN on ARM Rahul Singh
2021-10-06 17:40 ` [PATCH v5 05/11] xen/arm: Add support for Xilinx ZynqMP PCI host controller Rahul Singh
2021-10-06 17:40 ` [PATCH v5 06/11] xen/arm: Implement pci access functions Rahul Singh
2021-10-06 17:40 ` [PATCH v5 07/11] xen/domctl: Introduce XEN_DOMCTL_CDF_vpci flag Rahul Singh
2021-10-07 13:08   ` Jan Beulich
2021-10-08 18:06   ` Andrew Cooper
2021-10-08 21:12     ` Julien Grall
2021-10-08 21:46       ` Stefano Stabellini
2021-10-11  9:24         ` Julien Grall
2021-10-11 11:29         ` Michal Orzel
2021-10-11 11:35           ` Jan Beulich
2021-10-11 13:17             ` Roger Pau Monné
2021-10-11  9:48     ` Ian Jackson
2021-10-11  9:27   ` Roger Pau Monné
2021-10-11 12:06     ` Michal Orzel
2021-10-12 10:38     ` Michal Orzel
2021-10-13  8:30       ` Roger Pau Monné
2021-10-13  9:36         ` Bertrand Marquis
2021-10-13 10:56           ` Roger Pau Monné
2021-10-13 12:11             ` Bertrand Marquis
2021-10-13 12:57               ` Jan Beulich
2021-10-13 20:41                 ` Stefano Stabellini
2021-10-14  6:23                   ` Jan Beulich
2021-10-14  7:53                     ` Bertrand Marquis
2021-10-13 14:28               ` Roger Pau Monné [this message]
2021-10-13 20:53             ` Stefano Stabellini
2021-10-13 23:21               ` Stefano Stabellini
2021-10-12 21:48     ` Stefano Stabellini
2021-10-13  6:18       ` Jan Beulich
2021-10-13  7:11         ` Michal Orzel
2021-10-06 17:40 ` [PATCH v5 08/11] xen/arm: Enable the existing x86 virtual PCI support for ARM Rahul Singh
2021-10-07 13:43   ` Jan Beulich
2021-10-11 12:41     ` Bertrand Marquis
2021-10-11 13:09       ` Jan Beulich
2021-10-11 13:34         ` Bertrand Marquis
2021-10-11 14:10           ` Jan Beulich
2021-10-11 14:52             ` Bertrand Marquis
2021-10-11 18:18             ` Stefano Stabellini
2021-10-12  8:04               ` Jan Beulich
2021-10-12 21:37                 ` Stefano Stabellini
2021-10-13  6:10                   ` Jan Beulich
2021-10-13 10:02                     ` Bertrand Marquis
2021-10-13 12:21                       ` Jan Beulich
2021-10-12 15:04       ` Julien Grall
2021-10-12 16:12         ` Bertrand Marquis
2021-10-12 16:20           ` Julien Grall
2021-10-12 17:50             ` Bertrand Marquis
2021-10-11 10:51   ` Roger Pau Monné
2021-10-11 16:12     ` Bertrand Marquis
2021-10-11 16:20       ` Oleksandr Andrushchenko
2021-10-11 16:43         ` Roger Pau Monné
2021-10-11 17:15           ` Bertrand Marquis
2021-10-11 18:30             ` Oleksandr Andrushchenko
2021-10-11 19:27               ` Stefano Stabellini
2021-10-12  5:34                 ` Oleksandr Andrushchenko
2021-10-12  7:44                 ` Bertrand Marquis
2021-10-12 14:32   ` Julien Grall
2021-10-12 14:34     ` Bertrand Marquis
2021-10-13  8:45   ` Roger Pau Monné
2021-10-13  9:48     ` Bertrand Marquis
2021-10-13 10:33       ` Roger Pau Monné
2021-10-13 13:00     ` Jan Beulich
2021-10-13 14:51       ` Oleksandr Andrushchenko
2021-10-13 15:15         ` Jan Beulich
2021-10-13 19:27           ` Stefano Stabellini
2021-10-14  6:33             ` Jan Beulich
2021-10-14  7:53               ` Bertrand Marquis
2021-10-14  9:03               ` Bertrand Marquis
2021-10-14  9:24                 ` Jan Beulich
2021-10-06 17:40 ` [PATCH v5 09/11] xen/arm: Transitional change to build HAS_VPCI on ARM Rahul Singh
2021-10-11 11:43   ` Roger Pau Monné
2021-10-11 12:15     ` Bertrand Marquis
2021-10-12  1:32       ` Stefano Stabellini
2021-10-06 17:40 ` [PATCH v5 10/11] arm/libxl: Emulated PCI device tree node in libxl Rahul Singh
2021-10-06 18:01   ` Julien Grall
2021-10-07  0:26     ` Stefano Stabellini
2021-10-07 15:31       ` Rahul Singh
2021-10-07 10:53     ` Ian Jackson
2021-10-07 15:29       ` Rahul Singh
2021-10-07 16:11         ` Ian Jackson
2021-10-11 13:46           ` Roger Pau Monné
2021-10-14 17:16           ` Bertrand Marquis
2021-10-14 14:49             ` [PATCH v6 0/3] PCI devices passthrough on Arm Bertrand Marquis
2021-10-14 14:49               ` [PATCH v6 1/3] xen/vpci: Move ecam access functions to common code Bertrand Marquis
2021-10-14 16:06                 ` Jan Beulich
2021-10-14 17:09                   ` Bertrand Marquis
2021-10-15  6:29                     ` Jan Beulich
2021-10-15  7:37                       ` Bertrand Marquis
2021-10-15  8:13                         ` Jan Beulich
2021-10-15  8:20                           ` Bertrand Marquis
2021-10-15  8:24                             ` Jan Beulich
2021-10-15  9:49                           ` Roger Pau Monné
2021-10-14 23:47                 ` Stefano Stabellini
2021-10-15  7:44                 ` Roger Pau Monné
2021-10-15  7:53                   ` Bertrand Marquis
2021-10-15  9:53                     ` Roger Pau Monné
2021-10-15 10:12                       ` Bertrand Marquis
2021-10-15 10:14                       ` Jan Beulich
2021-10-14 14:49               ` [PATCH v6 2/3] xen/arm: Enable the existing x86 virtual PCI support for ARM Bertrand Marquis
2021-10-14 23:49                 ` Stefano Stabellini
2021-10-15  6:40                   ` Jan Beulich
2021-10-15  9:59                     ` Ian Jackson
2021-10-15 10:10                   ` Bertrand Marquis
2021-10-15  8:00                 ` Jan Beulich
2021-10-15 10:09                   ` Bertrand Marquis
2021-10-15 10:14                     ` Ian Jackson
2021-10-15 10:18                       ` Jan Beulich
2021-10-15 11:35                         ` Roger Pau Monné
2021-10-15 12:13                           ` Bertrand Marquis
2021-10-15 12:18                             ` Jan Beulich
2021-10-15 12:28                               ` Bertrand Marquis
2021-10-15 13:00                                 ` Jan Beulich
2021-10-15 13:10                                   ` Bertrand Marquis
2021-10-15 10:38                     ` Jan Beulich
2021-10-15  8:32                 ` Roger Pau Monné
2021-10-15  8:42                   ` Michal Orzel
2021-10-15  9:52                   ` Bertrand Marquis
2021-10-15 10:13                     ` Luca Fancellu
2021-10-15 10:17                       ` Bertrand Marquis
2021-10-15 10:19                     ` Roger Pau Monné
2021-10-15 10:31                       ` Bertrand Marquis
2021-10-15 10:24                     ` Jan Beulich
2021-10-15 10:33                       ` Bertrand Marquis
2021-10-15 10:41                         ` Jan Beulich
2021-10-15 10:48                           ` Bertrand Marquis
2021-10-15 10:51                             ` Jan Beulich
2021-10-15 11:08                               ` Bertrand Marquis
2021-10-15 13:47                             ` Roger Pau Monné
2021-10-15 14:00                               ` Luca Fancellu
2021-10-15 14:32                                 ` Roger Pau Monné
2021-10-14 14:49               ` [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl Bertrand Marquis
2021-10-14 17:54                 ` [PATCH v6 3/3] arm/libxl: Emulated PCI device tree node in libxl [and 1 more messages] Ian Jackson
2021-10-14 23:50                   ` Stefano Stabellini
2021-10-15  7:28                   ` Julien Grall
2021-10-15  7:41                     ` Michal Orzel
2021-10-15  9:01                       ` Julien Grall
2021-10-15 10:02                     ` Ian Jackson
2021-10-15 10:58                       ` Michal Orzel
2021-10-15 11:04                         ` Michal Orzel
2021-10-15 11:46                         ` Ian Jackson
2021-10-15 11:53                           ` Michal Orzel
2021-10-15 12:10                             ` Julien Grall
2021-10-15 12:14                               ` Ian Jackson
2021-10-15 12:13                             ` Ian Jackson
2021-10-12 15:03   ` [PATCH v5 10/11] arm/libxl: Emulated PCI device tree node in libxl Ian Jackson
2021-10-06 17:40 ` [PATCH v5 11/11] xen/arm: Add linux,pci-domain property for hwdom if not available Rahul Singh
2021-10-13 20:54   ` Stefano Stabellini
2021-10-07 19:54 ` [PATCH v5 00/11] PCI devices passthrough on Arm Stefano Stabellini
2021-10-07 21:29   ` Rahul Singh

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=YWbtIfMZYWR/3hnT@MacBook-Air-de-Roger.local \
    --to=roger.pau@citrix.com \
    --cc=Andre.Przywara@arm.com \
    --cc=Bertrand.Marquis@arm.com \
    --cc=Michal.Orzel@arm.com \
    --cc=Rahul.Singh@arm.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=george.dunlap@citrix.com \
    --cc=iwj@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.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;
as well as URLs for NNTP newsgroup(s).