Merge tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross: "Xen fixes and featrues for 4.12. The main changes are: - enable building the kernel with Xen support but without enabling paravirtualized mode (Vitaly Kuznetsov) - add a new 9pfs xen frontend driver (Stefano Stabellini) - simplify Xen's cpuid handling by making use of cpu capabilities (Juergen Gross) - add/modify some headers for new Xen paravirtualized devices (Oleksandr Andrushchenko) - EFI reset_system support under Xen (Julien Grall) - and the usual cleanups and corrections" * tag 'for-linus-4.12b-rc0b-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (57 commits) xen: Move xen_have_vector_callback definition to enlighten.c xen: Implement EFI reset_system callback arm/xen: Consolidate calls to shutdown hypercall in a single helper xen: Export xen_reboot xen/x86: Call xen_smp_intr_init_pv() on BSP xen: Revert commitsda72ff5bfc
and72a9b18629
xen/pvh: Do not fill kernel's e820 map in init_pvh_bootparams() xen/scsifront: use offset_in_page() macro xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops xen/arm,arm64: fix xen_dma_ops after815dd18
"Consolidate get_dma_ops..." xen/9pfs: select CONFIG_XEN_XENBUS_FRONTEND x86/cpu: remove hypervisor specific set_cpu_features vmware: set cpu capabilities during platform initialization x86/xen: use capabilities instead of fake cpuid values for xsave x86/xen: use capabilities instead of fake cpuid values for x2apic x86/xen: use capabilities instead of fake cpuid values for mwait x86/xen: use capabilities instead of fake cpuid values for acpi x86/xen: use capabilities instead of fake cpuid values for acc x86/xen: use capabilities instead of fake cpuid values for mtrr x86/xen: use capabilities instead of fake cpuid values for aperf ...
This commit is contained in:
@@ -35,9 +35,6 @@ struct hypervisor_x86 {
|
||||
/* Detection routine */
|
||||
uint32_t (*detect)(void);
|
||||
|
||||
/* Adjust CPU feature bits (run once per CPU) */
|
||||
void (*set_cpu_features)(struct cpuinfo_x86 *);
|
||||
|
||||
/* Platform setup (run once per boot) */
|
||||
void (*init_platform)(void);
|
||||
|
||||
@@ -53,15 +50,14 @@ extern const struct hypervisor_x86 *x86_hyper;
|
||||
/* Recognized hypervisors */
|
||||
extern const struct hypervisor_x86 x86_hyper_vmware;
|
||||
extern const struct hypervisor_x86 x86_hyper_ms_hyperv;
|
||||
extern const struct hypervisor_x86 x86_hyper_xen;
|
||||
extern const struct hypervisor_x86 x86_hyper_xen_pv;
|
||||
extern const struct hypervisor_x86 x86_hyper_xen_hvm;
|
||||
extern const struct hypervisor_x86 x86_hyper_kvm;
|
||||
|
||||
extern void init_hypervisor(struct cpuinfo_x86 *c);
|
||||
extern void init_hypervisor_platform(void);
|
||||
extern bool hypervisor_x2apic_available(void);
|
||||
extern void hypervisor_pin_vcpu(int cpu);
|
||||
#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 */
|
||||
|
@@ -20,4 +20,15 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
|
||||
/* No need for a barrier -- XCHG is a barrier on x86. */
|
||||
#define xchg_xen_ulong(ptr, val) xchg((ptr), (val))
|
||||
|
||||
extern int xen_have_vector_callback;
|
||||
|
||||
/*
|
||||
* Events delivered via platform PCI interrupts are always
|
||||
* routed to vcpu 0 and hence cannot be rebound.
|
||||
*/
|
||||
static inline bool xen_support_evtchn_rebind(void)
|
||||
{
|
||||
return (!xen_hvm_domain() || xen_have_vector_callback);
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_XEN_EVENTS_H */
|
||||
|
@@ -52,12 +52,30 @@ extern bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn);
|
||||
extern unsigned long __init set_phys_range_identity(unsigned long pfn_s,
|
||||
unsigned long pfn_e);
|
||||
|
||||
#ifdef CONFIG_XEN_PV
|
||||
extern int set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||
struct gnttab_map_grant_ref *kmap_ops,
|
||||
struct page **pages, unsigned int count);
|
||||
extern int clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
|
||||
struct gnttab_unmap_grant_ref *kunmap_ops,
|
||||
struct page **pages, unsigned int count);
|
||||
#else
|
||||
static inline int
|
||||
set_foreign_p2m_mapping(struct gnttab_map_grant_ref *map_ops,
|
||||
struct gnttab_map_grant_ref *kmap_ops,
|
||||
struct page **pages, unsigned int count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
clear_foreign_p2m_mapping(struct gnttab_unmap_grant_ref *unmap_ops,
|
||||
struct gnttab_unmap_grant_ref *kunmap_ops,
|
||||
struct page **pages, unsigned int count)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Helper functions to write or read unsigned long values to/from
|
||||
@@ -73,6 +91,7 @@ static inline int xen_safe_read_ulong(unsigned long *addr, unsigned long *val)
|
||||
return __get_user(*val, (unsigned long __user *)addr);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XEN_PV
|
||||
/*
|
||||
* When to use pfn_to_mfn(), __pfn_to_mfn() or get_phys_to_machine():
|
||||
* - pfn_to_mfn() returns either INVALID_P2M_ENTRY or the mfn. No indicator
|
||||
@@ -99,6 +118,12 @@ static inline unsigned long __pfn_to_mfn(unsigned long pfn)
|
||||
|
||||
return mfn;
|
||||
}
|
||||
#else
|
||||
static inline unsigned long __pfn_to_mfn(unsigned long pfn)
|
||||
{
|
||||
return pfn;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline unsigned long pfn_to_mfn(unsigned long pfn)
|
||||
{
|
||||
|
Reference in New Issue
Block a user