@@ -8,8 +8,6 @@
struct kvm;
static inline void kvm__arch_enable_mte(struct kvm *kvm) {}
-#define ARM_MAX_MEMORY(...) ARM_LOMAP_MAX_MEMORY
-
#define MAX_PAGE_SIZE SZ_4K
#include "arm-common/kvm-arch.h"
@@ -8,22 +8,6 @@ unsigned long long kvm__arch_get_kern_offset(struct kvm *kvm, int fd);
int kvm__arch_get_ipa_limit(struct kvm *kvm);
void kvm__arch_enable_mte(struct kvm *kvm);
-#define ARM_MAX_MEMORY(kvm) ({ \
- u64 max_ram; \
- \
- if ((kvm)->cfg.arch.aarch32_guest) { \
- max_ram = ARM_LOMAP_MAX_MEMORY; \
- } else { \
- int ipabits = kvm__arch_get_ipa_limit(kvm); \
- if (ipabits <= 0) \
- max_ram = ARM_HIMAP_MAX_MEMORY; \
- else \
- max_ram = (1ULL << ipabits) - ARM_MEMORY_AREA; \
- } \
- \
- max_ram; \
-})
-
#define MAX_PAGE_SIZE SZ_64K
#include "arm-common/kvm-arch.h"
For 32-bit guests, the maximum memory size is represented by the define ARM_LOMAP_MAX_MEMORY, which ARM_MAX_MEMORY() returns. For 64-bit guests, the RAM size is checked against the maximum allowed by KVM in kvm__get_vm_type(). There are no users left for the ARM_MAX_MEMORY() macro, remove it. Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> --- arm/aarch32/include/kvm/kvm-arch.h | 2 -- arm/aarch64/include/kvm/kvm-arch.h | 16 ---------------- 2 files changed, 18 deletions(-)