[xen-unstable test] 186105: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186105 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/186105/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 6 xen-buildfail REGR. vs. 186078 Tests which did

Re: [PATCH v4 3/9] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-23 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > Currently, the number of SPIs allocated to the domain is only > > configurable for Dom0less DomUs. Xen domains are supposed to be > > platform agnostics and therefore the numbers of SPIs for libxl

Re: [PATCH v4 5/9] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > In order to support the dynamic dtbo device assignment to a running > > VM, the add/remove of the DT overlay and the attach/detach of the > > device from the DT overlay should happen separately.

Re: [PATCH v4 9/9] docs: Add device tree overlay documentation

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > From: Vikram Garhwal > > > > Signed-off-by: Vikram Garhwal > > Signed-off-by: Stefano Stabellini > > Signed-off-by: Henry Wang > > --- > > v4: > > - No change. > > v3: > > - No change. > > v2:

Re: [PATCH v4 8/9] tools: Introduce the "xl dt-overlay {attach,detach}" commands

2024-05-23 Thread Stefano Stabellini
On Fri, 24 May 2024, Julien Grall wrote: > Hi Henry, > > On 23/05/2024 08:40, Henry Wang wrote: > > With the XEN_DOMCTL_dt_overlay DOMCTL added, users should be able to > > attach/detach devices from the provided DT overlay to domains. > > Support this by introducing a new set of "xl dt-overlay"

[PATCH v5 7/7] docs: Add device tree overlay documentation

2024-05-23 Thread Stefano Stabellini
From: Vikram Garhwal Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- docs/misc/arm/overlay.txt | 82 +++ 1 file changed, 82 insertions(+) create mode 100644 docs/misc/arm/overlay.txt diff --git

[PATCH v5 1/7] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-23 Thread Stefano Stabellini
From: Henry Wang Fix the name mismatch in the xl dt-overlay command, the command name should be "dt-overlay" instead of "dt_overlay". Add the missing "," in the cmdtable. Fix the exit code of the dt-overlay command, use EXIT_FAILURE instead of ERROR_FAIL. Fixes: 61765a07e3d8 ("tools/xl: Add

[PATCH v5 5/7] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-23 Thread Stefano Stabellini
From: Henry Wang In order to support the dynamic dtbo device assignment to a running VM, the add/remove of the DT overlay and the attach/detach of the device from the DT overlay should happen separately. Therefore, repurpose the existing XEN_SYSCTL_dt_overlay to only add the DT overlay to Xen

[PATCH v5 4/7] xen/arm/gic: Allow adding interrupt to running VMs

2024-05-23 Thread Stefano Stabellini
From: Henry Wang Currently, adding physical interrupts are only allowed at the domain creation time. For use cases such as dynamic device tree overlay addition, the adding of physical IRQ to running domains should be allowed. Drop the above-mentioned domain creation check. Since this will

[PATCH v5 6/7] tools: Introduce the "xl dt-overlay attach" command

2024-05-23 Thread Stefano Stabellini
From: Henry Wang With the XEN_DOMCTL_dt_overlay DOMCTL added, users should be able to attach (in the future also detach) devices from the provided DT overlay to domains. Support this by introducing a new "xl dt-overlay" command and related documentation, i.e. "xl dt-overlay attach. Slightly

[PATCH v5 3/7] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-23 Thread Stefano Stabellini
From: Henry Wang Currently, the number of SPIs allocated to the domain is only configurable for Dom0less DomUs. Xen domains are supposed to be platform agnostics and therefore the numbers of SPIs for libxl guests should not be based on the hardware. Introduce a new xl config entry for Arm to

[PATCH v5 2/7] xen/arm, doc: Add a DT property to specify IOMMU for Dom0less domUs

2024-05-23 Thread Stefano Stabellini
From: Henry Wang There are some use cases in which the dom0less domUs need to have the XEN_DOMCTL_CDF_iommu set at the domain construction time. For example, the dynamic dtbo feature allows the domain to be assigned a device that is behind the IOMMU at runtime. For these use cases, we need to

[PATCH v5 0/7] Remaining patches for dynamic node programming using overlay dtbo

2024-05-23 Thread Stefano Stabellini
Hi all, This is the remaining series for the full functional "dynamic node programming using overlay dtbo" feature. The first part [1] has already been merged. Quoting from the original series, the first part has already made Xen aware of new device tree node which means updating the dt_host

Re: [PATCH v4 1/9] tools/xl: Correct the help information and exit code of the dt-overlay command

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Henry Wang wrote: > Fix the name mismatch in the xl dt-overlay command, the > command name should be "dt-overlay" instead of "dt_overlay". > Add the missing "," in the cmdtable. > > Fix the exit code of the dt-overlay command, use EXIT_FAILURE > instead of ERROR_FAIL. > >

[xen-4.17-testing test] 186109: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186109 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/186109/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail REGR. vs. 185864 build-amd64

Re: [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX}

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Jan Beulich wrote: > On 23.05.2024 15:07, Sergiy Kibrik wrote: > > 16.05.24 14:12, Jan Beulich: > >> On 15.05.2024 11:12, Sergiy Kibrik wrote: > >>> --- a/xen/arch/x86/include/asm/cpufeature.h > >>> +++ b/xen/arch/x86/include/asm/cpufeature.h > >>> @@ -81,7 +81,8 @@ static

Re: [PATCH v4 8/9] tools: Introduce the "xl dt-overlay {attach,detach}" commands

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: With the XEN_DOMCTL_dt_overlay DOMCTL added, users should be able to attach/detach devices from the provided DT overlay to domains. Support this by introducing a new set of "xl dt-overlay" commands and related documentation, i.e. "xl dt-overlay

Re: [PATCH v4 3/9] tools/arm: Introduce the "nr_spis" xl config entry

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: Currently, the number of SPIs allocated to the domain is only configurable for Dom0less DomUs. Xen domains are supposed to be platform agnostics and therefore the numbers of SPIs for libxl guests should not be based on the hardware. Introduce a

[linux-linus test] 186103: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186103 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/186103/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 186052 build-amd64

Re: [PATCH v4 9/9] docs: Add device tree overlay documentation

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: From: Vikram Garhwal Signed-off-by: Vikram Garhwal Signed-off-by: Stefano Stabellini Signed-off-by: Henry Wang --- v4: - No change. v3: - No change. v2: - Update the content based on the changes in this version. ---

Re: [PATCH v4 7/9] xen/arm: Support device detachment from domains

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: Similarly as the device attachment from DT overlay to domain, this commit implements the device detachment from domain. The DOMCTL XEN_DOMCTL_dt_overlay op is extended to have the operation XEN_DOMCTL_DT_OVERLAY_DETACH. The detachment of the

Re: [PATCH v4 5/9] xen/arm: Add XEN_DOMCTL_dt_overlay and device attachment to domains

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: In order to support the dynamic dtbo device assignment to a running VM, the add/remove of the DT overlay and the attach/detach of the device from the DT overlay should happen separately. Therefore, repurpose the existing XEN_SYSCTL_dt_overlay to

Re: [PATCH v4 0/9] Remaining patches for dynamic node programming using overlay dtbo

2024-05-23 Thread Julien Grall
On 23/05/2024 08:40, Henry Wang wrote: Hi all, Hi Henry, This is the remaining series for the full functional "dynamic node programming using overlay dtbo" feature. The first part [1] has already been merged. Quoting from the original series, the first part has already made Xen aware of

Re: [PATCH v4 4/9] xen/arm/gic: Allow adding interrupt to running VMs

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: Currently, adding physical interrupts are only allowed at the domain creation time. For use cases such as dynamic device tree overlay addition, the adding of physical IRQ to running domains should be allowed. Drop the above-mentioned domain

Re: [PATCH v4 2/9] xen/arm, doc: Add a DT property to specify IOMMU for Dom0less domUs

2024-05-23 Thread Julien Grall
Hi Henry, On 23/05/2024 08:40, Henry Wang wrote: There are some use cases in which the dom0less domUs need to have the XEN_DOMCTL_CDF_iommu set at the domain construction time. For example, the dynamic dtbo feature allows the domain to be assigned a device that is behind the IOMMU at runtime.

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

2024-05-23 Thread osstest service owner
flight 186117 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/186117/ 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

[libvirt test] 186099: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186099 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/186099/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 186070 build-amd64

Re: [PATCH v2 3/8] x86/vlapic: Move lapic_load_hidden migration checks to the check hook

2024-05-23 Thread Andrew Cooper
On 08/05/2024 1:39 pm, Alejandro Vallejo wrote: > diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c > index 8a24419c..2f06bff1b2cc 100644 > --- a/xen/arch/x86/hvm/vlapic.c > +++ b/xen/arch/x86/hvm/vlapic.c > @@ -1573,35 +1573,54 @@ static void lapic_load_fixup(struct vlapic

Re: [PATCH v6 7/8] xen: mapcache: Add support for grant mappings

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Edgar E. Iglesias wrote: > On Thu, May 23, 2024 at 9:47 AM Manos Pitsidianakis > wrote: > On Thu, 16 May 2024 18:48, "Edgar E. Iglesias" > wrote: > >From: "Edgar E. Iglesias" > > > >Add a second mapcache for grant mappings. The mapcache for >

Re: [PATCH for-4.19 v3 2/3] xen: enable altp2m at create domain domctl

2024-05-23 Thread Stefano Stabellini
On Thu, 23 May 2024, Roger Pau Monné wrote: > On Fri, May 17, 2024 at 03:33:51PM +0200, Roger Pau Monne wrote: > > Enabling it using an HVM param is fragile, and complicates the logic when > > deciding whether options that interact with altp2m can also be enabled. > > > > Leave the HVM param

[PATCH v1 0/1] xen/arm: smmuv3: Mark more init-only functions with __init

2024-05-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" I was scanning for code that we could potentially move from the .text section into .init.text and found a few candidates. I'm not sure if this makes sense, perhaps we don't want to mark these functions for other reasons but my scripts found this chain of SMMUv3 init

[PATCH v1 1/1] xen/arm: smmuv3: Mark more init-only functions with __init

2024-05-23 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Move more functions that are only called at init to the .init.text section. Signed-off-by: Edgar E. Iglesias --- xen/drivers/passthrough/arm/smmu-v3.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

Re: [PATCH v2 6/8] xen/lib: Add topology generator for x86

2024-05-23 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:39:25PM +0100, Alejandro Vallejo wrote: > Add a helper to populate topology leaves in the cpu policy from > threads/core and cores/package counts. > > No functional change, as it's not connected to anything yet. There is a functional change in test-cpu-policy.c. Maybe

Re: [PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-23 Thread Oleksii K.
On Thu, 2024-05-23 at 15:33 +0100, Julien Grall wrote: > > > On 23/05/2024 15:11, Oleksii K. wrote: > > On Thu, 2024-05-23 at 14:00 +0100, Julien Grall wrote: > > > Hi Oleksii, > > Hi Julien, > > > > > > > > On 17/05/2024 14:54, Oleksii Kurochko wrote: > > > > diff --git

[xen-unstable-smoke test] 186108: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186108 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/186108/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 6 xen-buildfail REGR. vs. 186064 Tests which

Re: [PATCH 6/7] x86/cpuid: Fix handling of XSAVE dynamic leaves

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > First, if XSAVE is available in hardware but not visible to the guest, the > dynamic leaves shouldn't be filled in. > > Second, the comment concerning XSS state is wrong. VT-x doesn't manage > host/guest state automatically, but there is provision for

Re: [PATCH v2 5/8] tools/hvmloader: Retrieve (x2)APIC IDs from the APs themselves

2024-05-23 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:39:24PM +0100, Alejandro Vallejo wrote: > Make it so the APs expose their own APIC IDs in a LUT. We can use that LUT to > populate the MADT, decoupling the algorithm that relates CPU IDs and APIC IDs > from hvmloader. > > While at this also remove ap_callin, as writing

Re: [PATCH 4/7] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > @@ -611,6 +587,40 @@ static bool valid_xcr0(uint64_t xcr0) > return true; > } > > +unsigned int xstate_uncompressed_size(uint64_t xcr0) > +{ > +unsigned int size = XSTATE_AREA_MIN_SIZE, i; > + > +ASSERT((xcr0 & ~X86_XCR0_STATES) == 0);

Re: [PATCH 7/7] x86/defns: Clean up X86_{XCR0,XSS}_* constants

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > With the exception of one case in read_bndcfgu() which can use ilog2(), > the *_POS defines are unused. > > X86_XCR0_X87 is the name used by both the SDM and APM, rather than > X86_XCR0_FP. > > No functional change. > > Signed-off-by: Andrew Cooper

Re: [PATCH 3/7] x86/boot: Collect the Raw CPU Policy earlier on boot

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > This is a tangle, but it's a small step in the right direction. > > xstate_init() is shortly going to want data from the Raw policy. > calculate_raw_cpu_policy() is sufficiently separate from the other policies to > be safe to do. > > No functional

[ANNOUNCE} Postpone June Community call

2024-05-23 Thread Kelly Choi
Hi all, The next community call is on Thursday 6th June 2024, which clashes with Xen Summit in Lisbon. I propose we move the call a week later to *Thursday 13th June 2024, 4-5pm (UK time). * Many thanks, Kelly Choi Community Manager Xen Project

Re: [PATCH 2/7] x86/xstate: Cross-check dynamic XSTATE sizes at boot

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > Right now, xstate_ctxt_size() performs a cross-check of size with CPUID in for > every call. This is expensive, being used for domain create/migrate, as well > as to service certain guest CPUID instructions. > > Instead, arrange to check the sizes once

Re: [PATCH 1/7] x86/xstate: Fix initialisation of XSS cache

2024-05-23 Thread Jan Beulich
On 23.05.2024 13:16, Andrew Cooper wrote: > The clobbering of this_cpu(xcr0) and this_cpu(xss) to architecturally invalid > values is to force the subsequent set_xcr0() and set_msr_xss() to reload the > hardware register. > > While XCR0 is reloaded in xstate_init(), MSR_XSS isn't. This causes >

Re: [PATCH 4.5/8] tools/hvmloader: Further simplify SMP setup

2024-05-23 Thread Roger Pau Monné
On Thu, May 09, 2024 at 06:50:57PM +0100, Andrew Cooper wrote: > Now that we're using hypercalls to start APs, we can replace the 'ap_cpuid' > global with a regular function parameter. This requires telling the compiler > that we'd like the parameter in a register rather than on the stack. > >

Re: [PATCH v2 1/2] x86/hvm/trace: Use a different trace type for AMD processors

2024-05-23 Thread Andrew Cooper
On 23/05/2024 3:10 pm, George Dunlap wrote: > A long-standing usability sub-optimality with xenalyze is the > necessity to specify `--svm-mode` when analyzing AMD processors. This > fundamentally comes about because the same trace event ID is used for > both VMX and SVM, but the contents of the

Re: [xen-4.17-testing test] 186087: regressions - FAIL

2024-05-23 Thread Jan Beulich
On 23.05.2024 16:40, osstest service owner wrote: > flight 186087 xen-4.17-testing real [real] > http://logs.test-lab.xenproject.org/osstest/logs/186087/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > build-amd64

Re: [PATCH v2 2/8] xen/x86: Simplify header dependencies in x86/hvm

2024-05-23 Thread Roger Pau Monné
On Thu, May 23, 2024 at 04:40:06PM +0200, Jan Beulich wrote: > On 23.05.2024 16:37, Roger Pau Monné wrote: > > On Wed, May 08, 2024 at 01:39:21PM +0100, Alejandro Vallejo wrote: > >> --- a/xen/arch/x86/include/asm/hvm/hvm.h > >> +++ b/xen/arch/x86/include/asm/hvm/hvm.h > >> @@ -798,6 +798,12 @@

Re: [PATCH v2 3/8] x86/vlapic: Move lapic_load_hidden migration checks to the check hook

2024-05-23 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:39:22PM +0100, Alejandro Vallejo wrote: > While at it, add a check for the reserved field in the hidden save area. > > Signed-off-by: Alejandro Vallejo > --- > v2: > * New patch. Addresses the missing check for rsvd_zero in v1. Oh, it would be better if this was

Re: [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX}

2024-05-23 Thread Jan Beulich
On 23.05.2024 15:07, Sergiy Kibrik wrote: > 16.05.24 14:12, Jan Beulich: >> On 15.05.2024 11:12, Sergiy Kibrik wrote: >>> --- a/xen/arch/x86/include/asm/cpufeature.h >>> +++ b/xen/arch/x86/include/asm/cpufeature.h >>> @@ -81,7 +81,8 @@ static inline bool boot_cpu_has(unsigned int feat) >>>

Re: [XEN PATCH v2 06/15] x86/p2m: guard altp2m code with CONFIG_ALTP2M option

2024-05-23 Thread Jan Beulich
On 23.05.2024 12:44, Sergiy Kibrik wrote: > 16.05.24 14:01, Jan Beulich: >> On 15.05.2024 11:10, Sergiy Kibrik wrote: >>> --- a/xen/arch/x86/include/asm/hvm/hvm.h >>> +++ b/xen/arch/x86/include/asm/hvm/hvm.h >>> @@ -670,7 +670,7 @@ static inline bool hvm_hap_supported(void) >>> /* returns true

[xen-4.17-testing test] 186087: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186087 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/186087/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64 6 xen-buildfail REGR. vs. 185864

Re: [PATCH v2 2/8] xen/x86: Simplify header dependencies in x86/hvm

2024-05-23 Thread Jan Beulich
On 23.05.2024 16:37, Roger Pau Monné wrote: > On Wed, May 08, 2024 at 01:39:21PM +0100, Alejandro Vallejo wrote: >> --- a/xen/arch/x86/include/asm/hvm/hvm.h >> +++ b/xen/arch/x86/include/asm/hvm/hvm.h >> @@ -798,6 +798,12 @@ static inline void hvm_update_vlapic_mode(struct vcpu >> *v) >>

Re: [PATCH v2 2/8] xen/x86: Simplify header dependencies in x86/hvm

2024-05-23 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:39:21PM +0100, Alejandro Vallejo wrote: > Otherwise it's not possible to call functions described in hvm/vlapic.h from > the > inline functions of hvm/hvm.h. > > This is because a static inline in vlapic.h depends on hvm.h, and pulls it > transitively through vpt.h.

Re: [xen-unstable-smoke test] 186107: regressions - FAIL

2024-05-23 Thread Jan Beulich
On 23.05.2024 15:45, osstest service owner wrote: > flight 186107 xen-unstable-smoke real [real] > http://logs.test-lab.xenproject.org/osstest/logs/186107/ > > Regressions :-( > > Tests which did not succeed and are blocking, > including tests which could not be run: > build-armhf

Re: [PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-23 Thread Julien Grall
On 23/05/2024 15:11, Oleksii K. wrote: On Thu, 2024-05-23 at 14:00 +0100, Julien Grall wrote: Hi Oleksii, Hi Julien, On 17/05/2024 14:54, Oleksii Kurochko wrote: diff --git a/xen/arch/arm/arm64/livepatch.c b/xen/arch/arm/arm64/livepatch.c index df2cebedde..4bc8ed9be5 100644 ---

Re: [PATCH v2 1/8] xen/x86: Add initial x2APIC ID to the per-vLAPIC save area

2024-05-23 Thread Roger Pau Monné
On Wed, May 08, 2024 at 01:39:20PM +0100, Alejandro Vallejo wrote: > This allows the initial x2APIC ID to be sent on the migration stream. The > hardcoded mapping x2apic_id=2*vcpu_id is maintained for the time being. > Given the vlapic data is zero-extended on restore, fix up migrations from >

Re: [PATCH v4 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console

2024-05-23 Thread Jan Beulich
On 23.05.2024 16:22, Marek Marczykowski-Górecki wrote: > On Wed, May 22, 2024 at 05:39:02PM +0200, Marek Marczykowski-Górecki wrote: >> On older systems, XHCI xcap had a layout that no other (interesting) >> registers >> were placed on the same page as the debug capability, so Linux was fine with

[PATCH v2 1/2] x86/hvm/trace: Use a different trace type for AMD processors

2024-05-23 Thread George Dunlap
A long-standing usability sub-optimality with xenalyze is the necessity to specify `--svm-mode` when analyzing AMD processors. This fundamentally comes about because the same trace event ID is used for both VMX and SVM, but the contents of the trace must be interpreted differently. Instead,

[PATCH v2 2/2] tools/xenalyze: Ignore HVM_EMUL events harder

2024-05-23 Thread George Dunlap
To unify certain common sanity checks, checks are done very early in processing based only on the top-level type. Unfortunately, when TRC_HVM_EMUL was introduced, it broke some of the assumptions about how the top-level types worked. Namely, traces of this type will show up outside of HVM

Re: [PATCH v4 0/2] Add API for making parts of a MMIO page R/O and use it in XHCI console

2024-05-23 Thread Marek Marczykowski-Górecki
On Wed, May 22, 2024 at 05:39:02PM +0200, Marek Marczykowski-Górecki wrote: > On older systems, XHCI xcap had a layout that no other (interesting) registers > were placed on the same page as the debug capability, so Linux was fine with > making the whole page R/O. But at least on Tiger Lake and

Re: [PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-23 Thread Oleksii K.
On Thu, 2024-05-23 at 14:00 +0100, Julien Grall wrote: > Hi Oleksii, Hi Julien, > > On 17/05/2024 14:54, Oleksii Kurochko wrote: > > diff --git a/xen/arch/arm/arm64/livepatch.c > > b/xen/arch/arm/arm64/livepatch.c > > index df2cebedde..4bc8ed9be5 100644 > > --- a/xen/arch/arm/arm64/livepatch.c >

Re: [PATCH 4/5] x86/kernel: Move page table macros to new header

2024-05-23 Thread Borislav Petkov
On Thu, May 23, 2024 at 03:59:43PM +0200, Thomas Gleixner wrote: > On Wed, Apr 10 2024 at 15:48, Jason Andryuk wrote: > > --- > > arch/x86/kernel/head_64.S| 22 ++ > > arch/x86/kernel/pgtable_64_helpers.h | 28 > > That's the wrong

Re: [PATCH 4/5] x86/kernel: Move page table macros to new header

2024-05-23 Thread Thomas Gleixner
On Wed, Apr 10 2024 at 15:48, Jason Andryuk wrote: > --- > arch/x86/kernel/head_64.S| 22 ++ > arch/x86/kernel/pgtable_64_helpers.h | 28 That's the wrong place as you want to include it from arch/x86/platform.

[xen-unstable-smoke test] 186107: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186107 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/186107/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 6 xen-buildfail REGR. vs. 186064 Tests which

Re: [PATCH v10 03/14] xen/bitops: implement fls{l}() in common logic

2024-05-23 Thread Julien Grall
Hi, On 22/05/2024 09:15, Jan Beulich wrote: On 22.05.2024 09:37, Oleksii K. wrote: On Tue, 2024-05-21 at 13:18 +0200, Jan Beulich wrote: On 17.05.2024 15:54, Oleksii Kurochko wrote: To avoid the compilation error below, it is needed to update to places in common/page_alloc.c where flsl() is

Re: [XEN PATCH v2 07/15] x86: guard cpu_has_{svm/vmx} macros with CONFIG_{SVM/VMX}

2024-05-23 Thread Sergiy Kibrik
16.05.24 14:12, Jan Beulich: On 15.05.2024 11:12, Sergiy Kibrik wrote: --- a/xen/arch/x86/include/asm/cpufeature.h +++ b/xen/arch/x86/include/asm/cpufeature.h @@ -81,7 +81,8 @@ static inline bool boot_cpu_has(unsigned int feat) #define cpu_has_sse3boot_cpu_has(X86_FEATURE_SSE3)

Re: [PATCH v10 02/14] xen: introduce generic non-atomic test_*bit()

2024-05-23 Thread Julien Grall
Hi Oleksii, On 17/05/2024 14:54, Oleksii Kurochko wrote: diff --git a/xen/arch/arm/arm64/livepatch.c b/xen/arch/arm/arm64/livepatch.c index df2cebedde..4bc8ed9be5 100644 --- a/xen/arch/arm/arm64/livepatch.c +++ b/xen/arch/arm/arm64/livepatch.c @@ -10,7 +10,6 @@ #include #include

Re: [for-4.19] Re: [XEN PATCH v3] arm/mem_access: add conditional build of mem_access.c

2024-05-23 Thread Julien Grall
Hi Oleksii, On 23/05/2024 09:04, Oleksii K. wrote: On Wed, 2024-05-22 at 21:50 +0100, Julien Grall wrote: Hi, Adding Oleksii as the release manager. On 22/05/2024 19:27, Tamas K Lengyel wrote: On Fri, May 10, 2024 at 8:32 AM Alessandro Zucchelli wrote: In order to comply to MISRA C:2012

Re: [PATCH 5/5] x86/pvh: Add 64bit relocation page tables

2024-05-23 Thread Juergen Gross
On 10.04.24 21:48, Jason Andryuk wrote: The PVH entry point is 32bit. For a 64bit kernel, the entry point must switch to 64bit mode, which requires a set of page tables. In the past, PVH used init_top_pgt. This works fine when the kernel is loaded at LOAD_PHYSICAL_ADDR, as the page tables are

Re: [XEN PATCH] x86/iommu: Conditionally compile platform-specific union entries

2024-05-23 Thread Teddy Astie
Le 23/05/2024 à 11:52, Roger Pau Monné a écrit : > The #ifdef and #endif processor directives shouldn't be indented. > > Would you mind adding /* CONFIG_{AMD,INTEL}_IOMMU */ comments in the > #endif directives? > Sure, will change it for v2. > I wonder if we could move the definitions of those

Re: [PATCH 4/5] x86/kernel: Move page table macros to new header

2024-05-23 Thread Juergen Gross
On 10.04.24 21:48, Jason Andryuk wrote: The PVH entry point will need an additional set of prebuild page tables. Move the macros and defines to a new header so they can be re-used. Signed-off-by: Jason Andryuk With the one nit below addressed: Reviewed-by: Juergen Gross ... diff --git

Re: [PATCH for-4.19 v3 2/3] xen: enable altp2m at create domain domctl

2024-05-23 Thread Roger Pau Monné
On Fri, May 17, 2024 at 03:33:51PM +0200, Roger Pau Monne wrote: > Enabling it using an HVM param is fragile, and complicates the logic when > deciding whether options that interact with altp2m can also be enabled. > > Leave the HVM param value for consumption by the guest, but prevent it from >

[PATCH 7/7] x86/defns: Clean up X86_{XCR0,XSS}_* constants

2024-05-23 Thread Andrew Cooper
With the exception of one case in read_bndcfgu() which can use ilog2(), the *_POS defines are unused. X86_XCR0_X87 is the name used by both the SDM and APM, rather than X86_XCR0_FP. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné v3: * New ---

[PATCH 3/7] x86/boot: Collect the Raw CPU Policy earlier on boot

2024-05-23 Thread Andrew Cooper
This is a tangle, but it's a small step in the right direction. xstate_init() is shortly going to want data from the Raw policy. calculate_raw_cpu_policy() is sufficiently separate from the other policies to be safe to do. No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich

[PATCH 5/7] x86/cpu-policy: Simplify recalculate_xstate()

2024-05-23 Thread Andrew Cooper
Make use of xstate_uncompressed_size() helper rather than maintaining the running calculation while accumulating feature components. The rest of the CPUID data can come direct from the raw cpu policy. All per-component data form an ABI through the behaviour of the X{SAVE,RSTOR}* instructions.

[PATCH 1/7] x86/xstate: Fix initialisation of XSS cache

2024-05-23 Thread Andrew Cooper
The clobbering of this_cpu(xcr0) and this_cpu(xss) to architecturally invalid values is to force the subsequent set_xcr0() and set_msr_xss() to reload the hardware register. While XCR0 is reloaded in xstate_init(), MSR_XSS isn't. This causes get_msr_xss() to return the invalid value, and logic

[PATCH 6/7] x86/cpuid: Fix handling of XSAVE dynamic leaves

2024-05-23 Thread Andrew Cooper
First, if XSAVE is available in hardware but not visible to the guest, the dynamic leaves shouldn't be filled in. Second, the comment concerning XSS state is wrong. VT-x doesn't manage host/guest state automatically, but there is provision for "host only" bits to be set, so the implications are

[PATCH 4/7] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()

2024-05-23 Thread Andrew Cooper
We're soon going to need a compressed helper of the same form. The size of the uncompressed image depends on the single element with the largest offset + size. Sadly this isn't always the element with the largest index. Name the per-xstate-component cpu_policy struture, for legibility of the

[PATCH 2/7] x86/xstate: Cross-check dynamic XSTATE sizes at boot

2024-05-23 Thread Andrew Cooper
Right now, xstate_ctxt_size() performs a cross-check of size with CPUID in for every call. This is expensive, being used for domain create/migrate, as well as to service certain guest CPUID instructions. Instead, arrange to check the sizes once at boot. See the code comments for details. Right

[PATCH for-4.19 v3 0/7] x86/xstate: Fixes to size calculations

2024-05-23 Thread Andrew Cooper
This has grown somewhat from v2, but is better for it IMO. The headline change is patch 2 performing all the cross-checking at boot time. This turned into needing prepare the Raw CPU policy earlier on boot (to avoid further-adding to scheme we're already looking to retire). The end result has

Re: [PATCH 3/5] x86/pvh: Set phys_base when calling xen_prepare_pvh()

2024-05-23 Thread Jürgen Groß
On 10.04.24 21:48, Jason Andryuk wrote: phys_base needs to be set for __pa() to work in xen_pvh_init() when finding the hypercall page. Set it before calling into xen_prepare_pvh(), which calls xen_pvh_init(). Clear it afterward to avoid __startup_64() adding to it and creating an incorrect

[xen-unstable-smoke test] 186104: regressions - FAIL

2024-05-23 Thread osstest service owner
flight 186104 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/186104/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf 6 xen-buildfail REGR. vs. 186064 Tests which

Re: [PATCH] xen-hvm: Avoid livelock while handling buffered ioreqs

2024-05-23 Thread Ross Lagerwall
On Tue, Apr 9, 2024 at 3:19 PM Ross Lagerwall wrote: > > On Tue, Apr 9, 2024 at 11:20 AM Anthony PERARD > wrote: > > > > On Thu, Apr 04, 2024 at 03:08:33PM +0100, Ross Lagerwall wrote: > > > diff --git a/hw/xen/xen-hvm-common.c b/hw/xen/xen-hvm-common.c > > > index 1627da739822..1116b3978938

Re: [PATCH v3 2/2] tools/xg: Clean up xend-style overrides for CPU policies

2024-05-23 Thread Roger Pau Monné
On Thu, May 23, 2024 at 10:41:30AM +0100, Alejandro Vallejo wrote: > Factor out policy getters/setters from both (CPUID and MSR) policy override > functions. Additionally, use host policy rather than featureset when > preparing the cur policy, saving one hypercall and several lines of >

Re: [XEN PATCH v2 06/15] x86/p2m: guard altp2m code with CONFIG_ALTP2M option

2024-05-23 Thread Sergiy Kibrik
16.05.24 14:01, Jan Beulich: On 15.05.2024 11:10, Sergiy Kibrik wrote: @@ -38,7 +38,10 @@ static inline bool altp2m_active(const struct domain *d) } /* Only declaration is needed. DCE will optimise it out when linking. */ +void altp2m_vcpu_initialise(struct vcpu *v); +void

Re: [PATCH v6 7/8] xen: mapcache: Add support for grant mappings

2024-05-23 Thread Edgar E. Iglesias
On Thu, May 23, 2024 at 9:47 AM Manos Pitsidianakis < manos.pitsidiana...@linaro.org> wrote: > On Thu, 16 May 2024 18:48, "Edgar E. Iglesias" > wrote: > >From: "Edgar E. Iglesias" > > > >Add a second mapcache for grant mappings. The mapcache for > >grants needs to work with XC_PAGE_SIZE

Re: [PATCH v3 1/2] tools/xg: Streamline cpu policy serialise/deserialise calls

2024-05-23 Thread Roger Pau Monné
On Thu, May 23, 2024 at 10:41:29AM +0100, Alejandro Vallejo wrote: > The idea is to use xc_cpu_policy_t as a single object containing both the > serialised and deserialised forms of the policy. Note that we need lengths > for the arrays, as the serialised policies may be shorter than the array >

Re: [XEN PATCH] x86/iommu: Conditionally compile platform-specific union entries

2024-05-23 Thread Roger Pau Monné
On Thu, May 23, 2024 at 09:19:53AM +, Teddy Astie wrote: > If some platform driver isn't compiled in, remove its related union > entries as they are not used. > > Signed-off-by Teddy Astie > --- > xen/arch/x86/include/asm/iommu.h | 4 > xen/arch/x86/include/asm/pci.h | 4 > 2

[PATCH v3 2/2] tools/xg: Clean up xend-style overrides for CPU policies

2024-05-23 Thread Alejandro Vallejo
Factor out policy getters/setters from both (CPUID and MSR) policy override functions. Additionally, use host policy rather than featureset when preparing the cur policy, saving one hypercall and several lines of boilerplate. No functional change intended. Signed-off-by: Alejandro Vallejo ---

[PATCH v3 1/2] tools/xg: Streamline cpu policy serialise/deserialise calls

2024-05-23 Thread Alejandro Vallejo
The idea is to use xc_cpu_policy_t as a single object containing both the serialised and deserialised forms of the policy. Note that we need lengths for the arrays, as the serialised policies may be shorter than the array capacities. * Add the serialised lengths to the struct so we can

[PATCH v3 0/2] Clean the policy manipulation path in domain creation

2024-05-23 Thread Alejandro Vallejo
v2 -> v3: * Style adjustments * Revert of loop index scope refactors v1 -> v2: * Removed xc_cpu_policy from xenguest.h (dropped v1/patch1) * Added accessors for xc_cpu_policy so the serialised form can be extracted. * Modified xen-cpuid to use accessors. Original cover letter

[xen-unstable test] 186078: tolerable FAIL

2024-05-23 Thread osstest service owner
flight 186078 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/186078/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-qcow2 8 xen-boot fail in 186066 pass in 186078 test-armhf-armhf-xl-multivcpu

[XEN PATCH] x86/iommu: Conditionally compile platform-specific union entries

2024-05-23 Thread Teddy Astie
If some platform driver isn't compiled in, remove its related union entries as they are not used. Signed-off-by Teddy Astie --- xen/arch/x86/include/asm/iommu.h | 4 xen/arch/x86/include/asm/pci.h | 4 2 files changed, 8 insertions(+) diff --git a/xen/arch/x86/include/asm/iommu.h

Re: [PATCH v2 4/4] tools: Drop libsystemd as a dependency

2024-05-23 Thread Jürgen Groß
On 16.05.24 20:58, Andrew Cooper wrote: There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun

Re: [PATCH v2 4/4] tools: Drop libsystemd as a dependency

2024-05-23 Thread Andrew Cooper
On 23/05/2024 9:27 am, Jürgen Groß wrote: > On 16.05.24 20:58, Andrew Cooper wrote: >> diff --git a/automation/build/archlinux/current.dockerfile >> b/automation/build/archlinux/current.dockerfile >> index 3e37ab5c40c1..d29f1358c2bd 100644 >> --- a/automation/build/archlinux/current.dockerfile >>

Re: [PATCH v2 4/4] tools: Drop libsystemd as a dependency

2024-05-23 Thread Jürgen Groß
On 16.05.24 20:58, Andrew Cooper wrote: There are no more users, and we want to disuade people from introducing new users just for sd_notify() and friends. Drop the dependency. We still want the overall --with{,out}-systemd to gate the generation of the service/unit/mount/etc files. Rerun

Re: [PATCH v2 3/4] tools/{c,o}xenstored: Don't link against libsystemd

2024-05-23 Thread Jürgen Groß
On 16.05.24 20:58, Andrew Cooper wrote: Use the local freestanding wrapper instead. Signed-off-by: Andrew Cooper Reviewed-by: Juergen Gross # tools/xenstored Juergen --- CC: Anthony PERARD CC: Juergen Gross CC: George Dunlap CC: Jan Beulich CC: Stefano Stabellini CC: Julien Grall

Re: [PATCH v4 2/2] drivers/char: Use sub-page ro API to make just xhci dbc cap RO

2024-05-23 Thread Jan Beulich
On 22.05.2024 17:39, Marek Marczykowski-Górecki wrote: > Not the whole page, which may contain other registers too. The XHCI > specification describes DbC as designed to be controlled by a different > driver, but does not mandate placing registers on a separate page. In fact > on Tiger Lake and

Re: [PATCH v2 2/4] tools: Import standalone sd_notify() implementation from systemd

2024-05-23 Thread Jürgen Groß
On 16.05.24 20:58, Andrew Cooper wrote: ... in order to avoid linking against the whole of libsystemd. Only minimal changes to the upstream copy, to function as a drop-in replacement for sd_notify() and as a header-only library. Signed-off-by: Andrew Cooper With

Re: [PATCH] x86/shadow: don't leave trace record field uninitialized

2024-05-23 Thread Oleksii K.
On Wed, 2024-05-22 at 12:17 +0200, Jan Beulich wrote: > The emulation_count field is set only conditionally right now. > Convert > all field setting to an initializer, thus guaranteeing that field to > be > set to 0 (default initialized) when GUEST_PAGING_LEVELS != 3. > > While there also drop

  1   2   >