Merge tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross: "Xen features and fixes for v4.15-rc1 Apart from several small fixes it contains the following features: - a series by Joao Martins to add vdso support of the pv clock interface - a series by Juergen Gross to add support for Xen pv guests to be able to run on 5 level paging hosts - a series by Stefano Stabellini adding the Xen pvcalls frontend driver using a paravirtualized socket interface" * tag 'for-linus-4.15-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (34 commits) xen/pvcalls: fix potential endless loop in pvcalls-front.c xen/pvcalls: Add MODULE_LICENSE() MAINTAINERS: xen, kvm: track pvclock-abi.h changes x86/xen/time: setup vcpu 0 time info page x86/xen/time: set pvclock flags on xen_time_init() x86/pvclock: add setter for pvclock_pvti_cpu0_va ptp_kvm: probe for kvm guest availability xen/privcmd: remove unused variable pageidx xen: select grant interface version xen: update arch/x86/include/asm/xen/cpuid.h xen: add grant interface version dependent constants to gnttab_ops xen: limit grant v2 interface to the v1 functionality xen: re-introduce support for grant v2 interface xen: support priv-mapping in an HVM tools domain xen/pvcalls: remove redundant check for irq >= 0 xen/pvcalls: fix unsigned less than zero error check xen/time: Return -ENODEV from xen_get_wallclock() xen/pvcalls-front: mark expected switch fall-through xen: xenbus_probe_frontend: mark expected switch fall-throughs xen/time: do not decrease steal time after live migration on xen ...
This commit is contained in:
@@ -74,21 +74,43 @@
|
||||
#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0)
|
||||
|
||||
/*
|
||||
* Leaf 5 (0x40000x04)
|
||||
* HVM-specific features
|
||||
* EAX: Features
|
||||
* EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag)
|
||||
* Leaf 4 (0x40000x03)
|
||||
* Sub-leaf 0: EAX: bit 0: emulated tsc
|
||||
* bit 1: host tsc is known to be reliable
|
||||
* bit 2: RDTSCP instruction available
|
||||
* EBX: tsc_mode: 0=default (emulate if necessary), 1=emulate,
|
||||
* 2=no emulation, 3=no emulation + TSC_AUX support
|
||||
* ECX: guest tsc frequency in kHz
|
||||
* EDX: guest tsc incarnation (migration count)
|
||||
* Sub-leaf 1: EAX: tsc offset low part
|
||||
* EBX: tsc offset high part
|
||||
* ECX: multiplicator for tsc->ns conversion
|
||||
* EDX: shift amount for tsc->ns conversion
|
||||
* Sub-leaf 2: EAX: host tsc frequency in kHz
|
||||
*/
|
||||
|
||||
/* Virtualized APIC registers */
|
||||
#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0)
|
||||
/* Virtualized x2APIC accesses */
|
||||
#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1)
|
||||
/*
|
||||
* Leaf 5 (0x40000x04)
|
||||
* HVM-specific features
|
||||
* Sub-leaf 0: EAX: Features
|
||||
* Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag)
|
||||
*/
|
||||
#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */
|
||||
#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */
|
||||
/* Memory mapped from other domains has valid IOMMU entries */
|
||||
#define XEN_HVM_CPUID_IOMMU_MAPPINGS (1u << 2)
|
||||
/* vcpu id is present in EBX */
|
||||
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3)
|
||||
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */
|
||||
|
||||
#define XEN_CPUID_MAX_NUM_LEAVES 4
|
||||
/*
|
||||
* Leaf 6 (0x40000x05)
|
||||
* PV-specific parameters
|
||||
* Sub-leaf 0: EAX: max available sub-leaf
|
||||
* Sub-leaf 0: EBX: bits 0-7: max machine address width
|
||||
*/
|
||||
|
||||
/* Max. address width in bits taking memory hotplug into account. */
|
||||
#define XEN_CPUID_MACHINE_ADDRESS_WIDTH_MASK (0xffu << 0)
|
||||
|
||||
#define XEN_CPUID_MAX_NUM_LEAVES 5
|
||||
|
||||
#endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */
|
||||
|
@@ -27,6 +27,15 @@ typedef struct xpaddr {
|
||||
phys_addr_t paddr;
|
||||
} xpaddr_t;
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
#define XEN_PHYSICAL_MASK __sme_clr((1UL << 52) - 1)
|
||||
#else
|
||||
#define XEN_PHYSICAL_MASK __PHYSICAL_MASK
|
||||
#endif
|
||||
|
||||
#define XEN_PTE_MFN_MASK ((pteval_t)(((signed long)PAGE_MASK) & \
|
||||
XEN_PHYSICAL_MASK))
|
||||
|
||||
#define XMADDR(x) ((xmaddr_t) { .maddr = (x) })
|
||||
#define XPADDR(x) ((xpaddr_t) { .paddr = (x) })
|
||||
|
||||
@@ -278,7 +287,7 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn)
|
||||
|
||||
static inline unsigned long pte_mfn(pte_t pte)
|
||||
{
|
||||
return (pte.pte & PTE_PFN_MASK) >> PAGE_SHIFT;
|
||||
return (pte.pte & XEN_PTE_MFN_MASK) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static inline pte_t mfn_pte(unsigned long page_nr, pgprot_t pgprot)
|
||||
|
Reference in New Issue
Block a user