search for: kvm_flush_tlb_others

Displaying 20 results from an estimated 22 matches for "kvm_flush_tlb_others".

2019 May 27
3
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...like the below would work for KVM I suspect, the others (Hyper-V and Xen are more 'interesting'). --- --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(voi static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); -static void kvm_flush_tlb_others(const struct cpumask *cpumask, +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, const struct flush_tlb_info *info) { u8 state; @@ -594,6 +594,9 @@ static void kvm_flush_tlb_others(const s * queue flush_on_enter for pre-empted vCPUs */ for_each_cpu(cpu, flushmask) { +...
2019 May 27
3
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...like the below would work for KVM I suspect, the others (Hyper-V and Xen are more 'interesting'). --- --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(voi static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); -static void kvm_flush_tlb_others(const struct cpumask *cpumask, +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, const struct flush_tlb_info *info) { u8 state; @@ -594,6 +594,9 @@ static void kvm_flush_tlb_others(const s * queue flush_on_enter for pre-empted vCPUs */ for_each_cpu(cpu, flushmask) { +...
2019 May 27
0
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...others > (Hyper-V and Xen are more 'interesting'). > > --- > --- a/arch/x86/kernel/kvm.c > +++ b/arch/x86/kernel/kvm.c > @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(voi > > static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); > > -static void kvm_flush_tlb_others(const struct cpumask *cpumask, > +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, > const struct flush_tlb_info *info) > { > u8 state; > @@ -594,6 +594,9 @@ static void kvm_flush_tlb_others(const s > * queue flush_on_enter for pre-empted vCPUs > */ &...
2019 May 27
1
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...On 27/05/19 11:47, Peter Zijlstra wrote: > > --- a/arch/x86/kernel/kvm.c > > +++ b/arch/x86/kernel/kvm.c > > @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(voi > > > > static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); > > > > -static void kvm_flush_tlb_others(const struct cpumask *cpumask, > > +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, > > const struct flush_tlb_info *info) > > { > > u8 state; > > @@ -594,6 +594,9 @@ static void kvm_flush_tlb_others(const s > > * queue flush_on_enter for...
2019 May 25
3
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 3f0cc828cc36..c1c2b88ea3f1 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -643,6 +643,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 5492a669f658..1314f89304a8 100644 --- a/arch/x86/kernel/parav...
2019 May 25
3
[RFC PATCH 5/6] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 3f0cc828cc36..c1c2b88ea3f1 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -643,6 +643,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 5492a669f658..1314f89304a8 100644 --- a/arch/x86/kernel/parav...
2019 Jul 19
0
[PATCH v3 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...us, info), diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index b7f34fe2171e..de40657d9025 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -595,7 +595,7 @@ static void __init kvm_apf_trap_init(void) static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); -static void kvm_flush_tlb_others(const struct cpumask *cpumask, +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, const struct flush_tlb_info *info) { u8 state; @@ -609,6 +609,11 @@ static void kvm_flush_tlb_others(const struct cpumask *cpumask, * queue flush_on_enter for pre-empted vCPUs */ for_each_c...
2019 Jul 02
0
[PATCH v2 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...us, info), diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 5169b8cc35bb..d00d551d4a2a 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -580,7 +580,7 @@ static void __init kvm_apf_trap_init(void) static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); -static void kvm_flush_tlb_others(const struct cpumask *cpumask, +static void kvm_flush_tlb_multi(const struct cpumask *cpumask, const struct flush_tlb_info *info) { u8 state; @@ -594,6 +594,11 @@ static void kvm_flush_tlb_others(const struct cpumask *cpumask, * queue flush_on_enter for pre-empted vCPUs */ for_each_c...
2019 Jul 02
2
[PATCH v2 0/9] x86: Concurrent TLB flushes
Currently, local and remote TLB flushes are not performed concurrently, which introduces unnecessary overhead - each INVLPG can take 100s of cycles. This patch-set allows TLB flushes to be run concurrently: first request the remote CPUs to initiate the flush, then run it locally, and finally wait for the remote CPUs to finish their work. In addition, there are various small optimizations to avoid
2019 Jul 19
5
[PATCH v3 0/9] x86: Concurrent TLB flushes
[ Cover-letter is identical to v2, including benchmark results, excluding the change log. ] Currently, local and remote TLB flushes are not performed concurrently, which introduces unnecessary overhead - each INVLPG can take 100s of cycles. This patch-set allows TLB flushes to be run concurrently: first request the remote CPUs to initiate the flush, then run it locally, and finally wait for
2019 Jun 13
4
[PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 5169b8cc35bb..00d81e898717 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -630,6 +630,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 98039d7fb998..ac00afed5570 100644 --- a/arch/x86/kernel/parav...
2019 Jun 13
4
[PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 5169b8cc35bb..00d81e898717 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -630,6 +630,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 98039d7fb998..ac00afed5570 100644 --- a/arch/x86/kernel/parav...
2020 Apr 08
2
[RFC PATCH 00/26] Runtime paravirt patching
...ch pv-ops based on that. So what, the paravirt spinlock stuff works just fine when you're not oversubscribed. > We keep an interesting subset of pv-ops (pv_lock_ops only for now, > but PV-TLB ops are also good candidates) The PV-TLB ops also work just fine when not oversubscribed. IIRC kvm_flush_tlb_others() is pretty much the same in that case. > in .parainstructions.runtime, > while discarding the .parainstructions as usual at init. This is then > used for switching back and forth between native and paravirt mode. > ([1] lists some representative numbers of the increased memory > fo...
2020 Apr 08
2
[RFC PATCH 00/26] Runtime paravirt patching
...ch pv-ops based on that. So what, the paravirt spinlock stuff works just fine when you're not oversubscribed. > We keep an interesting subset of pv-ops (pv_lock_ops only for now, > but PV-TLB ops are also good candidates) The PV-TLB ops also work just fine when not oversubscribed. IIRC kvm_flush_tlb_others() is pretty much the same in that case. > in .parainstructions.runtime, > while discarding the .parainstructions as usual at init. This is then > used for switching back and forth between native and paravirt mode. > ([1] lists some representative numbers of the increased memory > fo...
2018 Aug 10
0
[PATCH 04/10] x86/paravirt: use a single ops structure
..._ops.steal_clock = kvm_steal_clock; + pv_ops.pv_time_ops.steal_clock = kvm_steal_clock; } if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) && !kvm_para_has_hint(KVM_HINTS_REALTIME) && kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) - pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others; + pv_ops.pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others; if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) apic_set_eoi_write(kvm_guest_apic_eoi_write); @@ -749,13 +749,15 @@ void __init kvm_spinlock_init(void) return; __pv_init_lock_hash(); - pv_lock_ops.queued_spin_lock_slowpath =...
2019 Jun 25
0
[PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
....c b/arch/x86/kernel/kvm.c > index 5169b8cc35bb..00d81e898717 100644 > --- a/arch/x86/kernel/kvm.c > +++ b/arch/x86/kernel/kvm.c > @@ -630,6 +630,7 @@ static void __init kvm_guest_init(void) > kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { > pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; > pv_ops.mmu.tlb_remove_table = tlb_remove_table; > + static_key_disable(&flush_tlb_multi_enabled.key); > } > > if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) > diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c > index 98039d7fb998..ac00afed5570...
2019 Jun 26
2
[PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...vm.c >> index 5169b8cc35bb..00d81e898717 100644 >> --- a/arch/x86/kernel/kvm.c >> +++ b/arch/x86/kernel/kvm.c >> @@ -630,6 +630,7 @@ static void __init kvm_guest_init(void) >> kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { >> pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; >> pv_ops.mmu.tlb_remove_table = tlb_remove_table; >> + static_key_disable(&flush_tlb_multi_enabled.key); >> } >> >> if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) >> diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c >> index 98...
2019 Jun 26
2
[PATCH 4/9] x86/mm/tlb: Flush remote and local TLBs concurrently
...vm.c >> index 5169b8cc35bb..00d81e898717 100644 >> --- a/arch/x86/kernel/kvm.c >> +++ b/arch/x86/kernel/kvm.c >> @@ -630,6 +630,7 @@ static void __init kvm_guest_init(void) >> kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { >> pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; >> pv_ops.mmu.tlb_remove_table = tlb_remove_table; >> + static_key_disable(&flush_tlb_multi_enabled.key); >> } >> >> if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) >> diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c >> index 98...
2019 May 31
2
[RFC PATCH v2 04/12] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 3f0cc828cc36..c1c2b88ea3f1 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -643,6 +643,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 5492a669f658..1314f89304a8 100644 --- a/arch/x86/kernel/parav...
2019 May 31
2
[RFC PATCH v2 04/12] x86/mm/tlb: Flush remote and local TLBs concurrently
...ff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 3f0cc828cc36..c1c2b88ea3f1 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -643,6 +643,7 @@ static void __init kvm_guest_init(void) kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) { pv_ops.mmu.flush_tlb_others = kvm_flush_tlb_others; pv_ops.mmu.tlb_remove_table = tlb_remove_table; + static_key_disable(&flush_tlb_multi_enabled.key); } if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index 5492a669f658..1314f89304a8 100644 --- a/arch/x86/kernel/parav...