* [PATCH v2] tools: remove local links to the x86 headers
@ 2018-07-12 16:48 Roger Pau Monne
2018-07-13 7:49 ` Jan Beulich
2018-07-13 8:27 ` Wei Liu
0 siblings, 2 replies; 7+ messages in thread
From: Roger Pau Monne @ 2018-07-12 16:48 UTC (permalink / raw)
To: xen-devel
Cc: Andrew Cooper, Ian Jackson, Wei Liu, Jan Beulich, Roger Pau Monne
In the x86 test harness and the fuzzer, and instead create a link in
the tools/include directory that can be used by all the tools.
No functional change.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
Changes since v1:
- Don't remove the header dependencies in the makefile for the x86
emulator test harness.
---
tools/fuzz/x86_instruction_emulator/Makefile | 10 +++-------
tools/include/Makefile | 3 +++
tools/tests/x86_emulator/Makefile | 10 +++-------
tools/tests/x86_emulator/x86-emulate.h | 6 +++---
4 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/tools/fuzz/x86_instruction_emulator/Makefile b/tools/fuzz/x86_instruction_emulator/Makefile
index fbbb70bbfc..eb88f9412c 100644
--- a/tools/fuzz/x86_instruction_emulator/Makefile
+++ b/tools/fuzz/x86_instruction_emulator/Makefile
@@ -13,11 +13,6 @@ x86_emulate:
x86_emulate/%: x86_emulate ;
-asm:
- [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
-
-asm/%: asm ;
-
x86-emulate.c x86-emulate.h wrappers.c: %:
[ -L $* ] || ln -sf $(XEN_ROOT)/tools/tests/x86_emulator/$*
@@ -27,7 +22,8 @@ GCOV_FLAGS := --coverage
%-cov.o: %.c
$(CC) -c $(CFLAGS) $(GCOV_FLAGS) $< -o $@
-x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
+x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\
+ x86-vendors.h x86-defns.h msr-index.h)
x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h $(x86.h)
# x86-emulate.c will be implicit for both
@@ -50,7 +46,7 @@ all: x86-insn-fuzz-all
.PHONY: distclean
distclean: clean
- rm -f x86_emulate x86-emulate.c x86-emulate.h asm
+ rm -f x86_emulate x86-emulate.c x86-emulate.h
.PHONY: clean
clean:
diff --git a/tools/include/Makefile b/tools/include/Makefile
index 666510530e..270a34f318 100644
--- a/tools/include/Makefile
+++ b/tools/include/Makefile
@@ -21,6 +21,9 @@ xen/.dir:
ln -sf $(addprefix $(XEN_ROOT)/xen/include/xen/,libelf.h elfstructs.h) xen/libelf/
ln -s ../xen-foreign xen/foreign
ln -sf $(XEN_ROOT)/xen/include/acpi acpi
+ifeq ($(CONFIG_X86),y)
+ ln -sf $(XEN_ROOT)/xen/include/asm-x86 xen/asm
+endif
touch $@
# Not xen/xsm as that clashes with link to
diff --git a/tools/tests/x86_emulator/Makefile b/tools/tests/x86_emulator/Makefile
index 417d5c0941..dec81c33b2 100644
--- a/tools/tests/x86_emulator/Makefile
+++ b/tools/tests/x86_emulator/Makefile
@@ -118,7 +118,7 @@ $(TARGET): x86-emulate.o test_x86_emulator.o wrappers.o
.PHONY: clean
clean:
- rm -rf $(TARGET) *.o *~ core $(addsuffix .h,$(TESTCASES)) *.bin x86_emulate asm
+ rm -rf $(TARGET) *.o *~ core $(addsuffix .h,$(TESTCASES)) *.bin x86_emulate
.PHONY: distclean
distclean: clean
@@ -131,16 +131,12 @@ x86_emulate:
x86_emulate/%: x86_emulate ;
-asm:
- [ -L $@ ] || ln -sf $(XEN_ROOT)/xen/include/asm-x86 $@
-
-asm/%: asm ;
-
HOSTCFLAGS-x86_64 := -fno-PIE
$(call cc-option-add,HOSTCFLAGS-x86_64,HOSTCC,-no-pie)
HOSTCFLAGS += $(CFLAGS_xeninclude) -I. $(HOSTCFLAGS-$(XEN_COMPILE_ARCH))
-x86.h := asm/x86-vendors.h asm/x86-defns.h asm/msr-index.h
+x86.h := $(addprefix $(XEN_ROOT)/tools/include/xen/asm/,\
+ x86-vendors.h x86-defns.h msr-index.h)
x86_emulate.h := x86-emulate.h x86_emulate/x86_emulate.h $(x86.h)
x86-emulate.o test_x86_emulator.o wrappers.o: %.o: %.c $(x86_emulate.h)
diff --git a/tools/tests/x86_emulator/x86-emulate.h b/tools/tests/x86_emulator/x86-emulate.h
index fd1ba5218b..b249e4673c 100644
--- a/tools/tests/x86_emulator/x86-emulate.h
+++ b/tools/tests/x86_emulator/x86-emulate.h
@@ -11,9 +11,9 @@
#include <xen/xen.h>
-#include <asm/msr-index.h>
-#include <asm/x86-defns.h>
-#include <asm/x86-vendors.h>
+#include <xen/asm/msr-index.h>
+#include <xen/asm/x86-defns.h>
+#include <xen/asm/x86-vendors.h>
#include <xen-tools/libs.h>
--
2.17.1
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-12 16:48 [PATCH v2] tools: remove local links to the x86 headers Roger Pau Monne
@ 2018-07-13 7:49 ` Jan Beulich
2018-07-13 7:55 ` Roger Pau Monné
2018-07-13 8:27 ` Wei Liu
1 sibling, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2018-07-13 7:49 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel
>>> On 12.07.18 at 18:48, <roger.pau@citrix.com> wrote:
> In the x86 test harness and the fuzzer, and instead create a link in
> the tools/include directory that can be used by all the tools.
>
> No functional change.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
> Changes since v1:
> - Don't remove the header dependencies in the makefile for the x86
> emulator test harness.
Hmm, afaics you've done the same for the fuzzer where afaict it's
unnecessary. Any specific reason?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-13 7:49 ` Jan Beulich
@ 2018-07-13 7:55 ` Roger Pau Monné
2018-07-13 10:04 ` Jan Beulich
0 siblings, 1 reply; 7+ messages in thread
From: Roger Pau Monné @ 2018-07-13 7:55 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel
On Fri, Jul 13, 2018 at 01:49:37AM -0600, Jan Beulich wrote:
> >>> On 12.07.18 at 18:48, <roger.pau@citrix.com> wrote:
> > In the x86 test harness and the fuzzer, and instead create a link in
> > the tools/include directory that can be used by all the tools.
> >
> > No functional change.
> >
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> > ---
> > Cc: Jan Beulich <jbeulich@suse.com>
> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > ---
> > Changes since v1:
> > - Don't remove the header dependencies in the makefile for the x86
> > emulator test harness.
>
> Hmm, afaics you've done the same for the fuzzer where afaict it's
> unnecessary. Any specific reason?
The fuzzer also includes x86-emulate.h which depends on those headers,
so it should also be rebuilt.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-12 16:48 [PATCH v2] tools: remove local links to the x86 headers Roger Pau Monne
2018-07-13 7:49 ` Jan Beulich
@ 2018-07-13 8:27 ` Wei Liu
1 sibling, 0 replies; 7+ messages in thread
From: Wei Liu @ 2018-07-13 8:27 UTC (permalink / raw)
To: Roger Pau Monne
Cc: xen-devel, Ian Jackson, Wei Liu, Jan Beulich, Andrew Cooper
On Thu, Jul 12, 2018 at 06:48:06PM +0200, Roger Pau Monne wrote:
> In the x86 test harness and the fuzzer, and instead create a link in
> the tools/include directory that can be used by all the tools.
>
> No functional change.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
Acked-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-13 7:55 ` Roger Pau Monné
@ 2018-07-13 10:04 ` Jan Beulich
2018-07-13 11:37 ` Roger Pau Monné
0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2018-07-13 10:04 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel
>>> On 13.07.18 at 09:55, <roger.pau@citrix.com> wrote:
> On Fri, Jul 13, 2018 at 01:49:37AM -0600, Jan Beulich wrote:
>> >>> On 12.07.18 at 18:48, <roger.pau@citrix.com> wrote:
>> > In the x86 test harness and the fuzzer, and instead create a link in
>> > the tools/include directory that can be used by all the tools.
>> >
>> > No functional change.
>> >
>> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> > ---
>> > Cc: Jan Beulich <jbeulich@suse.com>
>> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> > Cc: Wei Liu <wei.liu2@citrix.com>
>> > ---
>> > Changes since v1:
>> > - Don't remove the header dependencies in the makefile for the x86
>> > emulator test harness.
>>
>> Hmm, afaics you've done the same for the fuzzer where afaict it's
>> unnecessary. Any specific reason?
>
> The fuzzer also includes x86-emulate.h which depends on those headers,
> so it should also be rebuilt.
See my original mail - afaict the fuzzer makes use of .*.d files, so
explicit recodring of dependencies should not be needed.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-13 10:04 ` Jan Beulich
@ 2018-07-13 11:37 ` Roger Pau Monné
2018-07-13 13:09 ` Jan Beulich
0 siblings, 1 reply; 7+ messages in thread
From: Roger Pau Monné @ 2018-07-13 11:37 UTC (permalink / raw)
To: Jan Beulich; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel
On Fri, Jul 13, 2018 at 04:04:56AM -0600, Jan Beulich wrote:
> >>> On 13.07.18 at 09:55, <roger.pau@citrix.com> wrote:
> > On Fri, Jul 13, 2018 at 01:49:37AM -0600, Jan Beulich wrote:
> >> >>> On 12.07.18 at 18:48, <roger.pau@citrix.com> wrote:
> >> > In the x86 test harness and the fuzzer, and instead create a link in
> >> > the tools/include directory that can be used by all the tools.
> >> >
> >> > No functional change.
> >> >
> >> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> >> > ---
> >> > Cc: Jan Beulich <jbeulich@suse.com>
> >> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> >> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> >> > Cc: Wei Liu <wei.liu2@citrix.com>
> >> > ---
> >> > Changes since v1:
> >> > - Don't remove the header dependencies in the makefile for the x86
> >> > emulator test harness.
> >>
> >> Hmm, afaics you've done the same for the fuzzer where afaict it's
> >> unnecessary. Any specific reason?
> >
> > The fuzzer also includes x86-emulate.h which depends on those headers,
> > so it should also be rebuilt.
>
> See my original mail - afaict the fuzzer makes use of .*.d files, so
> explicit recodring of dependencies should not be needed.
I'm afraid that doesn't seem to work. If I modify any of the headers
without the explicit makefile tracking a rebuild is not triggered.
Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tools: remove local links to the x86 headers
2018-07-13 11:37 ` Roger Pau Monné
@ 2018-07-13 13:09 ` Jan Beulich
0 siblings, 0 replies; 7+ messages in thread
From: Jan Beulich @ 2018-07-13 13:09 UTC (permalink / raw)
To: Roger Pau Monne; +Cc: Andrew Cooper, Wei Liu, Ian Jackson, xen-devel
>>> On 13.07.18 at 13:37, <roger.pau@citrix.com> wrote:
> On Fri, Jul 13, 2018 at 04:04:56AM -0600, Jan Beulich wrote:
>> >>> On 13.07.18 at 09:55, <roger.pau@citrix.com> wrote:
>> > On Fri, Jul 13, 2018 at 01:49:37AM -0600, Jan Beulich wrote:
>> >> >>> On 12.07.18 at 18:48, <roger.pau@citrix.com> wrote:
>> >> > In the x86 test harness and the fuzzer, and instead create a link in
>> >> > the tools/include directory that can be used by all the tools.
>> >> >
>> >> > No functional change.
>> >> >
>> >> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> >> > ---
>> >> > Cc: Jan Beulich <jbeulich@suse.com>
>> >> > Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> >> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
>> >> > Cc: Wei Liu <wei.liu2@citrix.com>
>> >> > ---
>> >> > Changes since v1:
>> >> > - Don't remove the header dependencies in the makefile for the x86
>> >> > emulator test harness.
>> >>
>> >> Hmm, afaics you've done the same for the fuzzer where afaict it's
>> >> unnecessary. Any specific reason?
>> >
>> > The fuzzer also includes x86-emulate.h which depends on those headers,
>> > so it should also be rebuilt.
>>
>> See my original mail - afaict the fuzzer makes use of .*.d files, so
>> explicit recodring of dependencies should not be needed.
>
> I'm afraid that doesn't seem to work. If I modify any of the headers
> without the explicit makefile tracking a rebuild is not triggered.
Well, I don't understand this, but for the patch here
Acked-by: Jan Beulich <jbeulich@suse.com>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-07-13 13:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-12 16:48 [PATCH v2] tools: remove local links to the x86 headers Roger Pau Monne
2018-07-13 7:49 ` Jan Beulich
2018-07-13 7:55 ` Roger Pau Monné
2018-07-13 10:04 ` Jan Beulich
2018-07-13 11:37 ` Roger Pau Monné
2018-07-13 13:09 ` Jan Beulich
2018-07-13 8:27 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).