qemu-s390x
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-8.0] target/s390x/tcg: Fix and improve the SACF instructi


From: Thomas Huth
Subject: Re: [PATCH for-8.0] target/s390x/tcg: Fix and improve the SACF instruction
Date: Thu, 1 Dec 2022 19:31:36 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.13.0

On 01/12/2022 19.27, Thomas Huth wrote:
The SET ADDRESS SPACE CONTROL FAST code has a couple of issues:

1) The instruction is not privileged, it can be used from problem space,
too. Just the switching to the home address space is privileged and
should still generate a privilege exception. This bug is e.g. causing
programs like Java that use the "getcpu" vdso kernel function to crash
(see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=990417)

2) If DAT is not enabled, the instruction is supposed to generate
a special operation exception.

3) The switch-case statement in the code hid a weird oddity: It did not
support the secondary address space though that should be working without
problems. But there is a "case 0x100" which means access register mode -
and that is not implemented in QEMU yet. The code used the secondary mode
for the access register mode instead - which seems to sufficient to make
the Linux kernel happy that still temporarily tries to switch to the access
register mode here and there. Anyway, let's get rid of the cumbersome
switch-case statement and add a proper comment for the access register
oddity to make it more clear what is going on here.

Oooops, never mind, I just missed the part in the Principles of Operations where this is explained: The bit ordering is different here compared to the bits in the PSW. Ugly. I'll rework my patch...

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]