Re: [PATCH v5 02/22] KVM: arm/arm64: Add GICV3 pending table save API documentation

Peter Maydell
2017-04-26T13:24:11Z

On 26 April 2017 at 14:14, Christoffer Dall <christoffer.dall@linaro.org> wrote:
> On Wed, Apr 26, 2017 at 02:01:55PM +0100, Peter Maydell wrote:
>> On 26 April 2017 at 14:00, Christoffer Dall <cdall@linaro.org> wrote:
>> > Alternatively we should mark a pending error notification to the guest
>> > in KVM, so that when the guest boots it gets something like an SError
>> > instead, given that presumably the guest wrote the weird value. Except
>> > of course if the problem is caused by QEMU fudging with the register
>> > value for the PENDBASER.
>>
>> If we have scope for complaining at the guest we should do it at
>> the point where the guest sets PENDBASER in the first place...
>>
>
> Is that what the hardware would have done?

I think it's UNPREDICTABLE to enable the GIC with a bogus PENDBASER,
but I can't find the bit in the spec that actually says that.
I don't know what hardware actually does, but I imagine it will
only notice that it's been handed bogus memory at the point where
it tries to use it.

> Also, userspace could restore a bogus value in the PENDBASER (even
> though the guest wrote something sane), so maybe we should just keep
> this as is and handle it nicely in QEMU?

Yeah, I don't have a strong objection to doing it that way round.

thanks
-- PMM