Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Jan Beulich
On 17.07.2023 20:40, Shawn Anastasio wrote: > Quick followup, > > On 7/17/23 1:32 PM, Shawn Anastasio wrote: >> On 7/17/23 11:17 AM, Jan Beulich wrote: >>> This could do with using ARRAY_SIZE(rets). Same again below. >> >> Sure, will do this. > > ARRAY_SIZE is defined in which can't yet be inclu

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Jan Beulich
On 17.07.2023 20:32, Shawn Anastasio wrote: > On 7/17/23 11:17 AM, Jan Beulich wrote: >> On 06.07.2023 21:04, Shawn Anastasio wrote: >>> --- /dev/null >>> +++ b/xen/arch/ppc/boot-of.c >>> @@ -0,0 +1,100 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-or-later */ >>> +/* >>> + * Copyright IBM Corp. 2005

Re: [PATCH 1/3] x86: allow Kconfig control over psABI level

2023-07-17 Thread Jan Beulich
On 12.07.2023 14:33, Jan Beulich wrote: > Newer hardware offers more efficient and/or flexible and/or capable > instructions, some of which we can make good use of in the hypervisor > as well. Allow a basic way (no alternatives patching) of enabling their > use. Of course this means that hypervisor

[qemu-upstream-4.16-testing test] 181843: tolerable FAIL - PUSHED

2023-07-17 Thread osstest service owner
flight 181843 qemu-upstream-4.16-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/181843/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 174136 test-amd64-i386-xl-qem

Re: [PATCH v2 01/18] tools/xenstore: explicitly specify create or modify for tdb_store()

2023-07-17 Thread Juergen Gross
On 17.07.23 23:40, Julien Grall wrote: Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Instead of using TDB_REPLACE for either creating or modifying a TDB entry, use either TDB_INSERT or TDB_MODIFY when calling tdb_store(). At higher function levels use the abstract flag values NODE_CREA

[libvirt test] 181836: tolerable FAIL - PUSHED

2023-07-17 Thread osstest service owner
flight 181836 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/181836/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-libvirt-pair 10 xen-install/src_host fail in 181808 pass in 181836 test-amd64-i386-libvirt-pair 11

[qemu-upstream-4.17-testing test] 181841: regressions - trouble: blocked/fail/pass/starved

2023-07-17 Thread osstest service owner
flight 181841 qemu-upstream-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/181841/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-ws16-amd64 7 xen-install fail REGR. vs. 175008 buil

[xen-4.17-testing test] 181832: tolerable FAIL - PUSHED

2023-07-17 Thread osstest service owner
flight 181832 xen-4.17-testing real [real] http://logs.test-lab.xenproject.org/osstest/logs/181832/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemuu-win7-amd64 19 guest-stop fail like 180919 test-armhf-armhf-libvirt 16

Re: [PATCH v2 04/18] tools/xenstore: rename do_tdb_delete() and change parameter type

2023-07-17 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Rename do_tdb_delete() to db_delete() and replace the key parameter with db_name specifying the name of the node in the data base. This is in preparation to replace TDB with a more simple data storage. Signed-off-by: Juergen Gross Review

Re: [PATCH v2 01/18] tools/xenstore: explicitly specify create or modify for tdb_store()

2023-07-17 Thread Julien Grall
Hi Juergen, On 10/07/2023 07:59, Juergen Gross wrote: Instead of using TDB_REPLACE for either creating or modifying a TDB entry, use either TDB_INSERT or TDB_MODIFY when calling tdb_store(). At higher function levels use the abstract flag values NODE_CREATE Were you meant to replace 'flag' wi

Re: [RFC PATCH 1/4] xen/arm: justify or initialize conditionally uninitialized variables

2023-07-17 Thread Julien Grall
Hi Nicola, I am currently looking at the code to check if we can avoid some SAF-*. But I need some clarification on the usage. On 14/07/2023 12:49, Nicola Vetrini wrote: @@ -2914,6 +2924,7 @@ static int __init make_vpl011_uart_node(struct kernel_info *kinfo) void *fdt = kinfo->fdt;

[ovmf test] 181847: all pass - PUSHED

2023-07-17 Thread osstest service owner
flight 181847 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/181847/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4d1014093fbf1ae2788caaad8e70eabb15720ce4 baseline version: ovmf 39ded59c09a38cb17cee4

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Julien Grall
On 17/07/2023 21:40, Julien Grall wrote: On 14/07/2023 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable 'oldbit', which is written before being set, but is such a way that is not amenable to automatic checking. Therefore, a deviation comm

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Julien Grall
Hi, On 14/07/2023 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable 'oldbit', which is written before being set, but is such a way that is not amenable to automatic checking. Therefore, a deviation comment, is introduced to document this situ

[linux-linus test] 181822: regressions - FAIL

2023-07-17 Thread osstest service owner
flight 181822 linux-linus real [real] flight 181853 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181822/ http://logs.test-lab.xenproject.org/osstest/logs/181853/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Shawn Anastasio
Quick followup, On 7/17/23 1:32 PM, Shawn Anastasio wrote: > On 7/17/23 11:17 AM, Jan Beulich wrote: >> This could do with using ARRAY_SIZE(rets). Same again below. > > Sure, will do this. ARRAY_SIZE is defined in which can't yet be included due to missing headers. I could copy its definition i

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Shawn Anastasio
On 7/17/23 11:17 AM, Jan Beulich wrote: > On 06.07.2023 21:04, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/Makefile >> +++ b/xen/arch/ppc/Makefile >> @@ -1,5 +1,7 @@ >> obj-$(CONFIG_PPC64) += ppc64/ >> >> +obj-y += boot-of.init.o >> +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o > > While in th

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

2023-07-17 Thread osstest service owner
flight 181842 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181842/ 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 1

[xen-4.16-testing test] 181831: regressions - trouble: fail/pass/starved

2023-07-17 Thread osstest service owner
flight 181831 xen-4.16-testing real [real] flight 181848 xen-4.16-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181831/ http://logs.test-lab.xenproject.org/osstest/logs/181848/ Regressions :-( Tests which did not succeed and are blocking, including tests which could

Re: [PATCH v3 1/3] xen/ppc: Set up a basic C environment

2023-07-17 Thread Jan Beulich
On 17.07.2023 18:00, Shawn Anastasio wrote: > On 7/17/23 10:38 AM, Jan Beulich wrote: >> On 06.07.2023 21:04, Shawn Anastasio wrote: >>> --- a/xen/arch/ppc/include/asm/config.h >>> +++ b/xen/arch/ppc/include/asm/config.h >>> @@ -43,7 +43,7 @@ >>> >>> #define SMP_CACHE_BYTES (1 << 6) >>> >>> -#

Re: [PATCH 7/8] pdx: Reorder pdx.[ch]

2023-07-17 Thread Alejandro Vallejo
On Mon, Jul 17, 2023 at 05:03:17PM +0100, Alejandro Vallejo wrote: > The next patch compiles out compression-related chunks, and it's helpful to > have them grouped together beforehand. > > Signed-off-by: Alejandro Vallejo > --- > xen/common/pdx.c | 58 +-

Re: [PATCH v3 2/3] xen/ppc: Implement early serial printk on pseries

2023-07-17 Thread Jan Beulich
On 06.07.2023 21:04, Shawn Anastasio wrote: > --- a/xen/arch/ppc/Makefile > +++ b/xen/arch/ppc/Makefile > @@ -1,5 +1,7 @@ > obj-$(CONFIG_PPC64) += ppc64/ > > +obj-y += boot-of.init.o > +obj-$(CONFIG_EARLY_PRINTK) += early_printk.o While in this case I could accept the name as is to be the same

[PATCH 7/8] pdx: Reorder pdx.[ch]

2023-07-17 Thread Alejandro Vallejo
The next patch compiles out compression-related chunks, and it's helpful to have them grouped together beforehand. Signed-off-by: Alejandro Vallejo --- xen/common/pdx.c | 58 +-- xen/include/xen/pdx.h | 37 +-- 2 files changed,

[PATCH 6/8] mm/pdx: Standardize region validation wrt pdx compression

2023-07-17 Thread Alejandro Vallejo
Regions must be occasionally validated for pdx compression validity. That is, whether any of the machine addresses spanning the region have a bit set in the pdx "hole" (which is expected to always contain zeroes). There are a few such tests through the code, and they all check for different things.

[PATCH 4/8] build: Remove CONFIG_HAS_PDX

2023-07-17 Thread Alejandro Vallejo
It's set everywhere and can't be turned off because it's presence is assumed in several parts of the codebase. This is an initial patch towards adding a more fine-grained CONFIG_HAS_PDX_COMPRESSION that can actually be disabled on systems that don't typically benefit from it. No functional change.

[PATCH 8/8] pdx: Add CONFIG_HAS_PDX_COMPRESSION as a Kconfig option

2023-07-17 Thread Alejandro Vallejo
Adds a new compile-time flag to allow disabling pdx compression and compiles out compression-related code/data. It also shorts the pdx<->pfn conversion macros and creates stubs for masking fucntions. Signed-off-by: Alejandro Vallejo --- xen/arch/x86/domain.c | 19 +-- xen/common/

[PATCH 5/8] mm: Factor out the pdx compression logic in ma/va converters

2023-07-17 Thread Alejandro Vallejo
This patch factors out the pdx compression logic hardcoded in both ports for the maddr<->vaddr conversion functions. Touches both x86 and arm ports. Signed-off-by: Alejandro Vallejo --- xen/arch/arm/include/asm/mm.h | 3 +-- xen/arch/x86/include/asm/x86_64/page.h | 28 +++-

[PATCH 3/8] pdx: Mark pdx hole description globals readonly after boot

2023-07-17 Thread Alejandro Vallejo
They define where the compressible area of valid mfns is, and all of them are populated on boot (with the exception of max_pdx, that's updated on memory hotplug). No functional change. Signed-off-by: Alejandro Vallejo --- xen/common/pdx.c | 17 ++--- 1 file changed, 10 insertions(+)

[PATCH 1/8] mm/pdx: Add comments throughout the codebase for pdx

2023-07-17 Thread Alejandro Vallejo
Document the behaviour of the pdx machinery in Xen. Some logic is fairly opaque and hard to follow without it being documented anywhere. This explains the rationale behind compression and its relationship to frametable indexing and directmap management. While modifying the file: * Convert u64 ->

[PATCH 2/8] arm/mm: Document the differences between arm32 and arm64 directmaps

2023-07-17 Thread Alejandro Vallejo
arm32 merely covers the XENHEAP, whereas arm64 currently covers anything in the frame table. These comments highlight why arm32 doesn't need to account for PDX compression in its __va() implementation while arm64 does. Signed-off-by: Alejandro Vallejo --- xen/arch/arm/include/asm/mm.h | 27

[PATCH 0/8] Make PDX compression optional

2023-07-17 Thread Alejandro Vallejo
Currently there's a CONFIG_HAS_PDX Kconfig option, but it's impossible to disable it because the whole codebase performs unconditional compression/decompression operations on addresses. This has the unfortunate side effect that systems without a need for compression still have to pay the performanc

Re: [PATCH v3 1/3] xen/ppc: Set up a basic C environment

2023-07-17 Thread Shawn Anastasio
On 7/17/23 10:38 AM, Jan Beulich wrote: > On 06.07.2023 21:04, Shawn Anastasio wrote: >> --- a/xen/arch/ppc/include/asm/config.h >> +++ b/xen/arch/ppc/include/asm/config.h >> @@ -43,7 +43,7 @@ >> >> #define SMP_CACHE_BYTES (1 << 6) >> >> -#define STACK_ORDER 2 >> +#define STACK_ORDER 0 >> #de

Re: [PATCH] drm: Explicitly include correct DT includes

2023-07-17 Thread Robert Foss
On Mon, Jul 17, 2023 at 4:27 PM Rob Herring wrote: > > On Sun, Jul 16, 2023 at 3:26 AM Heiko Stuebner wrote: > > > > Am Freitag, 14. Juli 2023, 19:45:34 CEST schrieb Rob Herring: > > > The DT of_device.h and of_platform.h date back to the separate > > > of_platform_bus_type before it as merged in

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Jan Beulich
On 17.07.2023 17:28, Nicola Vetrini wrote: > > > On 17/07/23 15:59, Jan Beulich wrote: >> On 14.07.2023 16:20, Luca Fancellu wrote: >>> >>> On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable 'oldbit'

Re: [PATCH v3 1/3] xen/ppc: Set up a basic C environment

2023-07-17 Thread Jan Beulich
On 06.07.2023 21:04, Shawn Anastasio wrote: > --- a/xen/arch/ppc/include/asm/config.h > +++ b/xen/arch/ppc/include/asm/config.h > @@ -43,7 +43,7 @@ > > #define SMP_CACHE_BYTES (1 << 6) > > -#define STACK_ORDER 2 > +#define STACK_ORDER 0 > #define STACK_SIZE (PAGE_SIZE << STACK_ORDER) In whi

Re: U-Boot on XEN - dcache off

2023-07-17 Thread Ayan Kumar Halder
+ xen-devel (Since the question is related to Xen on Arm in general). Hi Michal, Julien/Stefano/Bertrand - Please feel free to add in. On 14/07/2023 15:14, Michal Simek wrote: +xen On 7/14/23 16:11, Michal Simek wrote: Hi Stefano, I am playing with running u-boot on the top of xen (xengues

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Nicola Vetrini
On 17/07/23 15:59, Jan Beulich wrote: On 14.07.2023 16:20, Luca Fancellu wrote: On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable 'oldbit', which is written before being set, but is such a way that is not amenable to

Re: [PATCH v3] mm/pdx: Add comments throughout the codebase for pdx

2023-07-17 Thread Jan Beulich
On 17.07.2023 17:17, Alejandro Vallejo wrote: > On Fri, Jul 14, 2023 at 12:36:11PM +0200, Jan Beulich wrote: >> On 14.07.2023 12:27, Alejandro Vallejo wrote: >>> On Thu, Jul 13, 2023 at 05:12:09PM +0200, Jan Beulich wrote: On 07.07.2023 18:07, Alejandro Vallejo wrote: > --- a/xen/include/x

Re: [PATCH v2 1/2] restrict concept of pIRQ to x86

2023-07-17 Thread Jan Beulich
On 14.07.2023 11:28, Julien Grall wrote: > On 11/07/2023 13:29, Jan Beulich wrote: >> On 10.07.2023 22:59, Julien Grall wrote: --- I'm not really certain about XEN_DOMCTL_irq_permission: With pIRQ-s not used, the prior pIRQ -> IRQ translation cannot have succeeded on Arm, so qui

Re: [PATCH v3] mm/pdx: Add comments throughout the codebase for pdx

2023-07-17 Thread Alejandro Vallejo
On Fri, Jul 14, 2023 at 12:36:11PM +0200, Jan Beulich wrote: > On 14.07.2023 12:27, Alejandro Vallejo wrote: > > On Thu, Jul 13, 2023 at 05:12:09PM +0200, Jan Beulich wrote: > >> On 07.07.2023 18:07, Alejandro Vallejo wrote: > >>> --- a/xen/include/xen/mm.h > >>> +++ b/xen/include/xen/mm.h > >>> @@

Re: [PATCH v3 2/3] xen/riscv: introduce function for physical offset calculation

2023-07-17 Thread Jan Beulich
On 17.07.2023 16:40, Oleksii Kurochko wrote: > The function was introduced to calculate and save physical > offset before MMU is enabled because access to start() is > PC-relative and in case of linker_addr != load_addr it will > result in incorrect value in phys_offset. > > Signed-off-by: Oleksii

Re: [PATCH v2 6/6] libxl: add support for parsing MSR features

2023-07-17 Thread Roger Pau Monné
On Thu, Jul 13, 2023 at 11:39:53AM +0100, Anthony PERARD wrote: > On Tue, Jul 11, 2023 at 11:22:30AM +0200, Roger Pau Monne wrote: > > diff --git a/tools/libs/light/libxl_cpuid.c b/tools/libs/light/libxl_cpuid.c > > index b1c4f8f2f45b..86a08f29a19c 100644 > > --- a/tools/libs/light/libxl_cpuid.c >

[PATCH v3 2/3] xen/riscv: introduce function for physical offset calculation

2023-07-17 Thread Oleksii Kurochko
The function was introduced to calculate and save physical offset before MMU is enabled because access to start() is PC-relative and in case of linker_addr != load_addr it will result in incorrect value in phys_offset. Signed-off-by: Oleksii Kurochko --- Changes in V3: - save/restore of a0/a1 re

[PATCH v3 3/3] xen/riscv: introduce identity mapping

2023-07-17 Thread Oleksii Kurochko
The way how switch to virtual address was implemented in the commit e66003e7be ("xen/riscv: introduce setup_initial_pages") isn't safe enough as: * enable_mmu() depends on hooking all exceptions and pagefault. * Any exception other than pagefault, or not taking a pagefault causes it to malfunct

[PATCH v3 0/3] xen/riscv: introduce identity mapping

2023-07-17 Thread Oleksii Kurochko
The patch series introduces things necessary to implement identity mapping: 1. Make identity mapping for the entire Xen. 2. Enable MMU. 3. Jump to the virtual address world 4. Remove identity mapping. Also current patch series introduces the calculation of physical offset before MMU is ena

[PATCH v3 1/3] xen/riscv: add SPDX tag to config.h

2023-07-17 Thread Oleksii Kurochko
Signed-off-by: Oleksii Kurochko --- Changes in V3: - new patch --- xen/arch/riscv/include/asm/config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/riscv/include/asm/config.h b/xen/arch/riscv/include/asm/config.h index 38862df0b8..fa90ae0898 100644 --- a/xen/arch/riscv/include

Re: [PATCH v2 3/6] libxl: introduce MSR data in libxl_cpuid_policy

2023-07-17 Thread Roger Pau Monné
On Wed, Jul 12, 2023 at 05:39:01PM +0100, Anthony PERARD wrote: > On Tue, Jul 11, 2023 at 11:22:27AM +0200, Roger Pau Monne wrote: > > Add a new array field to libxl_cpuid_policy in order to store the MSR > > policies. > > > > Note that libxl_cpuid_policy_list_{copy,length,parse_json,gen_json} > >

Re: [PATCH] drm: Explicitly include correct DT includes

2023-07-17 Thread Rob Herring
On Sun, Jul 16, 2023 at 3:26 AM Heiko Stuebner wrote: > > Am Freitag, 14. Juli 2023, 19:45:34 CEST schrieb Rob Herring: > > The DT of_device.h and of_platform.h date back to the separate > > of_platform_bus_type before it as merged into the regular platform bus. > > As part of that merge prepping

Re: [PATCH v2 2/6] libxl: change the type of libxl_cpuid_policy_list

2023-07-17 Thread Roger Pau Monné
On Wed, Jul 12, 2023 at 05:02:03PM +0100, Anthony PERARD wrote: > On Tue, Jul 11, 2023 at 11:22:26AM +0200, Roger Pau Monne wrote: > > -void libxl_cpuid_dispose(libxl_cpuid_policy_list *p_cpuid_list) > > +void libxl_cpuid_dispose(libxl_cpuid_policy_list *pl) > > { > > -int i, j; > > -libxl

Re: [PATCH v2 1/6] libs/guest: introduce support for setting guest MSRs

2023-07-17 Thread Roger Pau Monné
On Wed, Jul 12, 2023 at 03:34:23PM +0100, Anthony PERARD wrote: > On Tue, Jul 11, 2023 at 11:22:25AM +0200, Roger Pau Monne wrote: > > diff --git a/tools/libs/guest/xg_cpuid_x86.c > > b/tools/libs/guest/xg_cpuid_x86.c > > index 5b035223f4f5..5e5c8124dd74 100644 > > --- a/tools/libs/guest/xg_cpuid_

[PATCH v3 9/8] common: honor CONFIG_CC_SPLIT_SECTIONS also for assembly functions

2023-07-17 Thread Jan Beulich
Leverage the new infrastructure in xen/linkage.h to also switch to per- function sections (when configured), deriving the specific name from the "base" section in use at the time FUNC() is invoked. Signed-off-by: Jan Beulich --- RFC: Since we use .subsection in UNLIKELY_START(), a perhaps not rea

[OSSTEST PATCH] ts-xen-build-prep: force use of git protocol v2

2023-07-17 Thread Anthony PERARD
Recent version of QEMU (to be 8.1) started to use meson subproject to clone extra repo. With the example of the subproject "dtc", they do a shallow clone with a sha1. Meson end up running: git fetch --depth 1 origin b6910bec11614980a21e46fbccc35934b671bd81 This command fails. I think the erro

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Nicola Vetrini
On 17/07/23 16:06, Jan Beulich wrote: On 17.07.2023 14:16, Nicola Vetrini wrote: On 16/07/23 18:50, Julien Grall wrote: On 16/07/2023 10:20, Luca Fancellu wrote: On 14 Jul 2023, at 14:05, Julien Grall wrote: On 14/07/2023 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a functi

[PATCH] x86: avoid Misra Rule 19.1 violations

2023-07-17 Thread Jan Beulich
Not exactly overlapping accesses to objects on the left and right hand sides of an assignment are generally UB, and hence disallowed by Misra. While in the specific cases we're talking about here no actual UB can result as long as the compiler doesn't act actively "maliciously", let's still switch

Re: [PATCH] automation: avoid duplicated builds of staging branch

2023-07-17 Thread Marek Marczykowski-Górecki
On Mon, Jul 17, 2023 at 02:14:14PM +0100, Andrew Cooper wrote: > On 17/07/2023 2:09 pm, Marek Marczykowski-Górecki wrote: > > "staging" branch is mirrored (automatically or manually) to several > > repositories. Avoid building it several times to not waste runner > > resources. > > > > Signed-off-b

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Jan Beulich
On 17.07.2023 14:16, Nicola Vetrini wrote: > On 16/07/23 18:50, Julien Grall wrote: >> On 16/07/2023 10:20, Luca Fancellu wrote: On 14 Jul 2023, at 14:05, Julien Grall wrote: On 14/07/2023 12:49, Nicola Vetrini wrote: > The macro 'testop' expands to a function that declares the local

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Jan Beulich
On 14.07.2023 16:20, Luca Fancellu wrote: > > >> On 14 Jul 2023, at 12:49, Nicola Vetrini wrote: >> >> The macro 'testop' expands to a function that declares the local >> variable 'oldbit', which is written before being set, but is such a >> way that is not amenable to automatic checking. >> >>

Re: [PATCH v2 1/6] libs/guest: introduce support for setting guest MSRs

2023-07-17 Thread Roger Pau Monné
On Thu, Jul 13, 2023 at 04:14:30PM +0100, Andrew Cooper wrote: > On 11/07/2023 10:22 am, Roger Pau Monne wrote: > > diff --git a/tools/libs/guest/xg_cpuid_x86.c > > b/tools/libs/guest/xg_cpuid_x86.c > > index 5b035223f4f5..5e5c8124dd74 100644 > > --- a/tools/libs/guest/xg_cpuid_x86.c > > +++ b/too

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Julien Grall
Hi, On 17/07/2023 13:16, Nicola Vetrini wrote: On 16/07/23 18:50, Julien Grall wrote: Hi, On 16/07/2023 10:20, Luca Fancellu wrote: On 14 Jul 2023, at 14:05, Julien Grall wrote: Hi, On 14/07/2023 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the loc

[ovmf test] 181833: all pass - PUSHED

2023-07-17 Thread osstest service owner
flight 181833 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/181833/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 39ded59c09a38cb17cee498fca9f390c4deca98a baseline version: ovmf 3399f64588428010d48c7

[xen-unstable test] 181810: tolerable FAIL

2023-07-17 Thread osstest service owner
flight 181810 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/181810/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-vhd 13 guest-start fail in 181801 pass in 181810 test-amd64-i386-xl-qemuu-ovmf-am

Re: [RFC PATCH 1/4] xen/arm: justify or initialize conditionally uninitialized variables

2023-07-17 Thread Julien Grall
Hi Nicola, On 17/07/2023 13:08, Nicola Vetrini wrote: On 14/07/23 15:00, Julien Grall wrote: Hi Nicola, On 14/07/2023 12:49, Nicola Vetrini wrote: This patch aims to fix some occurrences of possibly uninitialized variables, that may be read before being written. This behaviour would violate M

Re: [PATCH 3/3] x86: short-circuit certain cpu_has_* when x86-64-v{2,3} are in effect

2023-07-17 Thread Jan Beulich
On 17.07.2023 14:35, Jason Andryuk wrote: > On Wed, Jul 12, 2023 at 8:36 AM Jan Beulich wrote: >> >> Certain fallback code can be made subject to DCE this way. Note that >> CX16 has no compiler provided manifest constant, so CONFIG_* are used >> there instead. Note also that we don't have cpu_has_

Re: [PATCH 1/3] x86: allow Kconfig control over psABI level

2023-07-17 Thread Jan Beulich
On 17.07.2023 14:23, Jason Andryuk wrote: > On Wed, Jul 12, 2023 at 8:34 AM Jan Beulich wrote: >> >> Newer hardware offers more efficient and/or flexible and/or capable >> instructions, some of which we can make good use of in the hypervisor >> as well. Allow a basic way (no alternatives patching)

Re: [PATCH] x86/HVM: adjust pIRQ calculation in hvm_inject_msi()

2023-07-17 Thread Jan Beulich
On 17.07.2023 14:47, Roger Pau Monné wrote: > On Mon, Jul 17, 2023 at 01:49:43PM +0200, Jan Beulich wrote: >> On 17.07.2023 12:51, Roger Pau Monné wrote: >>> On Mon, Jul 17, 2023 at 11:31:57AM +0200, Jan Beulich wrote: While the referenced commit came without any update to the public header >>

Re: [PATCH] automation: avoid duplicated builds of staging branch

2023-07-17 Thread Andrew Cooper
On 17/07/2023 2:09 pm, Marek Marczykowski-Górecki wrote: > "staging" branch is mirrored (automatically or manually) to several > repositories. Avoid building it several times to not waste runner > resources. > > Signed-off-by: Marek Marczykowski-Górecki > --- > .gitlab-ci.yml | 6 ++ > 1 file

[PATCH] automation: avoid duplicated builds of staging branch

2023-07-17 Thread Marek Marczykowski-Górecki
"staging" branch is mirrored (automatically or manually) to several repositories. Avoid building it several times to not waste runner resources. Signed-off-by: Marek Marczykowski-Górecki --- .gitlab-ci.yml | 6 ++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml

Re: Violations of mandatory MISRA C:2012 Rule 19.1 in X86_64 build

2023-07-17 Thread Nicola Vetrini
On 17/07/23 14:42, Jan Beulich wrote: On 11.07.2023 18:40, Roberto Bagnara wrote: Mandatory Rule 19.1 (An object shall not be assigned or copied to an overlapping object) is directly targeted at two undefined behaviors, one of which is the subject of 6.5.16.1p3, namely: If the value bein

Re: [PATCH] x86/HVM: adjust pIRQ calculation in hvm_inject_msi()

2023-07-17 Thread Roger Pau Monné
On Mon, Jul 17, 2023 at 01:49:43PM +0200, Jan Beulich wrote: > On 17.07.2023 12:51, Roger Pau Monné wrote: > > On Mon, Jul 17, 2023 at 11:31:57AM +0200, Jan Beulich wrote: > >> While the referenced commit came without any update to the public header > >> (which doesn't clarify how the upper address

Re: Violations of mandatory MISRA C:2012 Rule 19.1 in X86_64 build

2023-07-17 Thread Jan Beulich
On 11.07.2023 18:40, Roberto Bagnara wrote: > Mandatory Rule 19.1 (An object shall not be assigned or copied to an > overlapping object) is directly targeted at two undefined behaviors, > one of which is the subject of 6.5.16.1p3, namely: > >If the value being stored in an object is read from

Re: [PATCH 3/3] x86: short-circuit certain cpu_has_* when x86-64-v{2,3} are in effect

2023-07-17 Thread Jason Andryuk
On Wed, Jul 12, 2023 at 8:36 AM Jan Beulich wrote: > > Certain fallback code can be made subject to DCE this way. Note that > CX16 has no compiler provided manifest constant, so CONFIG_* are used > there instead. Note also that we don't have cpu_has_movbe nor > cpu_has_lzcnt (aka cpu_has_abm). > >

Re: [PATCH 2/3] x86: use POPCNT for hweight() when available

2023-07-17 Thread Jason Andryuk
On Wed, Jul 12, 2023 at 8:34 AM Jan Beulich wrote: > > This is faster than using the software implementation, and the insn is > available on all half-way recent hardware. Use the respective compiler > builtins when available. > > Signed-off-by: Jan Beulich Reviewed-by: Jason Andryuk

Re: [PATCH 1/3] x86: allow Kconfig control over psABI level

2023-07-17 Thread Jason Andryuk
On Wed, Jul 12, 2023 at 8:34 AM Jan Beulich wrote: > > Newer hardware offers more efficient and/or flexible and/or capable > instructions, some of which we can make good use of in the hypervisor > as well. Allow a basic way (no alternatives patching) of enabling their > use. Of course this means t

Re: [PATCH] x86: drop old (32-bit-only) MSR definitions

2023-07-17 Thread Andrew Cooper
On 17/07/2023 12:52 pm, Jan Beulich wrote: > On 17.07.2023 12:33, Andrew Cooper wrote: >> On 17/07/2023 10:17 am, Jan Beulich wrote: >>> /* Intel defined MSRs. */ >>> -#define MSR_IA32_P5_MC_ADDR0x >>> -#define MSR_IA32_P5_MC_TYPE0x0001 >> These are arch

Re: [RFC PATCH 2/4] xen/arm64: bitops: justify uninitialized variable inside a macro

2023-07-17 Thread Nicola Vetrini
On 16/07/23 18:50, Julien Grall wrote: Hi, On 16/07/2023 10:20, Luca Fancellu wrote: On 14 Jul 2023, at 14:05, Julien Grall wrote: Hi, On 14/07/2023 12:49, Nicola Vetrini wrote: The macro 'testop' expands to a function that declares the local variable 'oldbit', which is written before be

Re: [RFC PATCH 1/4] xen/arm: justify or initialize conditionally uninitialized variables

2023-07-17 Thread Nicola Vetrini
On 14/07/23 15:00, Julien Grall wrote: Hi Nicola, On 14/07/2023 12:49, Nicola Vetrini wrote: This patch aims to fix some occurrences of possibly uninitialized variables, that may be read before being written. This behaviour would violate MISRA C:2012 Rule 9.1, besides being generally undesir

Re: [PATCH] x86/ioapic: sanitize IO-APIC pins before enabling the local APIC

2023-07-17 Thread Roger Pau Monné
On Mon, Jul 17, 2023 at 08:40:05AM +0200, Jan Beulich wrote: > On 14.07.2023 18:05, Roger Pau Monné wrote: > > On Thu, Jul 13, 2023 at 02:18:29PM +0200, Jan Beulich wrote: > >> On 13.07.2023 13:29, Roger Pau Monné wrote: > >>> So to recap, I think we are in agreement that calling enable_IO_APIC() >

Re: [PATCH] x86: drop old (32-bit-only) MSR definitions

2023-07-17 Thread Jan Beulich
On 17.07.2023 12:33, Andrew Cooper wrote: > On 17/07/2023 10:17 am, Jan Beulich wrote: >> /* Intel defined MSRs. */ >> -#define MSR_IA32_P5_MC_ADDR 0x >> -#define MSR_IA32_P5_MC_TYPE 0x0001 > > These are architectural.  They still exist in all Intel and AMD CPUs. > >

Re: [PATCH] drm: Explicitly include correct DT includes

2023-07-17 Thread Kieran Bingham
Quoting Rob Herring (2023-07-14 18:45:34) > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each other. They also inclu

Re: [PATCH] x86/HVM: adjust pIRQ calculation in hvm_inject_msi()

2023-07-17 Thread Jan Beulich
On 17.07.2023 12:51, Roger Pau Monné wrote: > On Mon, Jul 17, 2023 at 11:31:57AM +0200, Jan Beulich wrote: >> While the referenced commit came without any update to the public header >> (which doesn't clarify how the upper address bits are used), the >> intention looks to have been that bits 12..19

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

2023-07-17 Thread osstest service owner
flight 181835 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181835/ 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 1

Re: [PATCH] drm: Explicitly include correct DT includes

2023-07-17 Thread Liviu Dudau
On Fri, Jul 14, 2023 at 11:45:34AM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each oth

Re: [PATCH] x86/HVM: adjust pIRQ calculation in hvm_inject_msi()

2023-07-17 Thread Roger Pau Monné
On Mon, Jul 17, 2023 at 11:31:57AM +0200, Jan Beulich wrote: > While the referenced commit came without any update to the public header > (which doesn't clarify how the upper address bits are used), the > intention looks to have been that bits 12..19 and 40..63 form the pIRQ. > Negative values simp

Re: [PATCH] x86: drop old (32-bit-only) MSR definitions

2023-07-17 Thread Andrew Cooper
On 17/07/2023 10:17 am, Jan Beulich wrote: > /* Intel defined MSRs. */ > -#define MSR_IA32_P5_MC_ADDR 0x > -#define MSR_IA32_P5_MC_TYPE 0x0001 These are architectural.  They still exist in all Intel and AMD CPUs. I'd suggest keeping them, because I think we're requi

Re: [PATCH v4 1/8] swiotlb: make io_tlb_default_mem local to swiotlb.c

2023-07-17 Thread Petr Tesařík
On Mon, 17 Jul 2023 08:06:07 +0200 Philippe Mathieu-Daudé wrote: > Hi Petr, > > On 13/7/23 17:23, Petr Tesarik wrote: > > From: Petr Tesarik > > > > SWIOTLB implementation details should not be exposed to the rest of the > > kernel. This will allow to make changes to the implementation without

Re: [PATCH] x86/ACPI: correct off-by-1 in SGI MMCFG check

2023-07-17 Thread Roger Pau Monné
On Mon, Jul 17, 2023 at 11:43:28AM +0200, Jan Beulich wrote: > As supported by the printk() (deliberately made visible in context by > also correcting a mis-indented return statement), "above 4GiB" is meant > here. Avoid comparison with a constant to "escape" Misra rule 7.2 > complaints. (Note howe

[libvirt test] 181808: regressions - FAIL

2023-07-17 Thread osstest service owner
flight 181808 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/181808/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-libvirt-pair 10 xen-install/src_host fail REGR. vs. 181789 test-amd64-i386-libvirt

[PATCH] x86/ACPI: correct off-by-1 in SGI MMCFG check

2023-07-17 Thread Jan Beulich
As supported by the printk() (deliberately made visible in context by also correcting a mis-indented return statement), "above 4GiB" is meant here. Avoid comparison with a constant to "escape" Misra rule 7.2 complaints. (Note however that even up-to-date Linux, which is where we "inherited" this co

[PATCH] x86/HVM: adjust pIRQ calculation in hvm_inject_msi()

2023-07-17 Thread Jan Beulich
While the referenced commit came without any update to the public header (which doesn't clarify how the upper address bits are used), the intention looks to have been that bits 12..19 and 40..63 form the pIRQ. Negative values simply make no sense, and pirq_info() also generally wants invoking with

[PATCH] x86: drop old (32-bit-only) MSR definitions

2023-07-17 Thread Jan Beulich
Some of them aren't liked by Misra rule 7.2; rather than fixing them, drop the affected ones and a few more that aren't used (anymore). (Note that e.g. some MSR_K7_* are applicable on K8 and newer as well, so need retaining.) Signed-off-by: Jan Beulich --- a/xen/arch/x86/include/asm/msr-index.h

Re: [XEN PATCH v3 12/15] xen/x86: fix violations of MISRA C:2012 Rule 7.2

2023-07-17 Thread Jan Beulich
On 12.07.2023 12:32, Simone Ballarin wrote: > @@ -378,10 +378,10 @@ static void __init calculate_host_policy(void) > * this information. > */ > if ( cpu_has_lfence_dispatch ) > -max_extd_leaf = max(max_extd_leaf, 0x8021); > +max_extd_leaf = max(max_extd_leaf, 0x

Re: [PATCH v2] x86/ioapic: sanitize IO-APIC pins before enabling lapic LVTERR/ESR

2023-07-17 Thread Jan Beulich
On 14.07.2023 18:03, Roger Pau Monne wrote: > The current logic to init the local APIC and the IO-APIC does init the > local APIC LVTERR/ESR before doing any sanitation on the IO-APIC pin Nit: I guess I'll take the liberty of making this read "sanitization" while committing. > configuration. It'

Re: [PATCH] drm: Explicitly include correct DT includes

2023-07-17 Thread Steven Price
On 14/07/2023 18:45, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily" include each other. They also include

Re: [PATCH] x86/common: Use const char * for string literals

2023-07-17 Thread Jan Beulich
On 14.07.2023 13:00, Andrew Cooper wrote: > For pre-ANSI-C compatibility reasons, string literals have a mutable type, but > it is undefined behaviour to mutate them. > > Swap char *'s to const char *'s for variables which hold string literals. > > This fixes several violations of MISRA Rule 7.4:

Re: [PATCH] xen/ACPI: Remove acpi_get_pxm() entirely

2023-07-17 Thread Jan Beulich
On 14.07.2023 15:20, Andrew Cooper wrote: > There are no callers, and the non-stub implementation is #if 0'd out, with the > internal trying to perform an AML invocation. > > There's no plausible way that code is getting un-#if 0'd, so drop it. > > No functional change. > > Signed-off-by: Andrew

RE: [XEN PATCH v10 24/24] docs: add Arm FF-A mediator

2023-07-17 Thread Henry Wang
Hi, > -Original Message- > Subject: Re: [XEN PATCH v10 24/24] docs: add Arm FF-A mediator > > On 17.07.2023 09:21, Jens Wiklander wrote: > > Describes a FF-A version 1.1 [1] mediator to communicate with a Secure > > Partition in secure world. > > > > [1] https://developer.arm.com/document

Re: XenSummit: Empty per-arch files

2023-07-17 Thread Jan Beulich
On 14.07.2023 22:52, Shawn Anastasio wrote: > On 6/28/23 6:32 AM, Andrew Cooper wrote: >> Hello, > > Hi Andrew, > >> This wasn't a formal discussion point at XenSummit, but Oleksii pointed >> out that it was still a problem, hence this thread. >> >> As we take on more architectures, it becomes mo

Re: [XEN PATCH v10 24/24] docs: add Arm FF-A mediator

2023-07-17 Thread Jan Beulich
On 17.07.2023 09:21, Jens Wiklander wrote: > Describes a FF-A version 1.1 [1] mediator to communicate with a Secure > Partition in secure world. > > [1] https://developer.arm.com/documentation/den0077/latest > Signed-off-by: Jens Wiklander > Reviewed-by: Henry Wang > --- > SUPPORT.md

[XEN PATCH v10 21/24] xen/arm: ffa: improve lock granularity

2023-07-17 Thread Jens Wiklander
The single lock in struct ffa_ctx is complemented with rx_lock and tx_lock. The old lock is used for small critical sections, like increasing shm_count or adding another shm to shm_list. rx_lock and tx_lock are only acquired using spin_trylock() which for well-behaving guests should always succee

[XEN PATCH v10 24/24] docs: add Arm FF-A mediator

2023-07-17 Thread Jens Wiklander
Describes a FF-A version 1.1 [1] mediator to communicate with a Secure Partition in secure world. [1] https://developer.arm.com/documentation/den0077/latest Signed-off-by: Jens Wiklander Reviewed-by: Henry Wang --- SUPPORT.md | 9 + docs/man/xl.cfg.5.pod.in | 15 +

  1   2   >