* [PATCH for-4.11 0/2] x86: two small cleanup patches @ 2018-04-06 9:36 Wei Liu 2018-04-06 9:36 ` [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling Wei Liu 2018-04-06 9:36 ` [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus Wei Liu 0 siblings, 2 replies; 7+ messages in thread From: Wei Liu @ 2018-04-06 9:36 UTC (permalink / raw) To: Xen-devel; +Cc: Juergen Gross, Andrew Cooper, Wei Liu, Jan Beulich Wei Liu (2): x86/cpu: get more information out from *_init_levelling x86: remove unused parameter from smp_prepare_cpus xen/arch/x86/cpu/amd.c | 9 +++++---- xen/arch/x86/cpu/intel.c | 9 +++++---- xen/arch/x86/setup.c | 2 +- xen/arch/x86/smpboot.c | 2 +- xen/include/xen/smp.h | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling 2018-04-06 9:36 [PATCH for-4.11 0/2] x86: two small cleanup patches Wei Liu @ 2018-04-06 9:36 ` Wei Liu 2018-04-06 9:40 ` Andrew Cooper 2018-04-06 9:36 ` [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus Wei Liu 1 sibling, 1 reply; 7+ messages in thread From: Wei Liu @ 2018-04-06 9:36 UTC (permalink / raw) To: Xen-devel; +Cc: Juergen Gross, Andrew Cooper, Wei Liu, Jan Beulich Signed-off-by: Wei Liu <wei.liu2@citrix.com> --- xen/arch/x86/cpu/amd.c | 9 +++++---- xen/arch/x86/cpu/intel.c | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/xen/arch/x86/cpu/amd.c b/xen/arch/x86/cpu/amd.c index fc9677f020..6e3d0ae2b0 100644 --- a/xen/arch/x86/cpu/amd.c +++ b/xen/arch/x86/cpu/amd.c @@ -265,7 +265,7 @@ static void __init noinline amd_init_levelling(void) const struct cpuidmask *m = NULL; if (probe_cpuid_faulting()) - return; + goto out; probe_masking_msrs(); @@ -341,6 +341,10 @@ static void __init noinline amd_init_levelling(void) cpuidmask_defaults._6c &= (~0ULL << 32) | ecx; } + if (levelling_caps) + ctxt_switch_masking = amd_ctxt_switch_masking; + +out: if (opt_cpu_info) { printk(XENLOG_INFO "Levelling caps: %#x\n", levelling_caps); printk(XENLOG_INFO @@ -354,9 +358,6 @@ static void __init noinline amd_init_levelling(void) (uint32_t)cpuidmask_defaults._7ab0, (uint32_t)cpuidmask_defaults._6c); } - - if (levelling_caps) - ctxt_switch_masking = amd_ctxt_switch_masking; } /* diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 9477965321..4be760788c 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -166,7 +166,7 @@ static void intel_ctxt_switch_masking(const struct vcpu *next) static void __init noinline intel_init_levelling(void) { if (probe_cpuid_faulting()) - return; + goto out; probe_masking_msrs(); @@ -207,6 +207,10 @@ static void __init noinline intel_init_levelling(void) cpuidmask_defaults.Da1 &= (~0ULL << 32) | eax; } + if (levelling_caps) + ctxt_switch_masking = intel_ctxt_switch_masking; + +out: if (opt_cpu_info) { printk(XENLOG_INFO "Levelling caps: %#x\n", levelling_caps); @@ -220,9 +224,6 @@ static void __init noinline intel_init_levelling(void) (uint32_t)cpuidmask_defaults.e1cd, (uint32_t)cpuidmask_defaults.Da1); } - - if (levelling_caps) - ctxt_switch_masking = intel_ctxt_switch_masking; } static void early_init_intel(struct cpuinfo_x86 *c) -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling 2018-04-06 9:36 ` [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling Wei Liu @ 2018-04-06 9:40 ` Andrew Cooper 2018-04-06 9:43 ` Wei Liu 0 siblings, 1 reply; 7+ messages in thread From: Andrew Cooper @ 2018-04-06 9:40 UTC (permalink / raw) To: Wei Liu, Xen-devel; +Cc: Juergen Gross, Jan Beulich On 06/04/18 10:36, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.liu2@citrix.com> For what purpose? This is very deliberate that, if faulting is available, levelling never gets touched. Levelling, as a mechanism, is strictly inferior to faulting. On Intel, the sets of hardware with levelling and faulting are disjoint. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling 2018-04-06 9:40 ` Andrew Cooper @ 2018-04-06 9:43 ` Wei Liu 0 siblings, 0 replies; 7+ messages in thread From: Wei Liu @ 2018-04-06 9:43 UTC (permalink / raw) To: Andrew Cooper; +Cc: Juergen Gross, Xen-devel, Wei Liu, Jan Beulich On Fri, Apr 06, 2018 at 10:40:23AM +0100, Andrew Cooper wrote: > On 06/04/18 10:36, Wei Liu wrote: > > Signed-off-by: Wei Liu <wei.liu2@citrix.com> > > For what purpose? This is very deliberate that, if faulting is > available, levelling never gets touched. > > Levelling, as a mechanism, is strictly inferior to faulting. On Intel, > the sets of hardware with levelling and faulting are disjoint. > AFAICT levelling_caps is changed by probe_cpuid_faulting. That's what I'm getting at. Wei. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus 2018-04-06 9:36 [PATCH for-4.11 0/2] x86: two small cleanup patches Wei Liu 2018-04-06 9:36 ` [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling Wei Liu @ 2018-04-06 9:36 ` Wei Liu 2018-04-06 9:40 ` Andrew Cooper 1 sibling, 1 reply; 7+ messages in thread From: Wei Liu @ 2018-04-06 9:36 UTC (permalink / raw) To: Xen-devel; +Cc: Juergen Gross, Andrew Cooper, Wei Liu, Jan Beulich Signed-off-by: Wei Liu <wei.liu2@citrix.com> --- xen/arch/x86/setup.c | 2 +- xen/arch/x86/smpboot.c | 2 +- xen/include/xen/smp.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index c0b97a748a..49cf963d7a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1576,7 +1576,7 @@ void __init noreturn __start_xen(unsigned long mbi_p) iommu_setup(); /* setup iommu if available */ - smp_prepare_cpus(max_cpus); + smp_prepare_cpus(); spin_debug_enable(); diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 98873df429..5daa7936aa 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -1030,7 +1030,7 @@ static struct notifier_block cpu_smpboot_nfb = { .notifier_call = cpu_smpboot_callback }; -void __init smp_prepare_cpus(unsigned int max_cpus) +void __init smp_prepare_cpus(void) { int rc; diff --git a/xen/include/xen/smp.h b/xen/include/xen/smp.h index c55f57f09e..a64c9b3882 100644 --- a/xen/include/xen/smp.h +++ b/xen/include/xen/smp.h @@ -17,7 +17,7 @@ extern void smp_send_state_dump(unsigned int cpu); /* * Prepare machine for booting other CPUs. */ -extern void smp_prepare_cpus(unsigned int max_cpus); +extern void smp_prepare_cpus(void); /* * Final polishing of CPUs -- 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus 2018-04-06 9:36 ` [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus Wei Liu @ 2018-04-06 9:40 ` Andrew Cooper 2018-04-06 16:49 ` Juergen Gross 0 siblings, 1 reply; 7+ messages in thread From: Andrew Cooper @ 2018-04-06 9:40 UTC (permalink / raw) To: Wei Liu, Xen-devel; +Cc: Juergen Gross, Jan Beulich On 06/04/18 10:36, Wei Liu wrote: > Signed-off-by: Wei Liu <wei.liu2@citrix.com> Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus 2018-04-06 9:40 ` Andrew Cooper @ 2018-04-06 16:49 ` Juergen Gross 0 siblings, 0 replies; 7+ messages in thread From: Juergen Gross @ 2018-04-06 16:49 UTC (permalink / raw) To: Andrew Cooper, Wei Liu, Xen-devel; +Cc: Jan Beulich On 06/04/18 11:40, Andrew Cooper wrote: > On 06/04/18 10:36, Wei Liu wrote: >> Signed-off-by: Wei Liu <wei.liu2@citrix.com> > > Acked-by: Andrew Cooper <andrew.cooper3@citrix.com> > Release-acked-by: Juergen Gross <jgross@suse.com> Juergen _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-04-06 16:49 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-04-06 9:36 [PATCH for-4.11 0/2] x86: two small cleanup patches Wei Liu 2018-04-06 9:36 ` [PATCH for-4.11 1/2] x86/cpu: get more information out from *_init_levelling Wei Liu 2018-04-06 9:40 ` Andrew Cooper 2018-04-06 9:43 ` Wei Liu 2018-04-06 9:36 ` [PATCH for-4.11 2/2] x86: remove unused parameter from smp_prepare_cpus Wei Liu 2018-04-06 9:40 ` Andrew Cooper 2018-04-06 16:49 ` Juergen Gross
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.