[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.7] x86/levelling: Pass a vcpu rather than a domain to ctxt_switch_levelling()
commit b80d7eb860f6ed4387b18fa887a225c73a67da4f Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Sep 6 11:41:33 2016 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Sep 6 11:41:33 2016 +0200 x86/levelling: Pass a vcpu rather than a domain to ctxt_switch_levelling() A subsequent change needs to special-case OSXSAVE handling, which is per-vcpu rather than per-domain. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> master commit: 33b23e5ab319a6bf9bfd38c4d9268fa6d9d072c6 master date: 2016-09-01 11:41:05 +0100 --- xen/arch/x86/cpu/amd.c | 3 ++- xen/arch/x86/cpu/common.c | 4 ++-- xen/arch/x86/cpu/intel.c | 3 ++- xen/arch/x86/domain.c | 2 +- xen/include/asm-x86/processor.h | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index d5afc3e..03d9b76 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -203,9 +203,10 @@ static void __init noinline probe_masking_msrs(void) * used to context switch to the default host state (by the cpu bringup-code, * crash path, etc). */ -static void amd_ctxt_switch_levelling(const struct domain *nextd) +static void amd_ctxt_switch_levelling(const struct vcpu *next) { struct cpuidmasks *these_masks = &this_cpu(cpuidmasks); + const struct domain *nextd = next ? next->domain : NULL; const struct cpuidmasks *masks = (nextd && is_pv_domain(nextd) && nextd->arch.pv_domain.cpuidmasks) ? nextd->arch.pv_domain.cpuidmasks : &cpuidmask_defaults; diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index 760543b..e8698d7 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -90,11 +90,11 @@ static const struct cpu_dev default_cpu = { }; static const struct cpu_dev *this_cpu = &default_cpu; -static void default_ctxt_switch_levelling(const struct domain *nextd) +static void default_ctxt_switch_levelling(const struct vcpu *next) { /* Nop */ } -void (* __read_mostly ctxt_switch_levelling)(const struct domain *nextd) = +void (* __read_mostly ctxt_switch_levelling)(const struct vcpu *next) = default_ctxt_switch_levelling; bool_t opt_cpu_info; diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index fe4736e..3491638 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -151,9 +151,10 @@ static void __init probe_masking_msrs(void) * used to context switch to the default host state (by the cpu bringup-code, * crash path, etc). */ -static void intel_ctxt_switch_levelling(const struct domain *nextd) +static void intel_ctxt_switch_levelling(const struct vcpu *next) { struct cpuidmasks *these_masks = &this_cpu(cpuidmasks); + const struct domain *nextd = next ? next->domain : NULL; const struct cpuidmasks *masks; if (cpu_has_cpuid_faulting) { diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index f2d7f47..ec67877 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -2107,7 +2107,7 @@ void context_switch(struct vcpu *prev, struct vcpu *next) load_segments(next); } - ctxt_switch_levelling(nextd); + ctxt_switch_levelling(next); } context_saved(prev); diff --git a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h index ddaaf2de..ccd406a 100644 --- a/xen/include/asm-x86/processor.h +++ b/xen/include/asm-x86/processor.h @@ -211,7 +211,7 @@ extern struct cpuinfo_x86 boot_cpu_data; extern struct cpuinfo_x86 cpu_data[]; #define current_cpu_data cpu_data[smp_processor_id()] -extern void (*ctxt_switch_levelling)(const struct domain *nextd); +extern void (*ctxt_switch_levelling)(const struct vcpu *next); extern u64 host_pat; extern bool_t opt_cpu_info; -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.7 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |