All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Eric Auger <eric.auger@redhat.com>
Cc: eric.auger.pro@gmail.com, qemu-arm <qemu-arm@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>,
	wanghaibin.wang@huawei.com, Vijay Kilari <vijay.kilari@gmail.com>,
	Andrew Jones <drjones@redhat.com>, Wei Huang <wei@redhat.com>,
	Juan Quintela <quintela@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Christoffer Dall <christoffer.dall@linaro.org>,
	wu.wubin@huawei.com
Subject: Re: [Qemu-devel] [RFC v2 4/4] hw/intc/arm_gicv3_its: Implement full reset
Date: Thu, 2 Nov 2017 13:04:44 +0000	[thread overview]
Message-ID: <CAFEAcA-ePpQn44zURCOyOV9cm6HAOD2YP4SLgWjkqzJErpEO5Q@mail.gmail.com> (raw)
In-Reply-To: <1508772937-21054-5-git-send-email-eric.auger@redhat.com>

On 23 October 2017 at 16:35, Eric Auger <eric.auger@redhat.com> wrote:
> Voiding the ITS caches is not supposed to happen via
> individual register writes. So we introduced a dedicated
> ITS KVM device ioctl to perform a cold reset of the ITS:
> KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_ITS_CTRL_RESET. Let's
> use this latter if the kernel supports it.
>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
> ---
>  hw/intc/arm_gicv3_its_kvm.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
>
> diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
> index 537cea1..73e2530 100644
> --- a/hw/intc/arm_gicv3_its_kvm.c
> +++ b/hw/intc/arm_gicv3_its_kvm.c
> @@ -215,9 +215,19 @@ static void kvm_arm_its_post_load(GICv3ITSState *s)
>
>  static void kvm_arm_its_reset(DeviceState *dev)
>  {
> +    GICv3ITSState *s = ARM_GICV3_ITS_COMMON(dev);
>      KVMARMITSClass *c = KVM_ARM_ITS_GET_CLASS(s);
>
>      c->parent_reset(dev);
> +
> +    if (!kvm_device_check_attr(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
> +                               KVM_DEV_ARM_ITS_CTRL_RESET)) {
> +        error_report("ITS KVM: reset is not supported by the kernel");

Best to say "host kernel" so users know we're not complaining about
the guest kernel.

> +        return;
> +    }
> +
> +    kvm_device_access(s->dev_fd, KVM_DEV_ARM_VGIC_GRP_CTRL,
> +                      KVM_DEV_ARM_ITS_CTRL_RESET, NULL, true, &error_abort);
>  }
>
>  static Property kvm_arm_its_props[] = {
> --

This would be the right patch for the boilerplate for adding
the parent class and hooking into the reset function chain.

thanks
-- PMM

      reply	other threads:[~2017-11-02 13:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 15:35 [Qemu-devel] [RFC v2 0/4] vITS Reset Eric Auger
2017-10-23 15:35 ` [Qemu-devel] [RFC v2 1/4] hw/intc/arm_gicv3_its: Don't abort on table save failure Eric Auger
2017-11-02 12:53   ` Peter Maydell
2017-11-06 10:09     ` Auger Eric
2017-11-06 11:13       ` Peter Maydell
2017-10-23 15:35 ` [Qemu-devel] [RFC v2 2/4] hw/intc/arm_gicv3_its: Implement a minimalist reset Eric Auger
2017-11-02 13:00   ` Peter Maydell
2017-10-23 15:35 ` [Qemu-devel] [RFC v2 3/4] linux-headers: Partial header update for ITS reset Eric Auger
2017-10-23 15:35 ` [Qemu-devel] [RFC v2 4/4] hw/intc/arm_gicv3_its: Implement full reset Eric Auger
2017-11-02 13:04   ` Peter Maydell [this message]

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=CAFEAcA-ePpQn44zURCOyOV9cm6HAOD2YP4SLgWjkqzJErpEO5Q@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=vijay.kilari@gmail.com \
    --cc=wanghaibin.wang@huawei.com \
    --cc=wei@redhat.com \
    --cc=wu.wubin@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.