Skip to contentSkip to conversation

KVM: selftests: Remove duplicate macro definition

PATCH In review [email protected] 2 participants 2 messages Feb 8, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: selftests: Remove duplicate macro definition

From: Shaoqin Huang <[email protected]>

The KVM_GUEST_PAGE_TABLE_MIN_PADDR macro has been defined in include/kvm_util_base.h. So remove the duplicate definition in lib/kvm_util.c.

---
 tools/testing/selftests/kvm/lib/kvm_util.c | 3 ---
 1 file changed, 3 deletions(-)
tools/testing/selftests/kvm/lib/kvm_util.c +0 -3
index f25b3e9b5a07..3ea24a5f4c43 100644
@@ -1942,9 +1942,6 @@ vm_paddr_t vm_phy_page_alloc(struct kvm_vm *vm, vm_paddr_t paddr_min,
 	return vm_phy_pages_alloc(vm, 1, paddr_min, memslot);
 }
 
-/* Arbitrary minimum physical address used for virtual translation tables. */
-#define KVM_GUEST_PAGE_TABLE_MIN_PADDR 0x180000
-
 vm_paddr_t vm_alloc_page_table(struct kvm_vm *vm)
 {
 	return vm_phy_page_alloc(vm, KVM_GUEST_PAGE_TABLE_MIN_PADDR,
Signature · 1 line
2.39.1
#1 lore raw
Quoted 16 lines · On Wed, Feb 08, 2023, [email protected] wrote:

From: Shaoqin Huang <[email protected]>

The KVM_GUEST_PAGE_TABLE_MIN_PADDR macro has been defined in include/kvm_util_base.h. So remove the duplicate definition in lib/kvm_util.c.

---
 tools/testing/selftests/kvm/lib/kvm_util.c | 3 ---
 1 file changed, 3 deletions(-)
tools/testing/selftests/kvm/lib/kvm_util.c +0 -0
index f25b3e9b5a07..3ea24a5f4c43 100644

tools/testing/selftests/kvm/lib/kvm_util.c vm_paddr_t vm_phy_page_alloc(struct kvm_vm *vm, vm_paddr_t paddr_min, · line 1946

Quoted 5 lines
tools/testing/selftests/kvm/lib/kvm_util.c +0 -2
@@ -1942,9 +1942,6 @@ vm_paddr_t vm_phy_page_alloc(struct kvm_vm *vm, vm_paddr_t paddr_min,
 	return vm_phy_pages_alloc(vm, 1, paddr_min, memslot);
 }
 
-/* Arbitrary minimum physical address used for virtual translation tables. */
-#define KVM_GUEST_PAGE_TABLE_MIN_PADDR 0x180000

Huh. There wasn't even a merge conflict or anything, I just added it twice in commit cce0c23dd944 ("KVM: selftests: Add wrapper to allocate page table page").

Anyways, applied to kvm-x86 selftests with a Fixes tag. Thanks!

[1/1] KVM: selftests: Remove duplicate macro definition

      https://github.com/kvm-x86/linux/commit/695fa5a64cf5

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes