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] [RFC 1/3] hw/intc/arm_gicv3_its: Don't abort on table save/restore
Date: Tue, 17 Oct 2017 14:54:20 +0200 [thread overview]
Message-ID: <f2e21f58-f630-cbf4-904a-3d86d7c38d3f@redhat.com> (raw)
In-Reply-To: <CAFEAcA9P51hn60vYErotTBc9m4REq=fgfp0ZN18mFtoLLbS9ZQ@mail.gmail.com>
Hi Peter,
On 12/10/2017 13:54, Peter Maydell wrote:
> On 27 September 2017 at 15:56, Eric Auger <eric.auger@redhat.com> wrote:
>> The ITS is not properly reset at the moment. It is possible the
>> GITS_BASER<n>.valid is set and the in-kernel ITS caches are not
>> empty (list of devices, collections, LPIs) while data structures
>> in guest RAM are invalid/inconsistent.
>>
>> For instance, this happens after a guest shutdown -r now or a
>> system reset, if we save the state before the guest re-writes
>> the ITS registers or map devices, the table save ioctl may
>> produce a QEMU abort.
>>
>> Until there is a proper reset implemented, let's unplug the
>> consistency error checking.
>>
>> The reset issue will be fixed in subsequent patches.
>>
>> Signed-off-by: Eric Auger <eric.auger@redhat.com>
>> Reported-by: wanghaibin <wanghaibin.wang@huawei.com>
>
> When in particular does this cause an abort -- when we're
> trying to save the state in these edge cases, or when we're
> trying to restore it?
Both.
After a guest reset, device GITS_BASER<n> may point to an L1 device
table that is not valid anymore. In that case device table save IOTCL
returned -EINVAL and we aborted.
On restore we had a bug in case all data in the table is invalid. In
that case as well we currently abort.
What does the kernel do -- is it just
> rejecting the attempt, or might it actually have done bad
> things to guest memory ?
On Save, in case the GITS_BASER points to an invalid linear device tree
table but the page still corresponds to a visible gfn window, this
memory could be overwritten by the kernel.
Thanks
Eric
>
> thanks
> -- PMM
>
next prev parent reply other threads:[~2017-10-17 12:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 14:56 [Qemu-devel] [RFC 0/3] vITS Reset Eric Auger
2017-09-27 14:56 ` [Qemu-devel] [RFC 1/3] hw/intc/arm_gicv3_its: Don't abort on table save/restore Eric Auger
2017-10-12 11:54 ` Peter Maydell
2017-10-17 12:54 ` Auger Eric [this message]
2017-09-27 14:56 ` [Qemu-devel] [RFC 2/3] linux-headers: Partial header update for ITS reset Eric Auger
2017-09-27 14:56 ` [Qemu-devel] [RFC 3/3] hw/intc/arm_gicv3_its: Implement reset Eric Auger
2017-10-12 11:52 ` Peter Maydell
2017-10-09 18:17 ` [Qemu-devel] [RFC 0/3] vITS Reset Peter Maydell
2017-10-11 16:06 ` Auger Eric
2017-10-12 10:36 ` 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=f2e21f58-f630-cbf4-904a-3d86d7c38d3f@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).