@@ -155,6 +155,16 @@ config X86_HVM_PMTIMER
Build driver that emulates ACPI PM timer for HVM guests.
If unsure, say Y.
+
+config X86_HVM_STDVGA
+ bool "Standard VGA card emulation support"
+ default y
+ help
+ Build driver that emulates standard VGA card with VESA BIOS
+ Extensions for HVM guests.
+
+ If unsure, say Y.
+
endmenu
config XEN_SHSTK
@@ -744,12 +744,15 @@ static bool emulation_flags_ok(const struct domain *d, uint32_t emflags)
{
#ifdef CONFIG_HVM
/* This doesn't catch !CONFIG_HVM case but it is better than nothing */
- BUILD_BUG_ON((X86_EMU_ALL & ~X86_EMU_PM) !=
- (XEN_X86_EMU_ALL & ~XEN_X86_EMU_PM));
+ BUILD_BUG_ON((X86_EMU_ALL & ~(X86_EMU_PM | X86_EMU_VGA)) !=
+ (XEN_X86_EMU_ALL & ~(XEN_X86_EMU_PM | XEN_X86_EMU_VGA)));
#endif
#ifdef CONFIG_X86_HVM_PMTIMER
BUILD_BUG_ON(X86_EMU_PM != XEN_X86_EMU_PM);
#endif
+#ifdef CONFIG_X86_HVM_STDVGA
+ BUILD_BUG_ON(X86_EMU_VGA != XEN_X86_EMU_VGA);
+#endif
/* emflags contain non-supported bits */
if ( (emflags & X86_EMU_ALL) != emflags )
@@ -22,7 +22,7 @@ obj-$(CONFIG_X86_HVM_PMTIMER) += pmtimer.o
obj-y += quirks.o
obj-y += rtc.o
obj-y += save.o
-obj-y += stdvga.o
+obj-$(CONFIG_X86_HVM_STDVGA) += stdvga.o
obj-y += vioapic.o
obj-y += vlapic.o
obj-y += vm_event.o
@@ -466,7 +466,6 @@ struct arch_domain
#define X86_EMU_RTC XEN_X86_EMU_RTC
#define X86_EMU_IOAPIC XEN_X86_EMU_IOAPIC
#define X86_EMU_PIC XEN_X86_EMU_PIC
-#define X86_EMU_VGA XEN_X86_EMU_VGA
#define X86_EMU_IOMMU XEN_X86_EMU_IOMMU
#define X86_EMU_USE_PIRQ XEN_X86_EMU_USE_PIRQ
#define X86_EMU_VPCI XEN_X86_EMU_VPCI
@@ -476,7 +475,6 @@ struct arch_domain
#define X86_EMU_RTC 0
#define X86_EMU_IOAPIC 0
#define X86_EMU_PIC 0
-#define X86_EMU_VGA 0
#define X86_EMU_IOMMU 0
#define X86_EMU_USE_PIRQ 0
#define X86_EMU_VPCI 0
@@ -488,6 +486,12 @@ struct arch_domain
#define X86_EMU_PM 0
#endif
+#ifdef CONFIG_X86_HVM_STDVGA
+#define X86_EMU_VGA XEN_X86_EMU_VGA
+#else
+#define X86_EMU_VGA 0
+#endif
+
#define X86_EMU_PIT XEN_X86_EMU_PIT
/* This must match XEN_X86_EMU_ALL in xen.h */
@@ -108,7 +108,11 @@ struct vpci_arch_msix_entry {
int pirq;
};
+#ifdef CONFIG_X86_HVM_STDVGA
void stdvga_init(struct domain *d);
+#else
+static inline void stdvga_init(struct domain *d) {}
+#endif
extern void hvm_dpci_msi_eoi(struct domain *d, int vector);