[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XEN PATCH] x86/hvm: make ACPI PM timer support optional
Introduce config option X86_PMTIMER so that pmtimer driver can be disabled on systems that don't need it. Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@xxxxxxxx> --- xen/arch/x86/Kconfig | 9 +++++++++ xen/arch/x86/hvm/Makefile | 2 +- xen/arch/x86/include/asm/acpi.h | 5 +++++ xen/arch/x86/include/asm/hvm/vpt.h | 10 ++++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 62f0b5e0f4..0a762be14e 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -385,6 +385,15 @@ config ALTP2M If unsure, stay with defaults. +config X86_PMTIMER + bool "ACPI PM timer emulation support" if EXPERT + default y + depends on HVM + help + Build pmtimer driver that emulates ACPI PM timer 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..321241f0bf 100644 --- a/xen/arch/x86/hvm/Makefile +++ b/xen/arch/x86/hvm/Makefile @@ -18,7 +18,7 @@ obj-y += irq.o obj-y += monitor.o obj-y += mtrr.o obj-y += nestedhvm.o -obj-y += pmtimer.o +obj-$(CONFIG_X86_PMTIMER) += pmtimer.o obj-y += quirks.o obj-y += rtc.o obj-y += save.o diff --git a/xen/arch/x86/include/asm/acpi.h b/xen/arch/x86/include/asm/acpi.h index 217819dd61..8d92014ae9 100644 --- a/xen/arch/x86/include/asm/acpi.h +++ b/xen/arch/x86/include/asm/acpi.h @@ -150,8 +150,13 @@ void acpi_mmcfg_init(void); /* Incremented whenever we transition through S3. Value is 1 during boot. */ extern uint32_t system_reset_counter; +#ifdef CONFIG_X86_PMTIMER void hvm_acpi_power_button(struct domain *d); void hvm_acpi_sleep_button(struct domain *d); +#else +static inline void hvm_acpi_power_button(struct domain *d) {} +static inline void hvm_acpi_sleep_button(struct domain *d) {} +#endif /* suspend/resume */ void save_rest_processor_state(void); diff --git a/xen/arch/x86/include/asm/hvm/vpt.h b/xen/arch/x86/include/asm/hvm/vpt.h index 0b92b28625..333b346068 100644 --- a/xen/arch/x86/include/asm/hvm/vpt.h +++ b/xen/arch/x86/include/asm/hvm/vpt.h @@ -187,10 +187,20 @@ void rtc_deinit(struct domain *d); void rtc_reset(struct domain *d); void rtc_update_clock(struct domain *d); +#ifdef CONFIG_X86_PMTIMER void pmtimer_init(struct vcpu *v); void pmtimer_deinit(struct domain *d); void pmtimer_reset(struct domain *d); int pmtimer_change_ioport(struct domain *d, uint64_t version); +#else +static inline void pmtimer_init(struct vcpu *v) {} +static inline void pmtimer_deinit(struct domain *d) {} +static inline void pmtimer_reset(struct domain *d) {} +static inline int pmtimer_change_ioport(struct domain *d, uint64_t version) +{ + return -ENODEV; +} +#endif void hpet_init(struct domain *d); void hpet_deinit(struct domain *d); -- 2.25.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |