On 11/11/19 16:00, Liran Alon wrote: > > >> On 11 Nov 2019, at 16:57, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: >> >> On 11/11/19 13:30, Liran Alon wrote: >>> No functional changes. >>> >>> Reviewed-by: Joao Martins <joao.m.martins@xxxxxxxxxx> >>> Signed-off-by: Liran Alon <liran.alon@xxxxxxxxxx> >>> --- >>> arch/x86/kvm/vmx/vmx.c | 9 +++------ >>> 1 file changed, 3 insertions(+), 6 deletions(-) >>> >>> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c >>> index f53b0c74f7c8..d5742378d031 100644 >>> --- a/arch/x86/kvm/vmx/vmx.c >>> +++ b/arch/x86/kvm/vmx/vmx.c >>> @@ -6013,17 +6013,14 @@ static void vmx_l1d_flush(struct kvm_vcpu *vcpu) >>> static void update_cr8_intercept(struct kvm_vcpu *vcpu, int tpr, int irr) >>> { >>> struct vmcs12 *vmcs12 = get_vmcs12(vcpu); >>> + int tpr_threshold; >>> >>> if (is_guest_mode(vcpu) && >>> nested_cpu_has(vmcs12, CPU_BASED_TPR_SHADOW)) >>> return; >>> >>> - if (irr == -1 || tpr < irr) { >>> - vmcs_write32(TPR_THRESHOLD, 0); >>> - return; >>> - } >>> - >>> - vmcs_write32(TPR_THRESHOLD, irr); >>> + tpr_threshold = ((irr == -1) || (tpr < irr)) ? 0 : irr; >> >> Pascal parentheses? :) > > What do you mean? Redundant parentheses around && or || are usually avoided in the kernel, and they are typical of Pascal (which had weird operator precedence rules and thus required operands of AND/OR to be parenthesized). I can remove them when committing the series. Paolo