All of lore.kernel.org
 help / color / mirror / Atom feed
* [XEN PATCH] x86/hvm: make stdvga support optional
@ 2024-09-12  8:57 Sergiy Kibrik
  2024-09-12  9:14 ` Roger Pau Monné
  2024-09-12 10:22 ` Jan Beulich
  0 siblings, 2 replies; 7+ messages in thread
From: Sergiy Kibrik @ 2024-09-12  8:57 UTC (permalink / raw)
  To: xen-devel
  Cc: Sergiy Kibrik, Jan Beulich, Andrew Cooper, Roger Pau Monné,
	Stefano Stabellini

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@epam.com>
---
 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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-16  7:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-12  8:57 [XEN PATCH] x86/hvm: make stdvga support optional Sergiy Kibrik
2024-09-12  9:14 ` Roger Pau Monné
2024-09-16  6:37   ` Sergiy Kibrik
2024-09-16  6:41     ` Jan Beulich
2024-09-16  7:42     ` Roger Pau Monné
2024-09-12 10:22 ` Jan Beulich
2024-09-12 20:15   ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.