2018-03-25 04:22:03

by Wanpeng Li

[permalink] [raw]
Subject: [PATCH 2/2] KVM: X86: Fix disable pv tlb flush when steal time is enabled

From: Wanpeng Li <[email protected]>

PV TLB FLUSH can be turned on when steal time is enabled. The condition
reverse when the patch is sent out for several rounds review by mistake.
This patch fixes it.

Cc: Paolo Bonzini <[email protected]>
Cc: Radim Krčmář <[email protected]>
Signed-off-by: Wanpeng Li <[email protected]>
---
arch/x86/kernel/kvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c
index 31ac585..4f859cc 100644
--- a/arch/x86/kernel/kvm.c
+++ b/arch/x86/kernel/kvm.c
@@ -555,7 +555,7 @@ static void __init kvm_guest_init(void)

if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
!kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
- !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
+ kvm_para_has_feature(KVM_FEATURE_STEAL_TIME))
pv_mmu_ops.flush_tlb_others = kvm_flush_tlb_others;

if (kvm_para_has_feature(KVM_FEATURE_PV_EOI))
@@ -651,7 +651,7 @@ static __init int kvm_setup_pv_tlb_flush(void)

if (kvm_para_has_feature(KVM_FEATURE_PV_TLB_FLUSH) &&
!kvm_para_has_hint(KVM_HINTS_DEDICATED) &&
- !kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
+ kvm_para_has_feature(KVM_FEATURE_STEAL_TIME)) {
for_each_possible_cpu(cpu) {
zalloc_cpumask_var_node(per_cpu_ptr(&__pv_tlb_mask, cpu),
GFP_KERNEL, cpu_to_node(cpu));
--
2.7.4



2018-03-28 20:15:50

by Radim Krčmář

[permalink] [raw]
Subject: Re: [PATCH 2/2] KVM: X86: Fix disable pv tlb flush when steal time is enabled

2018-03-24 21:18-0700, Wanpeng Li:
> From: Wanpeng Li <[email protected]>
>
> PV TLB FLUSH can be turned on when steal time is enabled. The condition
> reverse when the patch is sent out for several rounds review by mistake.

It was just one round and the m/l patch actually looks correct,

> This patch fixes it.
>
> Cc: Paolo Bonzini <[email protected]>
> Cc: Radim Krčmář <[email protected]>
> Signed-off-by: Wanpeng Li <[email protected]>
> ---

I've modified the commit message and rebased it for kvm/master, thanks.

2018-03-29 00:47:27

by Wanpeng Li

[permalink] [raw]
Subject: Re: [PATCH 2/2] KVM: X86: Fix disable pv tlb flush when steal time is enabled

2018-03-29 4:14 GMT+08:00 Radim Krčmář <[email protected]>:
> 2018-03-24 21:18-0700, Wanpeng Li:
>> From: Wanpeng Li <[email protected]>
>>
>> PV TLB FLUSH can be turned on when steal time is enabled. The condition
>> reverse when the patch is sent out for several rounds review by mistake.
>
> It was just one round and the m/l patch actually looks correct,
>
>> This patch fixes it.
>>
>> Cc: Paolo Bonzini <[email protected]>
>> Cc: Radim Krčmář <[email protected]>
>> Signed-off-by: Wanpeng Li <[email protected]>
>> ---
>
> I've modified the commit message and rebased it for kvm/master, thanks.

Thanks Radim. :)

Regards,
Wanpeng Li