Skip to contentSkip to conversation

tools/hvmloader: link errno.h from xen internal

PATCH In review Tiejun Chen 2 participants 3 messages Nov 4, 2014 – Nov 5, 2014

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 tools/hvmloader: link errno.h from xen internal

We need to act on some specific hypercall error numbers, so require the hypervisor view on the errno.h value rather than just the build environment's number. So here link this headfile from xen.

---
v3:

* Address Jan's two comments
The file name would seem quite right to be used as dependency here. subdirs-all should depend on errno.h

v2:

* CCed more tools MAINTAINERS
* Rephrase long log
* Remove this line '@rm -rf errno.h' since we always force link
* Drop including this head file in util.h directly

 .gitignore                        | 1 +
 tools/firmware/hvmloader/Makefile | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)
.gitignore +1 -0
index b24e905..52c3038 100644
@@ -127,6 +127,7 @@ tools/firmware/hvmloader/acpi/ssdt_*.h
 tools/firmware/hvmloader/hvmloader
 tools/firmware/hvmloader/roms.h
 tools/firmware/hvmloader/roms.inc
+tools/firmware/hvmloader/errno.h
 tools/firmware/rombios/BIOS-bochs-[^/]*
 tools/firmware/rombios/_rombios[^/]*_.c
 tools/firmware/rombios/rombios[^/]*.s
tools/firmware/hvmloader/Makefile +6 -1
index 46a79c5..ef2337b 100644
@@ -87,6 +87,11 @@ endif
 all: subdirs-all
 	$(MAKE) hvmloader
 
+subdirs-all: errno.h
+
+errno.h:
+	ln -sf $(XEN_ROOT)/xen/include/xen/errno.h .
+
 ovmf.o rombios.o seabios.o hvmloader.o: roms.inc
 smbios.o: CFLAGS += -D__SMBIOS_DATE__="\"$(shell date +%m/%d/%Y)\""
 
@@ -136,7 +141,7 @@ endif
 
 .PHONY: clean
 clean: subdirs-clean
-	rm -f roms.inc roms.inc.new acpi.h
+	rm -f roms.inc roms.inc.new acpi.h errno.h
 	rm -f hvmloader hvmloader.tmp *.o $(DEPS)
 
 -include $(DEPS)
Signature · 1 line
1.9.1
Acked-by on v3 1/1
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line · On 04.11.14 at 02:00, <[email protected]> wrote:

We need to act on some specific hypercall error numbers, so require the hypervisor view on the errno.h value rather than just the build environment's number. So here link this headfile from xen.

but only if this goes in
- together with code actually using it
- ahead (i.e. still for 4.5) of the planned changes to make error indicator values properly part of the hypercall ABI (4.6)

Jan

#2 lore raw
Quoted 6 lines · Jan Beulich
Quoted 6 lines
Quoted 1 line
Quoted 1 line · On 04.11.14 at 02:00, <[email protected]> wrote:

We need to act on some specific hypercall error numbers, so require the hypervisor view on the errno.h value rather than just the build environment's number. So here link this headfile from xen.

Quoted 8 lines
Quoted 1 line

but only if this goes in
- together with code actually using it
- ahead (i.e. still for 4.5) of the planned changes to make error indicator values properly part of the hypercall ABI (4.6)

So looks I just need to add your Ack and include this in my series of patches.

Thanks
Tiejun