Commit Graph
462 Commits
Author SHA1 Message Date
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
Wei Liu db6c2264e6 xen: add a gcov Kconfig option
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
2016-08-31 16:37:47 +01:00
Wei Liu a55ad65d3a Config.mk: update mini-os commit
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-08-12 16:37:24 +01:00
Daniel De Graaf 41b61be1c2 xsm: add a default policy to .init.data
This adds a Kconfig option and support for including the XSM policy from
tools/flask/policy in the hypervisor so that the bootloader does not
need to provide a policy to get sane behavior from an XSM-enabled
hypervisor.  The policy provided by the bootloader, if present, will
override the built-in policy.

The XSM policy is not moved out of tools because that remains the
primary location for installing and configuring the policy.

Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2016-07-14 15:32:38 +01:00
Wei Liu 7d82f09765 build: introduce XEN_RUN_STORED
It defaults to /var/run/xenstored. It will be used later to remove some
hard-coded paths in tree. There should be no visible change to default
configuration.

Install and remove it in respective Makefile targets.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2016-06-17 11:27:21 +01:00
Wei Liu 15f1a11d66 build: introduce and export XEN_LIB_DIR
This variable defaults to /var/lib/xen. It will be used to substitute
various hard-coded paths in tools.

The new variable points to $localstatedir/lib/xen, which defaults to
/var/lib/xen, so there is no change in default configuration.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
2016-06-14 14:31:27 +01:00
Ian Jackson 88e50f7e00 QEMU_TAG update 2016-06-10 11:48:57 +01:00
Wei Liu baca90434b Config.mk: add XEN_LOG_DIR to BUILD_MAKE_VARS
... so that it can be turned into shell environment variable and
exported to header files.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
2016-06-10 10:49:42 +01:00
Ian Jackson 936a7a5483 Open Xen 4.8-unstable
* Change version number in README and xen/Makefile to `4.8-unstable'.
* Set `debug ?= y'.
* Set QEMU_UPSTREAM_REVISION to track qemu-xen.git `master'.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
2016-06-07 14:50:54 +01:00
Jan Beulich 1dda826420 build: fix assembler instruction tests again
Commit 7fb252bd41 ("build/xen: fix assembler instruction tests") added
$(AFLAGS) here, which results in all of those tests now failing.
Certain items need to be removed for things to work again.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-05-31 18:14:22 +02:00
Anthony PERARD 449f2dc9d8 Config.mk: update qemu-xen tag
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-05-27 16:09:05 +01:00
Wei Liu 983aae0b59 Config.mk: non-debug build by default
Set debug ?= n in preparation for late RCs and eventual release.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-05-23 17:17:57 +01:00
Wei Liu ccf4a5e6db Revert "Config.mk: update ovmf changeset"
This reverts commit 1542efcea8. It fails
consistently on our Debian HVM test when the VM has more than 4G of
memory.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-05-23 11:13:07 +01:00
Ian Jackson 8b1834afdd QEMU_TAG update 2016-05-18 15:46:13 +01:00
Anthony PERARD 667a7120d0 Config.mk: update qemu-xen tag
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-05-18 13:55:33 +01:00
Wei Liu 1542efcea8 Config.mk: update ovmf changeset
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-05-18 11:48:25 +01:00
Wei Liu fcab4cec98 Config.mk: update mini-os changeset
There is one commit pulled in:
   lib/sys.c: enclose file_types in define guards

This is required to fix stubdom build on Arch Linux.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
2016-05-15 16:20:02 +01:00
Ian Jackson c79fc6c4be QEMU_TAG update 2016-05-10 19:14:34 +01:00
Ian Jackson c1b368ee2e QEMU_TAG update 2016-05-10 18:56:53 +01:00
Wei Liu 68a003ef43 Config.mk: update mini-os revision
This is only one commit:
    build: change MINI-OS_ROOT to MINIOS_ROOT

This change is required to fix stubdom build on Ubuntu 16.04.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
2016-05-04 11:57:31 +01:00
Ian Jackson b90ecd5f2b Final touches for Xen 4.7.0-rc1
* Update README and xen/Makefile to "Xen 4.7-rc"
* Fix QEMU_UPSTREAM_REVISION to a tag, so we get a specific commit

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
2016-05-03 12:43:35 +01:00
Konrad Rzeszutek Wilk 895111a94f xsplice: Stacking build-id dependency checking.
We now expect that the ELF payloads be built with the
--build-id.

Also the .xsplice.deps section has to have the contents
of the hypervisor (or a preceding payload) build-id.

We already have the code to verify the Elf_Note build-id
so export parts of it.

This dependency means the hypervisor MUST be compiled with
--build-id - so we gate the build of xSplice on the availability
of said functionality.

This does not impact the ordering of how the payloads can
be loaded, but it does enforce an STRICT ordering when the
payloads are applied. Also the REPLACE is special - we need
to check that its dependency against the hypervisor - not
the last applied patch.

To make this easier to test we also add an extra test-case
to be used - which can only be applied on top of the
xen_hello_world payload.

As in, one can apply xen_hello_world and then xen_bye_world
on top of that. Not the other way.

We also print the dependency and payloads build_in the keyhandler.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-04-29 03:59:24 -04:00
Konrad Rzeszutek Wilk a353cab905 build_id: Provide ld-embedded build-ids
This patch enables the Elf to be built with the build-id
and provide in the Xen hypervisor the code to extract it.

The man-page for ld --build-id says it is:

"Request the creation of a ".note.gnu.build-id" ELF note
section or a ".build-id" COFF section.  The contents of the
note are unique bits identifying this linked file. style can be
"uuid" to use 128 random bits, "sha1" to use a 160-bit SHA1 hash
on the normative parts of the output contents, ..."

One can also retrieve the value of the build-id by doing
'readelf -n xen-syms'.

For EFI builds we re-use the same build-id that the xen-syms
was built with.

The version of ld that first implemented --build-id is v2.18.
We check for to see if the linker supports the --build-id
parameter and if so use it.

For x86 we have two binaries - the xen-syms and the xen - an
smaller version with lots of sections removed. To make it possible
for readelf -n xen we also modify mkelf32 and xen.lds.S to include
the PT_NOTE ELF section.

The EFI binary is more complicated. We only build one type of
binary and expanding the amount of sections the EFI binary has to
include an .note one is pointless - as there is no concept of
PT_NOTE. The best we can do is move this .note in the .rodata section.

Further development wise should move it to .buildid section
so that DataDirectory debug data nor CodeView can view it.
(The author has no clue what those are).

Note that in earlier patches the linker script had:

 __note_gnu_build_id_start = .;
 *(.rodata.note.gnu.build-id)
 __note_gnu_build_id_end = .;
 *(.note)
 *(.note.*)

Which meant you could have different ELF notes _outside_ the
__note_gnu_build_id_end. However for EFI builds we take the whole
.note* section and jam it in the EFI to be between
__note_gnu_build_id_start and __note_gnu_build_id_end.
To not make this happend we make on the ELF build the section
be called .note.gnu.build-id  (instead of just .note).
If there is a need for a different type of note other folks
can add it as a different section name.

Note that we do call --binary-id=sha1 on all linker invocations.
We have to do to enforce that the symbol offsets don't changes
(the side effect is that we we would have multiple binary ids -
except that the last one is the final one).

Without this working the symbol table embedded in Xen ends
up incorrect - some of the values it contains would be offset by the
size of the included build id.

This obviously causes problems when resolving symbols.

We also define the NT_GNU_BUILD_ID in the elfstructs.h as we
need to use it in various places.

Suggested-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Martin Pohlack <mpohlack@amazon.de>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Acked-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-04-29 03:59:03 -04:00
Roger Pau Monné 1d5b507e69 build: use C{C/XX} as HOSTC{C/XX} if we are not cross-compiling
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-04-28 15:11:19 +02:00
Roger Pau Monné 7fb252bd41 build/xen: fix assembler instruction tests
The current test performed in order to check if the assembler supports
certain instructions doesn't take into account the value of AFLAGS, which
when using clang contains the option that disables the integrated assembler
due to the lack of features.

As a result of this, the current instruction tests were performed against the
integrated assembler, but then at build time the non-integrated assembler
was used. If both have feature-parity, this is a non-issue, but we cannot
assume this.

Fix this by passing AFLAGS in the instruction test, and including the arch
Rules.mk makefile after AFLAGS is set.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
2016-04-28 15:07:37 +02:00
Roger Pau Monne 22372e7724 build: set HOSTCXX based on clang value for Kconfig xconfig target
The xconfig Kconfig target requires a C++ compiler because it uses Qt.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Release-acked-by: Wei Liu <wei.liu2@citrix.com>
2016-04-27 14:12:09 +01:00