* [PATCH v2 0/2] s390x: Pipeline and other minor fixes
@ 2022-07-21 13:30 Claudio Imbrenda
2022-07-21 13:30 ` [PATCH v2 1/2] s390x: intercept: fence one test when using TCG Claudio Imbrenda
2022-07-21 13:30 ` [PATCH v2 2/2] s390x: intercept: make sure all output lines are unique Claudio Imbrenda
0 siblings, 2 replies; 6+ messages in thread
From: Claudio Imbrenda @ 2022-07-21 13:30 UTC (permalink / raw)
To: kvm, linux-s390, qemu-s390x; +Cc: frankja, thuth
The first patch fences a test when using TCG. When using Qemu < 7.1,
TCG would crash. This causes the CI pipeline to fail. Fence the
testcase when using TCG to get the CI pipeline to work.
The second patch adds some report_prefix_push/report_prefix_pop around
some of the new testcases to make each output line unique.
Claudio Imbrenda (2):
s390x: intercept: fence one test when using TCG
s390x: intercept: make sure all output lines are unique
s390x/intercept.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
--
2.36.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] s390x: intercept: fence one test when using TCG
2022-07-21 13:30 [PATCH v2 0/2] s390x: Pipeline and other minor fixes Claudio Imbrenda
@ 2022-07-21 13:30 ` Claudio Imbrenda
2022-07-21 13:41 ` Thomas Huth
2022-07-21 13:30 ` [PATCH v2 2/2] s390x: intercept: make sure all output lines are unique Claudio Imbrenda
1 sibling, 1 reply; 6+ messages in thread
From: Claudio Imbrenda @ 2022-07-21 13:30 UTC (permalink / raw)
To: kvm, linux-s390, qemu-s390x; +Cc: frankja, thuth
Qemu commit f8333de2793 ("target/s390x/tcg: SPX: check validity of new prefix")
fixes a TCG bug discovered with a new testcase in the intercept test.
The gitlab pipeline for the KVM unit tests uses TCG and it will keep
failing every time as long as the pipeline uses a version of Qemu
without the aforementioned patch.
Fence the specific testcase for now. Once the pipeline is fixed, this
patch can safely be reverted.
This patch is meant to go on top this already queued patch from Janis:
"s390x/intercept: Test invalid prefix argument to SET PREFIX"
https://lore.kernel.org/all/20220627152412.2243255-1-scgl@linux.ibm.com/
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
s390x/intercept.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/s390x/intercept.c b/s390x/intercept.c
index 54bed5a4..656b8adb 100644
--- a/s390x/intercept.c
+++ b/s390x/intercept.c
@@ -14,6 +14,7 @@
#include <asm/page.h>
#include <asm/facility.h>
#include <asm/time.h>
+#include <hardware.h>
static uint8_t pagebuf[PAGE_SIZE * 2] __attribute__((aligned(PAGE_SIZE * 2)));
@@ -76,7 +77,8 @@ static void test_spx(void)
check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
new_prefix = get_ram_size() & 0x7fffe000;
- if (get_ram_size() - new_prefix < 2 * PAGE_SIZE) {
+ /* TODO: Remove host_is_tcg() checks once CIs are using QEMU >= 7.1 */
+ if (!host_is_tcg() && (get_ram_size() - new_prefix < 2 * PAGE_SIZE)) {
expect_pgm_int();
asm volatile("spx %0 " : : "Q"(new_prefix));
check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
@@ -88,7 +90,10 @@ static void test_spx(void)
* the address to 8k we have a completely accessible area.
*/
} else {
- report_skip("inaccessible prefix area");
+ if (host_is_tcg())
+ report_skip("inaccessible prefix area (workaround for TCG bug)");
+ else
+ report_skip("inaccessible prefix area");
}
}
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2 1/2] s390x: intercept: fence one test when using TCG
2022-07-21 13:30 ` [PATCH v2 1/2] s390x: intercept: fence one test when using TCG Claudio Imbrenda
@ 2022-07-21 13:41 ` Thomas Huth
2022-07-21 13:46 ` Claudio Imbrenda
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Huth @ 2022-07-21 13:41 UTC (permalink / raw)
To: Claudio Imbrenda, kvm, linux-s390, qemu-s390x; +Cc: frankja
On 21/07/2022 15.30, Claudio Imbrenda wrote:
> Qemu commit f8333de2793 ("target/s390x/tcg: SPX: check validity of new prefix")
> fixes a TCG bug discovered with a new testcase in the intercept test.
>
> The gitlab pipeline for the KVM unit tests uses TCG and it will keep
> failing every time as long as the pipeline uses a version of Qemu
> without the aforementioned patch.
>
> Fence the specific testcase for now. Once the pipeline is fixed, this
> patch can safely be reverted.
>
> This patch is meant to go on top this already queued patch from Janis:
> "s390x/intercept: Test invalid prefix argument to SET PREFIX"
> https://lore.kernel.org/all/20220627152412.2243255-1-scgl@linux.ibm.com/
If we keep this as a separate patch, that paragraph should be removed from
the commit description.
Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2 1/2] s390x: intercept: fence one test when using TCG
2022-07-21 13:41 ` Thomas Huth
@ 2022-07-21 13:46 ` Claudio Imbrenda
0 siblings, 0 replies; 6+ messages in thread
From: Claudio Imbrenda @ 2022-07-21 13:46 UTC (permalink / raw)
To: Thomas Huth; +Cc: kvm, linux-s390, qemu-s390x, frankja
On Thu, 21 Jul 2022 15:41:30 +0200
Thomas Huth <thuth@redhat.com> wrote:
> On 21/07/2022 15.30, Claudio Imbrenda wrote:
> > Qemu commit f8333de2793 ("target/s390x/tcg: SPX: check validity of new prefix")
> > fixes a TCG bug discovered with a new testcase in the intercept test.
> >
> > The gitlab pipeline for the KVM unit tests uses TCG and it will keep
> > failing every time as long as the pipeline uses a version of Qemu
> > without the aforementioned patch.
> >
> > Fence the specific testcase for now. Once the pipeline is fixed, this
> > patch can safely be reverted.
> >
> > This patch is meant to go on top this already queued patch from Janis:
> > "s390x/intercept: Test invalid prefix argument to SET PREFIX"
> > https://lore.kernel.org/all/20220627152412.2243255-1-scgl@linux.ibm.com/
>
> If we keep this as a separate patch, that paragraph should be removed from
> the commit description.
yeah that will be removed
>
> Anyway:
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] s390x: intercept: make sure all output lines are unique
2022-07-21 13:30 [PATCH v2 0/2] s390x: Pipeline and other minor fixes Claudio Imbrenda
2022-07-21 13:30 ` [PATCH v2 1/2] s390x: intercept: fence one test when using TCG Claudio Imbrenda
@ 2022-07-21 13:30 ` Claudio Imbrenda
2022-07-21 13:42 ` Thomas Huth
1 sibling, 1 reply; 6+ messages in thread
From: Claudio Imbrenda @ 2022-07-21 13:30 UTC (permalink / raw)
To: kvm, linux-s390, qemu-s390x; +Cc: frankja, thuth
The intercept test has the same output line twice for two different
testcases.
Fix this by adding report_prefix_push() as appropriate.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
s390x/intercept.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/s390x/intercept.c b/s390x/intercept.c
index 656b8adb..9e826b6c 100644
--- a/s390x/intercept.c
+++ b/s390x/intercept.c
@@ -68,14 +68,19 @@ static void test_spx(void)
set_prefix(old_prefix);
report(pagebuf[GEN_LC_STFL] != 0, "stfl to new prefix");
+ report_prefix_push("operand not word aligned");
expect_pgm_int();
asm volatile(" spx 0(%0) " : : "r"(1));
check_pgm_int_code(PGM_INT_CODE_SPECIFICATION);
+ report_prefix_pop();
+ report_prefix_push("operand outside memory");
expect_pgm_int();
asm volatile(" spx 0(%0) " : : "r"(-8L));
check_pgm_int_code(PGM_INT_CODE_ADDRESSING);
+ report_prefix_pop();
+ report_prefix_push("new prefix outside memory");
new_prefix = get_ram_size() & 0x7fffe000;
/* TODO: Remove host_is_tcg() checks once CIs are using QEMU >= 7.1 */
if (!host_is_tcg() && (get_ram_size() - new_prefix < 2 * PAGE_SIZE)) {
@@ -95,6 +100,7 @@ static void test_spx(void)
else
report_skip("inaccessible prefix area");
}
+ report_prefix_pop();
}
/* Test the STORE CPU ADDRESS instruction */
--
2.36.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-07-21 13:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-21 13:30 [PATCH v2 0/2] s390x: Pipeline and other minor fixes Claudio Imbrenda
2022-07-21 13:30 ` [PATCH v2 1/2] s390x: intercept: fence one test when using TCG Claudio Imbrenda
2022-07-21 13:41 ` Thomas Huth
2022-07-21 13:46 ` Claudio Imbrenda
2022-07-21 13:30 ` [PATCH v2 2/2] s390x: intercept: make sure all output lines are unique Claudio Imbrenda
2022-07-21 13:42 ` Thomas Huth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox