Re: [PATCH v3 10/16] tools/libs/store: use xen_list.h instead of xenstore/list.h

2023-06-12 Thread Juergen Gross
On 09.06.23 20:09, Julien Grall wrote: Hi Juergen, On 30/05/2023 09:54, Juergen Gross wrote: Replace the usage of the xenstore private list.h header with the common xen_list.h one. Signed-off-by: Juergen Gross --- V3: - new patch ---   tools/libs/store/xs.c | 56 +-

Re: [PATCH v1 2/8] xen/riscv: add .sbss section to .bss

2023-06-12 Thread Jan Beulich
On 06.06.2023 21:55, Oleksii Kurochko wrote: > Sometimes variables are located in .sbss section but it won't > be mapped after MMU will be enabled. > To avoid MMU failures .sbss should be mapped > > Signed-off-by: Oleksii Kurochko > --- > xen/arch/riscv/xen.lds.S | 2 +- > 1 file changed, 1 inse

Re: [PATCH v1 1/8] xen/riscv: make sure that identity mapping isn't bigger then page size

2023-06-12 Thread Jan Beulich
On 06.06.2023 21:55, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko Such commits without description are worrying. This may be okay for entirely trivial and obvious changes, but that's going to be the exception. > --- a/xen/arch/riscv/xen.lds.S > +++ b/xen/arch/riscv/xen.lds.S > @@ -2

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

2023-06-12 Thread Jan Beulich
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? If so, in which way (which is relevant to determine whether the new

Re: [PATCH v1 4/8] xen/riscv: introduce function for physical offset calculation

2023-06-12 Thread Jan Beulich
On 06.06.2023 21:55, Oleksii Kurochko wrote: > The function was introduced to not calculate and save physical > offset before MMU is enabled because access to start() is > PC-relative and in case of linker_addr != load_addr it will result > in incorrect value in phys_offset. "... to _not_ calculat

Re: [PATCH v2] docs/misra: new rules addition

2023-06-12 Thread Jan Beulich
On 09.06.2023 19:45, Stefano Stabellini wrote: > @@ -133,6 +146,13 @@ existing codebase are work-in-progress. > headers (xen/include/public/) are allowed to retain longer > identifiers for backward compatibility. > > + * - `Rule 6.1 >

[qemu-mainline test] 181388: regressions - FAIL

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

Re: [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling

2023-06-12 Thread Juergen Gross
On 09.06.23 17:38, Juergen Gross wrote: On 07.06.23 15:12, Christoph Hellwig wrote: On Mon, May 22, 2023 at 10:37:09AM +0200, Juergen Gross wrote: In normal cases PCI passthrough in PV guests requires to start the guest with e820_host=1. So it should be rather easy to limit allocating the 64MB

Re: [PATCH v2 13/16] xen-blkback: Implement diskseq checks

2023-06-12 Thread Roger Pau Monné
On Fri, Jun 09, 2023 at 12:55:39PM -0400, Demi Marie Obenour wrote: > On Fri, Jun 09, 2023 at 05:13:45PM +0200, Roger Pau Monné wrote: > > On Thu, Jun 08, 2023 at 11:33:26AM -0400, Demi Marie Obenour wrote: > > > On Thu, Jun 08, 2023 at 10:29:18AM +0200, Roger Pau Monné wrote: > > > > On Wed, Jun 0

Re: [PATCH 2/4] x86: always initialize xen-swiotlb when xen-pcifront is enabling

2023-06-12 Thread Christoph Hellwig
Thank you. I'll queue it up as a separate patch.

Re: [PATCH] docs/misra: new rules addition

2023-06-12 Thread Roberto Bagnara
On 09/06/23 10:46, Jan Beulich wrote: On 08.06.2023 13:02, Roberto Bagnara wrote: On 07/06/23 23:53, Stefano Stabellini wrote: On Wed, 7 Jun 2023, Jan Beulich wrote: + * - `Rule 5.6 `_ + - Required +

[xen-unstable test] 181385: tolerable FAIL

2023-06-12 Thread osstest service owner
flight 181385 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/181385/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-debianhvm-i386-xsm 12 debian-hvm-install fail in 181373 pass in 181385 test-amd64-amd

Re: [PATCH] docs/misra: new rules addition

2023-06-12 Thread Jan Beulich
On 12.06.2023 10:58, Roberto Bagnara wrote: > On 09/06/23 10:46, Jan Beulich wrote: >> On 08.06.2023 13:02, Roberto Bagnara wrote: >>> On 07/06/23 23:53, Stefano Stabellini wrote: On Wed, 7 Jun 2023, Jan Beulich wrote: >> + * - `Rule 5.6 >>

Re: [PATCH v2] docs/misra: new rules addition

2023-06-12 Thread Roberto Bagnara
On 12/06/23 09:33, Jan Beulich wrote: On 09.06.2023 19:45, Stefano Stabellini wrote: @@ -133,6 +146,13 @@ existing codebase are work-in-progress. headers (xen/include/public/) are allowed to retain longer identifiers for backward compatibility. + * - `Rule 6.1

Re: [PATCH v2] docs/misra: new rules addition

2023-06-12 Thread Jan Beulich
On 12.06.2023 11:34, Roberto Bagnara wrote: > On 12/06/23 09:33, Jan Beulich wrote: >> On 09.06.2023 19:45, Stefano Stabellini wrote: >>> @@ -143,6 +163,12 @@ existing codebase are work-in-progress. >>>- Octal constants shall not be used >>>- >>> >>> + * - `Rule 7.2 >>>

[PATCH] tools/xenstored: Correct the prototype of domain_max_chk()

2023-06-12 Thread Julien Grall
From: Julien Grall Some version of GCC will complain because the prototype and the declaration of domain_max_chk() don't match: xenstored_domain.c:1503:6: error: conflicting types for 'domain_max_chk' due to enum/integer mismatch; have '_Bool(const struct connection *, enum accitem, unsigned

Re: [PATCH] tools/xenstored: Correct the prototype of domain_max_chk()

2023-06-12 Thread Juergen Gross
On 12.06.23 12:13, Julien Grall wrote: From: Julien Grall Some version of GCC will complain because the prototype and the declaration of domain_max_chk() don't match: xenstored_domain.c:1503:6: error: conflicting types for 'domain_max_chk' due to enum/integer mismatch; have '_Bool(const struc

Re: [PATCH v3 10/16] tools/libs/store: use xen_list.h instead of xenstore/list.h

2023-06-12 Thread Julien Grall
Hi, On 12/06/2023 08:02, Juergen Gross wrote: On 09.06.23 20:09, Julien Grall wrote: Hi Juergen, On 30/05/2023 09:54, Juergen Gross wrote: Replace the usage of the xenstore private list.h header with the common xen_list.h one. Signed-off-by: Juergen Gross --- V3: - new patch ---   tools/lib

Re: [PATCH v3 10/16] tools/libs/store: use xen_list.h instead of xenstore/list.h

2023-06-12 Thread Juergen Gross
On 12.06.23 12:34, Julien Grall wrote: Hi, On 12/06/2023 08:02, Juergen Gross wrote: On 09.06.23 20:09, Julien Grall wrote: Hi Juergen, On 30/05/2023 09:54, Juergen Gross wrote: Replace the usage of the xenstore private list.h header with the common xen_list.h one. Signed-off-by: Juergen Gr

Re: [PATCH] xen/arm: rename guest_cpuinfo in domain_cpuinfo

2023-06-12 Thread Julien Grall
Hi Bertrand, On 09/06/2023 14:13, Bertrand Marquis wrote: Rename the guest_cpuinfo structure to domain_cpuinfo as it is not only used for guests but also for dom0 so domain is a more suitable name. While there also rename the create_guest_cpuinfo function to create_domain_cpuinfo to be coherent

Re: [PATCH v3 10/16] tools/libs/store: use xen_list.h instead of xenstore/list.h

2023-06-12 Thread Julien Grall
On 12/06/2023 11:37, Juergen Gross wrote: On 12.06.23 12:34, Julien Grall wrote: Hi, On 12/06/2023 08:02, Juergen Gross wrote: On 09.06.23 20:09, Julien Grall wrote: Hi Juergen, On 30/05/2023 09:54, Juergen Gross wrote: Replace the usage of the xenstore private list.h header with the com

Re: [PATCH v1] tools: fix make rpmball

2023-06-12 Thread Anthony PERARD
On Tue, May 30, 2023 at 01:18:07PM +0200, Olaf Hering wrote: > Commit 438c5ffa44e99cceb574c0f9946aacacdedd2952 ("rpmball: Adjust to > new rpm, do not require --force") attempted to handle stricter > directory permissions in newer distributions. > > This introduced a few issues: > - /boot used to b

Re: [PATCH v3 2/4] vsscanf(): Integer overflow is a conversion failure

2023-06-12 Thread Rasmus Villemoes
On 10/06/2023 22.40, Demi Marie Obenour wrote: > sscanf() and friends currently ignore integer overflow, but this is a > bad idea. It is much better to detect integer overflow errors and > consider this a conversion failure. Perhaps. And maybe I even agree. But not like this: > while (*fmt

Re: New Defects reported by Coverity Scan for XenProject

2023-06-12 Thread Jan Beulich
On 11.06.2023 12:07, scan-ad...@coverity.com wrote: > *** CID 1532324: Memory - corruptions (OVERRUN) > /xen/common/trace.c: 800 in __trace_var() > 794 } > 795 > 796 if ( rec_size > bytes_to_wrap ) > 797 insert_wrap_record(buf, rec_size); > 798 > 799

Re: New Defects reported by Coverity Scan for XenProject

2023-06-12 Thread Andrew Cooper
On 12/06/2023 11:54 am, Jan Beulich wrote: > On 11.06.2023 12:07, scan-ad...@coverity.com wrote: >> *** CID 1532318: Memory - corruptions (OVERLAPPING_COPY) >> /tools/firmware/xen-dir/xen-root/xen/arch/x86/x86_emulate/x86_emulate.c: >> 1987 in x86_emulate() >> 1981 dst.val = *dst.re

Re: [PATCH v3 3/4] vsscanf(): do not skip spaces

2023-06-12 Thread Rasmus Villemoes
On 10/06/2023 22.40, Demi Marie Obenour wrote: > Passing spaces before e.g. an integer is usually > not intended. Maybe, maybe not. But it's mandated by POSIX/C99. And of course we are free to ignore that and implement our own semantics (though within the constraints that we really want -Wformat

RE: [PATCH v3 3/4] vsscanf(): do not skip spaces

2023-06-12 Thread David Laight
From: Demi Marie Obenour > Sent: 10 June 2023 21:41 > > Passing spaces before e.g. an integer is usually > not intended. This was suggested by Christoph in > https://lore.kernel.org/lkml/ziqrohcizoj4b...@infradead.org/. This is contrary to libc scanf and could easily affect userspace writing fix

Re: [XEN][PATCH v7 17/19] tools/libs/ctrl: Implement new xc interfaces for dt overlay

2023-06-12 Thread Anthony PERARD
On Thu, Jun 01, 2023 at 05:48:22PM -0700, Vikram Garhwal wrote: > --- /dev/null > +++ b/tools/libs/ctrl/xc_dt_overlay.c > +int xc_dt_overlay(xc_interface *xch, void *overlay_fdt, > + uint32_t overlay_fdt_size, uint8_t overlay_op) > +{ > +int err; > +DECLARE_SYSCTL; > + > +

Re: [PATCH v1] tools: fix make rpmball

2023-06-12 Thread Olaf Hering
Mon, 12 Jun 2023 11:40:55 +0100 Anthony PERARD : > On Tue, May 30, 2023 at 01:18:07PM +0200, Olaf Hering wrote: > > +pushd %buildroot > > +popd > Are these 2 lines left over from testing? They don't appear to do > anything useful. I think the intention was to test if mkdir succeeded. But then i

[PATCH 0/5] tools: address Coverity UNUSED issues

2023-06-12 Thread Jan Beulich
There a number of cases where Coverity has spotted writes to variables when the written values wouldn't be used subsequently. The patches here are independent of one another, except for this common theme. 1: xen-mfndump: drop dead assignment to "page" from lookup_pte_func() 2: libxl: drop dead ass

Re: [PATCH v1] tools: fix make rpmball

2023-06-12 Thread Jan Beulich
On 12.06.2023 13:35, Olaf Hering wrote: > Mon, 12 Jun 2023 11:40:55 +0100 Anthony PERARD : > >> On Tue, May 30, 2023 at 01:18:07PM +0200, Olaf Hering wrote: >>> +pushd %buildroot >>> +popd >> Are these 2 lines left over from testing? They don't appear to do >> anything useful. > > I think the i

Re: [PATCH v3 1/4] limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN

2023-06-12 Thread Lee Jones
On Sat, 10 Jun 2023, Demi Marie Obenour wrote: > Some drivers already defined these, and they will be used by sscanf() > for overflow checks later. Also add SSIZE_MIN to limits.h, which will > also be needed later. > > Signed-off-by: Demi Marie Obenour > --- > .../media/atomisp/pci/hive_isp_cs

[PATCH 1/5] xen-mfndump: drop dead assignment to "page" from lookup_pte_func()

2023-06-12 Thread Jan Beulich
The variable isn't used past the loop, and its value also isn't meaningful across iterations. Reduce its scope to make this more obvious. Coverity ID: 1532310 Fixes: ae763e422430 ("tools/misc: introduce xen-mfndump") Signed-off-by: Jan Beulich --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-

[PATCH 2/5] libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()

2023-06-12 Thread Jan Beulich
The variable needs to be properly set only on the error paths. Coverity ID: 1532311 Fixes: ab4440112bec ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl") Signed-off-by: Jan Beulich --- If XSM is disabled, is it really useful to issue the 2nd and 3rd calls if the 1st yielded ENOS

[PATCH 3/5] libxg: drop dead assignment to "ptes" from xc_core_arch_map_p2m_list_rw()

2023-06-12 Thread Jan Beulich
The function returns immediately after the enclosing if(). Coverity ID: 1532314 Fixes: bd7a29c3d0b9 ("tools/libs/ctrl: fix xc_core_arch_map_p2m() to support linear p2m table") Signed-off-by: Jan Beulich --- a/tools/libs/guest/xg_core_x86.c +++ b/tools/libs/guest/xg_core_x86.c @@ -210,7 +210,6 @

[PATCH 4/5] libxg: drop dead assignment to "rc" from xc_cpuid_apply_policy()

2023-06-12 Thread Jan Beulich
"rc" is written immediately below the outer if(). Fold the remaining two if()s. Coverity ID: 1532320 Fixes: 685e922d6f30 ("tools/libxc: Rework xc_cpuid_apply_policy() to use {get,set}_cpu_policy()") Signed-off-by: Jan Beulich --- The code in question was subsequently moved by 54463aa79dac ("x86/

[PATCH 5/5] libxl: drop dead assignment to transaction variable from libxl__domain_make()

2023-06-12 Thread Jan Beulich
"t" is written first thing at the "retry_transaction" label. Coverity ID: 1532321 Fixes: 1057300109ea ("libxl: fix error handling (xenstore transaction leak) in libxl__domain_make") Signed-off-by: Jan Beulich --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -909,10

Re: [PATCH v1] tools: fix make rpmball

2023-06-12 Thread Olaf Hering
Mon, 12 Jun 2023 13:44:34 +0200 Jan Beulich : > On 12.06.2023 13:35, Olaf Hering wrote: > > I will send v2 without these two lines. > I'd be fine dropping them while committing. Another cosmetic change in such v2 would be the usage of | instead of @ in the last sed call, for consistency with th

Re: [PATCH v1] tools: fix make rpmball

2023-06-12 Thread Jan Beulich
On 12.06.2023 13:52, Olaf Hering wrote: > Mon, 12 Jun 2023 13:44:34 +0200 Jan Beulich : > >> On 12.06.2023 13:35, Olaf Hering wrote: >>> I will send v2 without these two lines. >> I'd be fine dropping them while committing. > > Another cosmetic change in such v2 would be the usage of | instead

Re: [PATCH] xen/arm: rename guest_cpuinfo in domain_cpuinfo

2023-06-12 Thread Bertrand Marquis
Hi Julien, > On 12 Jun 2023, at 12:38, Julien Grall wrote: > > Hi Bertrand, > > On 09/06/2023 14:13, Bertrand Marquis wrote: >> Rename the guest_cpuinfo structure to domain_cpuinfo as it is not only >> used for guests but also for dom0 so domain is a more suitable name. >> While there also rena

Re: [PATCH 2/5] libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()

2023-06-12 Thread Juergen Gross
On 12.06.23 13:46, Jan Beulich wrote: The variable needs to be properly set only on the error paths. Coverity ID: 1532311 Fixes: ab4440112bec ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross --- If XSM is disabled, is

Re: [PATCH 3/5] libxg: drop dead assignment to "ptes" from xc_core_arch_map_p2m_list_rw()

2023-06-12 Thread Juergen Gross
On 12.06.23 13:46, Jan Beulich wrote: The function returns immediately after the enclosing if(). Coverity ID: 1532314 Fixes: bd7a29c3d0b9 ("tools/libs/ctrl: fix xc_core_arch_map_p2m() to support linear p2m table") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Juergen OpenPGP_0x

Re: [PATCH 4/5] libxg: drop dead assignment to "rc" from xc_cpuid_apply_policy()

2023-06-12 Thread Juergen Gross
On 12.06.23 13:47, Jan Beulich wrote: "rc" is written immediately below the outer if(). Fold the remaining two if()s. Coverity ID: 1532320 Fixes: 685e922d6f30 ("tools/libxc: Rework xc_cpuid_apply_policy() to use {get,set}_cpu_policy()") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross

Re: [PATCH 5/5] libxl: drop dead assignment to transaction variable from libxl__domain_make()

2023-06-12 Thread Juergen Gross
On 12.06.23 13:47, Jan Beulich wrote: "t" is written first thing at the "retry_transaction" label. Coverity ID: 1532321 Fixes: 1057300109ea ("libxl: fix error handling (xenstore transaction leak) in libxl__domain_make") Signed-off-by: Jan Beulich Reviewed-by: Juergen Gross Juergen Open

Re: [QEMU PATCH 1/1] virtgpu: do not destroy resources when guest suspend

2023-06-12 Thread Marc-André Lureau
Hi On Thu, Jun 8, 2023 at 6:26 AM Jiqian Chen wrote: > After suspending and resuming guest VM, you will get > a black screen, and the display can't come back. > > This is because when guest did suspending, it called > into qemu to call virtio_gpu_gl_reset. In function > virtio_gpu_gl_reset, it d

Re: [PATCH 1/5] xen-mfndump: drop dead assignment to "page" from lookup_pte_func()

2023-06-12 Thread Jason Andryuk
On Mon, Jun 12, 2023 at 7:45 AM Jan Beulich wrote: > > The variable isn't used past the loop, and its value also isn't > meaningful across iterations. Reduce its scope to make this more > obvious. > > Coverity ID: 1532310 > Fixes: ae763e422430 ("tools/misc: introduce xen-mfndump") > Signed-off-by:

[PATCH v2] xen/arm: rename guest_cpuinfo in domain_cpuinfo

2023-06-12 Thread Bertrand Marquis
Rename the guest_cpuinfo structure to domain_cpuinfo as it is not only used for guests but also for dom0 so domain is a more suitable name. While there also rename the create_guest_cpuinfo function to create_domain_cpuinfo to be coherent and fix comments accordingly. Signed-off-by: Bertrand Marqu

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

2023-06-12 Thread Jan Beulich
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 > used. I don't think this is sufficient as a description. You wa

[qemu-mainline test] 181389: regressions - FAIL

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

Re: [PATCH V3 1/3] libxl: virtio: Remove unused frontend nodes

2023-06-12 Thread Anthony PERARD
On Fri, Jun 02, 2023 at 11:19:07AM +0530, Viresh Kumar wrote: > Only the VirtIO backend will watch xenstore to find out when a new > instance needs to be created for a guest, and read the parameters from > there. VirtIO frontend are only virtio, so they will not do anything > with the xenstore node

Re: [PATCH V3 2/3] libxl: Call libxl__virtio_devtype.set_default() early enough

2023-06-12 Thread Anthony PERARD
On Fri, Jun 02, 2023 at 11:19:08AM +0530, Viresh Kumar wrote: > The _setdefault() function for virtio devices is getting called after > libxl__prepare_dtb(), which is late as libxl__prepare_dtb() expects the > defaults to be already set by this time. > > Call libxl__virtio_devtype.set_default() fr

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

2023-06-12 Thread Jan Beulich
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 >> + * mapping so it will cause an issue after MMU will be enabled. >> +

[PATCH 2/3] x86: always initialize xen-swiotlb when xen-pcifront is enabling

2023-06-12 Thread Christoph Hellwig
Remove the dangerous late initialization of xen-swiotlb in pci_xen_swiotlb_init_late and instead just always initialize xen-swiotlb in the boot code if CONFIG_XEN_PCIDEV_FRONTEND is enabled and Xen PV PCI is possible. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/xen/swiotlb-xen.h |

[PATCH 1/3] xen/pci: add flag for PCI passthrough being possible

2023-06-12 Thread Christoph Hellwig
From: Juergen Gross When running as a Xen PV guests passed through PCI devices only have a chance to work if the Xen supplied memory map has some PCI space reserved. Add a flag xen_pv_pci_possible which will be set in early boot in case the memory map has at least one area with the type E820_TYP

unexport swiotlb_active v2

2023-06-12 Thread Christoph Hellwig
Hi all, this little series removes the last swiotlb API exposed to modules. Changes since v1: - add a patch from Juergen to export if the e820 table indicates Xen PV PCI is enabled - slightly reorganize the logic to check if swiotlb is needed for Xen/x86 - drop the already merged nouveau

[PATCH 3/3] swiotlb: unexport is_swiotlb_active

2023-06-12 Thread Christoph Hellwig
Drivers have no business looking at dma-mapping or swiotlb internals. Signed-off-by: Christoph Hellwig --- kernel/dma/swiotlb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 775f7bb10ab184..1891faa3a6952e 100644 --- a/kernel/dma/swiotlb.c ++

Re: [PATCH V3 3/3] libxl: arm: Add grant_usage parameter for virtio devices

2023-06-12 Thread Anthony PERARD
On Fri, Jun 02, 2023 at 11:19:09AM +0530, Viresh Kumar wrote: > diff --git a/tools/libs/light/libxl_virtio.c b/tools/libs/light/libxl_virtio.c > index f8a78e22d156..19d834984777 100644 > --- a/tools/libs/light/libxl_virtio.c > +++ b/tools/libs/light/libxl_virtio.c > @@ -48,11 +56,13 @@ static int l

[PATCH v2 0/4] Initial support for Power

2023-06-12 Thread Shawn Anastasio
Hello all, This patch series adds support for building a minimal image (head.o-only) for Power ISA 2.07B+ (POWER8+) systems. The first patch boots to an infinite loop and the second adds early serial console support on pseries VMs, with bare metal support planned next. Since Xen previously had su

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

2023-06-12 Thread Shawn Anastasio
Add the build system changes required to build for ppc64le (POWER8+). As of now the resulting image simply boots to an infinite loop. $ make XEN_TARGET_ARCH=ppc64 -C xen openpower_defconfig $ make XEN_TARGET_ARCH=ppc64 SUBSYSTEMS=xen -C xen build This port targets POWER8+ CPUs running in Little E

[PATCH v2 3/4] automation: Add ppc64le cross-build jobs

2023-06-12 Thread Shawn Anastasio
Add build jobs to cross-compile Xen for ppc64le. Signed-off-by: Shawn Anastasio --- automation/gitlab-ci/build.yaml | 60 + 1 file changed, 60 insertions(+) diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml index 420ffa5acb..bd8c7332d

[PATCH v2 1/4] automation: Add container for ppc64le builds

2023-06-12 Thread Shawn Anastasio
Add a container for cross-compiling xen for ppc64le. Signed-off-by: Shawn Anastasio --- .../build/debian/bullseye-ppc64le.dockerfile | 28 +++ automation/scripts/containerize | 1 + 2 files changed, 29 insertions(+) create mode 100644 automation/build/debian/bull

[PATCH v2 4/4] maintainers: Add ppc64 maintainer

2023-06-12 Thread Shawn Anastasio
Signed-off-by: Shawn Anastasio --- MAINTAINERS | 4 1 file changed, 4 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 1bb7a6a839..8966175400 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -460,6 +460,10 @@ X: xen/arch/x86/acpi/lib.c F: xen/drivers/cpufreq/ F: xen/include

Re: [PATCH v2 0/4] Initial support for Power

2023-06-12 Thread Shawn Anastasio
On Mon Jun 12, 2023 at 9:51 AM CDT, Shawn Anastasio wrote: > With an appropriate powerpc64le-linux-gnu cross-toolchain, the minimal > image can be built with: > > $ make XEN_TARGET_ARCH=ppc64 -C xen openpower_defconfig > $ make XEN_TARGET_ARCH=ppc64 SUBSYSTEMS=xen -C xen TARGET=ppc64/head.o Minor

Re: [PATCH v2 4/4] maintainers: Add ppc64 maintainer

2023-06-12 Thread Jan Beulich
On 12.06.2023 16:51, Shawn Anastasio wrote: > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -460,6 +460,10 @@ X: xen/arch/x86/acpi/lib.c > F: xen/drivers/cpufreq/ > F: xen/include/acpi/cpufreq/ > > +PPC64 > +M: Shawn Anastasio > +F: xen/arch/ppc I'm sorry, but two nits again: This l

Re: [PATCH] tools/xenstored: Correct the prototype of domain_max_chk()

2023-06-12 Thread Jason Andryuk
On Mon, Jun 12, 2023 at 6:13 AM Julien Grall wrote: > > From: Julien Grall > > Some version of GCC will complain because the prototype and the > declaration of domain_max_chk() don't match: > > xenstored_domain.c:1503:6: error: conflicting types for 'domain_max_chk' due > to enum/integer mismatc

Re: [PATCH v2] docs/misra: new rules addition

2023-06-12 Thread Roberto Bagnara
On 12/06/23 11:50, Jan Beulich wrote: On 12.06.2023 11:34, Roberto Bagnara wrote: On 12/06/23 09:33, Jan Beulich wrote: On 09.06.2023 19:45, Stefano Stabellini wrote: @@ -143,6 +163,12 @@ existing codebase are work-in-progress. - Octal constants shall not be used - + * -

Re: [PATCH v2 1/4] x86/microcode: Remove Intel's family check on early_microcode_init()

2023-06-12 Thread Jan Beulich
On 05.06.2023 19:08, Alejandro Vallejo wrote: > --- a/xen/arch/x86/cpu/microcode/core.c > +++ b/xen/arch/x86/cpu/microcode/core.c > @@ -854,8 +854,14 @@ int __init early_microcode_init(unsigned long > *module_map, > break; > > case X86_VENDOR_INTEL: > -if ( c->x86 >= 6 ) >

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

2023-06-12 Thread George Dunlap
On Fri, Jun 9, 2023 at 5:07 PM Julien Grall wrote: > Hi Shawn, > > On 09/06/2023 16:01, Shawn Anastasio wrote: > > On Fri Jun 9, 2023 at 5:12 AM CDT, Julien Grall wrote: > >> Strictly speaking we can refuse any code. That count for license as > >> well. Anyway, I didn't request a change here. I m

[qemu-mainline test] 181390: regressions - FAIL

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

[linux-linus test] 181387: regressions - trouble: broken/fail/pass

2023-06-12 Thread osstest service owner
flight 181387 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/181387/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-libvirt-raw broken test-armhf-armhf-xl-credit1

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

2023-06-12 Thread Julien Grall
Hi George, Thanks for the summary! A couple of comments below. On 12/06/2023 16:19, George Dunlap wrote: On Fri, Jun 9, 2023 at 5:07 PM Julien Grall wrote: Hi Shawn, On 09/06/2023 16:01, Shawn Anastasio wrote: On Fri Jun 9, 2023 at 5:12 AM CDT, Julien Grall wrote: Strictly speaking we can

Re: [PATCH v3 0/4] Make sscanf() stricter

2023-06-12 Thread Andy Shevchenko
On Sat, Jun 10, 2023 at 04:40:40PM -0400, Demi Marie Obenour wrote: > Roger Pau Monné suggested making xenbus_scanf() stricter instead of > using a custom parser. Christoph Hellwig asked why the normal vsscanf() > cannot be made stricter. Richard Weinberger mentioned Linus Torvalds’s > suggestion

Re: [PATCH v2 2/4] x86: Read MSR_ARCH_CAPS after early_microcode_init()

2023-06-12 Thread Jan Beulich
On 05.06.2023 19:08, Alejandro Vallejo wrote: > tsx_init() has some ad-hoc code to read MSR_ARCH_CAPS if present. In order > to suuport DIS_MCU_UPDATE we need access to it earlier, so this patch moves > early read to the tail of early_microcode_init(), after the early microcode > update. > > The r

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

2023-06-12 Thread nicola . vetrini
From: Nicola Vetrini 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 comment". Most of the violations are due to the presence of links to webpages within C-style comment blocks, suc

[PATCH v3 4/4] x86/cpu-policy: Derive RSBA/RRSBA for guest policies

2023-06-12 Thread Andrew Cooper
The RSBA bit, "RSB Alternative", means that the RSB may use alternative predictors when empty. From a practical point of view, this mean "Retpoline not safe". Enhanced IBRS (officially IBRS_ALL in Intel's docs, previously IBRS_ATT) is a statement that IBRS is implemented in hardware (as opposed t

[PATCH v3 1/4] x86/spec-ctrl: Use a taint for CET without MSR_SPEC_CTRL

2023-06-12 Thread Andrew Cooper
Reword the comment for 'S' to include an incompatbile set of features on the same core. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu v3: * New --- xen/arch/x86/spec_ctrl.c | 3 +++ xen/common/kernel.c | 2 +- 2 files changed, 4 insertions(+), 1 delet

[PATCH v3 2/4] x86/spec-ctrl: Rename retpoline_safe() to retpoline_calculations()

2023-06-12 Thread Andrew Cooper
This is prep work, split out to simply the diff on the following change. * Rename to retpoline_calculations(), and call unconditionally. It is shortly going to synthesise missing enumerations required for guest safety. * For the model check switch statement, store the result in a variable an

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

2023-06-12 Thread Andrew Cooper
In order to level a VM safely for migration, the toolstack needs to know the RSBA/RRSBA properties of the CPU, whether or not they happen to be enumerated. See the code comment for details. Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu v3: * Add a taint fo

[PATCH v3 0/4] x86: RSBA and RRSBA handling

2023-06-12 Thread Andrew Cooper
This series deals with the hanlding of the RSBA and RRSBA bits across all parts and all mistakes encountered in various microcode versions. There are only minor changes from v2. See patches for details. Andrew Cooper (4): x86/spec-ctrl: Use a taint for CET without MSR_SPEC_CTRL x86/spec-ctrl

Re: [PATCH v3 1/4] limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN

2023-06-12 Thread Vincenzo Frascino
Hi Demi, On 6/10/23 21:40, Demi Marie Obenour wrote: > Some drivers already defined these, and they will be used by sscanf() > for overflow checks later. Also add SSIZE_MIN to limits.h, which will > also be needed later. > > Signed-off-by: Demi Marie Obenour > --- > .../media/atomisp/pci/hive_

[qemu-mainline test] 181391: regressions - FAIL

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

Re: [PATCH v2 1/4] x86/microcode: Remove Intel's family check on early_microcode_init()

2023-06-12 Thread Andrew Cooper
On 12/06/2023 4:16 pm, Jan Beulich wrote: > On 05.06.2023 19:08, Alejandro Vallejo wrote: > >> --- a/xen/arch/x86/cpu/microcode/core.c >> +++ b/xen/arch/x86/cpu/microcode/core.c >> @@ -854,8 +854,14 @@ int __init early_microcode_init(unsigned long >> *module_map, >> break; >> >> ca

Re: [PATCH v2 2/4] x86: Read MSR_ARCH_CAPS after early_microcode_init()

2023-06-12 Thread Andrew Cooper
On 12/06/2023 4:46 pm, Jan Beulich wrote: > On 05.06.2023 19:08, Alejandro Vallejo wrote: >> --- a/xen/arch/x86/cpu/microcode/core.c >> +++ b/xen/arch/x86/cpu/microcode/core.c >> @@ -840,6 +840,15 @@ static int __init early_microcode_update_cpu(void) >> return microcode_update_cpu(patch); >>

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

2023-06-12 Thread Andrew Cooper
On 05/06/2023 6:08 pm, Alejandro Vallejo wrote: > diff --git a/xen/arch/x86/cpu/microcode/core.c > b/xen/arch/x86/cpu/microcode/core.c > index 892bcec901..4f60d96d98 100644 > --- a/xen/arch/x86/cpu/microcode/core.c > +++ b/xen/arch/x86/cpu/microcode/core.c > @@ -874,6 +874,21 @@ int __init early_m

Re: [PATCH v2 4/4] x86/microcode: Prevent attempting updates if DIS_MCU_LOAD is set

2023-06-12 Thread Andrew Cooper
On 05/06/2023 6:08 pm, Alejandro Vallejo wrote: > diff --git a/xen/arch/x86/cpu/microcode/core.c > b/xen/arch/x86/cpu/microcode/core.c > index 4f60d96d98..a4c123118b 100644 > --- a/xen/arch/x86/cpu/microcode/core.c > +++ b/xen/arch/x86/cpu/microcode/core.c > @@ -871,6 +885,15 @@ int __init early_m

[qemu-mainline test] 181393: regressions - FAIL

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

[PATCH] x86/spec-ctrl: Fix the rendering of FB_CLEAR

2023-06-12 Thread Andrew Cooper
FB_CLEAR is a read-only status bit, not a read-write control. Move it from "Hardware features" into "Hardware hints". Signed-off-by: Andrew Cooper --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu --- xen/arch/x86/spec_ctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) dif

Re: [PATCH 2/5] libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()

2023-06-12 Thread Daniel P. Smith
On 6/12/23 07:46, Jan Beulich wrote: The variable needs to be properly set only on the error paths. Coverity ID: 1532311 Fixes: ab4440112bec ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl") Signed-off-by: Jan Beulich Reviewed-by: Daniel P. Smith --- If XSM is disabled, i

Re: [PATCH] xen: speed up grant-table reclaim

2023-06-12 Thread Demi Marie Obenour
On Mon, Jun 12, 2023 at 08:27:59AM +0200, Juergen Gross wrote: > On 10.06.23 17:32, Demi Marie Obenour wrote: > > When a grant entry is still in use by the remote domain, Linux must put > > it on a deferred list. > > This lacks quite some context. > > The main problem is related to the grant not

[qemu-mainline test] 181394: regressions - FAIL

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

Re: [PATCH v3 1/4] limits.h: add UCHAR_MAX, SCHAR_MAX, and SCHAR_MIN

2023-06-12 Thread Demi Marie Obenour
On Mon, Jun 12, 2023 at 05:31:51PM +0100, Vincenzo Frascino wrote: > Hi Demi, > > On 6/10/23 21:40, Demi Marie Obenour wrote: > > Some drivers already defined these, and they will be used by sscanf() > > for overflow checks later. Also add SSIZE_MIN to limits.h, which will > > also be needed late

Re: [PATCH 2/5] libxl: drop dead assignments to "ret" from libxl__domain_config_setdefault()

2023-06-12 Thread Daniel P. Smith
On 6/12/23 15:44, Daniel P. Smith wrote: On 6/12/23 07:46, Jan Beulich wrote: The variable needs to be properly set only on the error paths. Coverity ID: 1532311 Fixes: ab4440112bec ("xl / libxl: push parsing of SSID and CPU pool ID down to libxl") Signed-off-by: Jan Beulich Reviewed-by

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

2023-06-12 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) --- include/linux/page-flags.h | 20 +++

[PATCH v4 00/34] Split ptdesc from struct page

2023-06-12 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 v4 03/34] s390: Use pt_frag_refcount for pagetables

2023-06-12 Thread Vishal Moola (Oracle)
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 the safety for _refcount and the page table tracking. This also allows us to si

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

2023-06-12 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. This will help with the splitting of struct ptdesc from struct page, as well as allow

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

2023-06-12 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) --- include/linux/pgtable.h | 51 + 1 file changed, 51 insertions(+)

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

2023-06-12 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) --- include/linux/mm.h | 8 1 file changed, 4 insertions(+), 4 deletions(

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

2023-06-12 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) --- include/linux/mm.h | 6 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/mm.h b

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

2023-06-12 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) --- arch/x86/xen/mmu_pv.c | 2 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x

  1   2   >