From: Christian Borntraeger <borntraeger@linux.ibm.com>
To: Janosch Frank <frankja@linux.ibm.com>, kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com
Subject: Re: [PATCH 2/2] KVM: s390: selftests: Add load psw bear test
Date: Wed, 25 Mar 2026 11:29:56 +0100 [thread overview]
Message-ID: <77fb3826-08a2-4bf7-b9d5-2679072d0f7a@linux.ibm.com> (raw)
In-Reply-To: <20260323153637.3683-3-frankja@linux.ibm.com>
Had a 2nd look.
Just wanted to test that lpswe does indeed leaves the BEAR unchanged and then I
realized that lpswey does not work in our guest due to missing cpu model.
So either remove the lpswey test for now or fix it.
Something like this on top
--- a/tools/testing/selftests/kvm/s390/bear.c
+++ b/tools/testing/selftests/kvm/s390/bear.c
@@ -22,7 +22,10 @@ static void guest_lpswey(void)
u64 bear;
asm volatile (
- " larl %%r3,lpswey_addr\n"
+ " larl %%r3,jump_addr\n"
+ "jump_addr:\n"
+ " j lpswey_addr\n"
+ " nop\n"
"lpswey_addr:\n"
" .insn siy,0xeb0000000071,%[psw],0\n"
" nop\n"
@@ -107,21 +110,30 @@ static void test_lpswey(void)
struct kvm_vcpu *vcpu;
struct kvm_run *run;
struct kvm_vm *vm;
+ struct kvm_s390_vm_cpu_processor proc;
+ int r;
+
+ vm = vm_create(1);
+ __kvm_device_attr_get(vm->fd, KVM_S390_VM_CPU_MODEL,
+ KVM_S390_VM_CPU_PROCESSOR, &proc);
+ proc.fac_list[3] |= 0x4000000000000000UL;
+ r = __kvm_device_attr_set(vm->fd, KVM_S390_VM_CPU_MODEL,
+ KVM_S390_VM_CPU_PROCESSOR, &proc);
+ vcpu = vm_vcpu_add(vm, 0, guest_lpswey);
- vm = vm_create_with_one_vcpu(&vcpu, guest_lpswey);
inject_mcheck(vcpu);
run = vcpu->run;
vcpu_run(vcpu);
- ksft_test_result(run->s.regs.gprs[3] != run->s.regs.gprs[4],
- "emulation: lpswey bear does not match\n");
+ ksft_test_result(run->s.regs.gprs[3] == run->s.regs.gprs[4],
+ "emulation: lpswey bear does match previous\n");
kvm_vm_free(vm);
vm = vm_create_with_one_vcpu(&vcpu, guest_lpswey);
run = vcpu->run;
vcpu_run(vcpu);
ksft_test_result(run->s.regs.gprs[3] &&
- run->s.regs.gprs[3] != run->s.regs.gprs[4],
- "interpretation: lpswey bear does not match\n");
+ run->s.regs.gprs[3] == run->s.regs.gprs[4],
+ "interpretation: lpswey bear does match previous\n");
kvm_vm_free(vm);
}
next prev parent reply other threads:[~2026-03-25 10:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 15:35 [PATCH 0/2] KVM: s390: Fix lpsw/e breaking event handling Janosch Frank
2026-03-23 15:35 ` [PATCH 1/2] " Janosch Frank
2026-03-25 7:51 ` Christian Borntraeger
2026-03-25 12:00 ` Claudio Imbrenda
2026-04-15 10:59 ` Heiko Carstens
2026-04-15 11:45 ` Janosch Frank
2026-03-23 15:35 ` [PATCH 2/2] KVM: s390: selftests: Add load psw bear test Janosch Frank
2026-03-25 8:49 ` Christian Borntraeger
2026-03-25 10:29 ` Christian Borntraeger [this message]
2026-03-25 13:15 ` Janosch Frank
2026-03-25 13:19 ` [PATCH v2] " Janosch Frank
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=77fb3826-08a2-4bf7-b9d5-2679072d0f7a@linux.ibm.com \
--to=borntraeger@linux.ibm.com \
--cc=frankja@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox