From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tiejun Chen Subject: [v5][PATCH 01/10] xen:vtd:rmrr: export acpi_rmrr_units Date: Tue, 26 Aug 2014 19:02:51 +0800 Message-ID: <1409050980-21933-2-git-send-email-tiejun.chen@intel.com> References: <1409050980-21933-1-git-send-email-tiejun.chen@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409050980-21933-1-git-send-email-tiejun.chen@intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: JBeulich@suse.com, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com, yang.z.zhang@intel.com, kevin.tian@intel.com, andrew.cooper3@citrix.com Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org We need to expose acpi_rmrr_units to make sure we can use that somewhere else. Signed-off-by: Tiejun Chen --- xen/drivers/passthrough/vtd/dmar.h | 16 +--------------- xen/drivers/passthrough/vtd/iommu.h | 1 - xen/include/asm-x86/acpi.h | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/xen/drivers/passthrough/vtd/dmar.h b/xen/drivers/passthrough/vtd/dmar.h index af1feef..1839ca2 100644 --- a/xen/drivers/passthrough/vtd/dmar.h +++ b/xen/drivers/passthrough/vtd/dmar.h @@ -24,6 +24,7 @@ #include #include #include +#include /* This one is for interrupt remapping */ struct acpi_ioapic_unit { @@ -52,12 +53,6 @@ struct acpi_hpet_unit { }; }; -struct dmar_scope { - DECLARE_BITMAP(buses, 256); /* buses owned by this unit */ - u16 *devices; /* devices owned by this unit */ - int devices_cnt; -}; - struct acpi_drhd_unit { struct dmar_scope scope; struct list_head list; @@ -69,15 +64,6 @@ struct acpi_drhd_unit { struct list_head hpet_list; }; -struct acpi_rmrr_unit { - struct dmar_scope scope; - struct list_head list; - u64 base_address; - u64 end_address; - u16 segment; - u8 allow_all:1; -}; - struct acpi_atsr_unit { struct dmar_scope scope; struct list_head list; diff --git a/xen/drivers/passthrough/vtd/iommu.h b/xen/drivers/passthrough/vtd/iommu.h index 6b2cf1a..741e62b 100644 --- a/xen/drivers/passthrough/vtd/iommu.h +++ b/xen/drivers/passthrough/vtd/iommu.h @@ -482,7 +482,6 @@ struct qinval_entry { #define MAX_IOMMU_REGS 0xc0 extern struct list_head acpi_drhd_units; -extern struct list_head acpi_rmrr_units; extern struct list_head acpi_ioapic_units; struct qi_ctrl { diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h index 5e85b38..b3c9e90 100644 --- a/xen/include/asm-x86/acpi.h +++ b/xen/include/asm-x86/acpi.h @@ -28,6 +28,7 @@ #include #include #include +#include #define COMPILER_DEPENDENT_INT64 long long #define COMPILER_DEPENDENT_UINT64 unsigned long long @@ -141,6 +142,21 @@ struct acpi_sleep_info { bool_t sleep_extended; }; +struct dmar_scope { + DECLARE_BITMAP(buses, 256); /* buses owned by this unit */ + u16 *devices; /* devices owned by this unit */ + int devices_cnt; +}; + +struct acpi_rmrr_unit { + struct dmar_scope scope; + struct list_head list; + u64 base_address; + u64 end_address; + u16 segment; + u8 allow_all:1; +}; + #endif /* CONFIG_ACPI_SLEEP */ #define MAX_MADT_ENTRIES MAX(256, 2 * NR_CPUS) @@ -164,4 +180,5 @@ void hvm_acpi_sleep_button(struct domain *d); void save_rest_processor_state(void); void restore_rest_processor_state(void); +extern struct list_head acpi_rmrr_units; #endif /*__X86_ASM_ACPI_H*/ -- 1.9.1