Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 mm updates from Ingo Molnar: "The main x86 MM changes in this cycle were: - continued native kernel PCID support preparation patches to the TLB flushing code (Andy Lutomirski) - various fixes related to 32-bit compat syscall returning address over 4Gb in applications, launched from 64-bit binaries - motivated by C/R frameworks such as Virtuozzo. (Dmitry Safonov) - continued Intel 5-level paging enablement: in particular the conversion of x86 GUP to the generic GUP code. (Kirill A. Shutemov) - x86/mpx ABI corner case fixes/enhancements (Joerg Roedel) - ... plus misc updates, fixes and cleanups" * 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (62 commits) mm, zone_device: Replace {get, put}_zone_device_page() with a single reference to fix pmem crash x86/mm: Fix flush_tlb_page() on Xen x86/mm: Make flush_tlb_mm_range() more predictable x86/mm: Remove flush_tlb() and flush_tlb_current_task() x86/vm86/32: Switch to flush_tlb_mm_range() in mark_screen_rdonly() x86/mm/64: Fix crash in remove_pagetable() Revert "x86/mm/gup: Switch GUP to the generic get_user_page_fast() implementation" x86/boot/e820: Remove a redundant self assignment x86/mm: Fix dump pagetables for 4 levels of page tables x86/mpx, selftests: Only check bounds-vs-shadow when we keep shadow x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space Revert "x86/mm/numa: Remove numa_nodemask_from_meminfo()" x86/espfix: Add support for 5-level paging x86/kasan: Extend KASAN to support 5-level paging x86/mm: Add basic defines/helpers for CONFIG_X86_5LEVEL=y x86/paravirt: Add 5-level support to the paravirt code x86/mm: Define virtual memory map for 5-level paging x86/asm: Remove __VIRTUAL_MASK_SHIFT==47 assert x86/boot: Detect 5-level paging support x86/mm/numa: Remove numa_nodemask_from_meminfo() ...
This commit is contained in:
@@ -935,7 +935,6 @@ static DEFINE_PER_CPU(struct vmcs *, current_vmcs);
|
||||
* when a CPU is brought down, and we need to VMCLEAR all VMCSs loaded on it.
|
||||
*/
|
||||
static DEFINE_PER_CPU(struct list_head, loaded_vmcss_on_cpu);
|
||||
static DEFINE_PER_CPU(struct desc_ptr, host_gdt);
|
||||
|
||||
/*
|
||||
* We maintian a per-CPU linked-list of vCPU, so in wakeup_handler() we
|
||||
@@ -2057,14 +2056,13 @@ static bool update_transition_efer(struct vcpu_vmx *vmx, int efer_offset)
|
||||
*/
|
||||
static unsigned long segment_base(u16 selector)
|
||||
{
|
||||
struct desc_ptr *gdt = this_cpu_ptr(&host_gdt);
|
||||
struct desc_struct *table;
|
||||
unsigned long v;
|
||||
|
||||
if (!(selector & ~SEGMENT_RPL_MASK))
|
||||
return 0;
|
||||
|
||||
table = (struct desc_struct *)gdt->address;
|
||||
table = get_current_gdt_ro();
|
||||
|
||||
if ((selector & SEGMENT_TI_MASK) == SEGMENT_LDT) {
|
||||
u16 ldt_selector = kvm_read_ldt();
|
||||
@@ -2169,7 +2167,7 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx)
|
||||
#endif
|
||||
if (vmx->host_state.msr_host_bndcfgs)
|
||||
wrmsrl(MSR_IA32_BNDCFGS, vmx->host_state.msr_host_bndcfgs);
|
||||
load_gdt(this_cpu_ptr(&host_gdt));
|
||||
load_fixmap_gdt(raw_smp_processor_id());
|
||||
}
|
||||
|
||||
static void vmx_load_host_state(struct vcpu_vmx *vmx)
|
||||
@@ -2271,7 +2269,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
||||
}
|
||||
|
||||
if (!already_loaded) {
|
||||
struct desc_ptr *gdt = this_cpu_ptr(&host_gdt);
|
||||
void *gdt = get_current_gdt_ro();
|
||||
unsigned long sysenter_esp;
|
||||
|
||||
kvm_make_request(KVM_REQ_TLB_FLUSH, vcpu);
|
||||
@@ -2282,7 +2280,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
|
||||
*/
|
||||
vmcs_writel(HOST_TR_BASE,
|
||||
(unsigned long)this_cpu_ptr(&cpu_tss));
|
||||
vmcs_writel(HOST_GDTR_BASE, gdt->address);
|
||||
vmcs_writel(HOST_GDTR_BASE, (unsigned long)gdt); /* 22.2.4 */
|
||||
|
||||
/*
|
||||
* VM exits change the host TR limit to 0x67 after a VM
|
||||
@@ -3471,8 +3469,6 @@ static int hardware_enable(void)
|
||||
ept_sync_global();
|
||||
}
|
||||
|
||||
native_store_gdt(this_cpu_ptr(&host_gdt));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user