RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2111994 - RHEL9: skey test in kvm_unit_test got failed
Summary: RHEL9: skey test in kvm_unit_test got failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: qemu-kvm
Version: 9.1
Hardware: s390x
OS: Linux
medium
medium
Target Milestone: rc
: 9.1
Assignee: Thomas Huth
QA Contact: bfu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-28 14:53 UTC by bfu
Modified: 2022-11-15 10:20 UTC (History)
17 users (show)

Fixed In Version: qemu-kvm-7.0.0-10.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 09:54:42 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src qemu-kvm merge_requests 109 0 None opened Honor storage keys during emulation of I/O instructions 2022-07-29 15:45:39 UTC
Red Hat Issue Tracker RHELPLAN-129491 0 None None None 2022-07-28 15:03:08 UTC
Red Hat Product Errata RHSA-2022:7967 0 None None None 2022-11-15 09:55:16 UTC

Description bfu 2022-07-28 14:53:57 UTC
Description of problem:

[stdout] BUILD_HEAD=14b54ed7
[stdout] timeout -k 1s --foreground 90s /usr/libexec/qemu-kvm -nodefaults -nographic -machine s390-ccw-virtio,accel=kvm -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -kernel /tmp/tmp.HR9xw3499k -smp 1 -device virtio-net-ccw # -initrd /tmp/tmp.XgGEj0J8xV
[stdout] PASS: skey: privileged: sske: Program interrupt: expected(2) == received(2)
[stdout] PASS: skey: privileged: skey did not change on exception
[stdout] PASS: skey: privileged: iske: Program interrupt: expected(2) == received(2)
[stdout] PASS: skey: invalid address: sske: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: invalid address: iske: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: invalid address: rrbe: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: set key test
[stdout] PASS: skey: multi block
[stdout] PASS: skey: chg bit test
[stdout] PASS: skey: TPROT: zero key: no protection
[stdout] PASS: skey: TPROT: matching key: no protection
[stdout] PASS: skey: TPROT: mismatching key: no fetch protection: store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch protection: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: disabled: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: enabled: store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: invalid: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: storage-protection override: no protection
[stdout] PASS: skey: STORE CPU ADDRESS: zero key: store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: matching key: store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: no store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: no store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, override key: override occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: no store occurred
[stdout] PASS: skey: DIAG 308: no exception on fetch, response: invalid IPIB
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: zero key: Performed store-channel-subsystem-characteristics
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: matching key: Performed store-channel-subsystem-characteristics
[stdout] FAIL: skey: CHANNEL SUBSYSTEM CALL: mismatching key: no fetch protection: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: no fetch protection: TEID: valid protection code
[stdout] FAIL: skey: CHANNEL SUBSYSTEM CALL: mismatching key: fetch protection: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: fetch protection: TEID: valid protection code
[stdout] FAIL: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, invalid key: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, invalid key: TEID: valid protection code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, override key: Performed store-channel-subsystem-characteristics
[stdout] FAIL: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override disabled, override key: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override disabled, override key: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: zero key: set prefix
[stdout] PASS: skey: SET PREFIX: matching key: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: no fetch protection: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: did not set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: did not set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override applies: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: did not set prefix
[stdout] INFO: skey: MSCH: Found subchannel 00010000
[stdout] INFO: skey: MSCH: Tested subchannels: 1, I/O subchannels: 1, I/O devices: 1
[stdout] PASS: skey: MSCH: zero key: fetched from SCHIB
[stdout] PASS: skey: MSCH: matching key: fetched from SCHIB
[stdout] PASS: skey: MSCH: mismatching key: no fetch protection: fetched from SCHIB
[stdout] FAIL: skey: MSCH: mismatching key: fetch protection: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: MSCH: mismatching key: fetch protection: TEID: valid protection code
[stdout] FAIL: skey: MSCH: mismatching key: fetch protection: did not modify subchannel
[stdout] FAIL: skey: MSCH: mismatching key: remapped page, fetch protection: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: MSCH: mismatching key: remapped page, fetch protection: TEID: valid protection code
[stdout] FAIL: skey: MSCH: mismatching key: remapped page, fetch protection: did not modify subchannel
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override applies: fetched from SCHIB
[stdout] FAIL: skey: MSCH: mismatching key: fetch-protection override does not apply: Program interrupt: expected(4) == received(0)
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override does not apply: TEID: valid protection code
[stdout] FAIL: skey: MSCH: mismatching key: fetch-protection override does not apply: did not modify subchannel
[stdout] SUMMARY: 73 tests, 10 unexpected failures
[stdout] 
[stdout] EXIT: STATUS=3
[stdout] [31mFAIL[0m skey (73 tests, 10 unexpected failures)
[stderr] qemu-kvm: warning: nic virtio-net-ccw.0 has no peer

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

Comment 1 Thomas Huth 2022-07-29 11:10:29 UTC
The "skey" test is even failing for me when I use upstream kernel 5.19.0-rc7 and QEMU 7.1-rc0 ... Claudio, could you maybe have a look at this since you've merged the last changes to the skey test in the kvm-unit-test suite?

Comment 2 Thomas Huth 2022-07-29 13:16:20 UTC
(In reply to Thomas Huth from comment #1)
> The "skey" test is even failing for me when I use upstream kernel 5.19.0-rc7
> and QEMU 7.1-rc0 ... 

My bad, I was accidentally running the test with TCG - it works fine with upstream when using KVM.

I think we're likely missing this in QEMU:

 https://git.qemu.org/?p=qemu.git;a=commitdiff;h=54354861d21b69ec0781
 "target/s390x: kvm: Honor storage keys during emulation"

Comment 4 bfu 2022-08-11 18:02:05 UTC
Test result:
 (4/4) L1_kvm_unit_tests.Host_RHEL.m9.u1.v0.nographic.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.1.0.s390x.io-github-autotest-qemu.ansible_test.s390-virtio: PASS (323.67 s)
[stdout] BUILD_HEAD=7362976d
[stdout] timeout -k 1s --foreground 90s /usr/libexec/qemu-kvm -nodefaults -nographic -machine s390-ccw-virtio,accel=kvm -chardev stdio,id=con0 -device sclpconsole,chardev=con0 -kernel /tmp/tmp.jHigGmOzTm -smp 1 -device virtio-net-ccw # -initrd /tmp/tmp.70inHpK1iB
[stdout] PASS: skey: privileged: sske: Program interrupt: expected(2) == received(2)
[stdout] PASS: skey: privileged: skey did not change on exception
[stdout] PASS: skey: privileged: iske: Program interrupt: expected(2) == received(2)
[stdout] PASS: skey: invalid address: sske: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: invalid address: iske: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: invalid address: rrbe: Program interrupt: expected(5) == received(5)
[stdout] PASS: skey: set key test
[stdout] PASS: skey: multi block
[stdout] PASS: skey: chg bit test
[stdout] PASS: skey: TPROT: zero key: no protection
[stdout] PASS: skey: TPROT: matching key: no protection
[stdout] PASS: skey: TPROT: mismatching key: no fetch protection: store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch protection: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: disabled: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: enabled: store protection
[stdout] PASS: skey: TPROT: mismatching key: fetch-protection override: invalid: fetch & store protection
[stdout] PASS: skey: TPROT: mismatching key: storage-protection override: no protection
[stdout] PASS: skey: STORE CPU ADDRESS: zero key: store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: matching key: store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: mismatching key: no store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, invalid key: no store occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override, override key: override occurred
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: TEID: valid access code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: TEID: valid protection code
[stdout] PASS: skey: STORE CPU ADDRESS: storage-protection override disabled, override key: no store occurred
[stdout] PASS: skey: DIAG 308: no exception on fetch, response: invalid IPIB
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: zero key: Performed store-channel-subsystem-characteristics
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: matching key: Performed store-channel-subsystem-characteristics
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: no fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: no fetch protection: TEID: valid access code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: no fetch protection: TEID: valid protection code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: fetch protection: TEID: valid access code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: fetch protection: TEID: valid protection code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, invalid key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, invalid key: TEID: valid access code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, invalid key: TEID: valid protection code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override, override key: Performed store-channel-subsystem-characteristics
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override disabled, override key: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override disabled, override key: TEID: valid access code
[stdout] PASS: skey: CHANNEL SUBSYSTEM CALL: mismatching key: storage-protection override disabled, override key: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: zero key: set prefix
[stdout] PASS: skey: SET PREFIX: matching key: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: no fetch protection: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection: did not set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: remapped page, fetch protection: did not set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override applies: set prefix
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: TEID: valid access code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: TEID: valid protection code
[stdout] PASS: skey: SET PREFIX: mismatching key: fetch protection override does not apply: did not set prefix
[stdout] INFO: skey: MSCH: Found subchannel 00010000
[stdout] INFO: skey: MSCH: Tested subchannels: 1, I/O subchannels: 1, I/O devices: 1
[stdout] PASS: skey: MSCH: zero key: fetched from SCHIB
[stdout] PASS: skey: MSCH: matching key: fetched from SCHIB
[stdout] PASS: skey: MSCH: mismatching key: no fetch protection: fetched from SCHIB
[stdout] PASS: skey: MSCH: mismatching key: fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: MSCH: mismatching key: fetch protection: TEID: valid access code
[stdout] PASS: skey: MSCH: mismatching key: fetch protection: TEID: valid protection code
[stdout] PASS: skey: MSCH: mismatching key: fetch protection: did not modify subchannel
[stdout] PASS: skey: MSCH: mismatching key: remapped page, fetch protection: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: MSCH: mismatching key: remapped page, fetch protection: TEID: valid access code
[stdout] PASS: skey: MSCH: mismatching key: remapped page, fetch protection: TEID: valid protection code
[stdout] PASS: skey: MSCH: mismatching key: remapped page, fetch protection: did not modify subchannel
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override applies: fetched from SCHIB
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override does not apply: Program interrupt: expected(4) == received(4)
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override does not apply: TEID: valid access code
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override does not apply: TEID: valid protection code
[stdout] PASS: skey: MSCH: mismatching key: fetch-protection override does not apply: did not modify subchannel
[stdout] SUMMARY: 80 tests
[stdout] 
[stdout] EXIT: STATUS=1
[stdout] [32mPASS[0m skey (80 tests)
[stderr] qemu-kvm: warning: nic virtio-net-ccw.0 has no peer

As the test result, set this bz to verified

Comment 7 errata-xmlrpc 2022-11-15 09:54:42 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: qemu-kvm security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:7967


Note You need to log in before you can comment on or make changes to this bug.