From: Andre Przywara <andre.przywara@arm.com>
To: Alexandru Elisei <alexandru.elisei@arm.com>
Cc: will@kernel.org, julien.thierry.kdev@gmail.com, maz@kernel.org,
suzuki.poulose@arm.com, julien@xen.org,
linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu, james.morse@arm.com
Subject: Re: [PATCH v3 kvmtool 12/13] Introduce kvm__arch_default_ram_address()
Date: Wed, 1 Jun 2022 14:21:18 +0100 [thread overview]
Message-ID: <20220601142118.67212340@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <20220525112345.121321-13-alexandru.elisei@arm.com>
On Wed, 25 May 2022 12:23:44 +0100
Alexandru Elisei <alexandru.elisei@arm.com> wrote:
> 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>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> 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(+)
>
> diff --git a/arm/aarch32/kvm.c b/arm/aarch32/kvm.c
> index 9d68d7a15ee2..768a56bbb5b4 100644
> --- a/arm/aarch32/kvm.c
> +++ b/arm/aarch32/kvm.c
> @@ -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;
> +}
> diff --git a/arm/aarch64/kvm.c b/arm/aarch64/kvm.c
> index 2134528bf7f2..357936844046 100644
> --- a/arm/aarch64/kvm.c
> +++ b/arm/aarch64/kvm.c
> @@ -46,6 +46,11 @@ void kvm__arch_validate_cfg(struct kvm *kvm)
> }
> }
>
> +u64 kvm__arch_default_ram_address(void)
> +{
> + return ARM_MEMORY_AREA;
> +}
> +
> /*
> * Return the TEXT_OFFSET value that the guest kernel expects. Note
> * that pre-3.17 kernels expose this value using the native endianness
> diff --git a/include/kvm/kvm.h b/include/kvm/kvm.h
> index 640b76c095f9..360430b78b1e 100644
> --- a/include/kvm/kvm.h
> +++ b/include/kvm/kvm.h
> @@ -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);
> diff --git a/mips/kvm.c b/mips/kvm.c
> index d8610cf81b94..4cbc9907731b 100644
> --- a/mips/kvm.c
> +++ b/mips/kvm.c
> @@ -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)
> {
> }
> diff --git a/powerpc/kvm.c b/powerpc/kvm.c
> index d281b070fd0e..7b0d0669aff4 100644
> --- a/powerpc/kvm.c
> +++ b/powerpc/kvm.c
> @@ -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)
> {
> }
> diff --git a/riscv/kvm.c b/riscv/kvm.c
> index c46660772aa0..4d6f5cb57ac8 100644
> --- a/riscv/kvm.c
> +++ b/riscv/kvm.c
> @@ -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)
> {
> }
> diff --git a/x86/kvm.c b/x86/kvm.c
> index 24b0305a1841..328fa7500596 100644
> --- a/x86/kvm.c
> +++ b/x86/kvm.c
> @@ -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)
> {
> }
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-06-01 13:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 11:23 [PATCH v3 kvmtool 00/13] arm64: Allow the user to set RAM base address Alexandru Elisei
2022-05-25 11:23 ` [PATCH v3 kvmtool 01/13] Use MB for megabytes consistently Alexandru Elisei
2022-05-25 11:23 ` [PATCH v3 kvmtool 02/13] sizes.h: Make all sizes 64bit Alexandru Elisei
2022-05-30 15:05 ` Andre Przywara
2022-06-15 16:01 ` Alexandru Elisei
2022-05-25 11:23 ` [PATCH v3 kvmtool 03/13] builtin-run: Always use RAM size in bytes Alexandru Elisei
2022-05-25 11:23 ` [PATCH v3 kvmtool 04/13] builtin-run: Rework RAM size validation Alexandru Elisei
2022-05-30 17:13 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 05/13] builtin-run: Add arch hook to validate VM configuration Alexandru Elisei
2022-05-25 11:23 ` [PATCH v3 kvmtool 06/13] arm/arm64: Fail if RAM size is too large for 32-bit guests Alexandru Elisei
2022-06-01 11:09 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 07/13] arm/arm64: Kill the ARM_MAX_MEMORY() macro Alexandru Elisei
2022-06-01 11:14 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 08/13] arm/arm64: Kill the ARM_HIMAP_MAX_MEMORY() macro Alexandru Elisei
2022-06-01 11:16 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 09/13] builtin_run: Allow standard size specifiers for memory Alexandru Elisei
2022-06-01 13:39 ` Andre Przywara
2022-06-01 14:17 ` Alexandru Elisei
2022-06-01 16:14 ` Andre Przywara
2022-06-01 19:39 ` Alexandru Elisei
2022-06-01 19:42 ` Alexandru Elisei
2022-06-01 20:13 ` Alexandru Elisei
2022-06-06 10:53 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 10/13] kvm__arch_init: Remove hugetlbfs_path and ram_size as parameters Alexandru Elisei
2022-06-01 13:13 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 11/13] arm/arm64: Consolidate RAM initialization in kvm__init_ram() Alexandru Elisei
2022-06-01 13:20 ` Andre Przywara
2022-05-25 11:23 ` [PATCH v3 kvmtool 12/13] Introduce kvm__arch_default_ram_address() Alexandru Elisei
2022-06-01 13:21 ` Andre Przywara [this message]
2022-05-25 11:23 ` [PATCH v3 kvmtool 13/13] arm64: Allow the user to specify the RAM base address Alexandru Elisei
2022-06-01 13:39 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220601142118.67212340@donnerap.cambridge.arm.com \
--to=andre.przywara@arm.com \
--cc=alexandru.elisei@arm.com \
--cc=james.morse@arm.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=julien@xen.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox