lkml.org 
[lkml]   [2024]   [Feb]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] KVM: use KVM_HVA_ERR_BAD to check bad hva
Date
Replace PAGE_OFFSET with KVM_HVA_ERR_BAD, to facilitate the cscope when
looking for where KVM_HVA_ERR_BAD is used.

Every time I use cscope to query the functions that are impacted by the
return value (KVM_HVA_ERR_BAD) of __gfn_to_hva_many(), I may miss
kvm_is_error_hva().

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
---
include/linux/kvm_host.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 7e7fd25b09b3..4dc0300e7766 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -143,7 +143,7 @@ static inline bool is_noslot_pfn(kvm_pfn_t pfn)

static inline bool kvm_is_error_hva(unsigned long addr)
{
- return addr >= PAGE_OFFSET;
+ return addr >= KVM_HVA_ERR_BAD;
}

#endif
--
2.34.1

\
 
 \ /
  Last update: 2024-05-27 15:30    [W:0.041 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site