@@ -7,3 +7,8 @@ void kvm__arch_validate_cfg(struct kvm *kvm)
kvm->cfg.ram_size, ARM_LOMAP_MAX_MEMORY);
}
}
+
+u64 kvm__arch_default_ram_address(void)
+{
+ return ARM_MEMORY_AREA;
+}
@@ -5,6 +5,11 @@
#include <linux/byteorder.h>
#include <kvm/util.h>
+u64 kvm__arch_default_ram_address(void)
+{
+ return ARM_MEMORY_AREA;
+}
+
void kvm__arch_validate_cfg(struct kvm *kvm)
{
if (kvm->cfg.arch.aarch32_guest &&
@@ -190,6 +190,7 @@ void kvm__remove_socket(const char *name);
void kvm__arch_validate_cfg(struct kvm *kvm);
void kvm__arch_set_cmdline(char *cmdline, bool video);
void kvm__arch_init(struct kvm *kvm);
+u64 kvm__arch_default_ram_address(void);
void kvm__arch_delete_ram(struct kvm *kvm);
int kvm__arch_setup_firmware(struct kvm *kvm);
int kvm__arch_free_firmware(struct kvm *kvm);
@@ -12,6 +12,11 @@ struct kvm_ext kvm_req_ext[] = {
{ 0, 0 }
};
+u64 kvm__arch_default_ram_address(void)
+{
+ return 0;
+}
+
void kvm__arch_validate_cfg(struct kvm *kvm)
{
}
@@ -48,6 +48,11 @@ struct kvm_ext kvm_req_ext[] = {
{ 0, 0 }
};
+u64 kvm__arch_default_ram_address(void)
+{
+ return 0;
+}
+
void kvm__arch_validate_cfg(struct kvm *kvm)
{
}
@@ -13,6 +13,11 @@ struct kvm_ext kvm_req_ext[] = {
{ 0, 0 },
};
+u64 kvm__arch_default_ram_address(void)
+{
+ return RISCV_RAM;
+}
+
void kvm__arch_validate_cfg(struct kvm *kvm)
{
}
@@ -35,6 +35,11 @@ struct kvm_ext kvm_req_ext[] = {
{ 0, 0 }
};
+u64 kvm__arch_default_ram_address(void)
+{
+ return 0;
+}
+
void kvm__arch_validate_cfg(struct kvm *kvm)
{
}
Add a new function, kvm__arch_default_ram_address(), which returns the default address for guest RAM for each architecture. Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com> --- arm/aarch32/kvm.c | 5 +++++ arm/aarch64/kvm.c | 5 +++++ include/kvm/kvm.h | 1 + mips/kvm.c | 5 +++++ powerpc/kvm.c | 5 +++++ riscv/kvm.c | 5 +++++ x86/kvm.c | 5 +++++ 7 files changed, 31 insertions(+)