Skip to content

RFC x86 passthrough code cleanup

Wei Liu xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10passthrough: rearrange x86 codeMAINTAINERS xen/drivers/passthrough/Makefile xen/drivers/passthrough/x86/Makefile +24 more+14 -131 reply
2/10passthrough: split out x86 PCI code to x86/pci.cxen/drivers/passthrough/pci.c xen/drivers/passthrough/x86/Makefile xen/drivers/passthrough/x86/pci.c +1 more+66 -503 replies
3/10x86/passthrough: io.c is used for HVM onlyxen/drivers/passthrough/x86/Makefile+1 -11 reply
4/10x86/passthrough: arch_pci_clean_irqs is HVM onlyxen/drivers/passthrough/x86/pci.c+12 -00 replies
5/10x86/passthrough: move hvm_dpci_isairq_eoixen/drivers/passthrough/x86/io.c xen/drivers/passthrough/x86/vtd/x86/vtd.c xen/include/xen/iommu.h+45 -461 reply
6/10passthrough/amd: remove guest iommu supportxen/drivers/passthrough/x86/amd/Makefile xen/drivers/passthrough/x86/amd/iommu_guest.c xen/drivers/passthrough/x86/amd/iommu_init.c +3 more+6 -10031 reply
7/10passthrough/amd: split out hvm code from iommu_map.cxen/drivers/passthrough/x86/amd/Makefile xen/drivers/passthrough/x86/amd/hvm.c xen/drivers/passthrough/x86/amd/iommu.h +1 more+148 -962 replies
8/10passthrough/amd: make clear_iommu_pte_present staticxen/drivers/passthrough/x86/amd/iommu_map.c+1 -10 replies
9/10passthrough/intel: put some code under CONFIG_HVMxen/drivers/passthrough/x86/vtd/iommu.c+14 -11 reply
10/10x86: check hvm domain before calling pt_irq_destroy_bindxen/arch/x86/domctl.c+4 -00 replies

Reviews trailers per patch

2 of 10 patches have a Reviewed-by or Acked-by.

PatchJulien GrallJan Beulich
1/10
2/10A-b
3/10
4/10
5/10A-b
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH RFC 00/10] x86 passthrough code cleanup

Hi all

At some point I would like to make CONFIG_HVM and CONFIG_PV work. The passthrough code is one of the road blocks for that work.

A short discussion on #xendevel made me think that having host side code regardless of if HVM (the primary user) is configured is desirable because PV guests may still have limited use of the hardware, hence this series.

What I want is to have clear hierarchy of the code and split the host side and the guest side code, and start to use CONFIG_HVM where applicable. Luckily the amount of work seemed to be smaller than I had expected.

RFC because there are a few open questions. Please see individual patches.

Wei.

Wei Liu (10):
passthrough: rearrange x86 code
passthrough: split out x86 PCI code to x86/pci.c x86/passthrough: io.c is used for HVM only x86/passthrough: arch_pci_clean_irqs is HVM only x86/passthrough: move hvm_dpci_isairq_eoi passthrough/amd: remove guest iommu support passthrough/amd: split out hvm code from iommu_map.c passthrough/amd: make clear_iommu_pte_present static passthrough/intel: put some code under CONFIG_HVM
x86: check hvm domain before calling pt_irq_destroy_bind

 MAINTAINERS                                        |   8 +-
 xen/arch/x86/domctl.c                              |   4 +
 xen/drivers/passthrough/Makefile                   |   3 -
 xen/drivers/passthrough/amd/iommu_guest.c          | 927 ---------------------
 xen/drivers/passthrough/pci.c                      |  51 +-
 xen/drivers/passthrough/x86/Makefile               |   5 +
 xen/drivers/passthrough/{ => x86}/amd/Makefile     |   2 +-
 xen/drivers/passthrough/x86/amd/hvm.c              | 108 +++
 xen/drivers/passthrough/x86/amd/iommu.h            |  32 +
 xen/drivers/passthrough/{ => x86}/amd/iommu_acpi.c |   0
 xen/drivers/passthrough/{ => x86}/amd/iommu_cmd.c  |   2 +-
 .../passthrough/{ => x86}/amd/iommu_detect.c       |   0
 xen/drivers/passthrough/{ => x86}/amd/iommu_init.c |  21 +-
 xen/drivers/passthrough/{ => x86}/amd/iommu_intr.c |   0
 xen/drivers/passthrough/{ => x86}/amd/iommu_map.c  | 107 +--
 .../passthrough/{ => x86}/amd/pci_amd_iommu.c      |   2 +-
 xen/drivers/passthrough/{ => x86}/io.c             |  45 +
 xen/drivers/passthrough/x86/pci.c                  |  74 ++
 xen/drivers/passthrough/{ => x86}/vtd/Makefile     |   0
 xen/drivers/passthrough/{ => x86}/vtd/dmar.c       |   0
 xen/drivers/passthrough/{ => x86}/vtd/dmar.h       |   0
 xen/drivers/passthrough/{ => x86}/vtd/extern.h     |   0
 xen/drivers/passthrough/{ => x86}/vtd/intremap.c   |   0
 xen/drivers/passthrough/{ => x86}/vtd/iommu.c      |  17 +-
 xen/drivers/passthrough/{ => x86}/vtd/iommu.h      |   0
 xen/drivers/passthrough/{ => x86}/vtd/qinval.c     |   2 +-
 xen/drivers/passthrough/{ => x86}/vtd/quirks.c     |   0
 xen/drivers/passthrough/{ => x86}/vtd/utils.c      |   0
 xen/drivers/passthrough/{ => x86}/vtd/vtd.h        |   0
 xen/drivers/passthrough/{ => x86}/vtd/x86/Makefile |   0
 xen/drivers/passthrough/{ => x86}/vtd/x86/ats.c    |   2 +-
 xen/drivers/passthrough/{ => x86}/vtd/x86/vtd.c    |  45 -
 xen/include/asm-x86/amd-iommu.h                    |  51 --
 xen/include/asm-x86/hvm/svm/amd-iommu-proto.h      |   8 -
 xen/include/asm-x86/iommu.h                        |   1 -
 xen/include/xen/iommu.h                            |   1 -
 xen/include/xen/pci.h                              |   2 +
 37 files changed, 310 insertions(+), 1210 deletions(-)
 delete mode 100644 xen/drivers/passthrough/amd/iommu_guest.c
 rename xen/drivers/passthrough/{ => x86}/amd/Makefile (86%)
 create mode 100644 xen/drivers/passthrough/x86/amd/hvm.c
 create mode 100644 xen/drivers/passthrough/x86/amd/iommu.h
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_acpi.c (100%)
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_cmd.c (99%)
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_detect.c (100%)
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_init.c (99%)
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_intr.c (100%)
 rename xen/drivers/passthrough/{ => x86}/amd/iommu_map.c (86%)
 rename xen/drivers/passthrough/{ => x86}/amd/pci_amd_iommu.c (99%)
 rename xen/drivers/passthrough/{ => x86}/io.c (96%)
 create mode 100644 xen/drivers/passthrough/x86/pci.c
 rename xen/drivers/passthrough/{ => x86}/vtd/Makefile (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/dmar.c (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/dmar.h (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/extern.h (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/intremap.c (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/iommu.c (99%)
 rename xen/drivers/passthrough/{ => x86}/vtd/iommu.h (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/qinval.c (99%)
 rename xen/drivers/passthrough/{ => x86}/vtd/quirks.c (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/utils.c (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/vtd.h (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/x86/Makefile (100%)
 rename xen/drivers/passthrough/{ => x86}/vtd/x86/ats.c (99%)
 rename xen/drivers/passthrough/{ => x86}/vtd/x86/vtd.c (72%)
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel