Skip to contentSkip to conversation

s390x: pv: fix arguments for out-of-tree-builds

PATCH In review Nico Boehr 3 participants 5 messages Feb 27, 2025 – Mar 11, 2025

Subsystems (2)
lore
Share & tools
lore

Nico Boehr

author
#0 lore raw

PATCH 1/1 s390x: pv: fix arguments for out-of-tree-builds

When building out-of-tree, the parmfile was not passed to genprotimg, causing the selftest-setup_PV test to fail.

Fix the Makefile rule s.t. parmfile is correctly passed.

---
 s390x/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +1 -1
index 47dda6d26a6f..97ed0b473af5 100644
@@ -213,7 +213,7 @@ else
 	GENPROTIMG_PCF := 0x000000e0
 endif
 
-$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile
+$(TEST_DIR)/selftest.pv.bin: $(SRCDIR)/s390x/selftest.parmfile
 %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key)
 	$(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),))
 	$(GENPROTIMG) $(GENPROTIMG_DEFAULT_ARGS) --host-key-document $(HOST_KEY_DOCUMENT) $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@
Signature · 1 line
2.47.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 26 lines · Nico Boehr

When building out-of-tree, the parmfile was not passed to genprotimg, causing the selftest-setup_PV test to fail.

Fix the Makefile rule s.t. parmfile is correctly passed.

---
 s390x/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +1 -1
index 47dda6d26a6f..97ed0b473af5 100644
@@ -213,7 +213,7 @@ else
 	GENPROTIMG_PCF := 0x000000e0
 endif
 
-$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile
+$(TEST_DIR)/selftest.pv.bin: $(SRCDIR)/s390x/selftest.parmfile
 %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key)
 	$(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),))
 	$(GENPROTIMG) $(GENPROTIMG_DEFAULT_ARGS) --host-key-document $(HOST_KEY_DOCUMENT) $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@
Signature · 1 line
2.47.1
#2 lore raw
In reply to Nico Boehr
Quoted 16 lines · Nico Boehr

When building out-of-tree, the parmfile was not passed to genprotimg, causing the selftest-setup_PV test to fail.

Fix the Makefile rule s.t. parmfile is correctly passed.

---
  s390x/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +0 -0
index 47dda6d26a6f..97ed0b473af5 100644

s390x/Makefile else · line 219

Quoted 8 lines
s390x/Makefile +1 -1
@@ -213,7 +213,7 @@ else
  	GENPROTIMG_PCF := 0x000000e0
  endif
 
-$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile
+$(TEST_DIR)/selftest.pv.bin: $(SRCDIR)/s390x/selftest.parmfile
  %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key)
  	$(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),))
  	$(GENPROTIMG) $(GENPROTIMG_DEFAULT_ARGS) --host-key-document $(HOST_KEY_DOCUMENT) $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@

We had this hardcoded, then changed to this rule and now move back to hardcoding, no?

It's fine but it's still strange...

#3 lore raw
Quoted 20 lines · Janosch Frank
Quoted 19 lines · Nico Boehr

When building out-of-tree, the parmfile was not passed to genprotimg, causing the selftest-setup_PV test to fail.

Fix the Makefile rule s.t. parmfile is correctly passed.

---
  s390x/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +0 -0
index 47dda6d26a6f..97ed0b473af5 100644
@@ -213,7 +213,7 @@ else
  	GENPROTIMG_PCF := 0x000000e0
  endif
 
Quoted 9 lines

s390x/Makefile else · line 219

Quoted 5 lines
s390x/Makefile +1 -1
-$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile
+$(TEST_DIR)/selftest.pv.bin: $(SRCDIR)/s390x/selftest.parmfile
  %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key)
  	$(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),))
  	$(GENPROTIMG) $(GENPROTIMG_DEFAULT_ARGS) --host-key-document $(HOST_KEY_DOCUMENT) $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@

We had this hardcoded, then changed to this rule and now move back to hardcoding, no?

We probably have never tried to build KUT out-of-tree.

[…snip…]

author
#4 lore raw
In reply to Janosch Frank
Quoted 20 lines · Janosch Frank
Quoted 19 lines · Nico Boehr

When building out-of-tree, the parmfile was not passed to genprotimg, causing the selftest-setup_PV test to fail.

Fix the Makefile rule s.t. parmfile is correctly passed.

---
  s390x/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
s390x/Makefile +0 -0
index 47dda6d26a6f..97ed0b473af5 100644
@@ -213,7 +213,7 @@ else
  	GENPROTIMG_PCF := 0x000000e0
  endif
 
Quoted 9 lines

s390x/Makefile else · line 219

Quoted 5 lines
s390x/Makefile +1 -1
-$(patsubst %.parmfile,%.pv.bin,$(wildcard s390x/*.parmfile)): %.pv.bin: %.parmfile
+$(TEST_DIR)/selftest.pv.bin: $(SRCDIR)/s390x/selftest.parmfile
  %.pv.bin: %.bin $(HOST_KEY_DOCUMENT) $(comm-key)
  	$(eval parmfile_args = $(if $(filter %.parmfile,$^),--parmfile $(filter %.parmfile,$^),))
  	$(GENPROTIMG) $(GENPROTIMG_DEFAULT_ARGS) --host-key-document $(HOST_KEY_DOCUMENT) $(GENPROTIMG_COMM_OPTION) $(comm-key) --x-pcf $(GENPROTIMG_PCF) $(parmfile_args) --image $(filter %.bin,$^) -o $@

We had this hardcoded, then changed to this rule and now move back to hardcoding, no?

I mean the preferred way would be to not hardcode it _and_ have out of tree builds working, but I (with my limited makefile knowledge) couldn't get this to work properly. I will of course take patches... :-)

Since I had a unpleasant surprise with the upstream CI and out-of-tree-builds recently, I thought it's acceptable to remove flexibility that nobody uses.