Re: [PATCH 01/10] KVM: VMX: Use vpid_sync_context() directly when possible

From: Paolo Bonzini
Date: Fri Feb 21 2020 - 12:26:09 EST


On 21/02/20 16:36, Sean Christopherson wrote:
>>> vmx->nested.last_vpid = vmcs12->virtual_processor_id;
>>> - __vmx_flush_tlb(vcpu, nested_get_vpid02(vcpu), false);
>>> + vpid_sync_context(nested_get_vpid02(vcpu));
>>> }
>>> } else {
>>> /*
>>> @@ -5154,17 +5154,17 @@ static int handle_invvpid(struct kvm_vcpu *vcpu)
>>> __invvpid(VMX_VPID_EXTENT_INDIVIDUAL_ADDR,
>>> vpid02, operand.gla);
>>> } else
>>> - __vmx_flush_tlb(vcpu, vpid02, false);
>>> + vpid_sync_context(vpid02);
>> This is a pre-existing condition but coding style requires braces even
>> for single statements when they were used in another branch.
> I'll fix this in v2.
>

Can also remove the braces from the "then" branch.

Paolo