[PATCH 0/2] target/s390x: Emulate CVDG

Ilya Leoshkevich posted 2 patches 10 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240115202308.1930675-1-iii@linux.ibm.com
Maintainers: Thomas Huth <thuth@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, David Hildenbrand <david@redhat.com>, Ilya Leoshkevich <iii@linux.ibm.com>
There is a newer version of this series
target/s390x/helper.h            |  1 +
target/s390x/tcg/insn-data.h.inc |  1 +
target/s390x/tcg/int_helper.c    | 11 ++++++---
target/s390x/tcg/translate.c     |  8 ++++++
tests/tcg/s390x/Makefile.target  |  1 +
tests/tcg/s390x/cvd.c            | 42 ++++++++++++++++++++++++++++++++
6 files changed, 61 insertions(+), 3 deletions(-)
create mode 100644 tests/tcg/s390x/cvd.c
[PATCH 0/2] target/s390x: Emulate CVDG
Posted by Ilya Leoshkevich 10 months, 2 weeks ago
Hi,

Ido reported that we are missing the CVDG emulation (which is very
similar to the existing CVD emulation). This series adds it along with
a test.

Best regards,
Ilya


Ilya Leoshkevich (2):
  target/s390x: Emulate CVDG
  tests/tcg/s390x: Test CONVERT TO DECIMAL

 target/s390x/helper.h            |  1 +
 target/s390x/tcg/insn-data.h.inc |  1 +
 target/s390x/tcg/int_helper.c    | 11 ++++++---
 target/s390x/tcg/translate.c     |  8 ++++++
 tests/tcg/s390x/Makefile.target  |  1 +
 tests/tcg/s390x/cvd.c            | 42 ++++++++++++++++++++++++++++++++
 6 files changed, 61 insertions(+), 3 deletions(-)
 create mode 100644 tests/tcg/s390x/cvd.c

-- 
2.43.0
Re: [PATCH 0/2] target/s390x: Emulate CVDG
Posted by Thomas Huth 10 months, 1 week ago
On 15/01/2024 21.21, Ilya Leoshkevich wrote:
> Hi,
> 
> Ido reported that we are missing the CVDG emulation (which is very
> similar to the existing CVD emulation). This series adds it along with
> a test.

Just FYI, your patch made me curious which other instructions we still might 
be missing from chapter 7 in the Principles of Operation... with some shell 
scripting and manual fiddling, I ended up with this list:

0C	BRANCH AND SAVE AND SET MODE		BASSM
0B	BRANCH AND SET MODE			BSM
B21A	COMPARE AND FORM CODEWORD		CFC
B257	COMPARE UNTIL SUBSTRING EQUAL		CUSE
B263	COMPRESSION CALL			CMPSC
4F	CONVERT TO BINARY (32)			CVB
E306	CONVERT TO BINARY (32)			CVBY
E30E	CONVERT TO BINARY (64)			CVBG
B24D	COPY ACCESS				CPYA
EF	LOAD MULTIPLE DISJOINT			LMD
EE	PERFORM LOCKED OPERATION		PLO
B9BF	TRANSLATE AND TEST EXTENDED		TRTE
B9BD	TRANSLATE AND TEST REVERSE EXTENDED	TRTRE
0102	UPDATE TREE				UPT

There are some additional ones from the "Guarded-Storage Facility" and the 
"Transactional-Execution Facility", but these are optional AFAIK.

Some of these (like UPT) really look like sins from the CISC past, I guess 
we'll never need them for running Linux guests :-)

  Thomas
Re: [PATCH 0/2] target/s390x: Emulate CVDG
Posted by Ilya Leoshkevich 10 months ago
On Thu, 2024-01-18 at 18:28 +0100, Thomas Huth wrote:
> On 15/01/2024 21.21, Ilya Leoshkevich wrote:
> > Hi,
> > 
> > Ido reported that we are missing the CVDG emulation (which is very
> > similar to the existing CVD emulation). This series adds it along
> > with
> > a test.
> 
> Just FYI, your patch made me curious which other instructions we
> still might 
> be missing from chapter 7 in the Principles of Operation... with some
> shell 
> scripting and manual fiddling, I ended up with this list:
> 
> 0C	BRANCH AND SAVE AND SET MODE		BASSM
> 0B	BRANCH AND SET MODE			BSM
> B21A	COMPARE AND FORM CODEWORD		CFC
> B257	COMPARE UNTIL SUBSTRING EQUAL		CUSE
> B263	COMPRESSION CALL			CMPSC
> 4F	CONVERT TO BINARY (32)			CVB
> E306	CONVERT TO BINARY (32)			CVBY
> E30E	CONVERT TO BINARY (64)			CVBG
> B24D	COPY ACCESS				CPYA
> EF	LOAD MULTIPLE DISJOINT			LMD
> EE	PERFORM LOCKED OPERATION		PLO
> B9BF	TRANSLATE AND TEST EXTENDED		TRTE
> B9BD	TRANSLATE AND TEST REVERSE EXTENDED	TRTRE
> 0102	UPDATE TREE				UPT
> 
> There are some additional ones from the "Guarded-Storage Facility"
> and the 
> "Transactional-Execution Facility", but these are optional AFAIK.
> 
> Some of these (like UPT) really look like sins from the CISC past, I
> guess 
> we'll never need them for running Linux guests :-)
> 
>   Thomas
> 

Thanks, I'll append this to my TODO list. At least for CVB* there seems
to exist an unfinished patch on the list [1].

[1]
https://lore.kernel.org/qemu-devel/20180821025104.19604-8-pavel.zbitskiy@gmail.com/
Re: [PATCH 0/2] target/s390x: Emulate CVDG
Posted by Thomas Huth 10 months ago
On 25/01/2024 13.47, Ilya Leoshkevich wrote:
> On Thu, 2024-01-18 at 18:28 +0100, Thomas Huth wrote:
>> On 15/01/2024 21.21, Ilya Leoshkevich wrote:
>>> Hi,
>>>
>>> Ido reported that we are missing the CVDG emulation (which is very
>>> similar to the existing CVD emulation). This series adds it along
>>> with a test.
>>
>> Just FYI, your patch made me curious which other instructions we
>> still might
>> be missing from chapter 7 in the Principles of Operation... with some
>> shell
>> scripting and manual fiddling, I ended up with this list:
>>
>> 0C	BRANCH AND SAVE AND SET MODE		BASSM
>> 0B	BRANCH AND SET MODE			BSM
>> B21A	COMPARE AND FORM CODEWORD		CFC
>> B257	COMPARE UNTIL SUBSTRING EQUAL		CUSE
>> B263	COMPRESSION CALL			CMPSC
>> 4F	CONVERT TO BINARY (32)			CVB
>> E306	CONVERT TO BINARY (32)			CVBY
>> E30E	CONVERT TO BINARY (64)			CVBG
>> B24D	COPY ACCESS				CPYA
>> EF	LOAD MULTIPLE DISJOINT			LMD
>> EE	PERFORM LOCKED OPERATION		PLO
>> B9BF	TRANSLATE AND TEST EXTENDED		TRTE
>> B9BD	TRANSLATE AND TEST REVERSE EXTENDED	TRTRE
>> 0102	UPDATE TREE				UPT
>>
>> There are some additional ones from the "Guarded-Storage Facility"
>> and the
>> "Transactional-Execution Facility", but these are optional AFAIK.
>>
>> Some of these (like UPT) really look like sins from the CISC past, I
>> guess
>> we'll never need them for running Linux guests :-)
>>
>>    Thomas
>>
> 
> Thanks, I'll append this to my TODO list. At least for CVB* there seems
> to exist an unfinished patch on the list [1].
> 
> [1]
> https://lore.kernel.org/qemu-devel/20180821025104.19604-8-pavel.zbitskiy@gmail.com/

Oh, interesting, there was even a v4 that fixed the review feedback:

https://lore.kernel.org/qemu-devel/20180822144039.5796-4-pavel.zbitskiy@gmail.com/

But it seems like this had fallen through the cracks :-(

Maybe we can re-activate it now...

  Thomas