[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH v1 2/3] x86/hvm: introduce config option for stdvga emulation
Introduce config option X86_STDVGA so that stdvga emulation driver can later be made configurable and be disabled on systems that don't need it. As a first step the option is hidden from user. No functional changes intended. Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> CC: Jan Beulich <jbeulich@xxxxxxxx> --- xen/arch/x86/Kconfig | 3 +++ xen/arch/x86/hvm/Makefile | 2 +- xen/arch/x86/include/asm/domain.h | 3 ++- xen/arch/x86/include/asm/hvm/io.h | 4 ++++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 95275dc17e..89c42ff6da 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -147,6 +147,9 @@ config INTEL_VMX config X86_PMTIMER def_bool HVM +config X86_STDVGA + def_bool HVM + config XEN_SHSTK bool "Supervisor Shadow Stacks" depends on HAS_AS_CET_SS diff --git a/xen/arch/x86/hvm/Makefile b/xen/arch/x86/hvm/Makefile index 321241f0bf..b7741b0f60 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -22,7 +22,7 @@ obj-$(CONFIG_X86_PMTIMER) += 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/domain.h b/xen/arch/x86/include/asm/domain.h index 3f65bfd190..675a13d917 100644 --- a/xen/arch/x86/include/asm/domain.h +++ b/xen/arch/x86/include/asm/domain.h @@ -501,7 +501,8 @@ struct arch_domain #define has_vrtc(d) (!!((d)->arch.emulation_flags & X86_EMU_RTC)) #define has_vioapic(d) (!!((d)->arch.emulation_flags & X86_EMU_IOAPIC)) #define has_vpic(d) (!!((d)->arch.emulation_flags & X86_EMU_PIC)) -#define has_vvga(d) (!!((d)->arch.emulation_flags & X86_EMU_VGA)) +#define has_vvga(d) (IS_ENABLED(CONFIG_X86_STDVGA) && \ + !!((d)->arch.emulation_flags & X86_EMU_VGA)) #define has_viommu(d) (!!((d)->arch.emulation_flags & X86_EMU_IOMMU)) #define has_vpit(d) (!!((d)->arch.emulation_flags & X86_EMU_PIT)) #define has_pirq(d) (!!((d)->arch.emulation_flags & X86_EMU_USE_PIRQ)) diff --git a/xen/arch/x86/include/asm/hvm/io.h b/xen/arch/x86/include/asm/hvm/io.h index f2b8431fac..32a2490fbc 100644 --- a/xen/arch/x86/include/asm/hvm/io.h +++ b/xen/arch/x86/include/asm/hvm/io.h @@ -108,7 +108,11 @@ struct vpci_arch_msix_entry { int pirq; }; +#ifdef CONFIG_X86_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); -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |