[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] tools/hvmloader: link errno.h from xen internal



On 2014/10/31 17:15, Jan Beulich wrote:
On 31.10.14 at 03:18, <tiejun.chen@xxxxxxxxx> wrote:

(You omitted half of the tools maintainers; Cc-ing them now.)

I think I already pick all relevant maintainers to review this patch,

$ ./scripts/get_maintainer.pl 0004-tools-hvmloader-link-errno.h-from-xen-internal.patch
Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Wei Liu <wei.liu2@xxxxxxxxxx>
xen-devel@xxxxxxxxxxxxx

So please tell me whom should be included specifically.


We will use some error numbers in hvmloader so here just link
this head file from xen.

This is not a proper reasoning for using the Xen internal header here.
You should make clear that we want to act on specific hypercall
error codes, and hence require the hypervisors view on the errno.h
values rather than the build environment's (as was sufficient for the
use in xenbus.c).


So rephrase,

    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.

--- a/tools/firmware/hvmloader/Makefile
+++ b/tools/firmware/hvmloader/Makefile
@@ -84,9 +84,13 @@ ROMS += $(SEABIOS_ROM)
  endif

  .PHONY: all
-all: subdirs-all
+all: subdirs-all .dir
        $(MAKE) hvmloader

+.dir:
+       @rm -rf errno.h

Why?

We should make sure we are linking to create a non-existing file, otherwise you may see this,

ln: failed to create symbolic link '...': File exists


--- a/tools/firmware/hvmloader/util.h
+++ b/tools/firmware/hvmloader/util.h
@@ -6,6 +6,7 @@
  #include <stddef.h>
  #include <xen/xen.h>
  #include <xen/hvm/hvm_info_table.h>
+#include "errno.h"

Does this allow xenbus.c to still build? I think this either should go into

I did a test as follows:
1: make clean
2: make xen
3: make tools
4: make clean
5: make tools

Is this covering xenbus?

the .c file wanting to use the values (preferable - remember my earlier
comment about introducing unnecessary dependencies?), or the

Okay, I can remove this part, then just add this head file into any necessary .c files. This will be addressed in other RMRR patches.

Thanks
Tiejun

respective #include <errno.h> in xenbus.c should be dropped.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.