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

[XEN PATCH] x86/hvm: make stdvga support optional



Introduce config option X86_STDVGA so that stdvga driver can be disabled on
systems that don't need it.

Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx>
---
 xen/arch/x86/Kconfig              | 10 ++++++++++
 xen/arch/x86/hvm/Makefile         |  2 +-
 xen/arch/x86/include/asm/hvm/io.h |  5 +++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig
index 62f0b5e0f4..2ba25e6906 100644
--- a/xen/arch/x86/Kconfig
+++ b/xen/arch/x86/Kconfig
@@ -385,6 +385,16 @@ config ALTP2M
 
          If unsure, stay with defaults.
 
+config X86_STDVGA
+       bool "Standard VGA card emulation support" if EXPERT
+       default y
+       depends on HVM
+       help
+         Build stdvga driver that emulates standard VGA card with VESA BIOS
+          Extensions for HVM guests.
+
+         If unsure, say Y.
+
 endmenu
 
 source "common/Kconfig"
diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile
index 4c1fa5c6c2..4d1f8e00eb 100644
--- a/xen/arch/x86/hvm/Makefile
+++ b/xen/arch/x86/hvm/Makefile
@@ -22,7 +22,7 @@ obj-y += pmtimer.o
 obj-y += quirks.o
 obj-y += rtc.o
 obj-y += save.o
-obj-y += stdvga.o
+obj-$(CONFIG_X86_STDVGA) += stdvga.o
 obj-y += vioapic.o
 obj-y += vlapic.o
 obj-y += vm_event.o
diff --git a/xen/arch/x86/include/asm/hvm/io.h 
b/xen/arch/x86/include/asm/hvm/io.h
index 24d1b6134f..9b8d4f6b7a 100644
--- a/xen/arch/x86/include/asm/hvm/io.h
+++ b/xen/arch/x86/include/asm/hvm/io.h
@@ -128,8 +128,13 @@ struct hvm_hw_stdvga {
     spinlock_t lock;
 };
 
+#ifdef CONFIG_X86_STDVGA
 void stdvga_init(struct domain *d);
 void stdvga_deinit(struct domain *d);
+#else
+static inline void stdvga_init(struct domain *d) {}
+static inline void stdvga_deinit(struct domain *d) {}
+#endif
 
 extern void hvm_dpci_msi_eoi(struct domain *d, int vector);
 
-- 
2.25.1




 


Rackspace

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