[XEN PATCH v2] xen/arm: fix violations of MISRA C:2012 R8.3 on parameter names.

2023-06-22 Thread Federico Serafini
To comply with Rule 8.3 ("All declarations of an object or function shall use the same names and type qualifiers") change the parameter names in order to have function declarations consistent with the corresponding definitions. Change the function identifier 'access_guest_memory_by_ipa' to 'access

Re: [PATCH v2 1/2] x86/boot: Clear XD_DISABLE from the early boot path

2023-06-22 Thread Jan Beulich
On 22.06.2023 17:49, Alejandro Vallejo wrote: > On Thu, Jun 22, 2023 at 09:54:01AM +0200, Jan Beulich wrote: >> On 21.06.2023 18:43, Alejandro Vallejo wrote: >>> Sure, to everything before this >>> > diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c > index 168cd58f36..46b0cd

Re: [PATCH v2 0/3] Early serial on Power

2023-06-22 Thread Jan Beulich
On 22.06.2023 22:57, Shawn Anastasio wrote: > Changes in v2: > - Split main patch into two - one for basic C environment setup and > one for serial > - Mark OpenFirmware functions and early_printk functions as __init and > change boot-of.o to boot-of.init.o in Makefile > - Change inc

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

2023-06-22 Thread Jan Beulich
On 23.06.2023 03:26, Shawn Anastasio wrote: > On 6/22/23 5:49 PM, Andrew Cooper wrote: >> On 22/06/2023 9:57 pm, Shawn Anastasio wrote: >>> --- /dev/null >>> +++ b/xen/arch/ppc/setup.c >>> @@ -0,0 +1,13 @@ >>> +/* SPDX-License-Identifier: GPL-2.0-or-later */ >>> +#include >>> + >>> +void __init no

[linux-5.4 test] 181553: regressions - FAIL

2023-06-22 Thread osstest service owner
flight 181553 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/181553/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail in 181551 REGR. vs. 181363 Tests which are faili

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

2023-06-22 Thread Shawn Anastasio
On 6/22/23 5:49 PM, Andrew Cooper wrote: > On 22/06/2023 9:57 pm, Shawn Anastasio wrote: >> Update ppc64/head.S to set up an initial boot stack, zero the .bss >> section, and jump to C. >> >> Also refactor the endian fixup trampoline into its own macro, since it >> will need to be used in multiple

[xen-unstable test] 181552: regressions - FAIL

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

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

2023-06-22 Thread Andrew Cooper
On 22/06/2023 9:57 pm, Shawn Anastasio wrote: > Update ppc64/head.S to set up an initial boot stack, zero the .bss > section, and jump to C. > > Also refactor the endian fixup trampoline into its own macro, since it > will need to be used in multiple places, including every time we make a > call in

Re: [PATCH v5 26/33] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-22 Thread Dinh Nguyen
On 6/22/23 15:57, 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 1 file changed, 4 insertions(+)

Informal Qubes OS/Xen/Dasharo pPub Meetup in Prague!

2023-06-22 Thread Piotr Król
Hi, If you attend Xen Summit or Embedded Open Source Summit, you may want to join esteemed Qubes OS, Xen, and Dasharo enthusiasts! We are thrilled to invite you to an evening that combines the wisdom of cybersecurity with the delight of camaraderie. Let’s cherish privacy, security, and a good

Re: [PATCH v7 01/12] vpci: introduce per-domain lock to protect vpci structure

2023-06-22 Thread Volodymyr Babchuk
Hi Stewart, Stewart Hildebrand writes: > On 6/13/23 06:32, Volodymyr Babchuk wrote: > > ... > >> diff --git a/xen/drivers/vpci/vpci.c b/xen/drivers/vpci/vpci.c >> index 652807a4a4..1270174e78 100644 >> --- a/xen/drivers/vpci/vpci.c >> +++ b/xen/drivers/vpci/vpci.c >> @@ -38,20 +38,32 @@ extern

Re: [PATCH v7 01/12] vpci: introduce per-domain lock to protect vpci structure

2023-06-22 Thread Volodymyr Babchuk
Hi Roger, Roger Pau Monné writes: > On Wed, Jun 21, 2023 at 10:07:20PM +, Volodymyr Babchuk wrote: >> >> Hi Roger, >> >> Roger Pau Monné writes: >> >> > On Tue, Jun 13, 2023 at 10:32:26AM +, Volodymyr Babchuk wrote: >> >> From: Oleksandr Andrushchenko >> >> >> >> Introduce a per-d

[linux-linus test] 181548: regressions - FAIL

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

[PATCH v5 18/33] pgalloc: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 33/33] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers

2023-06-22 Thread Vishal Moola (Oracle)
These functions are no longer necessary. Remove them and cleanup Documentation referencing them. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- Documentation/mm/split_page_table_lock.rst| 12 +-- .../zh_CN/mm/split_page_table_lock.rst| 14 ++--

[PATCH v5 15/33] s390: Convert various gmap functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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() instead to help standardize page tables further. Since we're now using pagetable_fre

[PATCH v5 29/33] sh: Convert pte_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 Paul Adrian Glaubitz Acked-by: Mike Rapoport (IBM) --- arch/sh/include/asm/pgallo

[PATCH v5 21/33] csky: Convert __pte_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky

[PATCH v5 19/33] arm: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 this to use pagetable_alloc() and ptdesc_address() instead to help standardize

[PATCH v5 22/33] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/hexagon/include/

[PATCH v5 31/33] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-06-22 Thread Vishal Moola (Oracle)
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 changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/spar

[PATCH v5 25/33] mips: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 32/33] um: Convert {pmd, pte}_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deleti

[PATCH v5 17/33] mm: Remove page table members from struct page

2023-06-22 Thread Vishal Moola (Oracle)
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 -- include/linux/pgtable.h | 3 --- 2 files changed, 17 deletions(-) diff --g

[PATCH v5 28/33] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 11/33] mm: Convert ptlock_free() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +- mm/memory.c| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(

[PATCH v5 23/33] loongarch: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 30/33] sparc64: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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) --- arch/sparc/mm/init_64.c | 17 + 1 file changed, 9 insertions

[PATCH v5 12/33] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-06-22 Thread Vishal Moola (Oracle)
Create pagetable_pte_ctor(), pagetable_pmd_ctor(), pagetable_pte_dtor(), and pagetable_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 56 ++

[PATCH v5 20/33] arm64: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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) Acked-by: Catalin Marinas --- arch/arm64/include/asm/tlb.h | 14 --

[PATCH v5 26/33] nios2: Convert __pte_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/nios2/include/asm/

[PATCH v5 24/33] m68k: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 16/33] s390: Convert various pgalloc functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH v5 27/33] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/includ

[PATCH v5 14/33] x86: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

[PATCH v5 13/33] powerpc: Convert various functions to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +- arch/powerpc/mm/

[PATCH v5 09/33] mm: Convert ptlock_init() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/li

[PATCH v5 10/33] mm: Convert pmd_ptlock_free() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH v5 08/33] mm: Convert pmd_ptlock_init() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH v5 07/33] mm: Convert ptlock_ptr() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 de

[PATCH v5 06/33] mm: Convert ptlock_alloc() to use ptdescs

2023-06-22 Thread Vishal Moola (Oracle)
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 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) di

[PATCH v5 05/33] mm: Convert pmd_pgtable_page() to pmd_ptdesc()

2023-06-22 Thread Vishal Moola (Oracle)
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) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 8 1 file changed

[PATCH v5 00/33] Split ptdesc from struct page

2023-06-22 Thread Vishal Moola (Oracle)
The MM subsystem is trying to shrink struct page. This patchset introduces a memory descriptor for page table tracking - struct ptdesc. This patchset introduces ptdesc, splits ptdesc from struct page, and converts many callers of page table constructor/destructors to use ptdescs. Ptdesc is a foun

[PATCH v2 3/3] automation: Add smoke test for ppc64le

2023-06-22 Thread Shawn Anastasio
Add an initial smoke test that boots xen on a ppc64/pseries machine and checks for a magic string. Based on the riscv smoke test. Eventually the powernv9 (POWER9 bare metal) machine type will want to be tested as well, but for now we only boot on pseries. Signed-off-by: Shawn Anastasio --- auto

[PATCH v5 04/33] mm: add utility functions for ptdesc

2023-06-22 Thread Vishal Moola (Oracle)
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 that focus on the pagetable are prefixed with pagetable_*. pagetable_alloc() is

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

2023-06-22 Thread Shawn Anastasio
On typical Power VMs (e.g. QEMU's -M pseries), a variety of services including an early serial console are provided by Open Firmware. Implement the required interfaces to call into Open Firmware and write to the serial console. Since Open Firmware runs in 32-bit Big Endian mode and Xen runs in 64-

[PATCH v5 01/33] mm: Add PAGE_TYPE_OP folio functions

2023-06-22 Thread Vishal Moola (Oracle)
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. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linu

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

2023-06-22 Thread Shawn Anastasio
Update ppc64/head.S to set up an initial boot stack, zero the .bss section, and jump to C. Also refactor the endian fixup trampoline into its own macro, since it will need to be used in multiple places, including every time we make a call into firmware (see next commit). Signed-off-by: Shawn Anas

[PATCH v2 0/3] Early serial on Power

2023-06-22 Thread Shawn Anastasio
Hello all, This series adds support for early serial printing on Power, as well as a simple CI smoke test modeled after the riscv one. The first patch is responsible for setting up a basic C environment with an initial stack and a cleared .bss while the second sets up an Open Firmware serial cons

[PATCH v5 02/33] s390: Use _pt_s390_gaddr for gmap address tracking

2023-06-22 Thread Vishal Moola (Oracle)
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. Since page->_pt_s390_gaddr aliases with mapping, ensure its set to NULL before freein

[PATCH v5 03/33] pgtable: Create struct ptdesc

2023-06-22 Thread Vishal Moola (Oracle)
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) --- include/linux/pgtable.h | 68 + 1 f

[linux-5.4 test] 181551: regressions - FAIL

2023-06-22 Thread osstest service owner
flight 181551 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/181551/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-armhf broken in 181542 build-armhf4 host

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

2023-06-22 Thread Shawn Anastasio
On 6/22/23 11:43 AM, Julien Grall wrote: > Hi, Thanks for the response. I had one more question with regards to the emacs footer. >All files usually have an emacs magic block. E.g.: > >/* > * Local variables: > * mode: C > * c-file-style: "BSD" > * c-basic-offset: 4 > * indent-tabs-mode: nil > *

Re: [PATCH v2 15/16] accel: Rename 'cpu_state' -> 'cpu'

2023-06-22 Thread Richard Henderson
On 6/22/23 18:08, Philippe Mathieu-Daudé wrote: Most of the codebase uses 'CPUState *cpu' or 'CPUState *cs'. While 'cpu_state' is kind of explicit, it makes the code harder to review. Simply rename as 'cpu' like the rest. Signed-off-by: Philippe Mathieu-Daudé I would have chosen 'cs', since '

Re: [PATCH v2 12/16] accel: Remove WHPX unreachable error path

2023-06-22 Thread Richard Henderson
On 6/22/23 18:08, Philippe Mathieu-Daudé wrote: g_new0() can not fail. Remove the unreachable error path. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Reported-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- targe

Re: [PATCH v2 09/16] accel: Remove NVMM unreachable error path

2023-06-22 Thread Richard Henderson
On 6/22/23 18:08, Philippe Mathieu-Daudé wrote: g_malloc0() can not fail. Remove the unreachable error path. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 4 --

Re: [PATCH v2 07/16] accel: Rename HAX 'struct hax_vcpu_state' -> AccelCPUState

2023-06-22 Thread Richard Henderson
On 6/22/23 18:08, Philippe Mathieu-Daudé wrote: |+ struct AccelvCPUState *accel;| ... +typedef struct AccelCPUState { hax_fd fd; int vcpu_id; struct hax_tunnel *tunnel; unsigned char *iobuf; -}; +} hax_vcpu_state; Discussed face to face, but for the record: Put the typed

[PATCH v4 0/4] Prevent attempting updates known to fail

2023-06-22 Thread Alejandro Vallejo
v4: * The refactor Andrew asked for to avoid a conditional check on early_microcode_init(). I'm not convinced it's clearer, but it's not much more complicated either, so I don't mind. * Removed microcode_ops builders in favour of a separate Intel-specific function to check whether t

[PATCH v4 2/4] x86/microcode: Ignore microcode loading interface for revision = -1

2023-06-22 Thread Alejandro Vallejo
Some hypervisors report ~0 as the microcode revision to mean "don't issue microcode updates". Ignore the microcode loading interface in that case. Signed-off-by: Alejandro Vallejo Reviewed-by: Jan Beulich --- v4: * Stop piggybacking on the existing early exit --- xen/arch/x86/cpu/microcode/co

[PATCH v4 4/4] x86/microcode: Disable microcode update handler if DIS_MCU_UPDATE is set

2023-06-22 Thread Alejandro Vallejo
If IA32_MSR_MCU_CONTROL exists then it's possible a CPU may be unable to perform microcode updates. This is controlled through the DIS_MCU_LOAD bit and is intended for baremetal clouds where the owner may not trust the tenant to choose the microcode version in use. If we notice that bit being set t

[PATCH v4 3/4] x86: Read MSR_ARCH_CAPS immediately after early_microcode_init()

2023-06-22 Thread Alejandro Vallejo
Move MSR_ARCH_CAPS read code from tsx_init() to early_cpu_init(). Because microcode updates might make them that MSR to appear/have different values we also must reload it after a microcode update in early_microcode_init(). Signed-off-by: Alejandro Vallejo --- v4: * Read MSR_ARCH_CAPS in early_

[PATCH v4 1/4] x86/microcode: Allow reading microcode revision even if it can't be updated

2023-06-22 Thread Alejandro Vallejo
microcode_update_one() currently assumes all microcode handlers are set or none are. That won't be the case in a future patch, as apply_microcode() may not be set while the others are. Hence, this patch allows reading the microcode revision even if updating it is unavailable. Signed-off-by: Alejan

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

2023-06-22 Thread Jason Andryuk
On Thu, Jun 22, 2023 at 11:31 AM Anthony PERARD wrote: > > Patch series available in this git branch: > https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git > br.build-exported-shell-command-value-v2 > > v2: > - new patches removing TARGET_SUBARCH and TARGET_ARCH. > - style change in

Re: [PATCH v2 05/16] accel: Destroy HAX vCPU threads once done

2023-06-22 Thread Richard Henderson
On 6/22/23 18:08, Philippe Mathieu-Daudé wrote: When the vCPU thread finished its processing, destroy it and signal its destruction to generic vCPU management layer. Add a sanity check for the vCPU accelerator context. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hax/hax-accel-ops.c

Re: [PATCH] Updates to Xen hypercall preemption

2023-06-22 Thread Juergen Gross
On 22.06.23 18:39, Andy Lutomirski wrote: On Thu, Jun 22, 2023, at 3:33 AM, Juergen Gross wrote: On 22.06.23 10:26, Peter Zijlstra wrote: On Thu, Jun 22, 2023 at 07:22:53AM +0200, Juergen Gross wrote: The hypercalls we are talking of are synchronous ones. They are running in the context of th

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

2023-06-22 Thread Julien Grall
Hi, On 22/06/2023 17:05, Shawn Anastasio wrote: On 6/21/23 3:48 PM, Julien Grall wrote: On 21/06/2023 17:59, Shawn Anastasio wrote: diff --git a/xen/arch/ppc/boot-of.c b/xen/arch/ppc/boot-of.c new file mode 100644 index 00..1ceeaf1250 --- /dev/null +++ b/xen/arch/ppc/boot-of.c @@ -0,0

Re: [PATCH] Updates to Xen hypercall preemption

2023-06-22 Thread Andy Lutomirski
On Thu, Jun 22, 2023, at 3:33 AM, Juergen Gross wrote: > On 22.06.23 10:26, Peter Zijlstra wrote: >> On Thu, Jun 22, 2023 at 07:22:53AM +0200, Juergen Gross wrote: >> >>> The hypercalls we are talking of are synchronous ones. They are running >>> in the context of the vcpu doing the call (like a s

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-22 Thread Julien Grall
Hi, On 22/06/2023 16:41, Ayan Kumar Halder wrote: On 22/06/2023 10:22, Julien Grall wrote: Hi Ayan, Hi Julien, On 22/06/2023 09:59, Ayan Kumar Halder wrote: On 20/06/2023 21:43, Julien Grall wrote: Hi Ayan, Hi Julien, On 20/06/2023 19:28, Ayan Kumar Halder wrote: On 20/06/2023 17:41

[PATCH v2 12/16] accel: Remove WHPX unreachable error path

2023-06-22 Thread Philippe Mathieu-Daudé
g_new0() can not fail. Remove the unreachable error path. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Reported-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-all.c | 6 -- 1 file changed,

[PATCH v2 11/16] accel: Inline NVMM get_qemu_vcpu()

2023-06-22 Thread Philippe Mathieu-Daudé
No need for this helper to access the CPUState::accel field. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 28 +++- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/target/i386/nvmm/nvmm-all.c b/targ

[PATCH v2 13/16] accel: Rename WHPX 'struct whpx_vcpu' -> AccelCPUState

2023-06-22 Thread Philippe Mathieu-Daudé
We want all accelerators to share the same opaque pointer in CPUState. Rename WHPX 'whpx_vcpu' as 'AccelCPUState'; use the typedef. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/i386/whpx/whpx-all.c | 32 1 file changed, 16 inse

[PATCH v2 16/16] accel: Rename HVF 'struct hvf_vcpu_state' -> AccelCPUState

2023-06-22 Thread Philippe Mathieu-Daudé
We want all accelerators to share the same opaque pointer in CPUState. Rename the 'hvf_vcpu_state' structure as 'AccelCPUState'. Use the generic 'accel' field of CPUState instead of 'hvf'. Replace g_malloc0() by g_new0() for readability. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richa

[PATCH v2 08/16] accel: Move HAX hThread to accelerator context

2023-06-22 Thread Philippe Mathieu-Daudé
hThread variable is only used by the HAX accelerator, so move it to the accelerator specific context. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/core/cpu.h | 1 - target/i386/hax/hax-i386.h | 3 +++ target/i386/hax/hax-accel-ops.c | 2 +-

[PATCH v2 15/16] accel: Rename 'cpu_state' -> 'cpu'

2023-06-22 Thread Philippe Mathieu-Daudé
Most of the codebase uses 'CPUState *cpu' or 'CPUState *cs'. While 'cpu_state' is kind of explicit, it makes the code harder to review. Simply rename as 'cpu' like the rest. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hvf/x86hvf.h | 12 +- target/i386/hvf/x86hvf.c | 356 ++

[PATCH v2 10/16] accel: Rename NVMM 'struct qemu_vcpu' -> AccelCPUState

2023-06-22 Thread Philippe Mathieu-Daudé
We want all accelerators to share the same opaque pointer in CPUState. Rename NVMM 'qemu_vcpu' as 'AccelCPUState'; directly use the typedef, remove unnecessary casts. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 34 +-

[PATCH v2 14/16] accel: Inline WHPX get_whpx_vcpu()

2023-06-22 Thread Philippe Mathieu-Daudé
No need for this helper to access the CPUState::accel field. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-all.c | 29 ++--- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/target/i386/whpx/whpx-all.c b/tar

[PATCH v2 09/16] accel: Remove NVMM unreachable error path

2023-06-22 Thread Philippe Mathieu-Daudé
g_malloc0() can not fail. Remove the unreachable error path. https://developer-old.gnome.org/glib/stable/glib-Memory-Allocation.html#glib-Memory-Allocation.description Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-all.c | 4 1 file changed, 4 deletions(-) diff --git a/ta

[PATCH v2 07/16] accel: Rename HAX 'struct hax_vcpu_state' -> AccelCPUState

2023-06-22 Thread Philippe Mathieu-Daudé
We want all accelerators to share the same opaque pointer in CPUState. Start with the HAX context, renaming its forward declarated structure 'hax_vcpu_state' as 'AccelCPUState'. Directly use the typedef. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 5 ++--- target/i

[PATCH v2 06/16] accel: Rename 'hax_vcpu' as 'accel' in CPUState

2023-06-22 Thread Philippe Mathieu-Daudé
All accelerators will share a single opaque context in CPUState. Start by renaming 'hax_vcpu' as 'accel'. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 2 +- target/i386/hax/hax-accel-ops.c | 2 +- target/i386/hax/hax-all.c |

[PATCH v2 05/16] accel: Destroy HAX vCPU threads once done

2023-06-22 Thread Philippe Mathieu-Daudé
When the vCPU thread finished its processing, destroy it and signal its destruction to generic vCPU management layer. Add a sanity check for the vCPU accelerator context. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/hax/hax-accel-ops.c | 3 +++ target/i386/hax/hax-all.c | 1 + 2

[PATCH v2 04/16] accel: Fix a leak on Windows HAX

2023-06-22 Thread Philippe Mathieu-Daudé
hThread is only used on the error path in hax_kick_vcpu_thread(). Fixes: b0cb0a66d6 ("Plumb the HAXM-based hardware acceleration support") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- target/i386/hax/hax-all.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ta

[PATCH v2 03/16] accel: Remove unused hThread variable on TCG/WHPX

2023-06-22 Thread Philippe Mathieu-Daudé
On Windows hosts, cpu->hThread is assigned but never accessed: remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- accel/tcg/tcg-accel-ops-mttcg.c | 4 accel/tcg/tcg-accel-ops-rr.c | 3 --- target/i386/whpx/whpx-accel-ops.c | 3 --- 3 files changed, 1

[PATCH v2 02/16] accel: Document generic accelerator headers

2023-06-22 Thread Philippe Mathieu-Daudé
These headers are meant to be include by any file to check the availability of accelerators, thus are not accelerator specific. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Richard Henderson --- include/sysemu/hax.h | 2 ++ include/sysemu/kvm.h | 2 ++ include/sysemu/nvmm.h | 2 ++ include

[PATCH v2 01/16] MAINTAINERS: Update Roman Bolshakov email address

2023-06-22 Thread Philippe Mathieu-Daudé
r.bolsha...@yadro.com is bouncing: Update Roman's email address using one found somewhere on the Internet; this way he can Ack-by. (Reorder Taylor's line to keep the section sorted alphabetically). Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 4 ++-- .mailmap| 3 ++- 2 files chan

[PATCH v2 00/16] accel: Share CPUState accel context (HAX/NVMM/WHPX/HVF)

2023-06-22 Thread Philippe Mathieu-Daudé
This series is part of the single binary effort. All accelerator will share their per-vCPU context in an opaque 'accel' pointer within the CPUState. First handle HAX/NVMM/WHPX/HVF. KVM and TCG will follow as two different (bigger) follow-up series. Since v1: - Addressed rth's review comments - A

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

2023-06-22 Thread Shawn Anastasio
On 6/21/23 3:48 PM, Julien Grall wrote: > Hi Shawn, > > Below some remark about the coding style. I will try to spot all of them > so please go through your code and check if my comments applies in other > places. Thank you for the detailed comments. I had a couple of follow-up questions for you.

Re: [PATCH v2 1/2] x86/boot: Clear XD_DISABLE from the early boot path

2023-06-22 Thread Alejandro Vallejo
On Thu, Jun 22, 2023 at 09:54:01AM +0200, Jan Beulich wrote: > On 21.06.2023 18:43, Alejandro Vallejo wrote: > > Sure, to everything before this > > > >>> diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c > >>> index 168cd58f36..46b0cd8dbb 100644 > >>> --- a/xen/arch/x86/cpu/intel.c

Re: [PATCH v1] xen/arm: arm32: Add support to identify the Cortex-R52 processor

2023-06-22 Thread Ayan Kumar Halder
On 22/06/2023 10:22, Julien Grall wrote: Hi Ayan, Hi Julien, On 22/06/2023 09:59, Ayan Kumar Halder wrote: On 20/06/2023 21:43, Julien Grall wrote: Hi Ayan, Hi Julien, On 20/06/2023 19:28, Ayan Kumar Halder wrote: On 20/06/2023 17:41, Julien Grall wrote: Hi, Hi Julien, On 20/06/2

[XEN PATCH v2 5/5] Config.mk: evaluate XEN_COMPILE_ARCH and XEN_OS on first use

2023-06-22 Thread Anthony PERARD
With GNU make 4.4, the number of execution of the command present in these $(shell ) increased greatly. This is probably because as of make 4.4, exported variable are also added to the environment of $(shell ) construct. So, to avoid having these command been run more than necessery, we will use a

[XEN PATCH v2 4/5] build: evaluate XEN_BUILD_* and XEN_DOMAIN on first use

2023-06-22 Thread Anthony PERARD
With GNU make 4.4, the number of execution of the command present in these $(shell ) increased greatly. This is probably because as of make 4.4, exported variable are also added to the environment of $(shell ) construct. Also, `make -d` shows a lot of these: Makefile:15: not recursively expand

[XEN PATCH v2 3/5] build: remove TARGET_ARCH, a duplicates of SRCARCH

2023-06-22 Thread Anthony PERARD
The same command is used to generate the value of both $(TARGET_ARCH) and $(SRCARCH), as $(ARCH) is an alias for $(XEN_TARGET_ARCH). Signed-off-by: Anthony PERARD --- Notes: v2: - new patch xen/Makefile | 18 +++--- xen/Rules.mk | 2 +- xen/arch/riscv/a

[XEN PATCH v2 2/5] build: remove TARGET_SUBARCH, a duplicate of ARCH

2023-06-22 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Notes: v2: - new patch xen/Makefile | 3 +-- xen/build.mk | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/Makefile b/xen/Makefile index 78d176f04e..bc639a1f80 100644 --- a/xen/Makefile +++ b/xen/Makefile @@ -234,7 +234,7 @@ in

[XEN PATCH v2 1/5] build: define ARCH and SRCARCH later

2023-06-22 Thread Anthony PERARD
Defining ARCH and SRCARCH later in xen/Makefile allows to switch to immediate evaluation variable type. ARCH and SRCARCH depends on value defined in Config.mk and aren't used TARGET_SUBARCH or TARGET_ARCH, and not before it's needed in a sub-make or a rule. This will help reduce the number of tim

[XEN PATCH v2 0/5] build: reduce number of $(shell) execution on make 4.4

2023-06-22 Thread Anthony PERARD
Patch series available in this git branch: https://xenbits.xen.org/git-http/people/aperard/xen-unstable.git br.build-exported-shell-command-value-v2 v2: - new patches removing TARGET_SUBARCH and TARGET_ARCH. - style change in first patch With GNU make 4.4, the number of execution of the command

Re: [PATCH v3 4/5] x86: Read MSR_ARCH_CAPS immediately after early_microcode_init()

2023-06-22 Thread Jan Beulich
On 22.06.2023 16:55, Alejandro Vallejo wrote: > On Mon, Jun 19, 2023 at 05:57:14PM +0200, Jan Beulich wrote: >>> +if ( boot_cpu_data.cpuid_level >= 7 ) >>> +boot_cpu_data.x86_capability[FEATURESET_7d0] >>> += cpuid_count_edx(7, 0); >> >> I take it we assume the maximum CPUID

Re: [PATCH v3 5/5] x86/microcode: Disable microcode update handler if DIS_MCU_UPDATE is set

2023-06-22 Thread Alejandro Vallejo
On Tue, Jun 20, 2023 at 11:51:00AM +0200, Jan Beulich wrote: > On 15.06.2023 17:48, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/cpu/common.c > > +++ b/xen/arch/x86/cpu/common.c > > @@ -352,6 +352,11 @@ void __init early_cpu_init(void) > > &c->x86_capability[FEATURESET_7c

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

2023-06-22 Thread Shawn Anastasio
On 6/22/23 3:03 AM, Jan Beulich wrote: > On 21.06.2023 20:21, Shawn Anastasio wrote: >> On 6/21/23 12:54 PM, Andrew Cooper wrote: >>> Given: >>> >>> #define r0 0 >>> >>> do the assemblers really not understand register names? That seems mad. >> >> Yeah as surprising as it is, ppc64 assemblers don

Re: [PATCH v3 4/5] x86: Read MSR_ARCH_CAPS immediately after early_microcode_init()

2023-06-22 Thread Alejandro Vallejo
On Mon, Jun 19, 2023 at 05:57:14PM +0200, Jan Beulich wrote: > > + * We might have exposed MSR_ARCH_CAPS after the microcode update. > > I'm struggling a little with this sentence, but not being a native speaker > it may be me, not the sentence. I would perhaps have said "MSR_ARCH_CAPS > may h

[qemu-mainline test] 181549: regressions - FAIL

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

Re: [PATCH v3 2/5] x86/microcode: Create per-vendor microcode_ops builders

2023-06-22 Thread Alejandro Vallejo
On Mon, Jun 19, 2023 at 05:45:14PM +0200, Jan Beulich wrote: > On 15.06.2023 17:48, Alejandro Vallejo wrote: > > --- a/xen/arch/x86/cpu/microcode/amd.c > > +++ b/xen/arch/x86/cpu/microcode/amd.c > > @@ -432,9 +432,13 @@ static struct microcode_patch *cf_check > > cpu_request_microcode( > > re

  1   2   >