Re: [PATCH 03/10] x86 setup: change bootstrap map to accept new boot module structures

2023-07-28 Thread Jan Beulich
On 27.07.2023 20:36, Stefano Stabellini wrote: > On Thu, 27 Jul 2023, George Dunlap wrote: >> On Thu, Jul 27, 2023 at 3:42 PM Jan Beulich wrote: >> On 27.07.2023 15:26, Daniel P. Smith wrote: >> > Let's bring this back to the actual implementation instead of the >> > theoretical.

[PATCH v2 0/5] Make PDX compression optional

2023-07-28 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

[PATCH v2 1/5] arm/mm: Document the differences between arm32 and arm64 directmaps

2023-07-28 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 --- v2: * Removed statement about "contain

[PATCH v2 3/5] mm/pdx: Standardize region validation wrt pdx compression

2023-07-28 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 v2 5/5] pdx: Add CONFIG_HAS_PDX_COMPRESSION as a common Kconfig option

2023-07-28 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. While at it, removes the old arch-defined CONFIG_HAS_PDX flag, as it was not removable in practice

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

2023-07-28 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 --- v2: * Cast variable to u64 before shifting left to avoid overflow (Julien) --- xen/arch/arm/include/asm/mm.

[PATCH v2 4/5] pdx: Reorder pdx.[ch]

2023-07-28 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 --- v2: * Fix rebase error by which some function prototypes were left intact when they should've been removed --- xen/common/pdx.c | 58

[linux-5.4 test] 182031: regressions - FAIL

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

[RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Luca Fancellu
## Introduction In this serie, I would like to get feedbacks on the output generated by the configuration of clang-format, unfortunately we can't use only clang-format, but we need to call it using a wrapper, because we need the info

[RFC PATCH 3/5] [WIP]xen/scripts: add codestyle.py script

2023-07-28 Thread Luca Fancellu
This script finds every .c and .h file in the xen hypervisor codebase, takes the exclusion list from docs/misra, removes the file excluded from the list and for the remaining files is calling clang-format on them. TBD: write it better Signed-off-by: Luca Fancellu --- xen/scripts/codestyle.py |

[RFC PATCH 2/5] [WIP]cppcheck: rework exclusion_file_list.py code

2023-07-28 Thread Luca Fancellu
Rework the exclusion_file_list.py code to have the function load_exclusion_file_list() detached from the xen-analysis.py tool, in a way so that other modules can use the function. The xen-analysis tool and in particular its module cppcheck_analysis.py will use a new function cppcheck_exclusion_file

[RFC PATCH 1/5] [WIP]misra: add entries to the excluded list

2023-07-28 Thread Luca Fancellu
Add entries to the exclusion list, so that they can be excluded from the formatter tool. TBD: add a field on each entry to understand for what tool is the exclusion Signed-off-by: Luca Fancellu --- docs/misra/exclude-list.json | 88 1 file changed, 88 insert

[RFC PATCH 5/5] xen: Add clang-format configuration

2023-07-28 Thread Luca Fancellu
Add a clang format configuration for the Xen Hypervisor. Signed-off-by: Luca Fancellu --- xen/.clang-format | 693 ++ 1 file changed, 693 insertions(+) create mode 100644 xen/.clang-format diff --git a/xen/.clang-format b/xen/.clang-format new file m

[RFC PATCH 4/5] x86/HVM: protect mm_type_tbl format from clang-format

2023-07-28 Thread Luca Fancellu
The array mm_type_tbl initialization is formatted in a way that clang-format can't keep, so disable clang-format on that array initialization. Signed-off-by: Luca Fancellu --- xen/arch/x86/hvm/mtrr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm

Re: [PATCH v3 04/49] mm: shrinker: remove redundant shrinker_rwsem in debugfs operations

2023-07-28 Thread Simon Horman
On Thu, Jul 27, 2023 at 04:04:17PM +0800, Qi Zheng wrote: > The debugfs_remove_recursive() will wait for debugfs_file_put() to return, > so the shrinker will not be freed when doing debugfs operations (such as > shrinker_debugfs_count_show() and shrinker_debugfs_scan_write()), so there > is no need

Re: [PATCH v3 04/49] mm: shrinker: remove redundant shrinker_rwsem in debugfs operations

2023-07-28 Thread Qi Zheng
Hi Simon, On 2023/7/28 16:13, Simon Horman wrote: On Thu, Jul 27, 2023 at 04:04:17PM +0800, Qi Zheng wrote: The debugfs_remove_recursive() will wait for debugfs_file_put() to return, so the shrinker will not be freed when doing debugfs operations (such as shrinker_debugfs_count_show() and shrin

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_tdb_record_hdr is used for nodes stored in the data base. When working on a node, struct node is being used, which is including the same

Re: [PATCH v2 1/5] arm/mm: Document the differences between arm32 and arm64 directmaps

2023-07-28 Thread Julien Grall
Hi Alex, On 28/07/2023 08:58, Alejandro Vallejo wrote: 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: Aleja

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

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 08:59, Alejandro Vallejo wrote: 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 Reviewed-by: Julien Grall Cheers, -- Julien Grall

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_tdb_record_hdr is used for nodes stored in the data base. When working on a node, struct node is

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_tdb_record_hdr is used for nodes stored

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 11:38, Julien Grall wrote: Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24/07/2023 12:02, Juergen Gross wrote: Struct xs_

[PATCH v4 4/4] x86/iommu: pass full IO-APIC RTE for remapping table update

2023-07-28 Thread Roger Pau Monne
So that the remapping entry can be updated atomically when possible. Doing such update atomically will avoid Xen having to mask the IO-APIC pin prior to performing any interrupt movements (ie: changing the destination and vector fields), as the interrupt remapping entry is always consistent. This

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Jan Beulich
On 28.07.2023 10:11, Luca Fancellu wrote: > I've read the past threads about the brave people who dared to try to > introduce > clang-format for the xen codebase, some of them from 5 years ago, two points > were clear: 1) goto label needs to be indented and 2) do-while loops have the > braket in t

Re: [PATCH v4 4/4] x86/iommu: pass full IO-APIC RTE for remapping table update

2023-07-28 Thread Jan Beulich
On 28.07.2023 11:57, Roger Pau Monne wrote: > So that the remapping entry can be updated atomically when possible. > > Doing such update atomically will avoid Xen having to mask the IO-APIC > pin prior to performing any interrupt movements (ie: changing the > destination and vector fields), as the

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 10:45, Juergen Gross wrote: On 28.07.23 11:38, Julien Grall wrote: Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53, Julien Grall wrote: Hi Juergen, On 24

Re: [PATCH v6 2/2] xl: Add escape character argument to xl console

2023-07-28 Thread Anthony PERARD
On Thu, Jul 27, 2023 at 05:44:49PM +0100, Peter Hoyes wrote: > diff --git a/tools/libs/light/libxl_console.c > b/tools/libs/light/libxl_console.c > index f497be141b..0b7293fe71 100644 > --- a/tools/libs/light/libxl_console.c > +++ b/tools/libs/light/libxl_console.c > @@ -75,15 +76,26 @@ int libxl_

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 12:34, Julien Grall wrote: Hi, On 28/07/2023 10:45, Juergen Gross wrote: On 28.07.23 11:38, Julien Grall wrote: Hi Juergen, On 28/07/2023 10:14, Juergen Gross wrote: On 28.07.23 10:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 07:23, Juergen Gross wrote: On 27.07.23 23:53,

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

2023-07-28 Thread osstest service owner
flight 182054 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/182054/ 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: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Luca Fancellu
> On 28 Jul 2023, at 11:12, Jan Beulich wrote: > > On 28.07.2023 10:11, Luca Fancellu wrote: >> I've read the past threads about the brave people who dared to try to >> introduce >> clang-format for the xen codebase, some of them from 5 years ago, two points >> were clear: 1) goto label needs

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
On 28/07/2023 11:47, Juergen Gross wrote: On 28.07.23 12:34, Julien Grall wrote: Because one may want dom0 to send payload bigger than XENSTORE_PAYLOAD_MAX. Something like: if ( conn->id != 0 && len < XENSTORE_PAYLOAD_MAX ) Such change would not be caught during compilation. AWS has a simi

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Jan Beulich
On 28.07.2023 12:50, Luca Fancellu wrote: > > >> On 28 Jul 2023, at 11:12, Jan Beulich wrote: >> >> On 28.07.2023 10:11, Luca Fancellu wrote: >>> I've read the past threads about the brave people who dared to try to >>> introduce >>> clang-format for the xen codebase, some of them from 5 years

Re: [PATCH v6 1/3] x86/microcode: Ignore microcode loading interface for revision = -1

2023-07-28 Thread Alejandro Vallejo
On Tue, Jul 25, 2023 at 01:50:52PM +0100, Alejandro Vallejo wrote: > On Tue, Jul 25, 2023 at 08:40:31AM +0200, Jan Beulich wrote: > > > --- a/xen/arch/x86/cpu/microcode/core.c > > > +++ b/xen/arch/x86/cpu/microcode/core.c > > > @@ -867,10 +867,23 @@ int __init early_microcode_init(unsigned long >

[XEN PATCH v2 2/2] x86/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3

2023-07-28 Thread Federico Serafini
Give a name to unnamed parameters thus addressing violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names and types used in function declarations and the ones used in the corresponding function definitions, th

[XEN PATCH v2 1/2] xen/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3

2023-07-28 Thread Federico Serafini
Give a name to unnamed parameters thus addressing violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names and types used in function declarations and the ones used in the corresponding function definitions, th

[XEN PATCH v2 0/2] IRQ: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-07-28 Thread Federico Serafini
This patch series addresses violations of rules 8.2 and 8.3 related to the IRQ module. No functional changes. Federico Serafini (2): xen/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3 x86/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3 xen/arch/arm/irq.c |

[PATCH v7] xl: Add escape character argument to xl console

2023-07-28 Thread Peter Hoyes
From: Peter Hoyes Add -e argument to xl console and pass to new escape_character argument of libxl_console_exec. Introduce a new API version to support this new argument and advertise the new functionality in libxl.h In libxl_console_exec, there are currently two call sites to execl, which uses

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 13:19, Julien Grall wrote: On 28/07/2023 11:47, Juergen Gross wrote: On 28.07.23 12:34, Julien Grall wrote: Because one may want dom0 to send payload bigger than XENSTORE_PAYLOAD_MAX. Something like: if ( conn->id != 0 && len < XENSTORE_PAYLOAD_MAX ) Such change would not be ca

Re: [XEN PATCH] xen/arm: mechanical renaming to address MISRA C:2012 Rule 5.3

2023-07-28 Thread Nicola Vetrini
Hi Julien, On 21/07/2023 17:54, Julien Grall wrote: Hi, On 21/07/2023 16:22, Nicola Vetrini wrote: Rule 5.3 has the following headline: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope" The function parameters renamed in this patch are hiding a

Re: [PATCH v3 05/49] mm: shrinker: add infrastructure for dynamically allocating shrinker

2023-07-28 Thread Simon Horman
On Thu, Jul 27, 2023 at 04:04:18PM +0800, Qi Zheng wrote: > Currently, the shrinker instances can be divided into the following three > types: > > a) global shrinker instance statically defined in the kernel, such as >workingset_shadow_shrinker. > > b) global shrinker instance statically defi

[XEN PATCH v3] xen/sched: mechanical renaming to address MISRA C:2012 Rule 5.3

2023-07-28 Thread Nicola Vetrini
Rule 5.3 has the following headline: "An identifier declared in an inner scope shall not hide an identifier declared in an outer scope" The renaming s/sched_id/scheduler_id/ of the function defined in 'xen/common/sched/core.c' prevents any hiding of that function by the instances of homonymous fun

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be preferred. In the end I don't mind that much, but  BUILD_BUG_ON(XENSTORE_PAYLOAD_MAX >=   (typeof((struct node_hdr *)NULL-

[GIT PULL] xen: branch for v6.5-rc4

2023-07-28 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-6.5a-rc4-tag xen: branch for v6.5-rc4 It contains the following patches: - A fix for a performance problem in QubesOS, adding a way to drain the queue of grants experiencing delaye

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 14:48, Julien Grall wrote: Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be preferred. In the end I don't mind that much, but  BUILD_BUG_ON(XENSTORE_PAYLOAD_MAX >=   

Re: [PATCH v8 02/13] vpci: use per-domain PCI lock to protect vpci structure

2023-07-28 Thread Roger Pau Monné
On Fri, Jul 28, 2023 at 12:21:54AM +, Volodymyr Babchuk wrote: > > Hi Roger, > > Roger Pau Monné writes: > > > On Thu, Jul 27, 2023 at 12:56:54AM +, Volodymyr Babchuk wrote: > >> Hi Roger, > >> > >> Roger Pau Monné writes: > >> > >> > On Wed, Jul 26, 2023 at 01:17:58AM +, Volodym

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi Juergen, On 28/07/2023 14:24, Juergen Gross wrote: On 28.07.23 14:48, Julien Grall wrote: Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be preferred. In the end I don't mind that muc

[XEN PATCH] IOMMU: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-07-28 Thread Federico Serafini
Give a name to unnamed parameters to address violations of MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with named parameters"). Keep consistency between parameter names and types used in function declarations and the ones used in the corresponding function definitions, thus ad

[xen-unstable test] 182041: regressions - FAIL

2023-07-28 Thread osstest service owner
flight 182041 xen-unstable real [real] flight 182057 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182041/ http://logs.test-lab.xenproject.org/osstest/logs/182057/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be r

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Alejandro Vallejo
On Fri, Jul 28, 2023 at 09:11:39AM +0100, Luca Fancellu wrote: > ## Introduction > > > In this serie, I would like to get feedbacks on the output generated by the > configuration of clang-format, unfortunately we can't use only clan

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 16:08, Julien Grall wrote: Hi Juergen, On 28/07/2023 14:24, Juergen Gross wrote: On 28.07.23 14:48, Julien Grall wrote: Hi, On 28/07/2023 13:06, Juergen Gross wrote: On 28.07.23 13:19, Julien Grall wrote: In case of a runtime check I agree that a more central place would be pref

Re: [RFC PATCH 5/5] xen: Add clang-format configuration

2023-07-28 Thread Alejandro Vallejo
Hi, The exclusion of certain files definitely makes it a lot easier to see what's going on! I'll start with a couple that I find incompatible On Fri, Jul 28, 2023 at 09:11:44AM +0100, Luca Fancellu wrote: > Add a clang format configuration for the Xen Hypervisor. > > Signed-off-by: Luca Fancell

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Julien Grall
Hi Juergen, On 28/07/2023 15:32, Juergen Gross wrote: On 28.07.23 16:08, Julien Grall wrote: Using multiple commands has also its downside. The first that comes to my mind if that you need to keep around the data. But, with your proposal, you we wouldn't be able to store it in the databas

[PATCH v3] amd: disable C6 after 1000 days on Zen2

2023-07-28 Thread Roger Pau Monne
As specified on Errata 1474: "A core will fail to exit CC6 after about 1044 days after the last system reset. The time of failure may vary depending on the spread spectrum and REFCLK frequency." Detect when running on AMD Zen2 and setup a timer to prevent entering C6 after 1000 days of uptime. T

Re: [PATCH v3 17/25] tools/xenstore: rework struct xs_tdb_record_hdr

2023-07-28 Thread Juergen Gross
On 28.07.23 16:59, Julien Grall wrote: Hi Juergen, On 28/07/2023 15:32, Juergen Gross wrote: On 28.07.23 16:08, Julien Grall wrote: Using multiple commands has also its downside. The first that comes to my mind if that you need to keep around the data. But, with your proposal, you we woul

[XEN PATCH] xen/keyhandler: address violations of MISRA C:2012 Rule 8.3 and drop bool_t

2023-07-28 Thread Federico Serafini
Change types in function declarations to be consistent with the corresponding definitions. This addresses violations of MISRA C:2012 Rule 8.3: "All declarations of an object or function shall use the same names and type qualifiers". No functional changes. Signed-off-by: Federico Serafini --- xe

Re: [XEN PATCH] xen/keyhandler: address violations of MISRA C:2012 Rule 8.3 and drop bool_t

2023-07-28 Thread Andrew Cooper
On 28/07/2023 5:02 pm, Federico Serafini wrote: > Change types in function declarations to be consistent with the > corresponding definitions. > This addresses violations of MISRA C:2012 Rule 8.3: "All declarations > of an object or function shall use the same names and type qualifiers". > > No fun

Re: [XEN PATCH] xen/keyhandler: address violations of MISRA C:2012 Rule 8.3 and drop bool_t

2023-07-28 Thread Federico Serafini
Hello Andrew, On 28/07/23 18:04, Andrew Cooper wrote: On 28/07/2023 5:02 pm, Federico Serafini wrote: Change types in function declarations to be consistent with the corresponding definitions. This addresses violations of MISRA C:2012 Rule 8.3: "All declarations of an object or function shall u

Re: [PATCH v2 3/5] mm/pdx: Standardize region validation wrt pdx compression

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 08:59, Alejandro Vallejo wrote: 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 throu

Re: [PATCH v2 4/5] pdx: Reorder pdx.[ch]

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 08:59, 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 Acked-by: Julien Grall Cheers, -- Julien Grall

Re: [PATCH v2 5/5] pdx: Add CONFIG_HAS_PDX_COMPRESSION as a common Kconfig option

2023-07-28 Thread Julien Grall
Hi, On 28/07/2023 08:59, Alejandro Vallejo wrote: diff --git a/xen/include/xen/pdx.h b/xen/include/xen/pdx.h index 5a82b6bde2..dfb475c8dc 100644 --- a/xen/include/xen/pdx.h +++ b/xen/include/xen/pdx.h @@ -67,8 +67,6 @@ * region involved. */ -#ifdef CONFIG_HAS_PDX - extern unsigned lo

Re: [PATCH v2 5/5] pdx: Add CONFIG_HAS_PDX_COMPRESSION as a common Kconfig option

2023-07-28 Thread Andrew Cooper
On 28/07/2023 8:59 am, Alejandro Vallejo wrote: > 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. > > While at it, removes the old arch-defined

Re: [PATCH v1 2/7] xentrace: use correct output format for pit and rtc

2023-07-28 Thread George Dunlap
Sorry for the delay here. Just a couple of notes on the whole series. First, you didn't CC me on 0/7 or 1/7. Secondly, patch 7 seems to be corrupted (see e.g., Patchew's attempt to apply the series [1]). [1] https://patchew.org/Xen/20230601142742.15489-1-o...@aepfle.de/ -George On Thu, Jun 1

Re: [PATCH v2 5/5] pdx: Add CONFIG_HAS_PDX_COMPRESSION as a common Kconfig option

2023-07-28 Thread Andrew Cooper
On 28/07/2023 5:36 pm, Andrew Cooper wrote: > On 28/07/2023 8:59 am, Alejandro Vallejo wrote: >> 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 fucntio

Re: [PATCH v1 2/7] xentrace: use correct output format for pit and rtc

2023-07-28 Thread Olaf Hering
Fri, 28 Jul 2023 17:47:11 +0100 George Dunlap : > Just a couple of notes on the whole series. First, you didn't CC me on 0/7 > or 1/7. Secondly, patch 7 seems to be corrupted (see e.g., Patchew's > attempt to apply the series [1]). The cover letter can not be easily fixed, this is a bug in git

[PATCH] x86/amd: Fix DE_CFG truncation in amd_check_zenbleed()

2023-07-28 Thread Andrew Cooper
This line: val &= ~chickenbit; ends up truncating val to 32 bits, and turning off various errata workarounds in Zen2 systems. Fixes: f91c5ea97067 ("x86/amd: Mitigations for Zenbleed") Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu The choice is betw

[libvirt test] 182051: tolerable all pass - PUSHED

2023-07-28 Thread osstest service owner
flight 182051 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/182051/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 182030 test-armhf-armhf-libvirt-qcow2 15 saveres

Re: [PATCH] ALSA: xen-front: refactor deprecated strncpy

2023-07-28 Thread Kees Cook
On Thu, Jul 27, 2023 at 09:46:36PM -0700, Elliott Mitchell wrote: > On Thu, Jul 27, 2023 at 09:53:24PM +, Justin Stitt wrote: > > Technically, my patch yields subtly different behavior. The original > > implementation with `strncpy` would fill the entire destination buffer > > with null bytes [

Re: [GIT PULL] xen: branch for v6.5-rc4

2023-07-28 Thread pr-tracker-bot
The pull request you sent on Fri, 28 Jul 2023 15:18:04 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git > for-linus-6.5a-rc4-tag has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/81eef8909d171bdca6af37028a11a24e011ed312 Thank you! -- Deet-doot-dot, I

Re: [XEN PATCH v3 0/2] build: reduce number of $(shell) execution on make 4.4

2023-07-28 Thread Jason Andryuk
On Thu, Jul 27, 2023 at 10:55 AM Anthony PERARD wrote: > Anthony PERARD (2): > build: evaluate XEN_BUILD_* and XEN_DOMAIN immediately > Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS immediately For the series: Tested-by: Jason Andryuk Thanks, Jason

[PATCH 1/3] x86/traps: Move do_general_protection() earlier

2023-07-28 Thread Andrew Cooper
... in order to clean up the declarations without needing to forward declare it for handle_gdt_ldt_mapping_fault() No functional change. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Roberto Bagnara CC: Nicola Vetrini --- xen/arch/x86/traps.c | 157 ++

[PATCH 0/3] x86: Some MISRA Rule 5.3 fixes

2023-07-28 Thread Andrew Cooper
'debug' and 'str' account for an awefully large number of shadowed variable violations. Andrew Cooper (3): x86/traps: Move do_general_protection() earlier x86/entry: Rename the exception entrypoints x86: Delete str() xen/arch/x86/hvm/svm/svm.c | 2 - xen/arch/x86/include/asm/de

[PATCH 3/3] x86: Delete str()

2023-07-28 Thread Andrew Cooper
This is used in an assertion only, which is somewhat dubious to begin with and won't surivive the x86-S work (where TR will become be a NUL selector). Delete it now. This avoids many cases where as a global symbol, it shadows local string variables. Signed-off-by: Andrew Cooper --- CC: Jan Beul

[PATCH 2/3] x86/entry: Rename the exception entrypoints

2023-07-28 Thread Andrew Cooper
This makes the names match the architectural short names that we use elsewhere. This avoids 'debug' in particular from being a global symbol shadowed by many local parameter names. Remove the DECLARE_TRAP_HANDLER{,_CONST}() infrastructure. Only NMI/#MC are referenced externally (and NMI will cea

Re: [PATCH v1 2/7] xentrace: use correct output format for pit and rtc

2023-07-28 Thread George Dunlap
On Fri, Jul 28, 2023 at 6:52 PM Olaf Hering wrote: > Fri, 28 Jul 2023 17:47:11 +0100 George Dunlap : > > > Just a couple of notes on the whole series. First, you didn't CC me on > 0/7 > > or 1/7. Secondly, patch 7 seems to be corrupted (see e.g., Patchew's > > attempt to apply the series [1]).

Re: [PATCH v1 1/7] xentrace: remove unimplemented option from man page

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > The documented option --usage worked because every unknown option > showed the help. > > Signed-off-by: Olaf Hering > Reviewed-by: George Dunlap

[linux-linus test] 182045: regressions - FAIL

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

Re: [PATCH v1 2/7] xentrace: use correct output format for pit and rtc

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > The input values were always 32bit. > > Fixes 55ee5dea32 ("xentrace: add TRC_HVM_EMUL") > > Signed-off-by: Olaf Hering > --- > tools/xentrace/formats | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/xentrace/f

Re: [PATCH v1 3/7] xenalyze: sync with vmx.h, use EXIT_REASON_PENDING_VIRT_INTR

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > Signed-off-by: Olaf Hering > Reviewed-by: George Dunlap One can't help wondering if it would be better to arrange somehow not to have these definitions duplicated.

Re: [PATCH v1 6/7] xenalyze: sync with vmx.h, use EXIT_REASON_MCE_DURING_VMENTRY

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > Signed-off-by: Olaf Hering > Patches 4-7: Reviewed-by: George Dunlap

Re: [PATCH v1 7/7] xenalyze: handle more potential exit reason values from vmx.h

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > Copy and use more constants from vmx.h, to turn numbers into strings. > Adjust the REASON_MAX value accordingly. > Remove the size constraint from string array, the compiler will grow it > as needed. > > Signed-off-by: Olaf Hering > Thanks for

Re: [PATCH v1 6/7] xenalyze: sync with vmx.h, use EXIT_REASON_MCE_DURING_VMENTRY

2023-07-28 Thread George Dunlap
On Fri, Jul 28, 2023 at 9:25 PM George Dunlap wrote: > > > On Thu, Jun 1, 2023 at 3:28 PM Olaf Hering wrote: > >> Signed-off-by: Olaf Hering >> > > Patches 4-7: > > Reviewed-by: George Dunlap > Sorry, this should have said patches 4-6. At any rate, I've pushed patches 1-6 now. Thanks again

Re: [PATCH v1] xenalyze: remove unused defines

2023-07-28 Thread George Dunlap
On Thu, Jun 1, 2023 at 9:13 AM Olaf Hering wrote: > These defines are not used by xenalyze. > NR_CPUS will not match what was used for building Xen itself. > > Signed-off-by: Olaf Hering > Reviewed-by: George Dunlap

Re: [PATCH v1] xentrace: adjust exit code for --help option

2023-07-28 Thread George Dunlap
On Fri, May 26, 2023 at 1:38 PM Olaf Hering wrote: > Invoking the --help option of any tool should not return with an error, > if that tool does have a documented and implemented help option. > > Adjust the usage() function to exit with either error or success. > Handle the existing entry in the

[PATCH 4/5] xen/ppc: Parse device tree for OPAL node on PowerNV

2023-07-28 Thread Shawn Anastasio
Communication with firmware boot services on PowerNV requires parsing the fdt blob passed by the bootloader in order to obtain the firmware entrypoint. Use Xen's libfdt to do this and store the information required for firmware calls, to be implemented in a future patch. The full xen/common build

[PATCH 0/5] xen/ppc: Add PowerNV bare metal support

2023-07-28 Thread Shawn Anastasio
Hello all, This series adds support for booting and using the serial console on bare metal PowerNV/OpenPOWER systems. Up until now, Xen could only be booted on the QEMU pseries model, which was initially targetted for ease of development, but which differs significantly from the bare metal systems

[PATCH 5/5] xen/ppc: Implement early serial console on PowerNV

2023-07-28 Thread Shawn Anastasio
Implement the OPAL firmware calls required to write to the serial console on PowerNV systems. Unlike pseries/Open Firmware, the OPAL firmware interface can be used past early boot and as such the relevant functions are not marked as __init. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/include

[PATCH 2/5] xen/ppc: Switch to medium PIC code model

2023-07-28 Thread Shawn Anastasio
Switch Xen to the medium PIC code model on Power. Among other things, this allows us to be load address agnostic and will open the door to booting on bare metal PowerNV systems that don't use OpenFirmware. Also update XEN_VIRT_START to 0xc000, which is equivalent to address 0x0 when th

[PATCH 3/5] xen/ppc: Add OPAL API definition header file

2023-07-28 Thread Shawn Anastasio
OPAL (OpenPower Abstraction Layer) is the interface exposed by firmware on PowerNV (bare metal) systems. Import Linux's header definining the API and related information. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/include/asm/opal-api.h | 1190 +++ 1 file changed, 11

[PATCH 1/5] xen/lib: Move simple_strtoul from common/vsprintf.c to lib

2023-07-28 Thread Shawn Anastasio
Move the simple_strtoul routine which is used throughout the codebase from vsprintf.c to its own file in xen/lib. This allows libfdt to be built on ppc64 even though xen/common doesn't build yet. Signed-off-by: Shawn Anastasio --- xen/common/vsprintf.c| 37 --

[PATCH 0/3] xen/ppc: Add early Radix MMU support

2023-07-28 Thread Shawn Anastasio
Hello all, This series adds support for bringing up the Radix MMU with basic identity-mapped page tables. In order to simplify the memory layout, the series changes XEN_VIRT _START to 0xC000___, which has a couple of convenient properties. When the MMU is off, the top 4 address bits a

[PATCH 1/3] xen/ppc: Bump minimum target ISA to 3.0 (POWER9)

2023-07-28 Thread Shawn Anastasio
In preparation for implementing ISA3+ Radix MMU support, drop ISA 2.07B from the supported ISA list to avoid having a non-working configuration in tree. It can be re-added at a later point when Hash MMU support is added. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Kconfig | 7 +-- xen/ar

[PATCH 2/3] xen/ppc: Relocate kernel to physical address 0 on boot

2023-07-28 Thread Shawn Anastasio
Introduce a small assembly loop in `start` to copy the kernel to physical address 0 before continuing. This ensures that the physical address lines up with XEN_VIRT_START (0xc000) and allows us to identity map the kernel when the MMU is set up in the next patch. We are also able to sta

[PATCH 3/3] xen/ppc: Implement initial Radix MMU support

2023-07-28 Thread Shawn Anastasio
Add code to construct early identity-mapped page tables as well as the required process and partition tables to enable the MMU. Signed-off-by: Shawn Anastasio --- xen/arch/ppc/Makefile| 2 + xen/arch/ppc/include/asm/bitops.h| 11 ++ xen/arch/ppc/include/asm/mm.h|

Re: [XEN PATCH v2 1/2] xen/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3

2023-07-28 Thread Stefano Stabellini
On Fri, 28 Jul 2023, Federico Serafini wrote: > Give a name to unnamed parameters thus addressing violations of > MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with > named parameters"). > Keep consistency between parameter names and types used in function > declarations and the

Re: [XEN PATCH v2 2/2] x86/IRQ: address violations of MISRA C: 2012 Rules 8.2 and 8.3

2023-07-28 Thread Stefano Stabellini
On Fri, 28 Jul 2023, Federico Serafini wrote: > Give a name to unnamed parameters thus addressing violations of > MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with > named parameters"). > Keep consistency between parameter names and types used in function > declarations and the

Re: [XEN PATCH v3] xen/sched: mechanical renaming to address MISRA C:2012 Rule 5.3

2023-07-28 Thread Stefano Stabellini
On Fri, 28 Jul 2023, Nicola Vetrini wrote: > Rule 5.3 has the following headline: > "An identifier declared in an inner scope shall not hide an > identifier declared in an outer scope" > > The renaming s/sched_id/scheduler_id/ of the function defined in > 'xen/common/sched/core.c' prevents any hid

Re: [XEN PATCH] IOMMU: address violations of MISRA C:2012 Rules 8.2 and 8.3

2023-07-28 Thread Stefano Stabellini
On Fri, 28 Jul 2023, Federico Serafini wrote: > Give a name to unnamed parameters to address violations of > MISRA C:2012 Rule 8.2 ("Function types shall be in prototype form with > named parameters"). > Keep consistency between parameter names and types used in function > declarations and the ones

Re: [RFC PATCH 0/5] clang-format for Xen

2023-07-28 Thread Stefano Stabellini
On Fri, 28 Jul 2023, Luca Fancellu wrote: > ## Introduction > > > In this serie, I would like to get feedbacks on the output generated by the > configuration of clang-format, unfortunately we can't use only clang-format, > but > we

[linux-5.4 test] 182055: regressions - FAIL

2023-07-28 Thread osstest service owner
flight 182055 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/182055/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-xsm 6 xen-buildfail REGR. vs. 182001 Tests which are faili

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

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

  1   2   >