From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Kevin Tian <kevin.tian@intel.com>, Wei Liu <wei.liu2@citrix.com>,
Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
Jan Beulich <jbeulich@suse.com>
Subject: [PATCH RFC 01/10] passthrough: rearrange x86 code
Date: Wed, 21 Feb 2018 21:46:52 +0000 [thread overview]
Message-ID: <20180221214701.1646-2-wei.liu2@citrix.com> (raw)
In-Reply-To: <20180221214701.1646-1-wei.liu2@citrix.com>
Clean up the hierarchy of the directory: put vtd, amd and io.c under
x86. Adjust makefile and MAINTAINERS.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: Kevin Tian <kevin.tian@intel.com>
---
MAINTAINERS | 8 ++++----
xen/drivers/passthrough/Makefile | 3 ---
xen/drivers/passthrough/x86/Makefile | 4 ++++
xen/drivers/passthrough/{ => x86}/amd/Makefile | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_acpi.c | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_cmd.c | 2 +-
xen/drivers/passthrough/{ => x86}/amd/iommu_detect.c | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_guest.c | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_init.c | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_intr.c | 0
xen/drivers/passthrough/{ => x86}/amd/iommu_map.c | 2 +-
xen/drivers/passthrough/{ => x86}/amd/pci_amd_iommu.c | 2 +-
xen/drivers/passthrough/{ => x86}/io.c | 0
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 | 2 +-
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 | 0
27 files changed, 14 insertions(+), 13 deletions(-)
rename xen/drivers/passthrough/{ => x86}/amd/Makefile (100%)
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_guest.c (100%)
rename xen/drivers/passthrough/{ => x86}/amd/iommu_init.c (100%)
rename xen/drivers/passthrough/{ => x86}/amd/iommu_intr.c (100%)
rename xen/drivers/passthrough/{ => x86}/amd/iommu_map.c (99%)
rename xen/drivers/passthrough/{ => x86}/amd/pci_amd_iommu.c (99%)
rename xen/drivers/passthrough/{ => x86}/io.c (100%)
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 (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index e4070ffb80..6500ba2ac2 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -143,7 +143,7 @@ F: tools/libacpi/
AMD IOMMU
M: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
S: Maintained
-F: xen/drivers/passthrough/amd/
+F: xen/drivers/passthrough/x86/amd/
AMD SVM
M: Boris Ostrovsky <boris.ostrovsky@oracle.com>
@@ -222,7 +222,7 @@ F: xen/include/asm-x86/tboot.h
INTEL(R) VT FOR DIRECTED I/O (VT-D)
M: Kevin Tian <kevin.tian@intel.com>
S: Supported
-F: xen/drivers/passthrough/vtd/
+F: xen/drivers/passthrough/x86/vtd/
INTEL(R) VT FOR X86 (VT-X)
M: Jun Nakajima <jun.nakajima@intel.com>
@@ -237,10 +237,10 @@ IOMMU VENDOR INDEPENDENT CODE
M: Jan Beulich <jbeulich@suse.com>
S: Supported
F: xen/drivers/passthrough/
-X: xen/drivers/passthrough/amd/
X: xen/drivers/passthrough/arm/
-X: xen/drivers/passthrough/vtd/
X: xen/drivers/passthrough/device_tree.c
+X: xen/drivers/passthrough/x86/amd/
+X: xen/drivers/passthrough/x86/vtd/
F: xen/include/xen/iommu.h
KCONFIG
diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile
index 6087333a34..4b698bd566 100644
--- a/xen/drivers/passthrough/Makefile
+++ b/xen/drivers/passthrough/Makefile
@@ -1,9 +1,6 @@
-subdir-$(CONFIG_X86) += vtd
-subdir-$(CONFIG_X86) += amd
subdir-$(CONFIG_X86) += x86
subdir-$(CONFIG_ARM) += arm
obj-y += iommu.o
-obj-$(CONFIG_X86) += io.o
obj-$(CONFIG_HAS_PCI) += pci.o
obj-$(CONFIG_HAS_DEVICE_TREE) += device_tree.o
diff --git a/xen/drivers/passthrough/x86/Makefile b/xen/drivers/passthrough/x86/Makefile
index a70cf9460d..06971707f8 100644
--- a/xen/drivers/passthrough/x86/Makefile
+++ b/xen/drivers/passthrough/x86/Makefile
@@ -1,2 +1,6 @@
+subdir-y += vtd
+subdir-y += amd
+
obj-y += ats.o
+obj-y += io.o
obj-y += iommu.o
diff --git a/xen/drivers/passthrough/amd/Makefile b/xen/drivers/passthrough/x86/amd/Makefile
similarity index 100%
rename from xen/drivers/passthrough/amd/Makefile
rename to xen/drivers/passthrough/x86/amd/Makefile
diff --git a/xen/drivers/passthrough/amd/iommu_acpi.c b/xen/drivers/passthrough/x86/amd/iommu_acpi.c
similarity index 100%
rename from xen/drivers/passthrough/amd/iommu_acpi.c
rename to xen/drivers/passthrough/x86/amd/iommu_acpi.c
diff --git a/xen/drivers/passthrough/amd/iommu_cmd.c b/xen/drivers/passthrough/x86/amd/iommu_cmd.c
similarity index 99%
rename from xen/drivers/passthrough/amd/iommu_cmd.c
rename to xen/drivers/passthrough/x86/amd/iommu_cmd.c
index 08247fa354..a2948fca46 100644
--- a/xen/drivers/passthrough/amd/iommu_cmd.c
+++ b/xen/drivers/passthrough/x86/amd/iommu_cmd.c
@@ -20,7 +20,7 @@
#include <xen/sched.h>
#include <asm/amd-iommu.h>
#include <asm/hvm/svm/amd-iommu-proto.h>
-#include "../ats.h"
+#include "../../ats.h"
static int queue_iommu_command(struct amd_iommu *iommu, u32 cmd[])
{
diff --git a/xen/drivers/passthrough/amd/iommu_detect.c b/xen/drivers/passthrough/x86/amd/iommu_detect.c
similarity index 100%
rename from xen/drivers/passthrough/amd/iommu_detect.c
rename to xen/drivers/passthrough/x86/amd/iommu_detect.c
diff --git a/xen/drivers/passthrough/amd/iommu_guest.c b/xen/drivers/passthrough/x86/amd/iommu_guest.c
similarity index 100%
rename from xen/drivers/passthrough/amd/iommu_guest.c
rename to xen/drivers/passthrough/x86/amd/iommu_guest.c
diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/x86/amd/iommu_init.c
similarity index 100%
rename from xen/drivers/passthrough/amd/iommu_init.c
rename to xen/drivers/passthrough/x86/amd/iommu_init.c
diff --git a/xen/drivers/passthrough/amd/iommu_intr.c b/xen/drivers/passthrough/x86/amd/iommu_intr.c
similarity index 100%
rename from xen/drivers/passthrough/amd/iommu_intr.c
rename to xen/drivers/passthrough/x86/amd/iommu_intr.c
diff --git a/xen/drivers/passthrough/amd/iommu_map.c b/xen/drivers/passthrough/x86/amd/iommu_map.c
similarity index 99%
rename from xen/drivers/passthrough/amd/iommu_map.c
rename to xen/drivers/passthrough/x86/amd/iommu_map.c
index fd2327d3e5..0f9bd538af 100644
--- a/xen/drivers/passthrough/amd/iommu_map.c
+++ b/xen/drivers/passthrough/x86/amd/iommu_map.c
@@ -22,7 +22,7 @@
#include <asm/p2m.h>
#include <asm/amd-iommu.h>
#include <asm/hvm/svm/amd-iommu-proto.h>
-#include "../ats.h"
+#include "../../ats.h"
#include <xen/pci.h>
/* Given pfn and page table level, return pde index */
diff --git a/xen/drivers/passthrough/amd/pci_amd_iommu.c b/xen/drivers/passthrough/x86/amd/pci_amd_iommu.c
similarity index 99%
rename from xen/drivers/passthrough/amd/pci_amd_iommu.c
rename to xen/drivers/passthrough/x86/amd/pci_amd_iommu.c
index 12d2695b89..385d595bc0 100644
--- a/xen/drivers/passthrough/amd/pci_amd_iommu.c
+++ b/xen/drivers/passthrough/x86/amd/pci_amd_iommu.c
@@ -25,7 +25,7 @@
#include <xen/softirq.h>
#include <asm/amd-iommu.h>
#include <asm/hvm/svm/amd-iommu-proto.h>
-#include "../ats.h"
+#include "../../ats.h"
static bool_t __read_mostly init_done;
diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/x86/io.c
similarity index 100%
rename from xen/drivers/passthrough/io.c
rename to xen/drivers/passthrough/x86/io.c
diff --git a/xen/drivers/passthrough/vtd/Makefile b/xen/drivers/passthrough/x86/vtd/Makefile
similarity index 100%
rename from xen/drivers/passthrough/vtd/Makefile
rename to xen/drivers/passthrough/x86/vtd/Makefile
diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/x86/vtd/dmar.c
similarity index 100%
rename from xen/drivers/passthrough/vtd/dmar.c
rename to xen/drivers/passthrough/x86/vtd/dmar.c
diff --git a/xen/drivers/passthrough/vtd/dmar.h b/xen/drivers/passthrough/x86/vtd/dmar.h
similarity index 100%
rename from xen/drivers/passthrough/vtd/dmar.h
rename to xen/drivers/passthrough/x86/vtd/dmar.h
diff --git a/xen/drivers/passthrough/vtd/extern.h b/xen/drivers/passthrough/x86/vtd/extern.h
similarity index 100%
rename from xen/drivers/passthrough/vtd/extern.h
rename to xen/drivers/passthrough/x86/vtd/extern.h
diff --git a/xen/drivers/passthrough/vtd/intremap.c b/xen/drivers/passthrough/x86/vtd/intremap.c
similarity index 100%
rename from xen/drivers/passthrough/vtd/intremap.c
rename to xen/drivers/passthrough/x86/vtd/intremap.c
diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/x86/vtd/iommu.c
similarity index 99%
rename from xen/drivers/passthrough/vtd/iommu.c
rename to xen/drivers/passthrough/x86/vtd/iommu.c
index daaed0abbd..1d161fe149 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/x86/vtd/iommu.c
@@ -39,7 +39,7 @@
#include "dmar.h"
#include "extern.h"
#include "vtd.h"
-#include "../ats.h"
+#include "../../ats.h"
struct mapped_rmrr {
struct list_head list;
diff --git a/xen/drivers/passthrough/vtd/iommu.h b/xen/drivers/passthrough/x86/vtd/iommu.h
similarity index 100%
rename from xen/drivers/passthrough/vtd/iommu.h
rename to xen/drivers/passthrough/x86/vtd/iommu.h
diff --git a/xen/drivers/passthrough/vtd/qinval.c b/xen/drivers/passthrough/x86/vtd/qinval.c
similarity index 99%
rename from xen/drivers/passthrough/vtd/qinval.c
rename to xen/drivers/passthrough/x86/vtd/qinval.c
index e95dc54a8d..d2dace638a 100644
--- a/xen/drivers/passthrough/vtd/qinval.c
+++ b/xen/drivers/passthrough/x86/vtd/qinval.c
@@ -27,7 +27,7 @@
#include "dmar.h"
#include "vtd.h"
#include "extern.h"
-#include "../ats.h"
+#include "../../ats.h"
#define VTD_QI_TIMEOUT 1
diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough/x86/vtd/quirks.c
similarity index 100%
rename from xen/drivers/passthrough/vtd/quirks.c
rename to xen/drivers/passthrough/x86/vtd/quirks.c
diff --git a/xen/drivers/passthrough/vtd/utils.c b/xen/drivers/passthrough/x86/vtd/utils.c
similarity index 100%
rename from xen/drivers/passthrough/vtd/utils.c
rename to xen/drivers/passthrough/x86/vtd/utils.c
diff --git a/xen/drivers/passthrough/vtd/vtd.h b/xen/drivers/passthrough/x86/vtd/vtd.h
similarity index 100%
rename from xen/drivers/passthrough/vtd/vtd.h
rename to xen/drivers/passthrough/x86/vtd/vtd.h
diff --git a/xen/drivers/passthrough/vtd/x86/Makefile b/xen/drivers/passthrough/x86/vtd/x86/Makefile
similarity index 100%
rename from xen/drivers/passthrough/vtd/x86/Makefile
rename to xen/drivers/passthrough/x86/vtd/x86/Makefile
diff --git a/xen/drivers/passthrough/vtd/x86/ats.c b/xen/drivers/passthrough/x86/vtd/x86/ats.c
similarity index 99%
rename from xen/drivers/passthrough/vtd/x86/ats.c
rename to xen/drivers/passthrough/x86/vtd/x86/ats.c
index 1a3adb4acb..4332819136 100644
--- a/xen/drivers/passthrough/vtd/x86/ats.c
+++ b/xen/drivers/passthrough/x86/vtd/x86/ats.c
@@ -26,7 +26,7 @@
#include "../dmar.h"
#include "../vtd.h"
#include "../extern.h"
-#include "../../ats.h"
+#include "../../../ats.h"
static LIST_HEAD(ats_dev_drhd_units);
diff --git a/xen/drivers/passthrough/vtd/x86/vtd.c b/xen/drivers/passthrough/x86/vtd/x86/vtd.c
similarity index 100%
rename from xen/drivers/passthrough/vtd/x86/vtd.c
rename to xen/drivers/passthrough/x86/vtd/x86/vtd.c
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-02-21 21:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-21 21:46 [PATCH RFC 00/10] x86 passthrough code cleanup Wei Liu
2018-02-21 21:46 ` Wei Liu [this message]
2018-04-23 15:27 ` [PATCH RFC 01/10] passthrough: rearrange x86 code Jan Beulich
2018-02-21 21:46 ` [PATCH RFC 02/10] passthrough: split out x86 PCI code to x86/pci.c Wei Liu
2018-02-26 10:57 ` Julien Grall
2018-04-23 15:34 ` Jan Beulich
2018-04-24 9:08 ` Julien Grall
2018-02-21 21:46 ` [PATCH RFC 03/10] x86/passthrough: io.c is used for HVM only Wei Liu
2018-04-23 15:37 ` Jan Beulich
2018-02-21 21:46 ` [PATCH RFC 04/10] x86/passthrough: arch_pci_clean_irqs is " Wei Liu
2018-02-21 21:46 ` [PATCH RFC 05/10] x86/passthrough: move hvm_dpci_isairq_eoi Wei Liu
2018-04-23 15:39 ` Jan Beulich
2018-02-21 21:46 ` [PATCH RFC 06/10] passthrough/amd: remove guest iommu support Wei Liu
2018-05-02 17:10 ` Suravee Suthikulpanit
2018-02-21 21:46 ` [PATCH RFC 07/10] passthrough/amd: split out hvm code from iommu_map.c Wei Liu
2018-04-23 15:43 ` Jan Beulich
2018-05-02 17:32 ` Suravee Suthikulpanit
2018-02-21 21:46 ` [PATCH RFC 08/10] passthrough/amd: make clear_iommu_pte_present static Wei Liu
2018-02-21 21:47 ` [PATCH RFC 09/10] passthrough/intel: put some code under CONFIG_HVM Wei Liu
2018-04-23 15:47 ` Jan Beulich
2018-02-21 21:47 ` [PATCH RFC 10/10] x86: check hvm domain before calling pt_irq_destroy_bind Wei Liu
2018-02-23 5:12 ` [PATCH RFC 00/10] x86 passthrough code cleanup Tian, Kevin
2018-02-23 16:08 ` Wei Liu
2018-02-24 3:23 ` Tian, Kevin
2018-02-26 8:20 ` Jan Beulich
2018-02-26 12:45 ` Wei Liu
2018-02-24 4:39 ` Doug Goldstein
2018-02-26 0:47 ` Marek Marczykowski-Górecki
2018-02-26 12:49 ` Wei Liu
2018-03-08 12:18 ` Wei Liu
2018-03-08 12:37 ` Jan Beulich
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=20180221214701.1646-2-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=kevin.tian@intel.com \
--cc=suravee.suthikulpanit@amd.com \
--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).