Re: [PATCH 1/2] KVM: s390: Don't indicate suppression on dirtying, failing memop

From: Janis Schoetterl-Glausch
Date: Fri Apr 01 2022 - 13:40:45 EST


On 4/1/22 19:13, Christian Borntraeger wrote:
>
>
> Am 01.04.22 um 19:02 schrieb Janis Schoetterl-Glausch:
>> If user space uses a memop to emulate an instruction and that
>> memop fails, the execution of the instruction ends.
>> Instruction execution can end in different ways, one of which is
>> suppression, which requires that the instruction execute like a no-op.
>> A writing memop that spans multiple pages and fails due to key
>> protection can modified guest memory. Therefore do not indicate a
>> suppressing instruction ending in this case.

A writing memop that spans multiple pages and fails due to key
protection can modified guest memory, as a result, the likely
correct ending is termination. Therefore do not indicate a
suppressing instruction ending in this case.

?

It's phrased a bit vaguely, because we don't really know what user space wants
when emulating an instruction, I guess it could try to revert the changes?
And the TEID does not indicate termination, it only indicates that
the guest cannot assume that the instruction was suppressed.

>
> Make it explicit in the changelog that this is "terminating" instead of
> "suppressing". z/VM has the same logic and the architecture allows for
> terminating in those cases (even for ESOP2).
>  >
>> Signed-off-by: Janis Schoetterl-Glausch <scgl@xxxxxxxxxxxxx>
>> ---