On Thu, 2023-03-02 at 15:24 +0800, Chao Gao wrote: > > - bool pcid_enabled = kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE); > > + bool pcid_enabled = !!kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE); > > > > if (pcid_enabled) { > > skip_tlb_flush = cr3 & X86_CR3_PCID_NOFLUSH; > > pcid_enabled is used only once. You can drop it, i.e., > > if (kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE)) { > Emm, that's actually another point. Though I won't object so, wouldn't this be compiler optimized? And my point was: honor bool type, though in C implemention it's 0 and !0, it has its own type value: true, false. Implicit type casting always isn't good habit.