Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e2f5b59 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 paravirt update from Ingo Molnar:
 "Various paravirtualization related changes - the biggest one makes
  guest support optional via CONFIG_HYPERVISOR_GUEST"

* 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, wakeup, sleep: Use pvops functions for changing GDT entries
  x86, xen, gdt: Remove the pvops variant of store_gdt.
  x86-32, gdt: Store/load GDT for ACPI S3 or hibernation/resume path is not needed
  x86-64, gdt: Store/load GDT for ACPI S3 or hibernate/resume path is not needed.
  x86: Make Linux guest support optional
  x86, Kconfig: Move PARAVIRT_DEBUG into the paravirt menu
parents f9b3bcfb 4d681be3
Loading
Loading
Loading
Loading
+45 −44
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ config X86_NUMACHIP

config X86_VSMP
	bool "ScaleMP vSMP"
	select PARAVIRT_GUEST
	select HYPERVISOR_GUEST
	select PARAVIRT
	depends on X86_64 && PCI
	depends on X86_EXTENDED_PLATFORM
@@ -594,44 +594,17 @@ config SCHED_OMIT_FRAME_POINTER

	  If in doubt, say "Y".

menuconfig PARAVIRT_GUEST
	bool "Paravirtualized guest support"
menuconfig HYPERVISOR_GUEST
	bool "Linux guest support"
	---help---
	  Say Y here to get to see options related to running Linux under
	  various hypervisors.  This option alone does not add any kernel code.
	  Say Y here to enable options for running Linux under various hyper-
	  visors. This option enables basic hypervisor detection and platform
	  setup.

	  If you say N, all options in this submenu will be skipped and disabled.
	  If you say N, all options in this submenu will be skipped and
	  disabled, and Linux guest support won't be built in.

if PARAVIRT_GUEST

config PARAVIRT_TIME_ACCOUNTING
	bool "Paravirtual steal time accounting"
	select PARAVIRT
	default n
	---help---
	  Select this option to enable fine granularity task steal time
	  accounting. Time spent executing other tasks in parallel with
	  the current vCPU is discounted from the vCPU power. To account for
	  that, there can be a small performance impact.

	  If in doubt, say N here.

source "arch/x86/xen/Kconfig"

config KVM_GUEST
	bool "KVM Guest support (including kvmclock)"
	select PARAVIRT
	select PARAVIRT
	select PARAVIRT_CLOCK
	default y if PARAVIRT_GUEST
	---help---
	  This option enables various optimizations for running under the KVM
	  hypervisor. It includes a paravirtualized clock, so that instead
	  of relying on a PIT (or probably other) emulation by the
	  underlying device model, the host provides the guest with
	  timing infrastructure such as time of day, and system time

source "arch/x86/lguest/Kconfig"
if HYPERVISOR_GUEST

config PARAVIRT
	bool "Enable paravirtualization code"
@@ -641,6 +614,13 @@ config PARAVIRT
	  over full virtualization.  However, when run without a hypervisor
	  the kernel is theoretically slower and slightly larger.

config PARAVIRT_DEBUG
	bool "paravirt-ops debugging"
	depends on PARAVIRT && DEBUG_KERNEL
	---help---
	  Enable to debug paravirt_ops internals.  Specifically, BUG if
	  a paravirt_op is missing when it is called.

config PARAVIRT_SPINLOCKS
	bool "Paravirtualization layer for spinlocks"
	depends on PARAVIRT && SMP
@@ -654,17 +634,38 @@ config PARAVIRT_SPINLOCKS

	  If you are unsure how to answer this question, answer N.

config PARAVIRT_CLOCK
	bool
source "arch/x86/xen/Kconfig"

endif
config KVM_GUEST
	bool "KVM Guest support (including kvmclock)"
	depends on PARAVIRT
	select PARAVIRT_CLOCK
	default y
	---help---
	  This option enables various optimizations for running under the KVM
	  hypervisor. It includes a paravirtualized clock, so that instead
	  of relying on a PIT (or probably other) emulation by the
	  underlying device model, the host provides the guest with
	  timing infrastructure such as time of day, and system time

config PARAVIRT_DEBUG
	bool "paravirt-ops debugging"
	depends on PARAVIRT && DEBUG_KERNEL
source "arch/x86/lguest/Kconfig"

config PARAVIRT_TIME_ACCOUNTING
	bool "Paravirtual steal time accounting"
	depends on PARAVIRT
	default n
	---help---
	  Enable to debug paravirt_ops internals.  Specifically, BUG if
	  a paravirt_op is missing when it is called.
	  Select this option to enable fine granularity task steal time
	  accounting. Time spent executing other tasks in parallel with
	  the current vCPU is discounted from the vCPU power. To account for
	  that, there can be a small performance impact.

	  If in doubt, say N here.

config PARAVIRT_CLOCK
	bool

endif #HYPERVISOR_GUEST

config NO_BOOTMEM
	def_bool y
+11 −5
Original line number Diff line number Diff line
@@ -20,13 +20,11 @@
#ifndef _ASM_X86_HYPERVISOR_H
#define _ASM_X86_HYPERVISOR_H

#ifdef CONFIG_HYPERVISOR_GUEST

#include <asm/kvm_para.h>
#include <asm/xen/hypervisor.h>

extern void init_hypervisor(struct cpuinfo_x86 *c);
extern void init_hypervisor_platform(void);
extern bool hypervisor_x2apic_available(void);

/*
 * x86 hypervisor information
 */
@@ -55,4 +53,12 @@ extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
extern const struct hypervisor_x86 x86_hyper_xen_hvm;
extern const struct hypervisor_x86 x86_hyper_kvm;

#endif
extern void init_hypervisor(struct cpuinfo_x86 *c);
extern void init_hypervisor_platform(void);
extern bool hypervisor_x2apic_available(void);
#else
static inline void init_hypervisor(struct cpuinfo_x86 *c) { }
static inline void init_hypervisor_platform(void) { }
static inline bool hypervisor_x2apic_available(void) { return false; }
#endif /* CONFIG_HYPERVISOR_GUEST */
#endif /* _ASM_X86_HYPERVISOR_H */
+0 −4
Original line number Diff line number Diff line
@@ -262,10 +262,6 @@ static inline void set_ldt(const void *addr, unsigned entries)
{
	PVOP_VCALL2(pv_cpu_ops.set_ldt, addr, entries);
}
static inline void store_gdt(struct desc_ptr *dtr)
{
	PVOP_VCALL1(pv_cpu_ops.store_gdt, dtr);
}
static inline void store_idt(struct desc_ptr *dtr)
{
	PVOP_VCALL1(pv_cpu_ops.store_idt, dtr);
+1 −1
Original line number Diff line number Diff line
@@ -123,7 +123,7 @@ struct pv_cpu_ops {
	void (*load_tr_desc)(void);
	void (*load_gdt)(const struct desc_ptr *);
	void (*load_idt)(const struct desc_ptr *);
	void (*store_gdt)(struct desc_ptr *);
	/* store_gdt has been removed. */
	void (*store_idt)(struct desc_ptr *);
	void (*set_ldt)(const void *desc, unsigned entries);
	unsigned long (*store_tr)(void);
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ struct saved_context {
	unsigned long cr0, cr2, cr3, cr4;
	u64 misc_enable;
	bool misc_enable_saved;
	struct desc_ptr gdt;
	struct desc_ptr idt;
	u16 ldt;
	u16 tss;
Loading