Re: [PATCH v7] Preserve the EFI System Resource Table for dom0

2022-06-23 Thread Jan Beulich
On 22.06.2022 03:23, Demi Marie Obenour wrote: > @@ -1051,6 +1110,62 @@ static void __init > efi_set_gop_mode(EFI_GRAPHICS_OUTPUT_PROTOCOL *gop, UINTN gop > #define INVALID_VIRTUAL_ADDRESS (0xBAAADUL << \ > (EFI_PAGE_SHIFT + BITS_PER_LONG - 32)) > > +static voi

Re: [PATCH v3] xen: Add MISRA support to cppcheck make rule

2022-06-23 Thread Bertrand Marquis
Hi Stefano, > On 22 Jun 2022, at 22:52, Stefano Stabellini wrote: > > On Wed, 22 Jun 2022, Bertrand Marquis wrote: >> Hi Stefano, >> >>> On 22 Jun 2022, at 01:00, Stefano Stabellini wrote: >>> >>> On Fri, 10 Jun 2022, Bertrand Marquis wrote: cppcheck MISRA addon can be used to check for

Re: [PATCH v10 0/2] xen: Report and use hardware APIC virtualization capabilities

2022-06-23 Thread Jan Beulich
On 13.04.2022 13:21, Jane Malalane wrote: > Jane Malalane (2): > xen+tools: Report Interrupt Controller Virtualization capabilities on > x86 > x86/xen: Allow per-domain usage of hardware virtualized APIC > > docs/man/xl.cfg.5.pod.in | 15 ++ > docs/man/xl.conf.5.p

Re: XTF-on-ARM: Bugs

2022-06-23 Thread Bertrand Marquis
Hi Christopher, > On 22 Jun 2022, at 21:44, Christopher Clark > wrote: > > On Wed, Jun 22, 2022 at 9:40 AM Bertrand Marquis > wrote: >> >> Hi Andrew, >> >>> On 22 Jun 2022, at 17:28, Andrew Cooper wrote: >>> >>> On 22/06/2022 13:32, Bertrand Marquis wrote: Hi Andrew and Christopher, >

Re: [PATCH 0/9] MISRA C 2012 8.1 rule fixes

2022-06-23 Thread Jan Beulich
On 22.06.2022 21:23, Stefano Stabellini wrote: > A quick question about Rule 8.1. > > > Michal sent a patch series to fix Xen against Rule 8.1 (here is a link > if you are interested: https://marc.info/?l=xen-devel&m=165570851227125) > > Although we all generally agree that the changes are a goo

Re: [PATCH 0/9] MISRA C 2012 8.1 rule fixes

2022-06-23 Thread Roberto Bagnara
Hi there. Rule 8.1 only applies to C90 code, as all the violating instances are syntax errors in C99 and later versions of the language. So, the following line does not contain a violation of Rule 8.1: unsigned x; It does contain a violation of Directive 4.6, though, whose correct handling

Re: [PATCH] MAINTAINERS: drop XSM maintainer

2022-06-23 Thread Jan Beulich
On 09.06.2022 17:33, Jan Beulich wrote: > While mail hasn't been bouncing, Daniel has not been responding to patch > submissions or otherwise interacting with the community for several > years. Move maintainership to THE REST in kind of an unusual way, with > the goal to avoid > - orphaning the com

[PATCH] xen: arm: Don't use stop_cpu() in halt_this_cpu()

2022-06-23 Thread dmitry . semenets
From: Dmytro Semenets When shutting down (or rebooting) the platform, Xen will call stop_cpu() on all the CPUs but one. The last CPU will then request the system to shutdown/restart. On platform using PSCI, stop_cpu() will call PSCI CPU off. Per the spec (section 5.5.2 DEN0022D.b), the call coul

[libvirt test] 171323: regressions - FAIL

2022-06-23 Thread osstest service owner
flight 171323 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/171323/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-libvirt 6 libvirt-buildfail REGR. vs. 151777 build-amd64-libvirt

Re: [XEN PATCH v2.1 1/4] build,include: rework shell script for headers++.chk

2022-06-23 Thread Jan Beulich
On 21.06.2022 12:11, Anthony PERARD wrote: > The command line generated for headers++.chk by make is quite long, > and in some environment it is too long. This issue have been seen in > Yocto build environment. > > Error messages: > make[9]: execvp: /bin/sh: Argument list too long > make[9

Re: [PATCH 0/9] MISRA C 2012 8.1 rule fixes

2022-06-23 Thread Jan Beulich
On 23.06.2022 09:37, Roberto Bagnara wrote: > Rule 8.1 only applies to C90 code, as all the violating instances are > syntax errors in C99 and later versions of the language. So, > the following line does not contain a violation of Rule 8.1: > > unsigned x; > > It does contain a violation o

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Jan Beulich
On 22.06.2022 18:06, Juergen Gross wrote: > A Linux kernel 5.19 can only be loaded as dom0, if it has been > built with CONFIG_AMD_MEM_ENCRYPT enabled. This is due to the > fact that otherwise the (relevant) last section of the built > kernel has the NOLOAD flag set (it is still marked with > SHF_A

Re: [PATCH 1/2] x86/xen: use clear_bss() for Xen PV guests

2022-06-23 Thread Jan Beulich
On 22.06.2022 18:10, Juergen Gross wrote: > Instead of clearing the bss area in assembly code, use the clear_bss() > function. > > This requires to pass the start_info address as parameter to > xen_start_kernel() in order to avoid the xen_start_info being zeroed > again. > > Signed-off-by: Juerge

[PATCH] xen: consider alloc-only segments when loading PV dom0 kernel

2022-06-23 Thread Juergen Gross
When loading the dom0 kernel for PV mode, the first free usable memory location after the kernel needs to take segments into account, which have only the ALLOC flag set, but are not specified to be loaded in the program headers of the ELF file. This is e.g. a problem for Linux kernels from 5.19 on

Re: [PATCH] MAINTAINERS: drop XSM maintainer

2022-06-23 Thread Roger Pau Monné
On Thu, Jun 23, 2022 at 09:43:30AM +0200, Jan Beulich wrote: > On 09.06.2022 17:33, Jan Beulich wrote: > > While mail hasn't been bouncing, Daniel has not been responding to patch > > submissions or otherwise interacting with the community for several > > years. Move maintainership to THE REST in k

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Juergen Gross
On 23.06.22 09:55, Jan Beulich wrote: On 22.06.2022 18:06, Juergen Gross wrote: A Linux kernel 5.19 can only be loaded as dom0, if it has been built with CONFIG_AMD_MEM_ENCRYPT enabled. This is due to the fact that otherwise the (relevant) last section of the built kernel has the NOLOAD flag set

Re: [PATCH 2/2] x86: fix setup of brk area

2022-06-23 Thread Jan Beulich
On 22.06.2022 18:10, Juergen Gross wrote: > Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") > put the brk area into the .bss segment, causing it not to be cleared > initially. This reads contradictively: If the area was put in .bss, it would be cleared. Thing is it is put in .

Re: [PATCH 2/2] x86: fix setup of brk area

2022-06-23 Thread Juergen Gross
On 23.06.22 10:09, Jan Beulich wrote: On 22.06.2022 18:10, Juergen Gross wrote: Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") put the brk area into the .bss segment, causing it not to be cleared initially. This reads contradictively: If the area was put in .bss, it would

[PATCH 1/6] x86/Kconfig: add selection of default x2APIC destination mode

2022-06-23 Thread Roger Pau Monne
Allow selecting the default x2APIC destination mode from Kconfig. Note the default destination mode is still Logical (Cluster) mode. Signed-off-by: Roger Pau Monné --- xen/arch/x86/Kconfig | 29 + xen/arch/x86/genapic/x2apic.c | 6 -- 2 files changed, 33

[PATCH 2/6] x86/x2apic: use physical destination mode by default

2022-06-23 Thread Roger Pau Monne
Using cluster mode by default greatly limits the amount of vectors available, as then vector space is shared amongst all the CPUs in the logical cluster. This can lead to vector shortage issues on boxes with not a huge amount of CPUs but with a non-trivial amount of devices, there are reports of b

[PATCH 0/6] x86/irq: switch x2APIC default destination mode

2022-06-23 Thread Roger Pau Monne
Hello, The following series aims to change the default x2APIC Destination mode from Logical to Physical. This is done in order to cope with boxes that don't have a huge amount of CPUs, but do have a non trivial amount of PCI devices using MSI(-X). The default x2APIC destination mode can now be s

[PATCH 3/6] x86/setup: init nr_irqs after having detected x2APIC support

2022-06-23 Thread Roger Pau Monne
Logic in ioapic_init() that sets the number of available vectors for external interrupts requires knowing the x2APIC Destination Mode. As such move the call after x2APIC BSP setup. Do it as part of init_irq_data(), which is called just after x2APIC BSP init and also makes use of nr_irqs itself.

[PATCH 4/6] x86/irq: fix setting irq limits

2022-06-23 Thread Roger Pau Monne
Current code to calculate nr_irqs assumes the APIC destination mode to be physical, so all vectors on each possible CPU is available for use by a different interrupt source. This is not true when using Logical (Cluster) destination mode, where CPUs in the same cluster share the vector space. Fix b

[PATCH 5/6] x86/irq: print nr_irqs as limit on the number of MSI(-X) interrupts

2022-06-23 Thread Roger Pau Monne
Using nr_irqs minus nr_irqs_gsi is misleading, as GSI interrupts are not allocated unless requested by the hardware domain, so a hardware domain could not use any GSI (or just one for the ACPI SCI), and hence (almost) all nr_irqs will be available for MSI(-X) usage. No functional difference, just

[PATCH 6/6] x86/irq: do not set nr_irqs based on nr_irqs_gsi in APIC mode

2022-06-23 Thread Roger Pau Monne
When using an APIC do not set nr_irqs based on a factor of nr_irqs_gsi (currently x8), and instead do so exclusively based on the amount of available vectors on the system. There's no point in setting nr_irqs to a value higher than the available set of vectors, as vector allocation will fail anywa

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Jan Beulich
On 23.06.2022 10:06, Juergen Gross wrote: > On 23.06.22 09:55, Jan Beulich wrote: >> On 22.06.2022 18:06, Juergen Gross wrote: >>> A Linux kernel 5.19 can only be loaded as dom0, if it has been >>> built with CONFIG_AMD_MEM_ENCRYPT enabled. This is due to the >>> fact that otherwise the (relevant)

Re: [PATCH 2/2] x86: fix setup of brk area

2022-06-23 Thread Jan Beulich
On 23.06.2022 10:14, Juergen Gross wrote: > On 23.06.22 10:09, Jan Beulich wrote: >> On 22.06.2022 18:10, Juergen Gross wrote: >>> Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") >>> put the brk area into the .bss segment, causing it not to be cleared >>> initially. >> >> This

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Juergen Gross
On 23.06.22 10:47, Jan Beulich wrote: On 23.06.2022 10:06, Juergen Gross wrote: On 23.06.22 09:55, Jan Beulich wrote: On 22.06.2022 18:06, Juergen Gross wrote: A Linux kernel 5.19 can only be loaded as dom0, if it has been built with CONFIG_AMD_MEM_ENCRYPT enabled. This is due to the fact that

Re: [PATCH 2/2] x86: fix setup of brk area

2022-06-23 Thread Juergen Gross
On 23.06.22 10:50, Jan Beulich wrote: On 23.06.2022 10:14, Juergen Gross wrote: On 23.06.22 10:09, Jan Beulich wrote: On 22.06.2022 18:10, Juergen Gross wrote: Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") put the brk area into the .bss segment, causing it not to be clea

Re: [PATCH] xen: consider alloc-only segments when loading PV dom0 kernel

2022-06-23 Thread Jan Beulich
On 23.06.2022 10:02, Juergen Gross wrote: > When loading the dom0 kernel for PV mode, the first free usable memory > location after the kernel needs to take segments into account, which > have only the ALLOC flag set, but are not specified to be loaded in > the program headers of the ELF file. > >

Re: [PATCH] xen: consider alloc-only segments when loading PV dom0 kernel

2022-06-23 Thread Juergen Gross
On 23.06.22 11:04, Jan Beulich wrote: On 23.06.2022 10:02, Juergen Gross wrote: When loading the dom0 kernel for PV mode, the first free usable memory location after the kernel needs to take segments into account, which have only the ALLOC flag set, but are not specified to be loaded in the prog

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Jan Beulich
On 23.06.2022 11:01, Juergen Gross wrote: > On 23.06.22 10:47, Jan Beulich wrote: >> On 23.06.2022 10:06, Juergen Gross wrote: >>> On 23.06.22 09:55, Jan Beulich wrote: On 22.06.2022 18:06, Juergen Gross wrote: > A Linux kernel 5.19 can only be loaded as dom0, if it has been > built wi

[PATCH 0/2] console/serial: adjust default TX buffer size

2022-06-23 Thread Roger Pau Monne
Hello, First patch moves the setting of the default TX buffer size to Kconfig, and shouldn't be controversial, second patch increases the buffer to 32K. Thanks, Roger. Roger Pau Monne (2): console/serial: set the default transmit buffer size in Kconfig console/serial: bump buffer from 16K to

[PATCH 2/2] console/serial: bump buffer from 16K to 32K

2022-06-23 Thread Roger Pau Monne
Testing on a Kaby Lake box with 8 CPUs leads to the serial buffer being filled halfway during dom0 boot, and thus a non-trivial chunk of Linux boot messages are dropped. Increasing the buffer to 32K does fix the issue and Linux boot messages are no longer dropped. There's no justification either

[PATCH 1/2] console/serial: set the default transmit buffer size in Kconfig

2022-06-23 Thread Roger Pau Monne
Take the opportunity to convert the variable to read-only after init. No functional change intended. Signed-off-by: Roger Pau Monné --- xen/drivers/char/Kconfig | 10 ++ xen/drivers/char/serial.c | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/xen/drivers/char/

Re: [PATCH] xen: consider alloc-only segments when loading PV dom0 kernel

2022-06-23 Thread Jan Beulich
On 23.06.2022 11:08, Juergen Gross wrote: > On 23.06.22 11:04, Jan Beulich wrote: >> On 23.06.2022 10:02, Juergen Gross wrote: >>> When loading the dom0 kernel for PV mode, the first free usable memory >>> location after the kernel needs to take segments into account, which >>> have only the ALLOC

Re: Problem loading linux 5.19 as PV dom0

2022-06-23 Thread Juergen Gross
On 23.06.22 11:08, Jan Beulich wrote: On 23.06.2022 11:01, Juergen Gross wrote: On 23.06.22 10:47, Jan Beulich wrote: On 23.06.2022 10:06, Juergen Gross wrote: On 23.06.22 09:55, Jan Beulich wrote: On 22.06.2022 18:06, Juergen Gross wrote: A Linux kernel 5.19 can only be loaded as dom0, if i

Re: [PATCH v1 01/10] drivers/char: Add support for Xue USB3 debugger

2022-06-23 Thread Jan Beulich
On 22.06.2022 17:47, Marek Marczykowski-Górecki wrote: > On Wed, Jun 15, 2022 at 04:25:54PM +0200, Jan Beulich wrote: >> On 07.06.2022 16:30, Marek Marczykowski-Górecki wrote: >>> +/* ...we found it, so parse the BAR and map the registers */ >>> +bar0 = pci_conf_read32(xue->sbdf, PCI_BASE_A

[ovmf test] 171324: all pass - PUSHED

2022-06-23 Thread osstest service owner
flight 171324 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/171324/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 4bfd668e5edb59092a8e16414b3f6632efdac4f2 baseline version: ovmf f304308e1cb21846a79fc

[PATCH v2 2/3] x86: fix setup of brk area

2022-06-23 Thread Juergen Gross
Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") put the brk area into the .bss..brk section (placed directly behind .bss), causing it not to be cleared initially. As the brk area is used to allocate early page tables, these might contain garbage in not explicitly written entrie

[PATCH v2 1/3] x86/xen: use clear_bss() for Xen PV guests

2022-06-23 Thread Juergen Gross
Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross Reviewed-by: Jan Beulich --- arch/x86/include/a

[PATCH v2 3/3] x86: fix .brk attribute in linker script

2022-06-23 Thread Juergen Gross
Commit e32683c6f7d2 ("x86/mm: Fix RESERVE_BRK() for older binutils") added the "NOLOAD" attribute to the .brk section as a "failsafe" measure. Unfortunately this leads to the linker no longer covering the .brk section in a program header, resulting in the kernel loader not knowing that the memory

[PATCH v2 0/3] x86: fix brk area initialization

2022-06-23 Thread Juergen Gross
The brk area needs to be zeroed initially, like the .bss section. At the same time its memory should be covered by the ELF program headers. Juergen Gross (3): x86/xen: use clear_bss() for Xen PV guests x86: fix setup of brk area x86: fix .brk attribute in linker script arch/x86/include/asm

Re: [PATCH] iommu: add preemption support to iommu_{un,}map()

2022-06-23 Thread Jan Beulich
On 10.06.2022 10:32, Roger Pau Monne wrote: > The loop in iommu_{un,}map() can be arbitrary large, and as such it > needs to handle preemption. Introduce a new parameter that allow > returning the number of pages that have been processed, and which > presence also signals whether the function shou

Re: XTF-on-ARM: Bugs

2022-06-23 Thread George Dunlap
> On 22 Jun 2022, at 17:28, Andrew Cooper wrote: > > On 22/06/2022 13:32, Bertrand Marquis wrote: >> Hi Andrew and Christopher, >> >> I will not dig into the details of the issues you currently have >> but it seems you are trying to re-do the work we already did >> and have been using for quit

Re: [PATCH v2 1/3] x86/xen: use clear_bss() for Xen PV guests

2022-06-23 Thread Jan Beulich
On 23.06.2022 11:46, Juergen Gross wrote: > --- a/arch/x86/xen/enlighten_pv.c > +++ b/arch/x86/xen/enlighten_pv.c > @@ -1183,15 +1183,19 @@ static void __init xen_domu_set_legacy_features(void) > extern void early_xen_iret_patch(void); > > /* First C function to be called on Xen boot */ > -asml

Re: [PATCH] MAINTAINERS: drop XSM maintainer

2022-06-23 Thread George Dunlap
> On 23 Jun 2022, at 08:43, Jan Beulich wrote: > > On 09.06.2022 17:33, Jan Beulich wrote: >> While mail hasn't been bouncing, Daniel has not been responding to patch >> submissions or otherwise interacting with the community for several >> years. Move maintainership to THE REST in kind of an u

Re: [PATCH] MAINTAINERS: drop XSM maintainer

2022-06-23 Thread Roger Pau Monné
On Thu, Jun 23, 2022 at 09:56:34AM +, George Dunlap wrote: > > > > On 23 Jun 2022, at 08:43, Jan Beulich wrote: > > > > On 09.06.2022 17:33, Jan Beulich wrote: > >> While mail hasn't been bouncing, Daniel has not been responding to patch > >> submissions or otherwise interacting with the co

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 2/2] uboot-script-gen: Enable direct mapping of statically allocated memory

2022-06-23 Thread Ayan Kumar Halder
(Resending mail, as the previous delivery failed) On 21/06/2022 12:34, Ayan Kumar Halder wrote: Hi, On 19/06/2022 13:43, Xenia Ragiadakou wrote: Direct mapping for dom0less VMs is disabled by default in XEN and can be enabled through the 'direct-map' property. Add a new config parameter DOMU_D

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 1/2] uboot-script-gen: Skip dom0 instead of exiting if DOM0_KERNEL is not set

2022-06-23 Thread Ayan Kumar Halder
(Resending mail, as the previous delivery failed) On 21/06/2022 11:57, Ayan Kumar Halder wrote: Hi Xenia, Thanks for the change. It looks good. Some points :- 1. In README.md, please mention in 'DOM0_KERNEL' description that it is an optional parameter. When user does not provide this, it g

Re: [PATCH V10.1 1/3] libxl: Add support for Virtio disk configuration

2022-06-23 Thread Anthony PERARD
On Fri, Jun 17, 2022 at 07:14:31PM +0300, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > This patch adds basic support for configuring and assisting virtio-mmio > based virtio-disk backend (emulator) which is intended to run out of > Qemu and could be run in any domain. > Although t

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

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

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

2022-06-23 Thread osstest service owner
flight 171325 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/171325/ 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

[PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Julien Grall
From: Julien Grall At the moment, corrupt() is neither checking for allocation failure nor freeing the allocated memory. Harden the code by printing ENOMEM if the allocation failed and free 'str' after the last use. This is not considered to be a security issue because corrupt() should only be

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Juergen Gross
On 23.06.22 13:24, Julien Grall wrote: From: Julien Grall At the moment, corrupt() is neither checking for allocation failure nor freeing the allocated memory. Harden the code by printing ENOMEM if the allocation failed and free 'str' after the last use. This is not considered to be a securit

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Julien Grall
Hi Juergen, On 23/06/2022 12:28, Juergen Gross wrote: On 23.06.22 13:24, Julien Grall wrote: From: Julien Grall At the moment, corrupt() is neither checking for allocation failure nor freeing the allocated memory. Harden the code by printing ENOMEM if the allocation failed and free 'str' aft

Re: [PATCH 2/2] x86: annotate entry points with type and size

2022-06-23 Thread Jan Beulich
On 14.04.2022 14:59, Jan Beulich wrote: > On 14.04.2022 14:49, Andrew Cooper wrote: >> On 12/04/2022 11:28, Jan Beulich wrote: >>> Future gas versions will generate minimalistic Dwarf debug info for >>> items annotated as functions and having their sizes specified [1]. >>> "Borrow" Arm's END() and

[PATCH v2 0/2] x86/p2m: type checking adjustments

2022-06-23 Thread Jan Beulich
While the first change is a bug fix (for, admittedly, a case which apparently hasn't occurred in practice, or else we would have had bug reports), it already puts in place an instance of what the 2nd patch is proposing for perhaps wider use. 1: make p2m_get_page_from_gfn() handle grant and shared

[PATCH v2 1/2] x86/p2m: make p2m_get_page_from_gfn() handle grant case correctly

2022-06-23 Thread Jan Beulich
Grant P2M entries, which are covered by p2m_is_any_ram(), wouldn't pass the get_page() unless the grant was a local one. These need to take the same path as foreign entries. Just the assertion there is not valid for local grants, and hence it triggering needs to be avoided. Signed-off-by: Jan Beul

[PATCH v2 2/2] x86/p2m: aid the compiler in folding p2m_is_...()

2022-06-23 Thread Jan Beulich
By using | instead of || or (in the negated form) && chances increase for the compiler to recognize that both predicates can actually be folded into an expression requiring just a single branch (via OR-ing together the respective P2M_*_TYPES constants). Signed-off-by: Jan Beulich --- RFC: The 3-w

Ping: [PATCH 0/2] x86/P2M: allow 2M superpage use for shadowed guests

2022-06-23 Thread Jan Beulich
On 09.12.2021 12:25, Jan Beulich wrote: > I did notice this anomaly in the context of IOMMU side work. > > 1: shadow: slightly consolidate sh_unshadow_for_p2m_change() > 2: P2M: allow 2M superpage use for shadowed guests This has been pending for over half a year. Anyone? Thanks, Jan

Ping: [PATCH v2] x86: correct asm() constraints when dealing with immediate selector values

2022-06-23 Thread Jan Beulich
On 13.09.2021 08:26, Jan Beulich wrote: > asm() constraints need to fit both the intended insn(s) which the > respective operands are going to be used with as well as the actual kind > of value specified. "m" (alone) together with a constant, however, leads > to gcc saying > > error: memory input

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 2/2] uboot-script-gen: Enable direct mapping of statically allocated memory

2022-06-23 Thread xenia
Hi Ayan! On 6/23/22 13:02, Ayan Kumar Halder wrote: (Resending mail, as the previous delivery failed) On 21/06/2022 12:34, Ayan Kumar Halder wrote: Hi, On 19/06/2022 13:43, Xenia Ragiadakou wrote: Direct mapping for dom0less VMs is disabled by default in XEN and can be enabled through the '

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 1/2] uboot-script-gen: Skip dom0 instead of exiting if DOM0_KERNEL is not set

2022-06-23 Thread xenia
On 6/23/22 13:01, Ayan Kumar Halder wrote: (Resending mail, as the previous delivery failed) On 21/06/2022 11:57, Ayan Kumar Halder wrote: 1. In README.md, please mention in 'DOM0_KERNEL' description that it is an optional parameter. When user does not provide this, it generates a dom0less con

Re: Ping: [PATCH 0/2] x86/P2M: allow 2M superpage use for shadowed guests

2022-06-23 Thread George Dunlap
> On 23 Jun 2022, at 13:00, Jan Beulich wrote: > > On 09.12.2021 12:25, Jan Beulich wrote: >> I did notice this anomaly in the context of IOMMU side work. >> >> 1: shadow: slightly consolidate sh_unshadow_for_p2m_change() >> 2: P2M: allow 2M superpage use for shadowed guests > > This has been

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Andrew Cooper
On 23/06/2022 12:28, Juergen Gross wrote: > On 23.06.22 13:24, Julien Grall wrote: >> From: Julien Grall >> >> At the moment, corrupt() is neither checking for allocation failure >> nor freeing the allocated memory. >> >> Harden the code by printing ENOMEM if the allocation failed and >> free 'str

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Julien Grall
Hi Andrew, On 23/06/2022 13:41, Andrew Cooper wrote: On 23/06/2022 12:28, Juergen Gross wrote: On 23.06.22 13:24, Julien Grall wrote: From: Julien Grall At the moment, corrupt() is neither checking for allocation failure nor freeing the allocated memory. Harden the code by printing ENOMEM i

Re: Virtio on Xen with Rust

2022-06-23 Thread Oleksandr Tyshchenko
Hello Viresh [sorry for the possible format issues] On Thu, Jun 23, 2022 at 8:48 AM Viresh Kumar wrote: > On 22-06-22, 18:05, Oleksandr Tyshchenko wrote: > > Even leaving > > aside the fact that restricted virtio memory access in the guest means > that > > not all of guest memory can be accesse

Re: [PATCH v6 1/8] xen: reuse x86 EFI stub functions for Arm

2022-06-23 Thread Jan Beulich
On 10.06.2022 07:53, Wei Chen wrote: > --- a/xen/arch/arm/Makefile > +++ b/xen/arch/arm/Makefile > @@ -1,6 +1,5 @@ > obj-$(CONFIG_ARM_32) += arm32/ > obj-$(CONFIG_ARM_64) += arm64/ > -obj-$(CONFIG_ARM_64) += efi/ > obj-$(CONFIG_ACPI) += acpi/ > obj-$(CONFIG_HAS_PCI) += pci/ > ifneq ($(CONFIG_N

Re: [PATCH v4] xen/gntdev: Avoid blocking in unmap_grant_pages()

2022-06-23 Thread Juergen Gross
On 22.06.22 04:27, Demi Marie Obenour wrote: unmap_grant_pages() currently waits for the pages to no longer be used. In https://github.com/QubesOS/qubes-issues/issues/7481, this lead to a deadlock against i915: i915 was waiting for gntdev's MMU notifier to finish, while gntdev was waiting for i91

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

2022-06-23 Thread osstest service owner
flight 171322 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/171322/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-coresched-amd64-xl broken test-amd64-coresched-amd64-xl 5 host-ins

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Jan Beulich
On 23.06.2022 13:24, Julien Grall wrote: > From: Julien Grall > > At the moment, corrupt() is neither checking for allocation failure > nor freeing the allocated memory. > > Harden the code by printing ENOMEM if the allocation failed and > free 'str' after the last use. > > This is not consider

Re: [PATCH] xen-blkfront: Handle NULL gendisk

2022-06-23 Thread Juergen Gross
On 01.06.22 21:53, Jason Andryuk wrote: When a VBD is not fully created and then closed, the kernel can have a NULL pointer dereference: The reproducer is trivial: [user@dom0 ~]$ sudo xl block-attach work backend=sys-usb vdev=xvdi target=/dev/sdz [user@dom0 ~]$ xl block-list work Vdev BE han

Re: [PATCH] x86/xen: Remove undefined behavior in setup_features()

2022-06-23 Thread Juergen Gross
On 17.06.22 12:30, Julien Grall wrote: From: Julien Grall 1 << 31 is undefined. So switch to 1U << 31. Fixes: 5ead97c84fa7 ("xen: Core Xen implementation") Signed-off-by: Julien Grall Pushed to xen/tip.git for-linus-5.19a Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP publi

Re: [PATCH] drm/xen: Add missing VM_DONTEXPAND flag in mmap callback

2022-06-23 Thread Juergen Gross
On 09.05.22 15:51, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko With Xen PV Display driver in use the "expected" VM_DONTEXPAND flag is not set (neither explicitly nor implicitly), so the driver hits the code path in drm_gem_mmap_obj() which triggers the WARNING. Signed-off-by: Oleksa

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Julien Grall
On 23/06/2022 13:59, Jan Beulich wrote: On 23.06.2022 13:24, Julien Grall wrote: From: Julien Grall At the moment, corrupt() is neither checking for allocation failure nor freeing the allocated memory. Harden the code by printing ENOMEM if the allocation failed and free 'str' after the las

Re: [PATCH v6 0/9] xen: drop hypercall function tables

2022-06-23 Thread Juergen Gross
On 18.05.22 11:45, Juergen Gross wrote: On 04.05.22 09:53, Juergen Gross wrote: On 19.04.22 10:01, Juergen Gross wrote: On 24.03.22 15:01, Juergen Gross wrote: In order to avoid indirect function calls on the hypercall path as much as possible this series is removing the hypercall function tab

Re: [PATCH V10.1 1/3] libxl: Add support for Virtio disk configuration

2022-06-23 Thread Oleksandr Tyshchenko
Hello Anthony [sorry for the possible format issues] On Thu, Jun 23, 2022 at 1:24 PM Anthony PERARD wrote: > On Fri, Jun 17, 2022 at 07:14:31PM +0300, Oleksandr Tyshchenko wrote: > > From: Oleksandr Tyshchenko > > > > This patch adds basic support for configuring and assisting virtio-mmio > >

Re: [PATCH] tools/xenstored: Harden corrupt()

2022-06-23 Thread Jan Beulich
On 23.06.2022 15:03, Julien Grall wrote: > > > On 23/06/2022 13:59, Jan Beulich wrote: >> On 23.06.2022 13:24, Julien Grall wrote: >>> From: Julien Grall >>> >>> At the moment, corrupt() is neither checking for allocation failure >>> nor freeing the allocated memory. >>> >>> Harden the code by p

Re: [PATCH 1/2] console/serial: set the default transmit buffer size in Kconfig

2022-06-23 Thread Jan Beulich
On 23.06.2022 11:08, Roger Pau Monne wrote: > --- a/xen/drivers/char/Kconfig > +++ b/xen/drivers/char/Kconfig > @@ -74,3 +74,13 @@ config HAS_EHCI > help > This selects the USB based EHCI debug port to be used as a UART. If > you have an x86 based system with USB, say Y. > + >

Re: [PATCH 2/2] console/serial: bump buffer from 16K to 32K

2022-06-23 Thread Jan Beulich
On 23.06.2022 11:08, Roger Pau Monne wrote: > Testing on a Kaby Lake box with 8 CPUs leads to the serial buffer > being filled halfway during dom0 boot, and thus a non-trivial chunk of > Linux boot messages are dropped. > > Increasing the buffer to 32K does fix the issue and Linux boot > messages

[linux-5.4 test] 171320: regressions - FAIL

2022-06-23 Thread osstest service owner
flight 171320 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/171320/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-armhf-armhf-xl-credit1 14 guest-start fail REGR. vs. 171275 test-armhf-armhf-libv

Re: [Viryaos-discuss] [ImageBuilder] [PATCH 2/2] uboot-script-gen: Enable direct mapping of statically allocated memory

2022-06-23 Thread Ayan Kumar Halder
On 23/06/2022 13:05, xenia wrote: Hi Ayan! Hi Xenia, On 6/23/22 13:02, Ayan Kumar Halder wrote: (Resending mail, as the previous delivery failed) On 21/06/2022 12:34, Ayan Kumar Halder wrote: Hi, On 19/06/2022 13:43, Xenia Ragiadakou wrote: Direct mapping for dom0less VMs is disabled by

Re: [PATCH 1/6] x86/Kconfig: add selection of default x2APIC destination mode

2022-06-23 Thread Jan Beulich
On 23.06.2022 10:24, Roger Pau Monne wrote: > Allow selecting the default x2APIC destination mode from Kconfig. > Note the default destination mode is still Logical (Cluster) mode. > > Signed-off-by: Roger Pau Monné > --- > xen/arch/x86/Kconfig | 29 + > xen/

Re: [PATCH 2/6] x86/x2apic: use physical destination mode by default

2022-06-23 Thread Jan Beulich
On 23.06.2022 10:24, Roger Pau Monne wrote: > Using cluster mode by default greatly limits the amount of vectors > available, as then vector space is shared amongst all the CPUs in the > logical cluster. > > This can lead to vector shortage issues on boxes with not a huge > amount of CPUs but with

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-06-23 Thread Rahul Singh
Hi Julien, > On 22 Jun 2022, at 4:05 pm, Julien Grall wrote: > > Hi, > > On 22/06/2022 15:38, Rahul Singh wrote: >> Guest can request the Xen to close the event channels. Ignore the >> request from guest to close the static channels as static event channels >> should not be closed. > > Why do

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-06-23 Thread Julien Grall
On 23/06/2022 16:10, Rahul Singh wrote: Hi Julien, On 22 Jun 2022, at 4:05 pm, Julien Grall wrote: Hi, On 22/06/2022 15:38, Rahul Singh wrote: Guest can request the Xen to close the event channels. Ignore the request from guest to close the static channels as static event channels shoul

Re: [PATCH 5/8] xen/evtchn: don't close the static event channel.

2022-06-23 Thread Jan Beulich
On 23.06.2022 17:30, Julien Grall wrote: > On 23/06/2022 16:10, Rahul Singh wrote: >>> On 22 Jun 2022, at 4:05 pm, Julien Grall wrote: >>> On 22/06/2022 15:38, Rahul Singh wrote: Guest can request the Xen to close the event channels. Ignore the request from guest to close the static chan

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

2022-06-23 Thread osstest service owner
flight 171328 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/171328/ 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 V6 1/2] xen/gnttab: Store frame GFN in struct page_info on Arm

2022-06-23 Thread Julien Grall
Hi Oleksandr, Sorry for the late reply. On 11/05/2022 19:47, Oleksandr Tyshchenko wrote: diff --git a/xen/arch/arm/include/asm/mm.h b/xen/arch/arm/include/asm/mm.h +/* + * All accesses to the GFN portion of type_info field should always be + * protected by the P2M lock. In case when it is not f

Re: [PATCH V6 2/2] xen/arm: Harden the P2M code in p2m_remove_mapping()

2022-06-23 Thread Julien Grall
Hi Oleksandr, On 11/05/2022 19:47, Oleksandr Tyshchenko wrote: From: Oleksandr Tyshchenko Borrow the x86's check from p2m_remove_page() which was added by the following commit: c65ea16dbcafbe4fe21693b18f8c2a3c5d14600e "x86/p2m: don't assert that the passed in MFN matches for a remove" and adju

Re: [PATCH v2 1/4] tools/xenstore: modify feature bit specification in xenstore-ring.txt

2022-06-23 Thread Julien Grall
Hi Juergen, On 27/05/2022 08:24, Juergen Gross wrote: Instead of specifying the feature bits in xenstore-ring.txt as a mask value use bit numbers. This will make the specification easier to read when adding more features. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Cheers, -- J

Re: [PATCH 0/9] MISRA C 2012 8.1 rule fixes

2022-06-23 Thread Stefano Stabellini
On Thu, 23 Jun 2022, Jan Beulich wrote: > On 23.06.2022 09:37, Roberto Bagnara wrote: > > Rule 8.1 only applies to C90 code, as all the violating instances are > > syntax errors in C99 and later versions of the language. So, > > the following line does not contain a violation of Rule 8.1: > > > >

Re: [PATCH v2 2/4] tools/xenstore: add documentation for new set/get-feature commands

2022-06-23 Thread Julien Grall
Hi Juergen, On 27/05/2022 08:24, Juergen Gross wrote: Add documentation for two new Xenstore wire commands SET_FEATURE and GET_FEATURE used to set or query the Xenstore features visible in the ring page of a given domain. Signed-off-by: Juergen Gross --- Do we need support in the migration pro

Re: [PATCH v2 3/4] tools/xenstore: add documentation for new set/get-quota commands

2022-06-23 Thread Julien Grall
Hi Juergen, On 27/05/2022 08:24, Juergen Gross wrote: Add documentation for two new Xenstore wire commands SET_QUOTA and GET_QUOTA used to set or query the global Xenstore quota or those of a given domain. Signed-off-by: Juergen Gross --- Note that it might be a good idea to add support to the

[xen-unstable test] 171327: tolerable FAIL

2022-06-23 Thread osstest service owner
flight 171327 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/171327/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-libvirt 7 xen-installfail pass in 171319 test-amd64-amd64-libvirt-vhd 16

Re: [PATCH v2 4/4] tools/xenstore: add documentation for extended watch command

2022-06-23 Thread Julien Grall
Hi Juergen, On 27/05/2022 08:24, Juergen Gross wrote: Add documentation for an extension of the WATCH command used to limit the scope of watched paths. Additionally it enables to receive more information in the events related to special watches (@introduceDomain or @releaseDomain). Signed-off-b

Re: [PATCH] xen/common: device_tree: Fix MISRA C 2012 Rule 8.7 violation

2022-06-23 Thread Julien Grall
Hi, On 22/06/2022 20:31, Stefano Stabellini wrote: On Wed, 22 Jun 2022, Xenia Ragiadakou wrote: The function __dt_n_size_cells() is referenced only in device_tree.c. Change the linkage of the function from external to internal by adding the storage-class specifier static to the function definit

Re: [PATCH 1/3] xen/arm: shutdown: Fix MISRA C 2012 Rule 8.4 violation

2022-06-23 Thread Julien Grall
Hi Xenia, On 22/06/2022 16:19, Bertrand Marquis wrote: On 22 Jun 2022, at 16:15, Xenia Ragiadakou wrote: Include header so that the declarations of the functions machine_halt() and machine_restart(), which have external linkage, are visible before the function definitions. Signed-off-by: Xen

Re: [PATCH 1/2] xen/arm: vtimer: Fix MISRA C 2012 Rule 8.4 violation

2022-06-23 Thread Julien Grall
Hi Xenia, On 22/06/2022 00:44, Stefano Stabellini wrote: On Tue, 21 Jun 2022, Xenia Ragiadakou wrote: Include vtimer.h so that the declarations of vtimer functions with external linkage are visible before the function definitions. Signed-off-by: Xenia Ragiadakou Reviewed-by: Stefano Stabell

  1   2   >