qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Auger Eric <eric.auger@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
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] [PATCH v4 2/4] hw/intc/arm_gicv3_its: Implement a minimalist reset
Date: Fri, 24 Nov 2017 14:39:44 +0100	[thread overview]
Message-ID: <0a83e699-1985-3720-b5db-14c29c629a67@redhat.com> (raw)
In-Reply-To: <CAFEAcA-7s8D1mts4LG81DoRM6x-wwT3mOPTcZJJ+EKi72tCjJw@mail.gmail.com>

Hi Peter,
On 24/11/17 14:34, Peter Maydell wrote:
> On 24 November 2017 at 13:30, Eric Auger <eric.auger@redhat.com> wrote:
>> At the moment the ITS is not properly reset and this causes
>> various bugs on save/restore. We implement a minimalist reset
>> through individual register writes but for kernel versions
>> before v4.15 this fails voiding the vITS cache. We cannot
>> claim we have a comprehensive reset (hence the error message)
>> but that's better than nothing.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>>
>> ---
>>
>> v2 -> v3:
>> - individual register writes performed in kvm_arm_its_reset
>> - check KVM_DEV_ARM_VGIC_GRP_ITS_REGS support
>> ---
>>  hw/intc/arm_gicv3_its_kvm.c | 41 +++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 41 insertions(+)
>>
>> diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c
>> index b1b322b..83e5268 100644
>> --- a/hw/intc/arm_gicv3_its_kvm.c
>> +++ b/hw/intc/arm_gicv3_its_kvm.c
>> @@ -28,6 +28,16 @@
>>
>>  #define TYPE_KVM_ARM_ITS "arm-its-kvm"
>>  #define KVM_ARM_ITS(obj) OBJECT_CHECK(GICv3ITSState, (obj), TYPE_KVM_ARM_ITS)
>> +#define KVM_ARM_ITS_CLASS(klass) \
>> +     OBJECT_CLASS_CHECK(KVMARMITSClass, (klass), TYPE_KVM_ARM_ITS)
>> +#define KVM_ARM_ITS_GET_CLASS(obj) \
>> +     OBJECT_GET_CLASS(KVMARMITSClass, (obj), TYPE_KVM_ARM_ITS)
>> +
>> +typedef struct KVMARMITSClass {
>> +    GICv3ITSCommonClass parent_class;
>> +    void (*parent_reset)(DeviceState *dev);
>> +} KVMARMITSClass;
>> +
>>
>>  static int kvm_its_send_msi(GICv3ITSState *s, uint32_t value, uint16_t devid)
>>  {
>> @@ -186,6 +196,34 @@ static void kvm_arm_its_post_load(GICv3ITSState *s)
>>                        GITS_CTLR, &s->ctlr, true, &error_abort);
>>  }
>>
>> +static void kvm_arm_its_reset(DeviceState *dev)
>> +{
>> +    GICv3ITSState *s = ARM_GICV3_ITS_COMMON(dev);
>> +    KVMARMITSClass *c = KVM_ARM_ITS_GET_CLASS(s);
>> +    int i;
>> +
>> +    c->parent_reset(dev);
>> +
>> +    error_report("ITS KVM: full reset is not supported by the host kernel");
> 
> This message claims that we have a problem because of the host
> kernel version, but I can't see where we do the check on the
> host kernel that lets us avoid the error message when it's
> new enough ?

Actually the check is added in 4/4. So in that patch the message may be
"full ITS reset is not supported" without mentioning the host kernel.

Thanks

Eric
> 
> thanks
> -- PMM
> 

  reply	other threads:[~2017-11-24 13:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-24 13:30 [Qemu-devel] [PATCH v4 0/4] vITS Reset Eric Auger
2017-11-24 13:30 ` [Qemu-devel] [PATCH v4 1/4] hw/intc/arm_gicv3_its: Don't call post_load on reset Eric Auger
2017-11-24 13:41   ` Peter Maydell
2017-11-24 13:30 ` [Qemu-devel] [PATCH v4 2/4] hw/intc/arm_gicv3_its: Implement a minimalist reset Eric Auger
2017-11-24 13:34   ` Peter Maydell
2017-11-24 13:39     ` Auger Eric [this message]
2017-11-24 13:30 ` [Qemu-devel] [PATCH v4 3/4] linux-headers: update to pre 4.15-rc0 Eric Auger
2017-11-24 13:38   ` Peter Maydell
2017-11-24 13:50     ` Auger Eric
2017-11-24 13:30 ` [Qemu-devel] [PATCH v4 4/4] hw/intc/arm_gicv3_its: Implement full reset Eric Auger
2017-11-24 13:40   ` Peter Maydell

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=0a83e699-1985-3720-b5db-14c29c629a67@redhat.com \
    --to=eric.auger@redhat.com \
    --cc=christoffer.dall@linaro.org \
    --cc=dgilbert@redhat.com \
    --cc=drjones@redhat.com \
    --cc=eric.auger.pro@gmail.com \
    --cc=peter.maydell@linaro.org \
    --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 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).