Commit Graph
487 Commits
Author SHA1 Message Date
Roger Pau Monne e3c6e1b8c2 x86/clang: allow integrated assembler usage
If the required features are present.

Modify as-option-add to add an option in case the test fails, and use
it to detect whether the required clang integrated assembler features
are present.

This patch has been tested with clang 3.5, clang 6, gcc 6.4.0 without
retpoline support and gcc 7.3.1 with retpoline support.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2018-02-26 17:48:44 +00:00
Andrew Cooper f735cf5521 build: Rename as-insn-check to as-option-add
as-insn-check mutates the passed-in flags.  Rename it to as-option-add, in
line with cc-option-add, and update all callers.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
2018-02-23 13:23:43 +00:00
Andrew Cooper 7ed8612e6f build: Help attempts to syntax highlight Config.mk
Some attempts to syntax highlight Config.mk end up thinking that most of
Config.mk is a string, due to the unbalanced squote.  Provide a balancing
squote in a comment to compensate.

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
2018-02-23 13:23:43 +00:00
Roger Pau Monne e82c185e4c build: do not hardcode AFLAGS for as-insn tests
Hardcoding as-insn to use AFLAGS is not correct. For once the test is
performed using a C file with inline assembly, and secondly the flags
used can be passed by the caller together with the CC.

Fix as-insn-check to pass the flags given as parameter to the test.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
[Fix usage comments as they are changing]
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
2018-02-21 17:17:39 +00:00
Jan Beulich fe52ce7fc5 revert d64ac4d5f2's stray changed to Config.mk
Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
2017-12-20 11:37:43 +01:00
Yi Sun d64ac4d5f2 x86: implement get hw info flow for MBA
This patch implements get HW info flow for MBA including its callback
function and sysctl interface.

Signed-off-by: Yi Sun <yi.y.sun@linux.intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2017-12-20 10:00:56 +01:00
Ian Jackson 1002f1a21b README, Makefiles, Config.mk: Update for branching 4.10 vs 4.11-unstable
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-12-01 15:06:11 +00:00
Anthony PERARD 20ed7c8177 Config.mk: Update QEMU changeset
New commits:
- xen/pt: allow QEMU to request MSI unmasking at bind time
To fix a passthrough bug.
- ui/gtk: Fix deprecation of vte_terminal_copy_clipboard
A build fix.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Release-acked-by: Julien Grall <julien.grall@arm.com>
2017-11-13 15:48:47 +00:00
Wei Liu 03dd1e2a54 Config.mk: update mini-os changeset
The new changeset contains the new console.h fix in xen.git.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Julien Grall <julien.grall@linaro.org>
2017-10-25 11:27:45 +01:00
Ian Jackson 368d9d3630 *_REVISION: Swtich to fixed tags for Xen 4.10-rc1
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-10-16 15:23:48 +01:00
Ian Jackson d23babd31d QEMU_TAG update 2017-10-11 15:54:30 +01:00
Ian Jackson 3d269be691 xentoolcore: Link into minios (update MINIOS_UPSTREAM_REVISION)
We need to do this before we start to make the other libraries call
into xentoolcore, or we break building minios with new the xen.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-10-11 12:51:22 +01:00
Wei Liu 0b0ca65b54 Config.mk: update mini-os changeset
It contains build fix for stubdom.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-10-04 15:14:51 +01:00
Anthony PERARD 6a31a9b6d7 Config.mk: update OVMF changeset
Update to allow to build OVMF with GCC 7.2.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-09-26 11:08:00 +01:00
Ian Jackson d6b12add90 DEPS handling: Remove absolute paths from references to cwd
In some directories we use gcc on source files elsewhere, to generate
a .o here in the current directory.  Eg in tools/libxl/,
   gcc -I -o build.o /path/to/libacpi/build.c
We pass -MMD and -MF options to generate a .d file right here.

In the general case this .c file might need to include things from the
directory here, eg libacpi/build.c eventually #includes various
*libxl*.h.  We pass gcc -I. for this, which means things from the cwd
where we invoked gcc, not the directory of the #including file.

When we do this, gcc's -MMD output mentions /path/to/libxl/*libxl*.h,
even though it could refer to simply *libxl*.h.  This is presumably
because gcc has noticed that `.' in this context must mean relative to
the invocation cwd, not relative to build.c, and gcc doesn't realise
that references in the .d file are also wrt the invocation cwd.

make distinguishes targets purely textually.  It will canonicalise a
target name by removing ./ before comparison (so _libxl_types.h and
./_libxl_types.h are considered the same target) but it won't examine
the filesystem.  So _libxl_types.h and
/path/to/tools/libxl/_libxl_types.h are different targets.

And, _libxl_types.h is generated from a pattern rule.  This pattern
rule is therefore instatiated twice, and the two instances may be run
concurrently - but use the same tempfiles and can therefore fail.

The thing that is wrong here is gcc's choice to output an absolute
path.

We could work around it by adding a rule to teach make about a
relationship between these `two different files'.  But this has to be
done for every autogenerated file and is therefore fragile (leaving a
race bug when we get it wrong).

Ideally we would fix the problem by fixing the .d file as it is
generated.  But the .d files are generated by many many rules
mentioning $(CC) and $(CFLAGS).  (We might in theory pass a bash
process substitution to -MF, but 1. that's not portable to people who
don't have bash and 2. it hangs, anyway.)

So instead we do this conversion at include time.  That is, we tell
make to include not the raw .d files, but the sedded ones.

The sedding removes occurrences of ` $PWD/'.  We use the shell
variable PWD because the make variable sometimes refers to the xen
toplevel.  If gcc's output format should change, then this sed rune
may not work any more, but that doesn't seem very likely.

The rune is only effective for dependencies on files which are exactly
in the current directory, or a subdirectory of it named simply by its
subdirectory name.  If there are autogenerated include files which
exist in a sibling (or worse, somewhere completely else), this
approach will not work, because we'd have to figure out what name this
Makefile usually uses to refer to them.  Hopefully such things don't
exist.

The indirect variables DEPS_RM and DEPS_INCLUDE are necessary to
preserve the assumptions made in the various Makefiles.  Specifically,
xen/ Makefiles assume that it is ok to say DEPS+=something (where
something is in a subdirectory); tools/ Makefiles all used to include
DEPS themselves (but now they include DEPS_INCLUDE); and many
Makefiles tended to explictly rm DEPS (but now rm DEPS_RM).

In the new scheme of things: DEPS is the files that come out of gcc
(or perhaps an assembler or something) and may be assigned to by
Makefiles.  DEPS_INCLUDE is the processed form.  And DEPS_RM is both
combined, so that they both get cleaned.

We need to explicitly use $(wildcard ) to do the wildcard expansion on
DEPS a bit earlier.  If we didn't, then DEPS_INCLUDE would contain
`.*.d2' which would not exist.

Evaluation order: DEPS_RM and DEPS_INCLUDE are recursively expanded
variables, so that although they are defined early (in Config.mk),
their actual values are computed at the time of use, using the value
of DEPS that is prevailing at that time.

Reported-by: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-09-07 16:22:05 +01:00
Ian Jackson d648789df9 DEPS handling: Provide DEPS_RM and DEPS_INCLUDE
These are not used anywhere yet, so no functional change.

Reported-by: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-09-07 16:21:37 +01:00
Wei Liu f5c3e78b5c Config.mk: update mini-os changeset
Pull in the change to fix stubdom build with gcc 7.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-08-09 14:04:33 +01:00
Wei Liu 54e9d1e181 Config.mk: update mini-os changeset
The changes contain implementations for some termios functions.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-07-04 14:31:01 +01:00
Wei Liu 989563f97b Config.mk: update mini-os changeset
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-06-29 12:15:38 +01:00
Wei Liu 08463297d3 Config.mk: update seabios
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-06-07 15:37:25 +01:00
Ian Jackson b3bbdc96e0 Branch Xen 4.9: Make staging be an unstable branch
Config.mk
  MINIOS_UPSTREAM_REVISION   } changed from tag to equivalent
  QEMU_TRADITIONAL_REVISION  }  specific commit hash
  QEMU_UPSTREAM_REVISION     now tracking master again

README, xen/Makefile
  Update version number

*/configure
  Reran autoconf; only change is version number

tools/Rules.mk, xen/Kconfig.debug
  Enable debug.
  Reverts 229ff3125b "Use non-debug build for Xen 4.9".

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-05-30 16:30:58 +01:00
Ian Jackson d4df54737d Config.mk: Update for 4.9.0-rc1.2
Contrary to what I wrote in d0db50ced1 "Config.mk: Update for
4.9.0-rc1.1", the build failure with 4.9.0-rc1 was not due to a wrong
qemu tag, but a wrong mini-os tag.  So burn 4.9.0-rc1.1 too :-(.  (We
can rewind the qemu-trad tag to 4.9.0-rc1; the -rc1 and -rc1.1 tags
are identical.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-04-12 16:18:57 +01:00
Ian Jackson d0db50ced1 Config.mk: Update for 4.9.0-rc1.1
In qemu-trad, I made xen-4.9.0-rc1 refer erroneously to the 4.8
branch.  That doesn't build.  So we are burning the version number
4.9.0-rc1 in xen.git and qemu-trad.  (The other trees can remain as
they are.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-04-12 16:03:35 +01:00
Ian Jackson 5644f357b9 Config.mk, etc.: Prepare 4.9.0-rc1
* Update Config.mk REVISION values to refer to relevant tags.
* Update README version number
* Update xen/Makefile version number

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2017-04-12 15:45:39 +01:00
Anthony PERARD 50bb979f11 Config.mk: update OVMF changeset
This new changeset contain a fix to build with GCC 6.3.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-03-24 12:23:47 +00:00
Ian Jackson 5ca67f7453 QEMU_TAG update 2017-03-21 18:43:44 +00:00
Paul Durrant b108240265 tools/libxendevicemodel: introduce the new library
The new xendevicemodel library is intended to be used by all Xen device
models such that the only hypercall that use will be the dm_op hypercall
added by commit 524a98c2.

This patch adds the boilerplate for the new library, with only open() and
close() entry points, and calls to those from libxenctrl in preparation
for the compat layer added by a subsequent patch.

[ Also: update MINIOS_UPSTREAM_REVISION and QEMU_TRADITIONAL_REVISION
  to the commits with the corresponding changes to those other trees
  - Ian Jackson ]

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
2017-02-23 11:56:28 +00:00
Ian Jackson a4f3d32d7b QEMU_TAG update 2017-02-22 16:25:42 +00:00
Roger Pau Monné f827ab0390 build: enable no-parentheses in clang
And fix the following errors reported:

traps.c:2014:25: error: equality comparison with extraneous parentheses
      [-Werror,-Wparentheses-equality]
        else if ( (port == RTC_PORT(0)) )
                   ~~~~~^~~~~~~~~~~~~~
traps.c:2014:25: note: remove extraneous parentheses around the comparison to silence this warning
        else if ( (port == RTC_PORT(0)) )
                  ~     ^             ~
traps.c:2014:25: note: use '=' to turn this equality comparison into an assignment
        else if ( (port == RTC_PORT(0)) )
                        ^~
                        =
traps.c:2083:25: error: equality comparison with extraneous parentheses
      [-Werror,-Wparentheses-equality]
        else if ( (port == RTC_PORT(0)) )
                   ~~~~~^~~~~~~~~~~~~~

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2017-02-17 16:10:28 +01:00
Roger Pau Monné d40d3ef988 build: enable unused value checks for clang
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2017-02-17 16:10:00 +01:00
Roger Pau Monné d4906b5d05 build/printf: fix incorrect format specifiers
The following incorrect format specifiers and incorrect number of parameters
passed to printf like functions are reported by clang:

mce.c:601:18: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                 smp_processor_id());
                 ^

xenpm.c:102:23: error: data argument not used by format string [-Werror,-Wformat-extra-args]
                what, argv[argc > 1]);
                      ^

libxl_internal.c:25:69: error: data argument not used by format string
      [-Werror,-Wformat-extra-args]
    libxl__log(ctx, XTL_CRITICAL, ENOMEM, 0,0, func, INVALID_DOMID, L);
                                                                    ^
libxl_internal.c:24:17: note: expanded from macro 'L'
          func, (unsigned long)nmemb, (unsigned long)size
                ^
libxl_internal.c:26:21: error: data argument not used by format string
      [-Werror,-Wformat-extra-args]
    fprintf(stderr, L);
                    ^
libxl_internal.c:24:17: note: expanded from macro 'L'
          func, (unsigned long)nmemb, (unsigned long)size
                ^

This patch contains the fixes for them and enables -Wformat for clang.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2017-02-17 16:09:38 +01:00
Wei Liu c13f0f9a33 Config.mk: update OVMF changeset
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2017-01-24 17:25:27 +00:00
Wei Liu df6f513473 build: move debug{,_symbols} to tools/Rules.mk
31d41d7b tried to make debug affect tools build only but failed to take
care of debug_symbols (which appends "-g" to CFLAGS).

Move both to tools/Rules.mk at once in this patch.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2017-01-05 16:36:07 +00:00
Wei Liu 713b23ccd1 Config.mk: update mini-os changeset
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-12-14 14:44:33 +00:00
Ian Jackson 395010f346 QEMU_TAG update 2016-12-07 16:52:23 +00:00
Wei Liu d8f53ce6a4 Config.mk: introduce cc-ifversion
It returns different string depending on compiler version.

No user yet.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2016-12-03 15:55:34 +00:00
Wei Liu 1dcc690ca0 Config.mk: expand cc-ver a bit
... so that we can do other comparisons as well.

No functional change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2016-12-03 15:55:34 +00:00
Ian Jackson 3ab1527dad Open Xen 4.9-unstable
* Change version number in README and xen/Makefile to `4.8-unstable'.

* Set `debug ?= y' in Config.mk.

* Set QEMU_UPSTREAM_REVISION to track qemu-xen.git `master'.

* Set MINIOS_UPSTREAM_REVISION and QEMU_TRADITIONAL_REVISION back to
  commit hashes, rather than 4.8 tags.

Hypervisor debug enablement is left aside for now.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2016-12-02 12:15:45 +00:00
Ian Jackson a7a578ce6b Config.mk: Drop stale QEMU_TRADITIONAL_REVISION commentary
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2016-11-29 18:05:48 +00:00
Ian Jackson 91bdabab73 Update QEMU_TRADITIONAL_REVISION and QEMU_UPSTREAM_REVISION to -rc7
These commits include the fix for XSA-197.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2016-11-29 16:41:32 +00:00
Wei Liu c96b6ae4ee Config.mk: update seabios to 1.10.0
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-11-08 01:39:34 +00:00
Wei Liu fecf584294 Config.mk: fix comment for debug option
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-11-03 10:40:44 +00:00
Ian Jackson 0d250b69ea Update QEMU_UPSTREAM_REVISION
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2016-10-26 12:06:17 +01:00
Wei Liu 8b4664265b Config.mk: use non-debug build for 4.8
Set debug ?= n in preparation for late RCs and eventual release.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-10-20 14:00:47 +01:00
Ian Jackson 40277cded3 Xen 4.8.0-rc1 preparation
* Change QEMU_UPSTREAM_REVISION MINIOS_UPSTREAM_REVISION and
  QEMU_TRADITIONAL_REVISION to refer to the Xen 4.8.0-rc1 tags.

* Change README and xen/Makefile to refer to Xen 4.8.0-rc (note, the
  RC number is not included, so we do not have to update these again).

I reran autogen.sh as per the release checklist and this produced no
changes, as expected.  (Debian jessie i386.)

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-10-03 12:10:22 +01:00
Wei Liu da9207c864 Config.mk: update mini-os commit
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-09-28 12:12:13 +01:00
Ian Jackson a9c9600bb5 QEMU_TAG update 2016-09-20 16:35:48 +01:00
Wei Liu 8c8b6fb023 Config.mk: update OVMF commit
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-09-06 12:54:47 +01:00
Wei Liu 755e623dee Config.mk: update seabios to 1.9.3 release
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-09-06 12:50:59 +01:00
Juergen Gross c8777e62d9 stubdom: support Mini-OS config for Mini-OS apps
Mini-OS apps need to be compiled with the appropriate config settings
of Mini-OS, as there are various dependencies on those settings in
header files included by the apps.

Enhance stubdom Makefile to set the appropriate CPPFLAGS when calling
the apps' make.

Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
[ wei: fold in change to Config.mk to update mini-os commit ]
2016-09-02 09:54:42 +01:00