Commit Graph
25 Commits
Author SHA1 Message Date
Julien Grall 98060fc4a3 xen/arm64: Hide FEAT_SME
Newer hardware may support FEAT_SME. Xen doesn't have any knowledge but
it will still expose the feature to the VM. If the OS is trying to use
SME, then it will crash.

Solve by hiding FEAT_SME.

Signed-off-by: Julien Grall <julien@xen.org>
Acked-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Ayan Kumar Halder <ayan.kumar.halder@amd.com>
2024-08-22 11:09:42 +01:00
Julien Grall a99f25f7ac CHANGELOG.md: Start new 4.20.0 section
Signed-off-by: Julien Grall <julien@xen.org>
2024-07-18 16:51:02 +01:00
Julien Grall 974ad0926e CHANGELOG.md: Set release date for 4.19
Signed-off-by: Julien Grall <jgrall@amazon.com>
2024-07-18 16:49:57 +01:00
Julien Grall 285937175b Re-run ./autogens.h for 4.20
Signed-off-by: Julien Grall <julien@xen.org>
2024-07-18 16:00:52 +01:00
Julien Grall f66e523189 Set version to 4.20; 4.19 has branched
Signed-off-by: Julien Grall <julien@xen.org>
2024-07-18 15:42:58 +01:00
Julien Grall b181bb9fdb Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.19 RC1)"
The branch is unstable again.

This reverts commit 7584e39986.
2024-07-18 15:40:44 +01:00
Julien Grall 046f13a2b3 xen/arm64: head: only use the macro load_paddr() in the MMU code
The macro load_paddr() requires to know the offset between the
physical location of Xen and the virtual location.

When using the MPU, x20 will always be 0. Rather than wasting
a register for a compile-time constant value, it would be best if
we can avoid using load_paddr() altogether in the common head.S code.

The current use of load_paddr() are equivalent to adr_l() because
the MMU is off.

All the use of load_paddr() in arm64/head.S are now replaced with
adr_l(). With that, load_paddr() can now be moved in arm64/mmu/head.S.

For now, x20 is still unconditionally set. But this could change
in the future if needed.

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
2023-11-16 14:03:19 +00:00
Julien Grall 9659b2a6d7 Set version to 4.18; return ./autogen.sh
Signed-off-by: Julien Grall <julien@xen.org>
2023-10-30 09:23:06 +00:00
Julien Grall 7f48e34298 Revert "Config.mk pin QEMU_UPSTREAM_REVISION (prep for Xen 4.18 RC1)"
The branch is unstable again.

This reverts commit 520d18e0ff.
2023-10-30 09:13:38 +00:00
Julien Grall 4294987c7a Set version to 4.19; 4.18 has branched
Signed-off-by: Julien Grall <julien@xen.org>
2023-10-30 09:12:54 +00:00
Julien Grall 02a11313cd xen/arm: Check Xen size when linking
The linker will happily link Xen if it is bigger than what we can handle
(e.g 2MB). This will result to unexpected failure after boot.

This unexpected failure can be prevented by forbidding linking if Xen is
bigger than the area we reserved.

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Henry Wang <Henry.Wang@arm.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
Tested-by: Henry Wang <Henry.Wang@arm.com>
2023-06-29 20:58:09 +01:00
Julien Grall a5fb66f451 Revert "xen/arm: mm: Add more ASSERT() in {destroy, modify}_xen_mappings()"
This reverts commit 9b962e6183. This
was committed by mistake (lack an x86 ack).
2022-07-17 14:11:27 +01:00
Julien Grall 82b1b19469 MAINTAINERS: Add myself as reviewers for tools/xenstore
I would like to help reviewing Xenstored patches. It is more convenient
to find them if I am CCed.

Signed-off-by: Julien Grall <julien@xen.org>
Acked-by: Juergen Gross <jgross@suse.com>
2021-06-24 09:02:56 +01:00
Julien Grall 5730ac3c83 xen/arm: Avoid open-coding the relinquish state machine
In commit 0dfffe01d5 "x86: Improve the efficiency of
domain_relinquish_resources()", the x86 version of the function has been
reworked to avoid open-coding the state machine and also add more
documentation.

Bring the Arm version on par with x86 by introducing a documented
PROGRESS() macro to avoid latent bugs and make the new PROG_* states
private to domain_relinquish_resources().

Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2020-04-21 16:46:25 -07:00
Julien Grall 26cada81c4 xen/grant-table: Remove outdated warning in gnttab_grow_table()
One of the warning message in gnttab_grow_table() refers to a function
was removed in commit 6425f91c72 "xen/gnttab: Fold grant_table_{create,
set_limits}() into grant_table_init()".

Since the commit, gt->active will be allocated while initializing the
grant table at domain creation. Therefore gt-active will always be
valid.

Rather than replacing the warning by another one, drop the check
completely as we will likely not come back to a semi-initialized world.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
2020-03-05 12:59:46 +00:00
Julien Grall 0c35d44604 xen/arm: Workaround clang/armclang support for register allocation
Clang 8.0 (see [1]) and by extent some of the version of armclang does
not support register allocation using the syntax rN.

Thankfully, both GCC [2] and clang are able to support the xN syntax for
Arm64. Introduce a new macro ASM_REG() and use in common code for
register allocation.

[1] https://reviews.llvm.org/rL328829
[2] https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html

Cc: Andrii Anisov <andrii_anisov@epam.com>
Signed-off-by: Julien Grall <julien@xen.org>
Tested-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2020-03-03 18:04:34 -08:00
Julien Grall 2a03e78758 xen/arm: Use asm/ rather than asm-arm/ when including header
All the arch headers (i.e under asm-arm) are included using "asm/*.h".

To stay consistent, remove the only instance where "asm-arm/*.h" is
used.

Take the opportunity to move the inclusion with the rest of the asm/
include.

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
2020-02-13 16:41:18 -08:00
Julien Grall f44a192d22 xen/arm: gic: Remove pointless assertion against enum gic_sgi
The Arm Compiler will complain that the assertions ASSERT(sgi < 16) are
always true. This is because sgi is an item of the enum gic_sgi and
should always contain less than 16 SGIs.

Rather than using ASSERTs, introduce a new item in the enum that could
be checked against a build time.

Take the opportunity to remove the specific assigned values for each
item. This is fine because enum always starts at zero and values will be
assigned by increment of one. None of our code also rely on hardcoded
value.

[stefano: grammar fixes in commit message]

Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
CC: Andrii Anisov <andrii_anisov@epam.com>
2020-01-21 13:17:52 -08:00
Julien Grall 88739e9735 Revert "xen/arm32: setup: Give a xenheap page to the boot allocator"
Since commit c61c1b4943 "xen/page_alloc: statically allocate
bootmem_region_list", the boot allocator does not use the first page of
the first region passed for its own purpose.

This reverts commit ae84f55353.

Signed-off-by: Julien Grall <julien@xen.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2020-01-21 12:54:28 -08:00
Julien Grall c7de94fd6e xen/arm: Place a speculation barrier sequence following an eret instruction
Some CPUs can speculate past an ERET instruction and potentially perform
speculative accesses to memory before processing the exception return.
Since the register state is often controlled by lower privilege level
at the point of an ERET, this could potentially be used as part of a
side-channel attack.

Newer CPUs may implement a new SB barrier instruction which acts
as an architected speculation barrier. For current CPUs, the sequence
DSB; ISB is known to prevent speculation.

The latter sequence is heavier than SB but it would never be executed
(this is speculation after all!).

Introduce a new macro 'sb' that could be used when a speculation barrier
is required. For now it is using dsb; isb but this could easily be
updated to cater SB in the future.

This is XSA-312.

Signed-off-by: Julien Grall <julien@xen.org>
2020-01-14 14:23:25 +00:00
Julien Grall f1cf75c2d1 docs/misc: livepatch: Escape backslash
pandoc is currently failing to generate the pdf with the following
error:
! Undefined control sequence.
l.1048   metadata string format is: key=value\0

In this case, we want to print \0 so we need to backslash-escape the
first character.

Interestingly pandoc will not complain when creating html and will just
ignore \0 completely.

Fixes: 5083e0ff93 ("livepatch: Add metadata runtime retrieval mechanism")
Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Pawel Wieczorkiewicz <wipawel@amazon.de>
2020-01-14 13:34:50 +00:00
Julien Grall 9c8705f8fe docs/misc: pvcalls: Verbatim block should be indented with 4 spaces
At the moment, the diagram is only indented with 2 spaces. So pandoc
will try to badly interpret it and not display it correctly.

Fix it by indenting all the block by 4 spaces (i.e an extra 2 spaces).

Fixes: d661611d08 ("docs/markdown: Switch to using pandoc, and fix underscore escaping")
Signed-off-by: Julien Grall <julien@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
2020-01-14 13:34:44 +00:00
Julien Grall 8842d01b30 xen/sched: rt: Fix typo in a comment
Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
2020-01-11 12:48:41 +00:00
Julien Grall 9a400d1797 MAINTAINERS: Update path to the livepatch documentation
Commit d661611d08 "docs/markdown: Switch to using pandoc, and fix
underscore escaping" converted the livepatch documentation from markdown
to pandoc.

Update MAINTAINERS to reflect the change so the correct maintainers are
CCed to the patches.

Fixes: d661611d08 ("docs/markdown: Switch to using pandoc, and fix underscore escaping")
Signed-off-by: Julien Grall <julien@xen.org>
Acked-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-11-27 13:48:04 +00:00
Julien Grall df7a19338a xen: Add missing va_end() in hypercall_create_continuation()
The documentation requires va_start() to always be matched with a
corresponding va_end(). However, this is not the case in the path used
for bad format.

This was introduced by XSA-296.

Coverity-ID: 1488727
Fixes: 0bf9f8d3e3 ("xen/hypercall: Don't use BUG() for parameter checking in hypercall_create_continuation()")
Signed-off-by: Julien Grall <julien@xen.org>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
2019-11-21 15:50:01 +00:00