[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [v5][PATCH 02/10] xen:vtd:rmrr: introduce acpi_rmrr_unit_entries



We need a global count, acpi_rmrr_unit_entries, to record the number
of rmrr entries, then we can use that somewhere else conveniently.

Signed-off-by: Tiejun Chen <tiejun.chen@xxxxxxxxx>
---
 xen/drivers/passthrough/vtd/dmar.c | 2 ++
 xen/include/asm-x86/acpi.h         | 1 +
 2 files changed, 3 insertions(+)

diff --git a/xen/drivers/passthrough/vtd/dmar.c 
b/xen/drivers/passthrough/vtd/dmar.c
index 1152c3a..c1b62a8 100644
--- a/xen/drivers/passthrough/vtd/dmar.c
+++ b/xen/drivers/passthrough/vtd/dmar.c
@@ -74,8 +74,10 @@ static int __init acpi_register_drhd_unit(struct 
acpi_drhd_unit *drhd)
     return 0;
 }
 
+uint32_t acpi_rmrr_unit_entries = 0;
 static int __init acpi_register_rmrr_unit(struct acpi_rmrr_unit *rmrr)
 {
+    acpi_rmrr_unit_entries++;
     list_add(&rmrr->list, &acpi_rmrr_units);
     return 0;
 }
diff --git a/xen/include/asm-x86/acpi.h b/xen/include/asm-x86/acpi.h
index b3c9e90..6b9d3ab 100644
--- a/xen/include/asm-x86/acpi.h
+++ b/xen/include/asm-x86/acpi.h
@@ -181,4 +181,5 @@ void save_rest_processor_state(void);
 void restore_rest_processor_state(void);
 
 extern struct list_head acpi_rmrr_units;
+extern uint32_t acpi_rmrr_unit_entries;
 #endif /*__X86_ASM_ACPI_H*/
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.