[Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain

Marek Marczykowski-Górecki posted 4 patches 6 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/xen tags/patchew/cover.e819a32509fb1a6bdcbdcefb2de053ccf2361d59.1569379186.git-series.marmarek@invisiblethingslab.com
There is a newer version of this series
tools/libxl/libxl_pci.c                  | 63 +++++++++++++++++--------
xen/arch/x86/hpet.c                      |  3 +-
xen/arch/x86/irq.c                       | 42 +++++++++++------
xen/drivers/char/ns16550.c               |  2 +-
xen/drivers/passthrough/amd/iommu_init.c |  2 +-
xen/drivers/passthrough/vtd/iommu.c      |  3 +-
xen/include/asm-x86/irq.h                |  7 ++-
7 files changed, 84 insertions(+), 38 deletions(-)
[Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain
Posted by Marek Marczykowski-Górecki 6 years, 1 month ago
In this version, I drop PHYSDEVOP_interrupt_control patch, since Jan prefer not
to mix pciif and hypercalls for serving device model. Enabling MSI by the
stubdomain remains unsolved here, but other patches are improvement anyway.

Changes in v2:
 - new "xen/x86: Allow stubdom access to irq created for msi" patch
 - applied review comments from v1
Changes is v3:
 - apply suggestions by Roger
 - add PHYSDEVOP_msi_msix_set_enable
Changes in v4:
 - implement suggestions by Wei, Roger, Jan
 - plug new physdevop into XSM
Changes in v5:
 - rebase on master
 - rename to PHYSDEVOP_msi_control
 - move granting access to IRQ into create_irq
Changes in v6:
 - simplify granting IRQ access, record dm domid for cleanup
 - rename to PHYSDEVOP_interrupt_control
 - include INTx control in the hypercall
Changes in v7:
 - update "xen/x86: Allow stubdom access to irq created for msi"
 - drop "xen/x86: add PHYSDEVOP_interrupt_control"
 - drop "tools/libxc: add wrapper for PHYSDEVOP_interrupt_control"

---
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wl@xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>
Cc: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Brian Woods <brian.woods@amd.com>
Cc: Kevin Tian <kevin.tian@intel.com>
Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>

Marek Marczykowski-Górecki (4):
  libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use
  libxl: attach PCI device to qemu only after setting pciback/pcifront
  libxl: don't try to manipulate json config for stubdomain
  xen/x86: Allow stubdom access to irq created for msi.

 tools/libxl/libxl_pci.c                  | 63 +++++++++++++++++--------
 xen/arch/x86/hpet.c                      |  3 +-
 xen/arch/x86/irq.c                       | 42 +++++++++++------
 xen/drivers/char/ns16550.c               |  2 +-
 xen/drivers/passthrough/amd/iommu_init.c |  2 +-
 xen/drivers/passthrough/vtd/iommu.c      |  3 +-
 xen/include/asm-x86/irq.h                |  7 ++-
 7 files changed, 84 insertions(+), 38 deletions(-)

base-commit: 6c9639a72f0ca3a9430ef75f375877182281fdef
-- 
git-series 0.9.1

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain
Posted by Jan Beulich 6 years, 1 month ago
Ian, Wei,

On 25.09.2019 04:41, Marek Marczykowski-Górecki  wrote:
> In this version, I drop PHYSDEVOP_interrupt_control patch, since Jan prefer not
> to mix pciif and hypercalls for serving device model. Enabling MSI by the
> stubdomain remains unsolved here, but other patches are improvement anyway.
> 
> Changes in v2:
>  - new "xen/x86: Allow stubdom access to irq created for msi" patch
>  - applied review comments from v1
> Changes is v3:
>  - apply suggestions by Roger
>  - add PHYSDEVOP_msi_msix_set_enable
> Changes in v4:
>  - implement suggestions by Wei, Roger, Jan
>  - plug new physdevop into XSM
> Changes in v5:
>  - rebase on master
>  - rename to PHYSDEVOP_msi_control
>  - move granting access to IRQ into create_irq
> Changes in v6:
>  - simplify granting IRQ access, record dm domid for cleanup
>  - rename to PHYSDEVOP_interrupt_control
>  - include INTx control in the hypercall
> Changes in v7:
>  - update "xen/x86: Allow stubdom access to irq created for msi"
>  - drop "xen/x86: add PHYSDEVOP_interrupt_control"
>  - drop "tools/libxc: add wrapper for PHYSDEVOP_interrupt_control"
> 
> ---
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wl@xen.org>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: George Dunlap <George.Dunlap@eu.citrix.com>
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Julien Grall <julien.grall@arm.com>
> Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Cc: Stefano Stabellini <sstabellini@kernel.org>
> Cc: Tim Deegan <tim@xen.org>
> Cc: Anthony PERARD <anthony.perard@citrix.com>
> Cc: "Roger Pau Monné" <roger.pau@citrix.com>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Cc: Brian Woods <brian.woods@amd.com>
> Cc: Kevin Tian <kevin.tian@intel.com>
> Cc: Daniel De Graaf <dgdegra@tycho.nsa.gov>
> 
> Marek Marczykowski-Górecki (4):
>   libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use
>   libxl: attach PCI device to qemu only after setting pciback/pcifront
>   libxl: don't try to manipulate json config for stubdomain
>   xen/x86: Allow stubdom access to irq created for msi.

I did commit the last one, but I'd prefer if one of you could take
care of the three libxl ones.

Thanks, Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain
Posted by Wei Liu 6 years, 1 month ago
On Fri, Sep 27, 2019 at 04:21:55PM +0200, Jan Beulich wrote:
> > 
> > Marek Marczykowski-Górecki (4):
> >   libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use
> >   libxl: attach PCI device to qemu only after setting pciback/pcifront
> >   libxl: don't try to manipulate json config for stubdomain
> >   xen/x86: Allow stubdom access to irq created for msi.
> 
> I did commit the last one, but I'd prefer if one of you could take
> care of the three libxl ones.
> 

I tried to apply the first three. They don't apply cleanly. That's
perhaps due to Anthony's series which got committed recently.

Marek, do you have a branch?

Wei.

> Thanks, Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
Re: [Xen-devel] [PATCH v7 0/4] Fix PCI passthrough for HVM with stubdomain
Posted by Marek Marczykowski-Górecki 6 years, 1 month ago
On Fri, Sep 27, 2019 at 03:36:08PM +0100, Wei Liu wrote:
> On Fri, Sep 27, 2019 at 04:21:55PM +0200, Jan Beulich wrote:
> > > 
> > > Marek Marczykowski-Górecki (4):
> > >   libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use
> > >   libxl: attach PCI device to qemu only after setting pciback/pcifront
> > >   libxl: don't try to manipulate json config for stubdomain
> > >   xen/x86: Allow stubdom access to irq created for msi.
> > 
> > I did commit the last one, but I'd prefer if one of you could take
> > care of the three libxl ones.
> > 
> 
> I tried to apply the first three. They don't apply cleanly. That's
> perhaps due to Anthony's series which got committed recently.
> 
> Marek, do you have a branch?

This rebase turned out to be fairly complex, because of the whole pci
attach got reworked for async api. So, I've done it, but dropped your
ack on the patch needing rework for this reason. And also found one
regression introduced by Anthony series.

All in all - v8 on its way, still 4 patches (+1, -1).

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel