qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Haibo Xu <haibo.xu@linaro.org>
To: Andrew Jones <drjones@redhat.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	 "Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Juan Quintela <quintela@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [RFC PATCH 5/5] Enable the MTE support for KVM guest
Date: Fri, 12 Mar 2021 09:51:06 +0800	[thread overview]
Message-ID: <CAJc+Z1Hp8Hs7hBVgK3k=E58vFoT1Hz-sdwnYxfB1KshyQ+sEVw@mail.gmail.com> (raw)
In-Reply-To: <a42721fa503d6d26995f451a8ca6d59ae7f3b138.1612747873.git.haibo.xu@linaro.org>

++ more migration experts!

On Mon, 8 Feb 2021 at 11:20, Haibo Xu <haibo.xu@linaro.org> wrote:
>
> Signed-off-by: Haibo Xu <haibo.xu@linaro.org>
> ---
>  hw/arm/virt.c | 22 +++++++++++++++++++---
>  1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 623d5e9397..c2358cf4c5 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -79,6 +79,7 @@
>  #include "hw/virtio/virtio-iommu.h"
>  #include "hw/char/pl011.h"
>  #include "qemu/guest-random.h"
> +#include "migration/misc.h"
>
>  #define DEFINE_VIRT_MACHINE_LATEST(major, minor, latest) \
>      static void virt_##major##_##minor##_class_init(ObjectClass *oc, \
> @@ -821,6 +822,21 @@ static void virt_powerdown_req(Notifier *n, void *opaque)
>      }
>  }
>
> +static int virt_precopy_notify(NotifierWithReturn *n, void *data)
> +{
> +    PrecopyNotifyData *pnd = data;
> +
> +    switch (pnd->reason) {
> +    case PRECOPY_NOTIFY_SETUP:
> +        precopy_enable_metadata_migration();
> +        break;
> +    default:
> +        break;
> +    }
> +
> +    return 0;
> +}
> +
>  static void create_gpio_keys(const VirtMachineState *vms,
>                               DeviceState *pl061_dev,
>                               uint32_t phandle)
> @@ -1898,9 +1914,9 @@ static void machvirt_init(MachineState *machine)
>      }
>
>      if (vms->mte && kvm_enabled()) {
> -        error_report("mach-virt: KVM does not support providing "
> -                     "MTE to the guest CPU");
> -        exit(1);
> +        /* connect migration precopy request */
> +        vms->precopy_notifier.notify = virt_precopy_notify;
> +        precopy_add_notifier(&vms->precopy_notifier);
>      }
>
>      create_fdt(vms);
> --
> 2.17.1
>


  reply	other threads:[~2021-03-12  1:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-08  3:20 [RFC PATCH 0/5] target/arm: Add MTE support to KVM guest Haibo Xu
2021-02-08  3:20 ` [RFC PATCH 1/5] Update Linux headers with new MTE support Haibo Xu
2021-03-12  1:48   ` Haibo Xu
2021-02-08  3:20 ` [RFC PATCH 2/5] Add basic MTE support to KVM guest Haibo Xu
2021-03-12  1:49   ` Haibo Xu
2021-02-08  3:20 ` [RFC PATCH 3/5] Add APIs to get/set MTE tags Haibo Xu
2021-03-12  1:50   ` Haibo Xu
2021-02-08  3:20 ` [RFC PATCH 4/5] Add migration support for KVM guest with MTE Haibo Xu
2021-02-16 15:31   ` Richard Henderson
2021-02-22  9:46     ` Haibo Xu
2021-02-22 22:47       ` Richard Henderson
2021-03-12  1:50         ` Haibo Xu
2021-02-08  3:20 ` [RFC PATCH 5/5] Enable the MTE support for KVM guest Haibo Xu
2021-03-12  1:51   ` Haibo Xu [this message]
2021-02-16 11:20 ` [RFC PATCH 0/5] target/arm: Add MTE support to " Peter Maydell
2021-02-22  4:18   ` Haibo Xu

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='CAJc+Z1Hp8Hs7hBVgK3k=E58vFoT1Hz-sdwnYxfB1KshyQ+sEVw@mail.gmail.com' \
    --to=haibo.xu@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=richard.henderson@linaro.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;
as well as URLs for NNTP newsgroup(s).