[PATCH] libxg: shrink variable scope in xc_core_arch_map_p2m_list_rw()

2023-06-14 Thread Jan Beulich
This in particular allows to drop a dead assignment to "ptes" from near the end of the function. Coverity ID: 1532314 Fixes: bd7a29c3d0b9 ("tools/libs/ctrl: fix xc_core_arch_map_p2m() to support linear p2m table") Signed-off-by: Jan Beulich --- v2: Much bigger change to limit the scope of "ptes"

[PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
Missing newline is inconsistent with the rest of the callers, since panic() expects it. Signed-off-by: Michal Orzel --- xen/arch/arm/bootfdt.c| 2 +- xen/arch/arm/domain_build.c | 6 +++--- xen/arch/x86/cpu/microcode/core.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(

[PATCH v4 0/2] x86: xen: add missing prototypes

2023-06-14 Thread Juergen Gross
Avoid missing prototype warnings. Arnd Bergmann (1): x86: xen: add missing prototypes Juergen Gross (1): x86/xen: add prototypes for paravirt mmu functions arch/x86/xen/efi.c | 2 ++ arch/x86/xen/mmu_pv.c | 16 arch/x86/xen/smp.h | 4 arch/x86/xen/smp_pv.c

[PATCH v4 1/2] x86/xen: add prototypes for paravirt mmu functions

2023-06-14 Thread Juergen Gross
The paravirt MMU functions called via the PV_CALLEE_SAVE_REGS_THUNK() macro can't be defined to be static, as the macro is generating a function via asm() statement calling the paravirt MMU function. In order to avoid warnings when specifying "-Wmissing-prototypes" for the build, add local prototy

[PATCH v4 2/2] x86: xen: add missing prototypes

2023-06-14 Thread Juergen Gross
From: Arnd Bergmann These function are all called from assembler files, or from inline assembler, so there is no immediate need for a prototype in a header, but if -Wmissing-prototypes is enabled, the compiler warns about them: arch/x86/xen/efi.c:130:13: error: no previous prototype for 'xen_efi

[PATCH 1/2] tools/console: Add escape argument to configure escape character

2023-06-14 Thread Peter Hoyes
From: Peter Hoyes Dom0 may be accessed via telnet, meaning the default escape character (which is the same as telnet's) cannot be directly used to exit the console. It would be helpful to make the escape character customizable in such use cases. Add --escape argument to console tool for this pur

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

2023-06-14 Thread Peter Hoyes
From: Peter Hoyes Add -e argument to xl console and pass to new escape_character argument of libxl_console_exec. In libxl_console_exec, there are currently two call sites to execl, which uses varargs, in order to support optionally passing 'start-notify-fd' to the console client. In order to sup

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Luca Fancellu
> On 14 Jun 2023, at 08:30, Michal Orzel wrote: > > Missing newline is inconsistent with the rest of the callers, since > panic() expects it. > > Signed-off-by: Michal Orzel Reviewed-by: Luca Fancellu > --- > xen/arch/arm/bootfdt.c| 2 +- > xen/arch/arm/domain_build.c | 6

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Jan Beulich
On 14.06.2023 09:45, Luca Fancellu wrote: >> On 14 Jun 2023, at 08:30, Michal Orzel wrote: >> >> Missing newline is inconsistent with the rest of the callers, since >> panic() expects it. >> >> Signed-off-by: Michal Orzel > > Reviewed-by: Luca Fancellu Acked-by: Jan Beulich

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Andrew Cooper
On 14/06/2023 8:30 am, Michal Orzel wrote: > Missing newline is inconsistent with the rest of the callers, since > panic() expects it. > > Signed-off-by: Michal Orzel Acked-by: Andrew Cooper although... > --- > xen/arch/arm/bootfdt.c| 2 +- > xen/arch/arm/domain_build.c | 6

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
On 14/06/2023 10:04, Andrew Cooper wrote: > > > On 14/06/2023 8:30 am, Michal Orzel wrote: >> Missing newline is inconsistent with the rest of the callers, since >> panic() expects it. >> >> Signed-off-by: Michal Orzel > > Acked-by: Andrew Cooper > > although... > >> --- >> xen/arch/arm/

[PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids

2023-06-14 Thread Roger Pau Monne
When the passed domain is DomIO iterate over the list of DomIO assigned devices and flush each pseudo-domid found. invalidate_all_domain_pages() does call amd_iommu_flush_all_pages() with DomIO as a parameter, and hence the underlying _amd_iommu_flush_pages() implementation must be capable of flus

compat code lacks support for __attribute__

2023-06-14 Thread Olaf Hering
I would like to share code between the hypervisor and xenalyze, so that every definition comes from a single place and is not duplicated in xen and xenalyze. This works as long as simple constructs like struct x {}; are used. Depending on the data to be stored into the trace buffer, having support

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Julien Grall
On 14/06/2023 09:09, Michal Orzel wrote: On 14/06/2023 10:04, Andrew Cooper wrote: On 14/06/2023 8:30 am, Michal Orzel wrote: Missing newline is inconsistent with the rest of the callers, since panic() expects it. Signed-off-by: Michal Orzel Acked-by: Andrew Cooper although... --

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Michal Orzel
On 14/06/2023 11:02, Julien Grall wrote: > > > On 14/06/2023 09:09, Michal Orzel wrote: >> >> >> On 14/06/2023 10:04, Andrew Cooper wrote: >>> >>> >>> On 14/06/2023 8:30 am, Michal Orzel wrote: Missing newline is inconsistent with the rest of the callers, since panic() expects it. >>

Re: [PATCH] xen/evtchn: Purge ERROR_EXIT{,_DOM}()

2023-06-14 Thread Julien Grall
Hi Jan, On 14/06/2023 07:59, Jan Beulich wrote: On 13.06.2023 18:22, Andrew Cooper wrote: These are disliked specifically by MISRA, but they also interfere with code legibility by hiding control flow. Expand and drop them. * Rearrange the order of actions to write into rc, then render rc in

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Julien Grall
On 14/06/2023 10:06, Michal Orzel wrote: On 14/06/2023 11:02, Julien Grall wrote: On 14/06/2023 09:09, Michal Orzel wrote: On 14/06/2023 10:04, Andrew Cooper wrote: On 14/06/2023 8:30 am, Michal Orzel wrote: Missing newline is inconsistent with the rest of the callers, since panic(

Re: [PATCH] xen/evtchn: Purge ERROR_EXIT{,_DOM}()

2023-06-14 Thread Andrew Cooper
On 14/06/2023 7:52 am, Jan Beulich wrote: > On 13.06.2023 21:47, Roberto Bagnara wrote: >> On 13/06/23 19:45, Andrew Cooper wrote: >>> On 13/06/2023 6:39 pm, Julien Grall wrote: Hi, On 13/06/2023 17:22, Andrew Cooper wrote: > These are disliked specifically by MISRA, but they als

Re: [PATCH v4 27/34] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Geert Uytterhoeven
Hi Dinh, On Wed, Jun 14, 2023 at 12:17 AM Dinh Nguyen wrote: > On 6/12/23 16:04, Vishal Moola (Oracle) wrote: > > Part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents. > > > > Signed-off-by: Vishal Moola (Oracle) > > --- > > arch/nios2/include/asm/pgal

Re: [PATCH] xen/evtchn: Purge ERROR_EXIT{,_DOM}()

2023-06-14 Thread Jan Beulich
On 14.06.2023 11:21, Andrew Cooper wrote: > On 14/06/2023 7:52 am, Jan Beulich wrote: >> On 13.06.2023 21:47, Roberto Bagnara wrote: >>> On 13/06/23 19:45, Andrew Cooper wrote: On 13/06/2023 6:39 pm, Julien Grall wrote: > Hi, > > On 13/06/2023 17:22, Andrew Cooper wrote: >> The

[PATCH] xen/arm: Remove stray semicolon at VREG_REG_HELPERS/TLB_HELPER* callers

2023-06-14 Thread Michal Orzel
This is inconsistent with the rest of the code where macros are used to define functions, as it results in an empty declaration (i.e. semicolon with nothing before it) after function definition. This is also not allowed by C99. Take the opportunity to undefine TLB_HELPER* macros after last use. S

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
On Mon, 2023-06-12 at 15:48 +0200, Jan Beulich wrote: > On 06.06.2023 21:55, Oleksii Kurochko wrote: > > The way how switch to virtual address was implemented in the > > commit e66003e7be ("xen/riscv: introduce setup_initial_pages") > > wasn't safe enough so identity mapping was introduced and > >

Re: compat code lacks support for __attribute__

2023-06-14 Thread Jan Beulich
On 14.06.2023 10:43, Olaf Hering wrote: > I would like to share code between the hypervisor and xenalyze, so that > every definition comes from a single place and is not duplicated in xen > and xenalyze. This works as long as simple constructs like struct x {}; > are used. Depending on the data to

Re: [PATCH] xen: Append a newline character to panic() where missing

2023-06-14 Thread Bertrand Marquis
Hi Michal, > On 14 Jun 2023, at 09:30, Michal Orzel wrote: > > Missing newline is inconsistent with the rest of the callers, since > panic() expects it. > > Signed-off-by: Michal Orzel Reviewed-by: Bertrand Marquis And I agree with Julien: trailing punctuation is not an issue and I would def

Re: [PATCH] xen/arm: Remove stray semicolon at VREG_REG_HELPERS/TLB_HELPER* callers

2023-06-14 Thread Jan Beulich
On 14.06.2023 11:41, Michal Orzel wrote: > This is inconsistent with the rest of the code where macros are used > to define functions, as it results in an empty declaration (i.e. > semicolon with nothing before it) after function definition. This is also > not allowed by C99. > > Take the opportun

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
On Mon, 2023-06-12 at 16:24 +0200, Jan Beulich wrote: > On 12.06.2023 15:48, Jan Beulich wrote: > > On 06.06.2023 21:55, Oleksii Kurochko wrote: > > > -void __init noreturn noinline enable_mmu() > > > +/* > > > + * enable_mmu() can't be __init because __init section isn't > > > part of identity > >

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Jan Beulich
On 14.06.2023 11:47, Oleksii wrote: > On Mon, 2023-06-12 at 15:48 +0200, Jan Beulich wrote: >> On 06.06.2023 21:55, Oleksii Kurochko wrote: >>> The way how switch to virtual address was implemented in the >>> commit e66003e7be ("xen/riscv: introduce setup_initial_pages") >>> wasn't safe enough so i

Re: compat code lacks support for __attribute__

2023-06-14 Thread Olaf Hering
Wed, 14 Jun 2023 11:49:35 +0200 Jan Beulich : > So perhaps we could arrange for your additions to be excluded > from the compat translation machinery? Is there maybe a place for headers which are not public, but which are visible for tools/ and xen/? I think the trace functionality would be a can

Re: compat code lacks support for __attribute__

2023-06-14 Thread Jan Beulich
On 14.06.2023 12:08, Olaf Hering wrote: > Wed, 14 Jun 2023 11:49:35 +0200 Jan Beulich : > >> So perhaps we could arrange for your additions to be excluded >> from the compat translation machinery? > > Is there maybe a place for headers which are not public, > but which are visible for tools/ and

[xen-unstable test] 181415: tolerable FAIL - PUSHED

2023-06-14 Thread osstest service owner
flight 181415 xen-unstable real [real] flight 181420 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/181415/ http://logs.test-lab.xenproject.org/osstest/logs/181420/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd6

[qemu-mainline test] 181419: regressions - FAIL

2023-06-14 Thread osstest service owner
flight 181419 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181419/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 180691 build-arm64

[linux-linus test] 181417: regressions - FAIL

2023-06-14 Thread osstest service owner
flight 181417 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181417/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 8 xen-boot fail REGR. vs. 180278 build-arm64-pvops

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Oleksii
> > +} > > + > > +void __init remove_identity_mapping(void) > > +{ > > +    int i, j; > > Nit: unsigned int please. > > It should be int in the current case because of the 'for' exit condition: for ( pgtbl = stage1_pgtbl_root, i = CONFIG_PAGING_LEVELS - 1; i >= 0; i-- ) Should exit condit

Re: [PATCH v1 5/8] xen/riscv: introduce identity mapping

2023-06-14 Thread Jan Beulich
On 14.06.2023 13:06, Oleksii wrote: >>> +} >>> + >>> +void __init remove_identity_mapping(void) >>> +{ >>> +    int i, j; >> >> Nit: unsigned int please. >> >> > It should be int in the current case because of the 'for' exit > condition: > for ( pgtbl = stage1_pgtbl_root, i = CONFIG_PAGING_LE

Re: [PATCH v1 3/8] xen/riscv: introduce reset_stack() function

2023-06-14 Thread Oleksii
On Mon, 2023-06-12 at 09:12 +0200, Jan Beulich wrote: > On 06.06.2023 21:55, Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > > This wants addressing the "Why?" aspect in the description. Is the > present > code wrong in some perhaps subtle way? Are you meaning to re-use the > code?

Re: [PATCH v1 3/8] xen/riscv: introduce reset_stack() function

2023-06-14 Thread Jan Beulich
On 14.06.2023 14:19, Oleksii wrote: > On Mon, 2023-06-12 at 09:12 +0200, Jan Beulich wrote: >> On 06.06.2023 21:55, Oleksii Kurochko wrote: >>> Signed-off-by: Oleksii Kurochko >> >> This wants addressing the "Why?" aspect in the description. Is the >> present >> code wrong in some perhaps subtle w

Re: [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids

2023-06-14 Thread Jan Beulich
On 14.06.2023 10:32, Roger Pau Monne wrote: > When the passed domain is DomIO iterate over the list of DomIO > assigned devices and flush each pseudo-domid found. > > invalidate_all_domain_pages() does call amd_iommu_flush_all_pages() > with DomIO as a parameter, Does it? Since the full function

Re: [PATCH v4 01/34] mm: Add PAGE_TYPE_OP folio functions

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:50PM -0700, Vishal Moola (Oracle) wrote: > No folio equivalents for page type operations have been defined, so > define them for later folio conversions. > > Also changes the Page##uname macros to take in const struct page* since > we only read the memory here. > > S

Functions _spin_lock_cb() and handle_ro_raz()

2023-06-14 Thread Federico Serafini
Hello everyone, I am working on the violations of MISRA C:2012 Rule 8.10, whose headline says: "An inline function shall be declared with the static storage class". For both ARM64 and X86_64 builds, function _spin_lock_cb() defined in spinlock.c violates the rule. Such function is declared in sp

Re: [PATCH v4 02/34] s390: Use _pt_s390_gaddr for gmap address tracking

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:51PM -0700, Vishal Moola (Oracle) wrote: > s390 uses page->index to keep track of page tables for the guest address > space. In an attempt to consolidate the usage of page fields in s390, > replace _pt_pad_2 with _pt_s390_gaddr to replace page->index in gmap. > > This

Re: [XEN PATCH] xen: fixed violations of MISRA C:2012 Rule 3.1

2023-06-14 Thread nicola
On 13/06/23 11:44, Julien Grall wrote: Hi, On 13/06/2023 09:27, Jan Beulich wrote: On 13.06.2023 09:42, Nicola Vetrini wrote: The xen sources contain several violations of Rule 3.1 from MISRA C:2012, whose headline states: "The character sequences '/*' and '//' shall not be used within a c

Re: [PATCH v4 03/34] s390: Use pt_frag_refcount for pagetables

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:52PM -0700, Vishal Moola (Oracle) wrote: > s390 currently uses _refcount to identify fragmented page tables. > The page table struct already has a member pt_frag_refcount used by > powerpc, so have s390 use that instead of the _refcount field as well. > This improves t

Re: [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids

2023-06-14 Thread Roger Pau Monné
On Wed, Jun 14, 2023 at 02:58:14PM +0200, Jan Beulich wrote: > On 14.06.2023 10:32, Roger Pau Monne wrote: > > When the passed domain is DomIO iterate over the list of DomIO > > assigned devices and flush each pseudo-domid found. > > > > invalidate_all_domain_pages() does call amd_iommu_flush_all_

Re: [PATCH v4 04/34] pgtable: Create struct ptdesc

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:53PM -0700, Vishal Moola (Oracle) wrote: > Currently, page table information is stored within struct page. As part > of simplifying struct page, create struct ptdesc for page table > information. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM)

[qemu-mainline test] 181424: regressions - FAIL

2023-06-14 Thread osstest service owner
flight 181424 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181424/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 180691 build-arm64

Re: [PATCH v4 05/34] mm: add utility functions for ptdesc

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:54PM -0700, Vishal Moola (Oracle) wrote: > Introduce utility functions setting the foundation for ptdescs. These > will also assist in the splitting out of ptdesc from struct page. > > Functions that focus on the descriptor are prefixed with ptdesc_* while > functions

Re: [PATCH v4 06/34] mm: Convert pmd_pgtable_page() to pmd_ptdesc()

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:55PM -0700, Vishal Moola (Oracle) wrote: > Converts pmd_pgtable_page() to pmd_ptdesc() and all its callers. This > removes some direct accesses to struct page, working towards splitting > out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) A

Re: [PATCH] iommu/amd-vi: adjust _amd_iommu_flush_pages() to handle pseudo-domids

2023-06-14 Thread Jan Beulich
On 14.06.2023 15:23, Roger Pau Monné wrote: > On Wed, Jun 14, 2023 at 02:58:14PM +0200, Jan Beulich wrote: >> On 14.06.2023 10:32, Roger Pau Monne wrote: >>> When the passed domain is DomIO iterate over the list of DomIO >>> assigned devices and flush each pseudo-domid found. >>> >>> invalidate_all

Re: [PATCH v4 07/34] mm: Convert ptlock_alloc() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:56PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 6 +++-

Re: [PATCH v4 08/34] mm: Convert ptlock_ptr() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:57PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/x86/xen/mmu_pv.c | 2

Re: [PATCH v4 09/34] mm: Convert pmd_ptlock_init() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:58PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 10 +++

Re: [PATCH v4 10/34] mm: Convert ptlock_init() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:03:59PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 14 +++

Re: [PATCH v4 11/34] mm: Convert pmd_ptlock_free() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:00PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 10 +++

Re: [PATCH v4 12/34] mm: Convert ptlock_free() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:01PM -0700, Vishal Moola (Oracle) wrote: > This removes some direct accesses to struct page, working towards > splitting out struct ptdesc from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm.h | 10 +++

Re: Functions _spin_lock_cb() and handle_ro_raz()

2023-06-14 Thread Jan Beulich
On 14.06.2023 15:08, Federico Serafini wrote: > Hello everyone, > > I am working on the violations of MISRA C:2012 Rule 8.10, > whose headline says: > "An inline function shall be declared with the static storage class". > > For both ARM64 and X86_64 builds, > function _spin_lock_cb() defined in

Re: [PATCH v4 13/34] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:02PM -0700, Vishal Moola (Oracle) wrote: > Creates pagetable_pte_ctor(), pagetable_pmd_ctor(), pagetable_pte_dtor(), > and pagetable_pmd_dtor() and make the original pgtable > constructor/destructors wrappers. Nit: either "creates ... makes" or "create ... make" I lik

[PATCH] spinlock: alter inlining of _spin_lock_cb()

2023-06-14 Thread Jan Beulich
To comply with Misra rule 8.10 ("An inline function shall be declared with the static storage class"), convert what is presently _spin_lock_cb() to an always-inline (and static) helper, while making the function itself a thin wrapper, just like _spin_lock() is. While there drop the unlikely() from

Re: [PATCH v4 14/34] powerpc: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:03PM -0700, Vishal Moola (Oracle) wrote: > In order to split struct ptdesc from struct page, convert various > functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/powerpc/mm/book3s64/mmu_context.c | 10 +++

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

2023-06-14 Thread osstest service owner
flight 181426 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/181426/ 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 v4 15/34] x86: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:04PM -0700, Vishal Moola (Oracle) wrote: > In order to split struct ptdesc from struct page, convert various > functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert Nit: *get_free_page*() > these

Re: [XEN PATCH] xen: fixed violations of MISRA C:2012 Rule 3.1

2023-06-14 Thread Andrew Cooper
On 13/06/2023 8:42 am, Nicola Vetrini wrote: > diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c > index 75bdf18c4e..ea6ec47a59 100644 > --- a/xen/common/xmalloc_tlsf.c > +++ b/xen/common/xmalloc_tlsf.c > @@ -140,9 +140,10 @@ static inline void MAPPING_SEARCH(unsigned long *r, int

[libvirt test] 181418: tolerable all pass - PUSHED

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

Re: [PATCH v4 16/34] s390: Convert various gmap functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:05PM -0700, Vishal Moola (Oracle) wrote: > In order to split struct ptdesc from struct page, convert various > functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert > these to use pagetable_alloc() and ptdesc_address() inst

Re: [PATCH v4 17/34] s390: Convert various pgalloc functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:06PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 18/34] mm: Remove page table members from struct page

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:07PM -0700, Vishal Moola (Oracle) wrote: > The page table members are now split out into their own ptdesc struct. > Remove them from struct page. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > include/linux/mm_types.h | 14

Re: [PATCH v4 19/34] pgalloc: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:08PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 20/34] arm: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:09PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > late_alloc() also uses the __get_free_pages() helper function. Convert

Re: [XEN PATCH] xen: fixed violations of MISRA C:2012 Rule 3.1

2023-06-14 Thread Jan Beulich
On 14.06.2023 16:28, Andrew Cooper wrote: > On 13/06/2023 8:42 am, Nicola Vetrini wrote: >> diff --git a/xen/common/xmalloc_tlsf.c b/xen/common/xmalloc_tlsf.c >> index 75bdf18c4e..ea6ec47a59 100644 >> --- a/xen/common/xmalloc_tlsf.c >> +++ b/xen/common/xmalloc_tlsf.c >> @@ -140,9 +140,10 @@ static

Re: [PATCH v4 21/34] arm64: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:10PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM)

Re: [PATCH v4 22/34] csky: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:11PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) > Acked-by: Guo Ren Acked-by: Mike Rapoport (IBM) > --- > arch/csky/include/asm/pgal

Re: [PATCH v4 23/34] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:12PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/hexagon/include/asm/pgalloc.h | 8

Re: [PATCH] libxg: shrink variable scope in xc_core_arch_map_p2m_list_rw()

2023-06-14 Thread Anthony PERARD
On Wed, Jun 14, 2023 at 09:02:56AM +0200, Jan Beulich wrote: > This in particular allows to drop a dead assignment to "ptes" from near > the end of the function. > > Coverity ID: 1532314 > Fixes: bd7a29c3d0b9 ("tools/libs/ctrl: fix xc_core_arch_map_p2m() to support > linear p2m table") > Signed-o

Re: [PATCH v4 24/34] loongarch: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:13PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 25/34] m68k: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:14PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 26/34] mips: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:15PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 27/34] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:16PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/nios2/include/asm/pgalloc.h | 8 >

Re: [PATCH v4 28/34] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:17PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/openrisc/include/asm/pgalloc.h | 8 ---

Re: [PATCH v4 29/34] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:18PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Some of the functions use the *get*page*() helper functions. Convert >

Re: [PATCH v4 30/34] sh: Convert pte_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:19PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. Also cleans up some spacing issues. > > Signed-off-by: Vishal Moola (Oracle) > Reviewed-by: Geert Uytterhoeven > Acked-by: John P

Re: [PATCH v4 31/34] sparc64: Convert various functions to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:20PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM)

Re: [PATCH v4 32/34] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:21PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable pte constructor/destructors with > ptdesc equivalents. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/sparc/mm/srmmu.c | 5 +++-- > 1 file c

Re: [PATCH v4 33/34] um: Convert {pmd, pte}_free_tlb() to use ptdescs

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:22PM -0700, Vishal Moola (Oracle) wrote: > Part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents. Also cleans up some spacing issues. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) > --- > arch/um/inc

Re: [PATCH v4 34/34] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers

2023-06-14 Thread Mike Rapoport
On Mon, Jun 12, 2023 at 02:04:23PM -0700, Vishal Moola (Oracle) wrote: > These functions are no longer necessary. Remove them and cleanup > Documentation referencing them. > > Signed-off-by: Vishal Moola (Oracle) I've found one stale reference in riscv: $ git grep -n pgtable_pmd_page_ctor arch/

Re: [PATCH v3 2/4] xen: Add files needed for minimal ppc64le build

2023-06-14 Thread Jan Beulich
On 13.06.2023 16:50, Shawn Anastasio wrote: > --- /dev/null > +++ b/xen/arch/ppc/Makefile > @@ -0,0 +1,16 @@ > +obj-$(CONFIG_PPC64) += ppc64/ > + > +$(TARGET): $(TARGET)-syms > + cp -f $< $@ > + > +$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds > + $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.ld

[PATCH] Arm: drop bogus ALIGN() from linker script

2023-06-14 Thread Jan Beulich
Having ALIGN() inside a section definition usually makes sense only with a label definition following (an exception case is a few lines out of context, where cache line sharing is intended to be avoided). Constituents of .bss.page_aligned need to specify their own alignment correctly anyway, or els

Re: Functions _spin_lock_cb() and handle_ro_raz()

2023-06-14 Thread Federico Serafini
On 14/06/23 16:03, Jan Beulich wrote: On 14.06.2023 15:08, Federico Serafini wrote: Hello everyone, I am working on the violations of MISRA C:2012 Rule 8.10, whose headline says: "An inline function shall be declared with the static storage class". For both ARM64 and X86_64 builds, function

[PATCH v2] xen/grant: Purge PIN_FAIL()

2023-06-14 Thread Andrew Cooper
The name PIN_FAIL() is poor; it's not used only pinning failures. More importantly, it interferes with code legibility by hiding control flow. Expand and drop it. * Drop redundant "rc = rc" assignment * Rework gnttab_copy_buf() to be simpler by dropping the rc variable As a side effect, this f

Re: [PATCH v3 2/4] xen: Add files needed for minimal ppc64le build

2023-06-14 Thread Shawn Anastasio
On Wed Jun 14, 2023 at 10:51 AM CDT, Jan Beulich wrote: > On 13.06.2023 16:50, Shawn Anastasio wrote: > > --- /dev/null > > +++ b/xen/arch/ppc/Makefile > > @@ -0,0 +1,16 @@ > > +obj-$(CONFIG_PPC64) += ppc64/ > > + > > +$(TARGET): $(TARGET)-syms > > + cp -f $< $@ > > + > > +$(TARGET)-syms: $(objtr

[qemu-mainline test] 181428: regressions - FAIL

2023-06-14 Thread osstest service owner
flight 181428 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/181428/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-amd64-xsm 6 xen-buildfail REGR. vs. 180691 build-arm64

Re: [PATCH v4 21/34] arm64: Convert various functions to use ptdescs

2023-06-14 Thread Catalin Marinas
On Mon, Jun 12, 2023 at 02:04:10PM -0700, Vishal Moola (Oracle) wrote: > As part of the conversions to replace pgtable constructor/destructors with > ptdesc equivalents, convert various page table functions to use ptdescs. > > Signed-off-by: Vishal Moola (Oracle) Acked-by: Catalin Marinas

Re: [PATCH v9 02/42] mm: Move pte/pmd_mkwrite() callers with no VMA to _novma()

2023-06-14 Thread Edgecombe, Rick P
On Tue, 2023-06-13 at 19:00 +0200, David Hildenbrand wrote: > On 13.06.23 18:19, Edgecombe, Rick P wrote: > > On Tue, 2023-06-13 at 10:44 +0300, Mike Rapoport wrote: > > > > Previous patches have done the first step, so next move the > > > > callers > > > > that > > > > don't have a VMA to pte_mkwr

Re: [PATCH v3 3/4] x86/spec-ctrl: Fix up the RSBA/RRSBA bits as appropriate

2023-06-14 Thread Andrew Cooper
On 13/06/2023 10:30 am, Jan Beulich wrote: > On 12.06.2023 18:13, Andrew Cooper wrote: >> @@ -593,15 +596,93 @@ static bool __init retpoline_calculations(void) >> return false; >> >> /* >> - * RSBA may be set by a hypervisor to indicate that we may move to a >> - * processor

[xen-unstable test] 181423: regressions - FAIL

2023-06-14 Thread osstest service owner
flight 181423 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/181423/ 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. 181415 Tests which are fa

Re: Functions _spin_lock_cb() and handle_ro_raz()

2023-06-14 Thread Julien Grall
(+ Bertrand and Stefano) On 14/06/2023 14:08, Federico Serafini wrote: Hello everyone, Hi Federico, Let me start with a tip to help reaching the maintainers and getting a more timely answer. Xen-devel has a large volume of e-mails (still less than Linux :)). So some of us will have filter t

[PATCH v4 01/15] cpufreq: Allow restricting to internal governors only

2023-06-14 Thread Jason Andryuk
For hwp, the standard governors are not usable, and only the internal one is applicable. Add the cpufreq_governor_internal boolean to indicate when an internal governor, like hwp, will be used. This is set during presmp_initcall, so that it can suppress governor registration during initcall. Add

[PATCH v4 03/15] cpufreq: Export intel_feature_detect

2023-06-14 Thread Jason Andryuk
Export feature_detect as intel_feature_detect so it can be re-used by HWP. Signed-off-by: Jason Andryuk Acked-by: Jan Beulich --- v4: Add Jan's Ack v3: Remove void * cast when calling intel_feature_detect v2: export intel_feature_detect with typed pointer Move intel_feature_detect to acpi/cpuf

[PATCH v4 00/15] Intel Hardware P-States (HWP) support

2023-06-14 Thread Jason Andryuk
Hi, This patch series adds Hardware-Controlled Performance States (HWP) for Intel processors to Xen. v2 was only partially reviewed, so v3 is mostly a reposting of v2. In v2 & v3, I think I addressed all comments for v1. I kept patch 11 "xenpm: Factor out a non-fatal cpuid_parse variant", with

[PATCH v4 02/15] cpufreq: Add perf_freq to cpuinfo

2023-06-14 Thread Jason Andryuk
acpi-cpufreq scales the aperf/mperf measurements by max_freq, but HWP needs to scale by base frequency. Settings max_freq to base_freq "works" but the code is not obvious, and returning values to userspace is tricky. Add an additonal perf_freq member which is used for scaling aperf/mperf measurem

[PATCH v4 04/15] xen/sysctl: Nest cpufreq scaling options

2023-06-14 Thread Jason Andryuk
Add a union and struct so that most of the scaling variables of struct xen_get_cpufreq_para are within in a binary-compatible layout. This allows cppc_para to live in the larger union and use uint32_ts - struct xen_cppc_para will be 10 uint32_t's. The new scaling struct is 3 * uint32_t + 16 bytes

[PATCH v4 05/15] pmstat&xenpm: Re-arrage for cpufreq union

2023-06-14 Thread Jason Andryuk
Move some code around now that common xen_sysctl_pm_op get_para fields are together. In particular, the scaling governor information like scaling_available_governors is inside the union, so it is not always available. With that, gov_num may be 0, so bounce buffer handling needs to be modified. s

  1   2   >