Re: [PATCH 13/36] xen/arm: A domain is not direct mapped when coloring is enabled

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Based on the intrinsic nature of cache coloring, it is trivial to state that each domain that is colored is also not direct mapped. Set the directmap variable to false when coloring is enabled. This is basically fixing a bug

[xen-4.15-testing test] 168483: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168483 xen-4.15-testing real [real] flight 168497 xen-4.15-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168483/ http://logs.test-lab.xenproject.org/osstest/logs/168497/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH 11/36] xen/include: define hypercall parameter for coloring

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio During domU creation process the colors selection has to be passed to the Xen hypercall. This is generally done using what Xen calls GUEST_HANDLE_PARAMS. In this case a simple bitmask for the coloring configuration suffices.

[xen-unstable-smoke test] 168495: tolerable all pass - PUSHED

2022-03-09 Thread osstest service owner
flight 168495 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168495/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm

Re: [PATCH 05/36] xen/arm: compute LLC way size by hardware inspection

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio The size of the LLC way is a crucial parameter for the cache coloring support, since it determines the maximum number of available colors on the platform. This parameter can currently be retrieved only from the way_size bootarg

[linux-5.4 test] 168485: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168485 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/168485/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 168334 test-amd64-amd64-xl-qemut-win7-amd64

Re: [PATCH 10/36] xen/arch: check color selection function

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Dom0 color configuration is parsed in the Xen command line. Add an helper function to check the user selection. If no configuration is provided by the user, all the available colors supported by the hardware will be assigned to

[linux-linus test] 168486: regressions - FAIL

2022-03-09 Thread osstest service owner
flight 168486 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/168486/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-pvops 6 kernel-build fail REGR. vs. 168466 Tests which did

[libvirt test] 168492: regressions - FAIL

2022-03-09 Thread osstest service owner
flight 168492 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/168492/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

[PATCH v4 06/11] xen: include compat/platform.h from hypercall.h

2022-03-09 Thread Juergen Gross
The definition of compat_platform_op_t is in compat/platform.h already, so include that file from hypercall.h instead of repeating the typedef. This allows to remove the related include statement from arch/x86/x86_64/platform_hypercall.c. Signed-off-by: Juergen Gross Acked-by: Jan Beulich ---

[PATCH v4 03/11] xen: switch non style compliant hypercall handler parameter types

2022-03-09 Thread Juergen Gross
Switch some non style compliant types (u32, s32, s64) of hypercall handler parameters to style compliant ones. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- V4: - carved out from following patch (Julien Grall) --- xen/arch/x86/include/asm/hypercall.h | 10 +-

[PATCH v4 01/11] xen/arm: rename do_phydev_op() to do_arm_physdev_op()

2022-03-09 Thread Juergen Gross
do_physdev_op() prototypes on Arm and x86 differ in their return type, so rename the Arm one in order to prepare using a common generated header file. Signed-off-by: Juergen Gross --- V4: - new patch --- xen/arch/arm/include/asm/hypercall.h | 2 +- xen/arch/arm/physdev.c | 2 +-

[PATCH v4 07/11] xen: generate hypercall interface related code

2022-03-09 Thread Juergen Gross
Instead of repeating similar data multiple times use a single source file and a generator script for producing prototypes and call sequences of the hypercalls. As the script already knows the number of parameters used add generating a macro for populating an array with the number of parameters

[PATCH v4 04/11] xen: harmonize return types of hypercall handlers

2022-03-09 Thread Juergen Gross
Today most hypercall handlers have a return type of long, while the compat ones return an int. There are a few exceptions from that rule, however. Get rid of the exceptions by letting compat handlers always return int and others always return long, with the exception of the Arm specific

[PATCH v4 10/11] xen/arm: call hypercall handlers via generated macro

2022-03-09 Thread Juergen Gross
Instead of using a function table use the generated macros for calling the appropriate hypercall handlers. This makes the calls of the handlers type safe. For deprecated hypercalls define stub functions. Signed-off-by: Juergen Gross Tested-by: Michal Orzel --- V2: - make hypercall_args[]

[PATCH v4 08/11] xen: use generated prototypes for hypercall handlers

2022-03-09 Thread Juergen Gross
Remove the hypercall handler's prototypes in the related header files and use the generated ones instead. Some handlers having been static before need to be made globally visible. Signed-off-by: Juergen Gross Acked-by: Jan Beulich --- xen/arch/arm/include/asm/hypercall.h | 1 -

[PATCH v4 09/11] xen/x86: call hypercall handlers via generated macro

2022-03-09 Thread Juergen Gross
Instead of using a function table use the generated macros for calling the appropriate hypercall handlers. This is beneficial to performance and avoids speculation issues. With calling the handlers using the correct number of parameters now it is possible to do the parameter register clobbering

[PATCH v4 02/11] xen: move do_vcpu_op() to arch specific code

2022-03-09 Thread Juergen Gross
The entry point used for the vcpu_op hypercall on Arm is different from the one on x86 today, as some of the common sub-ops are not supported on Arm. The Arm specific handler filters out the not supported sub-ops and then calls the common handler. This leads to the weird call hierarchy:

[PATCH v4 00/11] xen: drop hypercall function tables

2022-03-09 Thread Juergen Gross
In order to avoid indirect function calls on the hypercall path as much as possible this series is removing the hypercall function tables and is replacing the hypercall handler calls via the function array by automatically generated call macros. Another by-product of generating the call macros is

[PATCH v4 05/11] xen: don't include asm/hypercall.h from C sources

2022-03-09 Thread Juergen Gross
Instead of including asm/hypercall.h always use xen/hypercall.h. Additionally include xen/hypercall.h from all sources containing a hypercall handler. This prepares for generating the handlers' prototypes at build time. Add a guard in asm/hypercall.h to catch direct inclusion. Signed-off-by:

[PATCH v4 11/11] xen/x86: remove cf_check attribute from hypercall handlers

2022-03-09 Thread Juergen Gross
Now that the hypercall handlers are all being called directly instead through a function vector, the "cf_check" attribute can be removed. Signed-off-by: Juergen Gross --- V4: - new patch --- xen/arch/x86/compat.c | 6 +++--- xen/arch/x86/cpu/mcheck/mce.c | 2 +-

[PATCH v6 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-09 Thread Bjoern Doebel
Xen enabled CET for supporting architectures. The control flow aspect of CET expects functions that can be called indirectly (i.e., via function pointers) to start with an ENDBR64 instruction. Otherwise a control flow exception is raised. This expectation breaks livepatching flows because we

[qemu-mainline test] 168488: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168488 qemu-mainline real [real] flight 168499 qemu-mainline real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168488/ http://logs.test-lab.xenproject.org/osstest/logs/168499/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH] x86/cet: Use dedicated NOP4 for cf_clobber

2022-03-09 Thread Doebel, Bjoern
On 08.03.22 15:01, Andrew Cooper wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you can confirm the sender and know the content is safe. For livepatching, we need to look at a potentially clobbered function and

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Rahul Singh
Hi Jan, > On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: > > On 03.03.2022 17:31, Rahul Singh wrote: >>> On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote: >>> On 01.03.2022 14:34, Rahul Singh wrote: > On 24 Feb 2022, at 2:57 pm, Jan Beulich wrote: > On 15.02.2022 16:25, Rahul Singh wrote:

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Jan Beulich
On 09.03.2022 11:08, Rahul Singh wrote: > Hi Jan, > >> On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: >> >> On 03.03.2022 17:31, Rahul Singh wrote: On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote: On 01.03.2022 14:34, Rahul Singh wrote: >> On 24 Feb 2022, at 2:57 pm, Jan Beulich

[xen-4.12-testing test] 168480: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168480 xen-4.12-testing real [real] flight 168494 xen-4.12-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168480/ http://logs.test-lab.xenproject.org/osstest/logs/168494/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

[PATCH early-RFC 4/5] xen/arm: mm: Rework switch_ttbr()

2022-03-09 Thread Julien Grall
From: Julien Grall At the moment, switch_ttbr() is switching the TTBR whilst the MMU is still on. Switching TTBR is like replacing existing mappings with new ones. So we need to follow the break-before-make sequence. In this case, it means the MMU needs to be switched off while the TTBR is

Re: [PATCH 27/36] xen/arch: add coloring support for Xen

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 19:47, Julien Grall wrote: On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Introduce a new implementation of setup_pagetables that uses coloring logic in order to isolate Xen code using its color selection. Page tables construction is essentially copied, except

Re: [PATCH] xen/x86: drop dependency of XEN_SHSTK on EXPERT

2022-03-09 Thread Jan Beulich
On 09.03.2022 12:34, Juergen Gross wrote: > XEN_SHSTK should be on per default now that it is supported officially. > Only let the prompt depend on EXPERT. > > Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -117,8 +117,8 @@

Re: [PATCH v6 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

2022-03-09 Thread Roger Pau Monné
On Tue, Mar 08, 2022 at 05:31:17PM +, Jane Malalane wrote: > Add XEN_SYSCTL_PHYSCAP_X86_ASSISTED_XAPIC and > XEN_SYSCTL_PHYSCAP_X86_ASSISTED_X2APIC to report accelerated xapic > and x2apic, on x86 hardware. > No such features are currently implemented on AMD hardware. > > HW assisted xAPIC

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Roger Pau Monné
On Wed, Mar 09, 2022 at 10:47:06AM +, Rahul Singh wrote: > Hi Roger, > > > On 9 Mar 2022, at 10:16 am, Roger Pau Monné wrote: > > > > On Wed, Mar 09, 2022 at 10:08:12AM +, Rahul Singh wrote: > >> Hi Jan, > >> > >>> On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: > >>> > >>> On

Re: [PATCH v6 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Roger Pau Monné
On Tue, Mar 08, 2022 at 05:36:43PM +, Jane Malalane wrote: > diff --git a/tools/libs/light/libxl_arm.c b/tools/libs/light/libxl_arm.c > index 39fdca1b49..ba5b8f433f 100644 > --- a/tools/libs/light/libxl_arm.c > +++ b/tools/libs/light/libxl_arm.c > @@ -1384,8 +1384,9 @@ void >

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Roger Pau Monné
On Wed, Mar 09, 2022 at 10:08:12AM +, Rahul Singh wrote: > Hi Jan, > > > On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: > > > > On 03.03.2022 17:31, Rahul Singh wrote: > >>> On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote: > >>> On 01.03.2022 14:34, Rahul Singh wrote: > > On 24 Feb 2022,

Re: [PATCH v3 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Jan Beulich
On 09.03.2022 10:30, Roger Pau Monné wrote: > On Tue, Mar 08, 2022 at 05:58:49PM +0100, Jan Beulich wrote: >> On 08.03.2022 17:41, Roger Pau Monné wrote: >>> On Tue, Mar 08, 2022 at 04:13:55PM +0100, Jan Beulich wrote: On 08.03.2022 15:46, Roger Pau Monné wrote: > On Tue, Mar 08, 2022 at

[PATCH] arm/xen: Fix refcount leak in xen_dt_guest_init

2022-03-09 Thread Miaoqian Lin
The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes: 9b08aaa3199a ("ARM: XEN: Move xen_early_init() before efi_init()") Signed-off-by: Miaoqian Lin ---

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Rahul Singh
Hi Roger, > On 9 Mar 2022, at 10:16 am, Roger Pau Monné wrote: > > On Wed, Mar 09, 2022 at 10:08:12AM +, Rahul Singh wrote: >> Hi Jan, >> >>> On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: >>> >>> On 03.03.2022 17:31, Rahul Singh wrote: > On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote:

[PATCH early-RFC 1/5] xen/arm: Clean-up the memory layout

2022-03-09 Thread Julien Grall
From: Julien Grall In a follow-up patch, the base address for the common mappings will vary between arm32 and arm64. To avoid any duplication, define every mapping in the common region from the previous one. Take the opportunity to add mising *_SIZE for some mappings. Signed-off-by: Julien

[PATCH early-RFC 3/5] xen/arm: mm: Introduce helpers to prepare/enable/disable the identity mapping

2022-03-09 Thread Julien Grall
From: Julien GralL In follow-up patches we will need to have part of Xen identity mapped in order to safely switch the TTBR. On some platform, the identity mapping may have to start at 0. If we always keep the identity region mapped, NULL pointer ference would lead to access to valid mapping.

[PATCH early-RFC 2/5] xen/arm64: Rework the memory layout

2022-03-09 Thread Julien Grall
From: Julien Grall Xen is currently not fully compliant with the Arm because it will switch the TTBR with the MMU on. In order to be compliant, we need to disable the MMU before switching the TTBR. The implication is the page-tables should contain an identity mapping of the code switching the

[PATCH early-RFC 0/5] xen/arm: Don't switch TTBR while the MMU is on

2022-03-09 Thread Julien Grall
From: Julien Grall Hi all, Currently, Xen on Arm will switch TTBR whilst the MMU is on. This is similar to replacing existing mappings with new ones. So we need to follow a break-before-make sequence. When switching the TTBR, we need to temporary disable the MMU before update the TTBR. This

[PATCH early-RFC 5/5] xen/arm: smpboot: Directly switch to the runtime page-tables

2022-03-09 Thread Julien Grall
From: Julien Grall Switching TTBR while the MMU is on is not safe. Now that the identity mapping will not clash with the rest of the memory layout, we can avoid creating temporary page-tables every time a CPU is brought up. Signed-off-by: Julien Grall --- xen/arch/arm/arm64/head.S | 29

[PATCH] xen/x86: drop dependency of XEN_SHSTK on EXPERT

2022-03-09 Thread Juergen Gross
XEN_SHSTK should be on per default now that it is supported officially. Only let the prompt depend on EXPERT. Signed-off-by: Juergen Gross --- xen/arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index

Re: [PATCH 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL

2022-03-09 Thread Roger Pau Monné
On Wed, Mar 09, 2022 at 04:40:24PM +0100, Jan Beulich wrote: > On 09.03.2022 16:03, Roger Pau Monné wrote: > > On Mon, Feb 14, 2022 at 04:07:09PM +0100, Jan Beulich wrote: > >> On 01.02.2022 17:46, Roger Pau Monne wrote: > >>> Use the logic to set shadow SPEC_CTRL values in order to implement >

Re: [PATCH v5 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Jan Beulich
On 09.03.2022 16:56, Jane Malalane wrote: > On 08/03/2022 14:41, Jan Beulich wrote: >> [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments >> unless you have verified the sender and know the content is safe. >> >> On 08.03.2022 15:31, Jane Malalane wrote: >>> On 08/03/2022

Re: [PATCH v3 0/2] livepatch: enable -f{function,data}-sections compiler option

2022-03-09 Thread Julien Grall
Hi Roger, On 09/03/2022 12:28, Roger Pau Monné wrote: On Tue, Mar 08, 2022 at 02:52:55PM +, Julien Grall wrote: Hi, On 08/03/2022 13:49, Roger Pau Monne wrote: Hello, The content in v3 has been split in two patches, but is still mostly the same. The main difference is that first patch

[xen-4.13-testing test] 168481: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168481 xen-4.13-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168481/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemut-win7-amd64 19 guest-stop fail like 167817 test-armhf-armhf-libvirt 16

[xen-4.14-testing test] 168482: regressions - trouble: broken/fail/pass

2022-03-09 Thread osstest service owner
flight 168482 xen-4.14-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168482/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-vhd broken test-armhf-armhf-xl-vhd 5

Re: [PATCH v3 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Roger Pau Monné
On Tue, Mar 08, 2022 at 05:58:49PM +0100, Jan Beulich wrote: > On 08.03.2022 17:41, Roger Pau Monné wrote: > > On Tue, Mar 08, 2022 at 04:13:55PM +0100, Jan Beulich wrote: > >> On 08.03.2022 15:46, Roger Pau Monné wrote: > >>> On Tue, Mar 08, 2022 at 03:09:17PM +0100, Jan Beulich wrote: > On

Re: [PATCH v3 0/2] livepatch: enable -f{function,data}-sections compiler option

2022-03-09 Thread Roger Pau Monné
On Tue, Mar 08, 2022 at 02:52:55PM +, Julien Grall wrote: > Hi, > > On 08/03/2022 13:49, Roger Pau Monne wrote: > > Hello, > > > > The content in v3 has been split in two patches, but is still mostly the > > same. The main difference is that first patch does a bit of cleanup of > > the build

[PATCH 2/2] Changelog: Add __ro_after_init and CET

2022-03-09 Thread Andrew Cooper
Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- CHANGELOG.md | 6 ++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83d85fad5bbc..577517383ec9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is

[PATCH 0/2] XSA-398 Followup

2022-03-09 Thread Andrew Cooper
Andrew Cooper (2): x86/CET: Remove XEN_SHSTK's dependency on EXPERT Changelog: Add __ro_after_init and CET CHANGELOG.md | 6 ++ xen/arch/x86/Kconfig | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) -- 2.11.0

Re: [PATCH v4 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Jan Beulich
On 09.03.2022 13:28, Roger Pau Monne wrote: > If livepatching support is enabled build the hypervisor with > -f{function,data}-sections compiler options, which is required by the > livepatching tools to detect changes and create livepatches. > > This shouldn't result in any functional change on

Re: [PATCH v6 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Jan Beulich
On 08.03.2022 18:36, Jane Malalane wrote: > @@ -685,13 +687,31 @@ int arch_sanitise_domain_config(struct > xen_domctl_createdomain *config) > } > } > > -if ( config->arch.misc_flags & ~XEN_X86_MSR_RELAXED ) > +if ( config->arch.misc_flags & ~(XEN_X86_MSR_RELAXED | > +

Re: [PATCH v2 1/2] xen+tools: Report Interrupt Controller Virtualization capabilities on x86

2022-03-09 Thread Roger Pau Monné
On Tue, Feb 15, 2022 at 04:33:15PM +, Jane Malalane wrote: > On 15/02/2022 15:21, Jan Beulich wrote: > > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > > unless you have verified the sender and know the content is safe. > > > > On 15.02.2022 16:10, Jane Malalane

[xen-4.16-testing test] 168484: tolerable FAIL - PUSHED

2022-03-09 Thread osstest service owner
flight 168484 xen-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/168484/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemut-win7-amd64 19 guest-stopfail like 168136

Re: [PATCH 19/36] xen/arch: introduce cache-coloring allocator

2022-03-09 Thread Jan Beulich
On 04.03.2022 18:46, Marco Solieri wrote: > @@ -438,6 +441,263 @@ mfn_t __init alloc_boot_pages(unsigned long nr_pfns, > unsigned long pfn_align) > > > > +static DEFINE_SPINLOCK(heap_lock); Please take the opportunity and shrink the number of consecutive blank lines above here. > + >

[PATCH 1/2] x86/CET: Remove XEN_SHSTK's dependency on EXPERT

2022-03-09 Thread Andrew Cooper
CET-SS hardware is now available from multiple vendors, and the feature has downstream users. Enable it by default. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- xen/arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [PATCH 1/2] x86/CET: Remove XEN_SHSTK's dependency on EXPERT

2022-03-09 Thread Jan Beulich
On 09.03.2022 13:39, Andrew Cooper wrote: > --- a/xen/arch/x86/Kconfig > +++ b/xen/arch/x86/Kconfig > @@ -117,8 +117,8 @@ config HVM > If unsure, say Y. > > config XEN_SHSTK > - bool "Supervisor Shadow Stacks (EXPERT)" > - depends on HAS_AS_CET_SS && EXPERT > + bool

Re: [PATCH 2/2] Changelog: Add __ro_after_init and CET

2022-03-09 Thread Jan Beulich
On 09.03.2022 13:39, Andrew Cooper wrote: > --- a/CHANGELOG.md > +++ b/CHANGELOG.md > @@ -6,6 +6,12 @@ The format is based on [Keep a > Changelog](https://keepachangelog.com/en/1.0.0/) > > ## [unstable > UNRELEASED](https://xenbits.xen.org/gitweb/?p=xen.git;a=shortlog;h=staging) - > TBD >

Re: [PATCH v6 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Roger Pau Monné
On Tue, Mar 08, 2022 at 05:36:43PM +, Jane Malalane wrote: > Introduce a new per-domain creation x86 specific flag to > select whether hardware assisted virtualization should be used for > x{2}APIC. > > A per-domain option is added to xl in order to select the usage of > x{2}APIC hardware

[PATCH v4 1/2] xen/build: put image header into a separate section

2022-03-09 Thread Roger Pau Monne
So it can be explicitly placed ahead of the rest of the .text content in the linker script (and thus the resulting image). This is a prerequisite for further work that will add a catch-all to the text section (.text.*). Note that placement of the sections inside of .text is also slightly adjusted

[PATCH v4 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Roger Pau Monne
If livepatching support is enabled build the hypervisor with -f{function,data}-sections compiler options, which is required by the livepatching tools to detect changes and create livepatches. This shouldn't result in any functional change on the hypervisor binary image, but does however require

[PATCH v4 0/2] livepatch: enable -f{function,data}-sections compiler option

2022-03-09 Thread Roger Pau Monne
Hello, The content in v3 has been split in two patches, but is still mostly the same. The main difference is that first patch does a bit of cleanup of the build logic now that the header object file doesn't need to be the first one passed to the linker script. Thanks, Roger. Roger Pau Monne

Re: [PATCH 20/36] xen/common: introduce buddy required reservation

2022-03-09 Thread Jan Beulich
On 04.03.2022 18:46, Marco Solieri wrote: > --- a/xen/common/page_alloc.c > +++ b/xen/common/page_alloc.c > @@ -230,6 +230,13 @@ static bool __read_mostly scrub_debug; > #define scrub_debugfalse > #endif > > +#ifdef CONFIG_COLORING > +/* Minimum size required for buddy allocator to work

[PATCH v5 1/2] Livepatch: resolve old address before function verification

2022-03-09 Thread Bjoern Doebel
When verifying that a livepatch can be applied, we may as well want to inspect the target function to be patched. To do so, we need to resolve this function's address before running the arch-specific livepatch_verify hook. Signed-off-by: Bjoern Doebel Acked-by: Konrad Rzeszutek Wilk

Re: [PATCH 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL

2022-03-09 Thread Roger Pau Monné
On Mon, Feb 14, 2022 at 04:07:09PM +0100, Jan Beulich wrote: > On 01.02.2022 17:46, Roger Pau Monne wrote: > > Use the logic to set shadow SPEC_CTRL values in order to implement > > support for VIRT_SPEC_CTRL (signaled by VIRT_SSBD CPUID flag) for HVM > > guests. This includes using the spec_ctrl

Re: [PATCH v4 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Roger Pau Monné
On Wed, Mar 09, 2022 at 02:58:06PM +, Andrew Cooper wrote: > On 09/03/2022 12:28, Roger Pau Monne wrote: > > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S > > index 960c51eb4c..4103763f63 100644 > > --- a/xen/arch/x86/xen.lds.S > > +++ b/xen/arch/x86/xen.lds.S > > @@ -87,9

Re: [PATCH 11/12] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-03-09 Thread Boris Ostrovsky
On 3/9/22 1:18 AM, Christoph Hellwig wrote: On Tue, Mar 08, 2022 at 04:38:21PM -0500, Boris Ostrovsky wrote: On 3/1/22 5:53 AM, Christoph Hellwig wrote: Allow to pass a remap argument to the swiotlb initialization functions to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping

[PATCH] x86/hvm: Annotate hvm_physdev_op() with cf_check

2022-03-09 Thread Andrew Cooper
This was missed previously, and would yield a fatal #CP for any HVM domain which issues a physdevop hypercall. Reported-by: Juergen Gross Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Juergen Gross --- xen/arch/x86/hvm/hypercall.c | 2 +- 1 file

Re: [PATCH] x86/hvm: Annotate hvm_physdev_op() with cf_check

2022-03-09 Thread Jan Beulich
On 09.03.2022 16:20, Andrew Cooper wrote: > This was missed previously, and would yield a fatal #CP for any HVM domain > which issues a physdevop hypercall. > > Reported-by: Juergen Gross > Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich

Re: [PATCH 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL

2022-03-09 Thread Jan Beulich
On 09.03.2022 16:03, Roger Pau Monné wrote: > On Mon, Feb 14, 2022 at 04:07:09PM +0100, Jan Beulich wrote: >> On 01.02.2022 17:46, Roger Pau Monne wrote: >>> Use the logic to set shadow SPEC_CTRL values in order to implement >>> support for VIRT_SPEC_CTRL (signaled by VIRT_SSBD CPUID flag) for HVM

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Jan Beulich
On 09.03.2022 16:50, Rahul Singh wrote: >> On 9 Mar 2022, at 10:17 am, Jan Beulich wrote: >> On 09.03.2022 11:08, Rahul Singh wrote: On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: On 03.03.2022 17:31, Rahul Singh wrote: >> On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote: >> On

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Roger Pau Monné
On Wed, Mar 09, 2022 at 03:50:12PM +, Rahul Singh wrote: > Hi Jan, > > > On 9 Mar 2022, at 10:17 am, Jan Beulich wrote: > > > > On 09.03.2022 11:08, Rahul Singh wrote: > >> Hi Jan, > >> > >>> On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: > >>> > >>> On 03.03.2022 17:31, Rahul Singh

Re: [PATCH 20/36] xen/common: introduce buddy required reservation

2022-03-09 Thread Jan Beulich
On 09.03.2022 15:45, Jan Beulich wrote: > On 04.03.2022 18:46, Marco Solieri wrote: >> --- a/xen/common/page_alloc.c >> +++ b/xen/common/page_alloc.c >> @@ -230,6 +230,13 @@ static bool __read_mostly scrub_debug; >> #define scrub_debugfalse >> #endif >> >> +#ifdef CONFIG_COLORING >> +/*

[PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-09 Thread Bjoern Doebel
Xen enabled CET for supporting architectures. The control flow aspect of CET expects functions that can be called indirectly (i.e., via function pointers) to start with an ENDBR64 instruction. Otherwise a control flow exception is raised. This expectation breaks livepatching flows because we

Re: [PATCH 21/36] xen/common: add colored allocator initialization

2022-03-09 Thread Jan Beulich
On 04.03.2022 18:46, Marco Solieri wrote: > From: Luca Miccio > > Initialize colored heap and allocator data structures. It is assumed > that pages are given to the init function is in ascending order. I don't think this is a good assumption to make. > To > ensure that, pages are retrieved

Re: [PATCH v4 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Andrew Cooper
On 09/03/2022 12:28, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S > index 960c51eb4c..4103763f63 100644 > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -87,9 +87,12 @@ SECTIONS > *(.text.cold) > *(.text.unlikely

Re: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-09 Thread Jan Beulich
On 09.03.2022 15:53, Bjoern Doebel wrote: > Changes since r1: > * use sizeof_field() to avoid unused variable warning > * make metadata variable const in arch_livepatch_revert > * rebase on top and make use of Andrew Cooper's was_endbr64() patch > * use padding byte to store offset rather than

Re: [PATCH v2 1/3] xen/vpci: msix: move x86 specific code to x86 file

2022-03-09 Thread Rahul Singh
Hi Jan, > On 9 Mar 2022, at 10:17 am, Jan Beulich wrote: > > On 09.03.2022 11:08, Rahul Singh wrote: >> Hi Jan, >> >>> On 4 Mar 2022, at 7:23 am, Jan Beulich wrote: >>> >>> On 03.03.2022 17:31, Rahul Singh wrote: > On 1 Mar 2022, at 1:55 pm, Jan Beulich wrote: > On 01.03.2022 14:34,

Re: [PATCH v5 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Jane Malalane
On 08/03/2022 14:41, Jan Beulich wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 08.03.2022 15:31, Jane Malalane wrote: >> On 08/03/2022 12:33, Roger Pau Monné wrote: >>> On Tue, Mar 08,

Re: [PATCH v5 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-09 Thread Ross Lagerwall
> From: Bjoern Doebel > Sent: Wednesday, March 9, 2022 2:53 PM > To: xen-devel@lists.xenproject.org > Cc: Michael Kurth ; Martin Pohlack ; > Roger Pau Monne ; Andrew Cooper > ; Bjoern Doebel ; Konrad > Rzeszutek Wilk ; Ross Lagerwall > > Subject: [PATCH v5 2/2] xen/x86: Livepatch: support

Re: [PATCH v5 2/2] x86/xen: Allow per-domain usage of hardware virtualized APIC

2022-03-09 Thread Jane Malalane
On 09/03/2022 16:51, Jan Beulich wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 09.03.2022 16:56, Jane Malalane wrote: >> On 08/03/2022 14:41, Jan Beulich wrote: >>> [CAUTION - EXTERNAL

Re: [PATCH 1/3] amd/msr: implement VIRT_SPEC_CTRL for HVM guests on top of SPEC_CTRL

2022-03-09 Thread Jan Beulich
On 09.03.2022 17:31, Roger Pau Monné wrote: > On Wed, Mar 09, 2022 at 04:40:24PM +0100, Jan Beulich wrote: >> On 09.03.2022 16:03, Roger Pau Monné wrote: >>> On Mon, Feb 14, 2022 at 04:07:09PM +0100, Jan Beulich wrote: On 01.02.2022 17:46, Roger Pau Monne wrote: > ---

[ovmf test] 168490: regressions - FAIL

2022-03-09 Thread osstest service owner
flight 168490 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/168490/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 168254 build-amd64-xsm

Re: [PATCH v3 2/2] livepatch: set -f{function,data}-sections compiler option

2022-03-09 Thread Andrew Cooper
On 09/03/2022 10:22, Jan Beulich wrote: > On 09.03.2022 10:30, Roger Pau Monné wrote: >> On Tue, Mar 08, 2022 at 05:58:49PM +0100, Jan Beulich wrote: >>> On 08.03.2022 17:41, Roger Pau Monné wrote: On Tue, Mar 08, 2022 at 04:13:55PM +0100, Jan Beulich wrote: > On 08.03.2022 15:46, Roger

Re: [PATCH 04/36] xen/arm: add parsing function for cache coloring configuration

2022-03-09 Thread Julien Grall
Hi, On 04/03/2022 17:46, Marco Solieri wrote: From: Luca Miccio Add three new bootargs allowing configuration of cache coloring support for Xen: I would prefer if documentation of each command line is part of the patch introducing them. This would help understanding some of the