Skip to content

Commit

Permalink
Changes representative of linux-4.18.0-425.19.2.el8_7.tar.xz
Browse files Browse the repository at this point in the history
  • Loading branch information
da-x committed Mar 16, 2023
1 parent 8bc1dfa commit 7ed0a79
Show file tree
Hide file tree
Showing 76 changed files with 2,543 additions and 1,293 deletions.
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 7
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 425.13.1
RHEL_RELEASE = 425.19.2

#
# ZSTREAM
Expand Down
5 changes: 3 additions & 2 deletions arch/s390/kernel/machine_kexec_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ static int kexec_file_add_ipl_report(struct kimage *image,

data->memsz = ALIGN(data->memsz, PAGE_SIZE);
buf.mem = data->memsz;
if (image->type == KEXEC_TYPE_CRASH)
buf.mem += crashk_res.start;

ptr = (void *)ipl_cert_list_addr;
end = ptr + ipl_cert_list_size;
Expand Down Expand Up @@ -217,6 +215,9 @@ static int kexec_file_add_ipl_report(struct kimage *image,
data->kernel_buf + offsetof(struct lowcore, ipl_parmblock_ptr);
*lc_ipl_parmblock_ptr = (__u32)buf.mem;

if (image->type == KEXEC_TYPE_CRASH)
buf.mem += crashk_res.start;

ret = kexec_add_buffer(&buf);
out:
return ret;
Expand Down
12 changes: 4 additions & 8 deletions arch/x86/include/asm/kvm_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ typedef enum exit_fastpath_completion fastpath_t;

struct x86_emulate_ctxt;
struct x86_exception;
union kvm_smram;
enum x86_intercept;
enum x86_intercept_stage;

Expand Down Expand Up @@ -1468,8 +1469,8 @@ struct kvm_x86_ops {
void (*setup_mce)(struct kvm_vcpu *vcpu);

int (*smi_allowed)(struct kvm_vcpu *vcpu, bool for_injection);
int (*enter_smm)(struct kvm_vcpu *vcpu, char *smstate);
int (*leave_smm)(struct kvm_vcpu *vcpu, const char *smstate);
int (*enter_smm)(struct kvm_vcpu *vcpu, union kvm_smram *smram);
int (*leave_smm)(struct kvm_vcpu *vcpu, const union kvm_smram *smram);
void (*enable_smi_window)(struct kvm_vcpu *vcpu);

int (*mem_enc_ioctl)(struct kvm *kvm, void __user *argp);
Expand Down Expand Up @@ -1717,6 +1718,7 @@ int kvm_emulate_ap_reset_hold(struct kvm_vcpu *vcpu);
int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu);

void kvm_get_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg);
void kvm_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg);
int kvm_load_segment_descriptor(struct kvm_vcpu *vcpu, u16 selector, int seg);
void kvm_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector);

Expand Down Expand Up @@ -1961,12 +1963,6 @@ static inline int kvm_cpu_get_apicid(int mps_cpu)
#endif
}

#define put_smstate(type, buf, offset, val) \
*(type *)((buf) + (offset) - 0x7e00) = val

#define GET_SMSTATE(type, buf, offset) \
(*(type *)((buf) + (offset) - 0x7e00))

int kvm_cpu_dirty_log_size(void);

int memslot_rmap_alloc(struct kvm_memory_slot *slot, unsigned long npages);
Expand Down
10 changes: 9 additions & 1 deletion arch/x86/kernel/cpu/intel_epb.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,15 @@ static __init int intel_epb_init(void)
return 0;

err_out_online:
cpuhp_remove_state(CPUHP_AP_X86_INTEL_EPB_ONLINE);
/*
* RHEL: CPUHP_AP_X86_INTEL_EPB_ONLINE is defined as CPUHP_AP_ONLINE_DYN
* which is a shared state. CPUHP_AP_ONLINE_DYN cannot be removed as
* all entries will be executed. This could cause a problem with
* CPU hotplug is some cases where EPB was not enabled properly, however,
* the case where CPU hotplug is used along with EPB in production
* environments are few and far between.
*/
/* cpuhp_remove_state(CPUHP_AP_X86_INTEL_EPB_ONLINE); */
return ret;
}
subsys_initcall(intel_epb_init);
8 changes: 0 additions & 8 deletions arch/x86/kernel/fpu/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,6 @@ static void __init fpu__init_system_xstate_size_legacy(void)
fpstate_reset(&current->thread.fpu);
}

static void __init fpu__init_init_fpstate(void)
{
/* Bring init_fpstate size and features up to date */
init_fpstate.size = fpu_kernel_cfg.max_size;
init_fpstate.xfeatures = fpu_kernel_cfg.max_features;
}

/*
* Called on the boot CPU once per system bootup, to set up the initial
* FPU state that is later cloned into all processes:
Expand All @@ -236,5 +229,4 @@ void __init fpu__init_system(struct cpuinfo_x86 *c)
fpu__init_system_xstate_size_legacy();
fpu__init_system_xstate(fpu_kernel_cfg.max_size);
fpu__init_task_struct_size();
fpu__init_init_fpstate();
}
44 changes: 24 additions & 20 deletions arch/x86/kernel/fpu/xstate.c
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ static void __init setup_init_fpu_buf(void)

print_xstate_features();

xstate_init_xcomp_bv(&init_fpstate.regs.xsave, fpu_kernel_cfg.max_features);
xstate_init_xcomp_bv(&init_fpstate.regs.xsave, init_fpstate.xfeatures);

/*
* Init all the features state with header.xfeatures being 0x0
Expand Down Expand Up @@ -669,20 +669,6 @@ static unsigned int __init get_xsave_size_user(void)
return ebx;
}

/*
* Will the runtime-enumerated 'xstate_size' fit in the init
* task's statically-allocated buffer?
*/
static bool __init is_supported_xstate_size(unsigned int test_xstate_size)
{
if (test_xstate_size <= sizeof(init_fpstate.regs))
return true;

pr_warn("x86/fpu: xstate buffer too small (%zu < %d), disabling xsave\n",
sizeof(init_fpstate.regs), test_xstate_size);
return false;
}

static int __init init_xstate_size(void)
{
/* Recompute the context size for enabled features: */
Expand All @@ -707,10 +693,6 @@ static int __init init_xstate_size(void)
kernel_default_size =
xstate_calculate_size(fpu_kernel_cfg.default_features, compacted);

/* Ensure we have the space to store all default enabled features. */
if (!is_supported_xstate_size(kernel_default_size))
return -EINVAL;

if (!paranoid_xstate_size_valid(kernel_size))
return -EINVAL;

Expand Down Expand Up @@ -857,6 +839,19 @@ void __init fpu__init_system_xstate(unsigned int legacy_size)
update_regset_xstate_info(fpu_user_cfg.max_size,
fpu_user_cfg.max_features);

/*
* init_fpstate excludes dynamic states as they are large but init
* state is zero.
*/
init_fpstate.size = fpu_kernel_cfg.default_size;
init_fpstate.xfeatures = fpu_kernel_cfg.default_features;

if (init_fpstate.size > sizeof(init_fpstate.regs)) {
pr_warn("x86/fpu: init_fpstate buffer too small (%zu < %d), disabling XSAVE\n",
sizeof(init_fpstate.regs), init_fpstate.size);
goto out_disable;
}

setup_init_fpu_buf();

/*
Expand Down Expand Up @@ -1142,6 +1137,15 @@ void __copy_xstate_to_uabi_buf(struct membuf to, struct fpstate *fpstate,
*/
mask = fpstate->user_xfeatures;

/*
* Dynamic features are not present in init_fpstate. When they are
* in an all zeros init state, remove those from 'mask' to zero
* those features in the user buffer instead of retrieving them
* from init_fpstate.
*/
if (fpu_state_size_dynamic())
mask &= (header.xfeatures | xinit->header.xcomp_bv);

for_each_extended_xfeature(i, mask) {
/*
* If there was a feature or alignment gap, zero the space
Expand Down Expand Up @@ -1585,7 +1589,7 @@ static int __xstate_request_perm(u64 permitted, u64 requested, bool guest)

perm = guest ? &fpu->guest_perm : &fpu->perm;
/* Pairs with the READ_ONCE() in xstate_get_group_perm() */
WRITE_ONCE(perm->__state_perm, requested);
WRITE_ONCE(perm->__state_perm, mask);
/* Protected by sighand lock */
perm->__state_size = ksize;
perm->__user_state_size = usize;
Expand Down
1 change: 1 addition & 0 deletions arch/x86/kvm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ endif

kvm-$(CONFIG_X86_64) += mmu/tdp_iter.o mmu/tdp_mmu.o
kvm-$(CONFIG_KVM_XEN) += xen.o
kvm-y += smm.o

kvm-intel-y += vmx/vmx.o vmx/vmenter.o vmx/pmu_intel.o vmx/vmcs12.o \
vmx/evmcs.o vmx/nested.o vmx/posted_intr.o
Expand Down
Loading

0 comments on commit 7ed0a79

Please sign in to comment.