public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Julien Thierry <julien.thierry@arm.com>
Cc: Sami.Mujawar@arm.com, will.deacon@arm.com,
	kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org
Subject: Re: [PATCH kvmtool 5/6] kvm: Add arch specific reset
Date: Fri, 14 Dec 2018 18:11:24 +0000	[thread overview]
Message-ID: <20181214181124.5374b2d0@donnerap.cambridge.arm.com> (raw)
In-Reply-To: <1543922073-55530-6-git-send-email-julien.thierry@arm.com>

On Tue,  4 Dec 2018 11:14:32 +0000
Julien Thierry <julien.thierry@arm.com> wrote:

Hi,

> Add a callback that allows to set arch specific default values when
> creating fresh VM.

So is this needed just for initialising the LIST_HEAD in the next
patch? Can't we use some dev_init() call for that purpose, or even add
the nonvolatile memory device to all architectures and init this in one
place?

Cheers,
Andre.

> 
> Signed-off-by: Julien Thierry <julien.thierry@arm.com>
> ---
>  arm/kvm.c         | 4 ++++
>  include/kvm/kvm.h | 1 +
>  kvm.c             | 2 ++
>  mips/kvm.c        | 4 ++++
>  powerpc/kvm.c     | 4 ++++
>  x86/kvm.c         | 4 ++++
>  6 files changed, 19 insertions(+)
> 
> diff --git a/arm/kvm.c b/arm/kvm.c
> index d5bbbc3..1a2cfdc 100644
> --- a/arm/kvm.c
> +++ b/arm/kvm.c
> @@ -57,6 +57,10 @@ void kvm__arch_set_cmdline(char *cmdline, bool
> video) {
>  }
>  
> +void kvm__arch_reset(struct kvm *kvm)
> +{
> +}
> +
>  void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64
> ram_size) {
>  	/*
> diff --git a/include/kvm/kvm.h b/include/kvm/kvm.h
> index 1edacfd..eeeb10c 100644
> --- a/include/kvm/kvm.h
> +++ b/include/kvm/kvm.h
> @@ -136,6 +136,7 @@ int kvm__enumerate_instances(int
> (*callback)(const char *name, int pid)); void
> kvm__remove_socket(const char *name); 
>  void kvm__arch_set_cmdline(char *cmdline, bool video);
> +void kvm__arch_reset(struct kvm *kvm);
>  void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64
> ram_size); void kvm__arch_delete_ram(struct kvm *kvm);
>  int kvm__arch_setup_firmware(struct kvm *kvm);
> diff --git a/kvm.c b/kvm.c
> index 7de825a..05ad0b6 100644
> --- a/kvm.c
> +++ b/kvm.c
> @@ -158,6 +158,8 @@ struct kvm *kvm__new(void)
>  	kvm->sys_fd = -1;
>  	kvm->vm_fd = -1;
>  
> +	kvm__arch_reset(kvm);
> +
>  	return kvm;
>  }
>  
> diff --git a/mips/kvm.c b/mips/kvm.c
> index 211770d..3f6fd20 100644
> --- a/mips/kvm.c
> +++ b/mips/kvm.c
> @@ -56,6 +56,10 @@ void kvm__arch_set_cmdline(char *cmdline, bool
> video) 
>  }
>  
> +void kvm__arch_reset(struct kvm *kvm)
> +{
> +}
> +
>  /* Architecture-specific KVM init */
>  void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64
> ram_size) {
> diff --git a/powerpc/kvm.c b/powerpc/kvm.c
> index 702d67d..5bb721b 100644
> --- a/powerpc/kvm.c
> +++ b/powerpc/kvm.c
> @@ -87,6 +87,10 @@ void kvm__arch_set_cmdline(char *cmdline, bool
> video) /* We don't need anything unusual in here. */
>  }
>  
> +void kvm__arch_reset(struct kvm *kvm)
> +{
> +}
> +
>  /* Architecture-specific KVM init */
>  void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64
> ram_size) {
> diff --git a/x86/kvm.c b/x86/kvm.c
> index 3e0f0b7..e017d36 100644
> --- a/x86/kvm.c
> +++ b/x86/kvm.c
> @@ -129,6 +129,10 @@ void kvm__arch_set_cmdline(char *cmdline, bool
> video) strcat(cmdline, " earlyprintk=serial i8042.noaux=1");
>  }
>  
> +void kvm__arch_reset(struct kvm *kvm)
> +{
> +}
> +
>  /* Architecture-specific KVM init */
>  void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64
> ram_size) {

  reply	other threads:[~2018-12-14 18:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-04 11:14 [PATCH kvmtool 0/6] arm: Add support for firmware booting Julien Thierry
2018-12-04 11:14 ` [PATCH kvmtool 1/6] rtc: Initialize the Register D for MC146818 RTC Julien Thierry
2018-12-12 18:16   ` Andre Przywara
2018-12-14 18:58     ` Sami Mujawar
2018-12-04 11:14 ` [PATCH kvmtool 2/6] arm: Move firmware function Julien Thierry
2018-12-12 18:16   ` Andre Przywara
2018-12-04 11:14 ` [PATCH kvmtool 3/6] builtin-run: Do not look for default kernel when firmware is provided Julien Thierry
2018-12-12 18:16   ` Andre Przywara
2018-12-04 11:14 ` [PATCH kvmtool 4/6] arm: Support firmware loading Julien Thierry
2018-12-14 18:08   ` Andre Przywara
2018-12-17 10:05     ` Julien Thierry
2018-12-17 12:01       ` André Przywara
2018-12-04 11:14 ` [PATCH kvmtool 5/6] kvm: Add arch specific reset Julien Thierry
2018-12-14 18:11   ` Andre Przywara [this message]
2018-12-17 10:25     ` Julien Thierry
2018-12-04 11:14 ` [PATCH kvmtool 6/6] arm: Support non-volatile memory Julien Thierry
2018-12-14 18:09   ` Andre Przywara
2018-12-17 10:31     ` Julien Thierry
2018-12-17 12:04       ` André 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=20181214181124.5374b2d0@donnerap.cambridge.arm.com \
    --to=andre.przywara@arm.com \
    --cc=Sami.Mujawar@arm.com \
    --cc=julien.thierry@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=will.deacon@arm.com \
    /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