On 13/12/2022 09:04, Yu Zhang wrote:
KVM already has a 'GPA_INVALID' defined as (~(gpa_t)0) in kvm_types.h, and it is used by ARM and X86 xen code. We do not need a specific definition of 'INVALID_GPA' for X86. Instead of using the common 'GPA_INVALID' for X86, replace the definition of 'GPA_INVALID' with 'INVALID_GPA', and change the users of 'GPA_INVALID', so that the diff can be smaller. Also because the name 'INVALID_GPA' tells the user we are using an invalid GPA, while the name 'GPA_INVALID' is emphasizing the GPA is an *invalid* one. Tested by rebuilding KVM for x86 and for ARM64. No functional change intended. Signed-off-by: Yu Zhang <yu.c.zhang@xxxxxxxxxxxxxxx> --- v2: Followed Sean's comments to rename GPA_INVALID to INVALID_GPA and modify _those_ users. Also, changed the commit message. v1: https://lore.kernel.org/lkml/20221209023622.274715-1-yu.c.zhang@xxxxxxxxxxxxxxx/ --- arch/arm64/include/asm/kvm_host.h | 4 ++-- arch/arm64/kvm/hypercalls.c | 2 +- arch/arm64/kvm/pvtime.c | 8 ++++---- arch/x86/include/asm/kvm_host.h | 2 -- arch/x86/kvm/xen.c | 14 +++++++------- include/linux/kvm_types.h | 2 +- 6 files changed, 15 insertions(+), 17 deletions(-)
Reviewed-by: Paul Durrant <paul@xxxxxxx>