Re: [PATCH v6 1/7] KVM: x86: Explicitly cast ulong to bool in kvm_set_cr3()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I will drop this patch in this LAM KVM enabling patch series per Sean's comments in V5.


On 3/19/2023 4:49 PM, Binbin Wu wrote:
From: Robert Hoo <robert.hu@xxxxxxxxxxxxxxx>

kvm_read_cr4_bits() returns ulong, explicitly cast it bool when assign to a
bool variable.

Signed-off-by: Robert Hoo <robert.hu@xxxxxxxxxxxxxxx>
Signed-off-by: Binbin Wu <binbin.wu@xxxxxxxxxxxxxxx>
---
  arch/x86/kvm/x86.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 810cbe3b3ba6..410327e7eb55 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1238,7 +1238,7 @@ int kvm_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)
  	bool skip_tlb_flush = false;
  	unsigned long pcid = 0;
  #ifdef CONFIG_X86_64
-	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;



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux