[PATCH] xen/scsifront: shost_priv() can never return NULL

2023-08-21 Thread Juergen Gross
There is no need to check whether shost_priv() returns a non-NULL value, as the pointer returned is just an offset to the passed in parameter. While at it replace an open coded shost_priv() instance. Reported-by: Dan Carpenter Signed-off-by: Juergen Gross --- drivers/scsi/xen-scsifront.c | 6 +

Re: [XEN PATCH v3] x86/hpet: Disable legacy replacement mode after IRQ test

2023-08-21 Thread Jan Beulich
On 07.08.2023 13:28, Simon Gaiser wrote: > As far as I understand the HPET legacy mode is not required after the > timer IRQ test. For previous discussion see [1] and [2]. Keeping it > enabled prevents reaching deeper C-states on some systems and thereby > also S0ix residency. So disable it after t

Re: [PATCH v2] docs/misra: document gcc-specific behavior with shifting signed integers

2023-08-21 Thread Jan Beulich
On 22.08.2023 03:02, Stefano Stabellini wrote: > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini Acked-by: Jan Beulich

Re: [RFC PATCH 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR

2023-08-21 Thread Jan Beulich
On 21.08.2023 18:54, Nicola Vetrini wrote: > To be able to check for the existence of the necessary subsections in > the documentation for MISRA C:2012 Dir 4.1, ECLAIR needs to have a source > file that is built. > > This file is generated from 'C-runtime-failures.rst' in docs/misra > and the conf

Re: [PATCH v3 1/4] xen/pci: address a violation of MISRA C:2012 Rule 8.3

2023-08-21 Thread Jan Beulich
On 22.08.2023 03:29, Stewart Hildebrand wrote: > Make the paramater names of the prototype match the definition. No functional > change. > > Signed-off-by: Stewart Hildebrand Reviewed-by: Jan Beulich

Re: [PATCH v1 45/57] xen/riscv: add definition of __read_mostly

2023-08-21 Thread Jan Beulich
On 16.08.2023 12:19, Oleksii Kurochko wrote: > --- a/xen/arch/riscv/include/asm/cache.h > +++ b/xen/arch/riscv/include/asm/cache.h > @@ -3,4 +3,6 @@ > #ifndef _ASM_RISCV_CACHE_H > #define _ASM_RISCV_CACHE_H > > +#define __read_mostly __section(".data.read_mostly") I did already post a patch el

Re: [PATCH 0/5] Fixes to debugging facilities

2023-08-21 Thread Jan Beulich
On 21.08.2023 17:55, Jinoh Kang wrote: > This is a rebased version of Andrew Cooper's debugging facilities patch: > https://lore.kernel.org/xen-devel/1528120755-17455-1-git-send-email-andrew.coop...@citrix.com/ > >> So this started as a small fix for the vmentry failure (penultimate patch), >> and

Re: [PATCH] docs/misra: add exceptions to rules

2023-08-21 Thread Jan Beulich
On 22.08.2023 03:40, Stefano Stabellini wrote: > On Mon, 21 Aug 2023, Jan Beulich wrote: >> On 19.08.2023 03:24, Stefano Stabellini wrote: >>> @@ -106,7 +107,23 @@ maintainers if you want to suggest a change. >>> * - `Rule 2.1 >>>

Re: [PATCH -next] xen: Fix one kernel-doc comment

2023-08-21 Thread Juergen Gross
On 31.07.23 05:00, Yang Li wrote: Use colon to separate parameter name from their specific meaning. silence the warning: drivers/xen/grant-table.c:1051: warning: Function parameter or member 'nr_pages' not described in 'gnttab_free_pages' Reported-by: Abaci Robot Closes: https://bugzilla.open

Re: [PATCH -next] xen: xenbus: Use helper function IS_ERR_OR_NULL()

2023-08-21 Thread Juergen Gross
On 17.08.23 03:47, Li Zetao wrote: Use IS_ERR_OR_NULL() to detect an error pointer or a null pointer open-coding to simplify the code. Signed-off-by: Li Zetao Pushed to xen/tip.git for-linus-6.6 Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.as

Re: [PATCH -next] xen: Switch to use kmemdup() helper

2023-08-21 Thread Juergen Gross
On 15.08.23 11:24, Ruan Jinjie wrote: Use kmemdup() helper instead of open-coding to simplify the code. Signed-off-by: Ruan Jinjie Pushed to xen/tip.git for-linus-6.6 Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature.asc Description: OpenPGP digit

Re: [PATCH -next] xen-pciback: Remove unused function declarations

2023-08-21 Thread Juergen Gross
On 08.08.23 17:09, Yue Haibing wrote: Commit a92336a1176b ("xen/pciback: Drop two backends, squash and cleanup some code.") declared but never implemented these functions. Signed-off-by: Yue Haibing Pushed to xen/tip.git for-linus-6.6 Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description:

Re: [PATCH] x86/xen: Make virt_to_pfn() a static inline

2023-08-21 Thread Juergen Gross
On 10.08.23 09:27, Linus Walleij wrote: Making virt_to_pfn() a static inline taking a strongly typed (const void *) makes the contract of a passing a pointer of that type to the function explicit and exposes any misuse of the macro virt_to_pfn() acting polymorphic and accepting many types such as

Re: [PATCH v1] xen: remove a confusing comment on auto-translated guest I/O

2023-08-21 Thread Juergen Gross
On 02.08.23 18:31, Petr Tesarik wrote: From: Petr Tesarik After removing the conditional return from xen_create_contiguous_region(), the accompanying comment was left in place, but it now precedes an unrelated conditional and confuses readers. Fixes: 989513a735f5 ("xen: cleanup pvh leftovers f

Re: [PATCH -next] xen/evtchn: Remove unused function declaration xen_set_affinity_evtchn()

2023-08-21 Thread Juergen Gross
On 01.08.23 16:54, Yue Haibing wrote: Commit 67473b8194bc ("xen/events: Remove disfunct affinity spreading") leave this unused declaration. Signed-off-by: Yue Haibing Pushed to xen/tip.git for-linus-6.6 Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_sign

Re: [PATCH] xen/xenbus: Avoid a lockdep warning when adding a watch

2023-08-21 Thread Juergen Gross
On 07.06.23 14:36, Petr Pavlu wrote: The following lockdep warning appears during boot on a Xen dom0 system: [ 96.388794] == [ 96.388797] WARNING: possible circular locking dependency detected [ 96.388799] 6.4.0-rc5-default+ #8 Tainted: G

Re: [PATCH v5 08/13] xen/arm: Fold pmap and fixmap into MMU system

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 22, 2023, at 02:14, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> From: Penny Zheng >> >> diff --git a/xen/arch/arm/include/asm/fixmap.h >> b/xen/arch/arm/include/asm/fixmap.h >> index 734eb9b1d4..5d5de6995a 100644 >> --- a/xen/arch/arm/

Re: [PATCH v5 13/13] xen/arm: mmu: enable SMMU subsystem only in MMU

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 22, 2023, at 05:34, Julien Grall wrote: > > Hi, > > On 14/08/2023 05:25, Henry Wang wrote: >> From: Penny Zheng >> SMMU subsystem is only supported in MMU system, so we make it dependent >> on CONFIG_HAS_MMU. > > "only supported" as in it doesn't work with Xen or the HW is

Re: [PATCH] docs/misra: add exceptions to rules

2023-08-21 Thread Stefano Stabellini
On Mon, 21 Aug 2023, Jan Beulich wrote: > On 19.08.2023 03:24, Stefano Stabellini wrote: > > From: Stefano Stabellini > > > > During the discussions that led to the acceptable of the Rules, we > > decided on a few exceptions that were not properly recorded in > > rules.rst. Other times, the excep

[PATCH v3 4/4] xen/vpci: header: status register handler

2023-08-21 Thread Stewart Hildebrand
Introduce a handler for the PCI status register, with ability to mask the capabilities bit. The status register is write-1-to-clear, so introduce handling for this type of register in vPCI. Signed-off-by: Stewart Hildebrand --- v2->v3: * new patch --- xen/drivers/vpci/header.c | 24 +

[PATCH v3 3/4] xen/vpci: header: filter PCI capabilities

2023-08-21 Thread Stewart Hildebrand
Currently, Xen vPCI only supports virtualizing the MSI and MSI-X capabilities. Hide all other PCI capabilities (including extended capabilities) from domUs for now, even though there may be certain devices/drivers that depend on being able to discover certain capabilities. We parse the physical PC

[PATCH v3 2/4] xen/pci: convert pci_find_*cap* to pci_sbdf_t

2023-08-21 Thread Stewart Hildebrand
Convert pci_find_*cap* functions and call sites to pci_sbdf_t, and remove some now unused local variables. No functional change. Signed-off-by: Stewart Hildebrand --- I built with EXTRA_CFLAGS_XEN_CORE="-Wunused-but-set-variable" (and unfortunately -Wno-error=unused-but-set-variable too) to ident

[PATCH v3 1/4] xen/pci: address a violation of MISRA C:2012 Rule 8.3

2023-08-21 Thread Stewart Hildebrand
Make the paramater names of the prototype match the definition. No functional change. Signed-off-by: Stewart Hildebrand --- v2->v3: * new patch --- xen/drivers/pci/pci.c | 2 +- xen/include/xen/pci.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/xen/drivers/pci/pci.c b/

[PATCH v3 0/4] vPCI capabilities filtering

2023-08-21 Thread Stewart Hildebrand
This small series enables vPCI to filter which PCI capabilities we expose to a domU. This series adds vPCI register handlers within xen/drivers/vpci/header.c:init_bars(), along with some supporting functions. Note there are minor rebase conflicts with the in-progress vPCI series [1]. These conflic

[PATCH v2] docs/misra: add exceptions to rules

2023-08-21 Thread Stefano Stabellini
From: Stefano Stabellini During the discussions that led to the acceptable of the Rules, we decided on a few exceptions that were not properly recorded in rules.rst. Other times, the exceptions were decided later when it came to enabling a rule in ECLAIR. Either way, update rules.rst with approp

[xen-4.17-testing test] 182410: tolerable FAIL - PUSHED

2023-08-21 Thread osstest service owner
flight 182410 xen-4.17-testing real [real] flight 182415 xen-4.17-testing real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/182410/ http://logs.test-lab.xenproject.org/osstest/logs/182415/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): t

[PATCH v2] docs/misra: document gcc-specific behavior with shifting signed integers

2023-08-21 Thread Stefano Stabellini
From: Stefano Stabellini Signed-off-by: Stefano Stabellini --- v2: - split << and >> - do not use the word "shift" instead of << or >> --- docs/misra/C-language-toolchain.rst | 9 + 1 file changed, 9 insertions(+) diff --git a/docs/misra/C-language-toolchain.rst b/docs/misra/C-languag

Re: [PATCH] docs/misra: document gcc-specific behavior with shifting signed integers

2023-08-21 Thread Stefano Stabellini
On Mon, 21 Aug 2023, Jan Beulich wrote: > On 19.08.2023 02:33, Stefano Stabellini wrote: > > From: Stefano Stabellini > > > > Signed-off-by: Stefano Stabellini > > --- > > Changes in v2: > > - use "shift" instead of << or >> > > - use All Architectures (I haven't changed all the other instances

Re: [XEN PATCH v2 1/2] automation/eclair: avoid unintentional ECLAIR analysis

2023-08-21 Thread Stefano Stabellini
On Mon, 21 Aug 2023, Simone Ballarin wrote: > With this patch, ECLAIR jobs will need to be manually > started for "people/.*" pipelines and will not be triggered > if the WTOKEN variable is missing. > > This avoids occupying the runner on analyzes that might > not be used by developers. > > If de

Re: [XEN PATCH v2 2/2] automation: avoid pipelines on specific branches

2023-08-21 Thread Stefano Stabellini
On Mon, 21 Aug 2023, Simone Ballarin wrote: > This patch avoids the execution of pipelines in the > following branches: > - master > - smoke > - coverirty-tested/.* > - stable-.* > > The job-level exclusions have been removed as they are > pointless with this new workspace-level exclusion. > > Si

Re: [PATCH v5 13/13] xen/arm: mmu: enable SMMU subsystem only in MMU

2023-08-21 Thread Julien Grall
Hi, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng SMMU subsystem is only supported in MMU system, so we make it dependent on CONFIG_HAS_MMU. "only supported" as in it doesn't work with Xen or the HW is not supporting it? Also, I am not entirely convinced that anything in passth

Re: [PATCH v5 12/13] xen/arm: mmu: relocate copy_from_paddr() to setup.c

2023-08-21 Thread Julien Grall
Hi, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng Function copy_from_paddr() is defined in asm/setup.h, so it is better to be implemented in setup.c. I don't agree with this reasoning. We used setup.h to declare prototype for function that are out of setup.c. Looking at the ove

Re: [PATCH v5 10/13] xen/arm: mmu: move MMU-specific setup_mm to mmu/setup.c

2023-08-21 Thread Julien Grall
Hi, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng setup_mm is used for Xen to setup memory management subsystem at boot time, like boot allocator, direct-mapping, xenheap initialization, frametable and static memory pages. We could inherit some components seamlessly in later MPU sy

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

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

[linux-linus test] 182409: regressions - FAIL

2023-08-21 Thread osstest service owner
flight 182409 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/182409/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-arm64-pvops 6 kernel-build fail in 182408 REGR. vs. 182405 Tests which are fai

Re: [XEN][PATCH v8 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-08-21 Thread Julien Grall
Hi, On 21/08/2023 20:46, Vikram Garhwal wrote: Hi Julien On Fri, Aug 18, 2023 at 09:35:02PM +0100, Julien Grall wrote: Hi Vikram, On 18/08/2023 20:52, Vikram Garhwal wrote: Hi Jan On Thu, Aug 17, 2023 at 09:05:44AM +0200, Jan Beulich wrote: On 17.08.2023 02:39, Vikram Garhwal wrote: --- /de

Re: [XEN][PATCH v8 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-08-21 Thread Vikram Garhwal
Hi Julien On Fri, Aug 18, 2023 at 09:35:02PM +0100, Julien Grall wrote: > Hi Vikram, > > On 18/08/2023 20:52, Vikram Garhwal wrote: > > Hi Jan > > On Thu, Aug 17, 2023 at 09:05:44AM +0200, Jan Beulich wrote: > > > On 17.08.2023 02:39, Vikram Garhwal wrote: > > > > --- /dev/null > > > > +++ b/xen/i

Re: [XEN][PATCH v9 09/19] xen/iommu: Move spin_lock from iommu_dt_device_is_assigned to caller

2023-08-21 Thread Vikram Garhwal
Hi Jen, On Mon, Aug 21, 2023 at 08:53:38AM +0200, Jan Beulich wrote: > On 19.08.2023 02:28, Vikram Garhwal wrote: > > Rename iommu_dt_device_is_assigned() to > > iommu_dt_device_is_assigned_locked(). > > Remove static type so this can also be used by SMMU drivers to check if the > > device is bein

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

2023-08-21 Thread Vikram Garhwal
Hi Anthony, On Mon, Aug 21, 2023 at 05:18:27PM +0100, Anthony PERARD wrote: > On Fri, Aug 18, 2023 at 05:28:48PM -0700, Vikram Garhwal wrote: > > xc_dt_overlay() sends the device tree binary overlay, size of .dtbo and > > overlay > > operation type i.e. add or remove to xen. > > > > Signed-off-by

Re: [PATCH v5 09/13] xen/arm: mm: Use generic variable/function names for extendability

2023-08-21 Thread Julien Grall
Hi, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng As preparation for MPU support, which will use some variables/functions for both MMU and MPU system, We rename the affected variable/function to more generic names: - init_ttbr -> init_mm, You moved init_ttbr to mm/mmu.c. So why do

Re: [PATCH v5 08/13] xen/arm: Fold pmap and fixmap into MMU system

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: From: Penny Zheng fixmap and pmap are MMU-specific features, so fold them to MMU system. Do the folding for pmap by moving the HAS_PMAP Kconfig selection under HAS_MMU. Do the folding for fixmap by moving the implementation of virt_to_fix() to m

Re: [PATCH v5 07/13] xen/arm: Extract MMU-specific code

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: Currently, most of the MMU-specific code is in mm.{c,h}. To make the mm extendable, this commit extract the MMU-specific code by firstly: - Create a arch/arm/include/asm/mmu/ subdir. - Create a arch/arm/mmu/ subdir. Then move the MMU-specific cod

Re: [PATCH 0/3] xen/arm: Some clean-up found with -Wconversion and -Warith-conversion

2023-08-21 Thread Julien Grall
Hi, On 17/08/2023 22:43, Julien Grall wrote: From: Julien Grall Hi all, This is a small series to fix some of the issues found while playing with -Wconversion and -Warith-conversion. There are a lot more but the bulk are in - bitmap - cpumask - nodemask - bitops/atomics - find_* S

Re: [PATCH v5 03/13] xen/arm64: prepare for moving MMU related code from head.S

2023-08-21 Thread Julien Grall
Hi Henry, On 21/08/2023 09:54, Henry Wang wrote: On Aug 21, 2023, at 16:44, Julien Grall wrote: On 14/08/2023 05:25, Henry Wang wrote: From: Wei Chen We want to reuse head.S for MPU systems, but there are some code are implemented for MMU systems only. We will move such code to another MMU sp

Re: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible

2023-08-21 Thread Julien Grall
Hi Michal, On 18/08/2023 08:02, Michal Orzel wrote: On 17/08/2023 23:43, Julien Grall wrote: From: Julien Grall Switch to unsigned int for the return/parameters of the following functions: * REG_RANK_NR(): 'b' (number of bits) and the return is always positive. 'n' doesn't need

Re: [PATCH 2/3] xen/arm: vgic: Use 'unsigned int' rather than 'int' whenever it is possible

2023-08-21 Thread Julien Grall
Hi Stefano, On 18/08/2023 00:04, Stefano Stabellini wrote: On Thu, 17 Aug 2023, Julien Grall wrote: From: Julien Grall Switch to unsigned int for the return/parameters of the following functions: * REG_RANK_NR(): 'b' (number of bits) and the return is always positive. 'n' doesn't

[RFC PATCH 0/3] docs/misra: add documentation to address MISRA C:2012 Dir 4.1

2023-08-21 Thread Nicola Vetrini
The headline of Directive 4.1 states: "Run-time failures shall be minimized". Thus, it requires the project to supply documentation that pertains the measures and techinques used to prevent run-time failures from happening. For ease of reading, the documentation is in RST format, but since ECLAIR n

[RFC PATCH 3/3] automation/eclair: build docs/misra to address MISRA C:2012 Dir 4.1

2023-08-21 Thread Nicola Vetrini
The documentation pertaining Directive 4.1 is contained in docs/misra. The build script driving the analysis is amended to allow ECLAIR to find it and thus resolving violations of the directive. Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/build.sh | 10 -- automation/e

[RFC PATCH 2/3] docs: make the docs for MISRA C:2012 Dir 4.1 visible to ECLAIR

2023-08-21 Thread Nicola Vetrini
To be able to check for the existence of the necessary subsections in the documentation for MISRA C:2012 Dir 4.1, ECLAIR needs to have a source file that is built. This file is generated from 'C-runtime-failures.rst' in docs/misra and the configuration is updated accordingly. Signed-off-by: Nicol

[RFC PATCH 1/3] docs/misra: add documentation for MISRA C:2012 Dir 4.1

2023-08-21 Thread Nicola Vetrini
The aforementioned directive requires the project to supply documentation on the measures taken towards the minimization of run-time failures. The 'rules.rst' file is updated accordingly to mention the newly added documentation. Signed-off-by: Nicola Vetrini --- docs/misra/C-runtime-failures.rs

Re: [PATCH v1 44/57] xen/riscv: introduce asm/vm_event.h

2023-08-21 Thread Tamas K Lengyel
On Wed, Aug 16, 2023 at 12:30 PM Oleksii Kurochko wrote: > > Signed-off-by: Oleksii Kurochko > --- > xen/arch/riscv/include/asm/vm_event.h | 52 +++ > 1 file changed, 52 insertions(+) > create mode 100644 xen/arch/riscv/include/asm/vm_event.h I don't think we ought to r

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

2023-08-21 Thread Anthony PERARD
On Fri, Aug 18, 2023 at 05:28:48PM -0700, Vikram Garhwal wrote: > xc_dt_overlay() sends the device tree binary overlay, size of .dtbo and > overlay > operation type i.e. add or remove to xen. > > Signed-off-by: Vikram Garhwal Hi Vikram, I've given some comments on the v7 of this patch at [1],

Re: [PATCH 1/5] x86: Fix calculation of %dr6/7 reserved bits

2023-08-21 Thread Jinoh Kang
On 8/22/23 00:56, Jinoh Kang wrote: > From: Andrew Cooper > > The reserved bit calculations for %dr6 and %dr7 depend on whether the VM has > the Restricted Transnational Memory feature available. s/Transnational/Transactional/. It was in the original review, but I missed the change. Apologies.

[PATCH 2/5] x86/emul: Add pending_dbg field to x86_event

2023-08-21 Thread Jinoh Kang
From: Andrew Cooper All #DB exceptions result in an update of %dr6, but this isn't captured in Xen's handling. PV guests generally work by modifying %dr6 before raising #DB, whereas HVM guests do nothing and have a single-step special case in the lowest levels of {vmx,svm}_inject_event(). All o

[PATCH 4/5] x86: Fix merging of new status bits into %dr6

2023-08-21 Thread Jinoh Kang
From: Andrew Cooper The current logic used to update %dr6 when injecting #DB is buggy. The architectural behaviour is to overwrite B{0..3} (rather than accumulate) and accumulate all other bits. Introduce a new merge_dr6() helper, which also takes care of handing RTM correctly. Signed-off-by:

[PATCH 5/5] x86/dbg: Cleanup of legacy dr6 constants

2023-08-21 Thread Jinoh Kang
From: Andrew Cooper Replace the few remaining uses with X86_DR6_* constants. Signed-off-by: Jinoh Kang --- CC: Jan Beulich CC: Wei Liu CC: Roger Pau Monné --- xen/arch/x86/hvm/vmx/vmx.c | 2 +- xen/arch/x86/include/asm/debugreg.h | 17 - xen/arch/x86/pv/emul-priv-o

[PATCH 3/5] x86/hvm: RFC - PROBABLY BROKEN - Defer all debugging/monitor actions to {svm,vmx}_inject_event()

2023-08-21 Thread Jinoh Kang
From: Andrew Cooper Currently, there is a lot of functionality in the #DB intercepts, and some repeated functionality in the *_inject_event() logic. The gdbsx code is implemented at both levels (albeit differently for #BP, which is presumably due to the fact that the old emulator behaviour used

[PATCH 1/5] x86: Fix calculation of %dr6/7 reserved bits

2023-08-21 Thread Jinoh Kang
From: Andrew Cooper The reserved bit calculations for %dr6 and %dr7 depend on whether the VM has the Restricted Transnational Memory feature available. Introduce adjust_dr{6,7}_rsvd() and replace the opencoded logic and constants (except for DR_STATUS_RESERVED_ONE which is (mis)used elsewhere an

[PATCH 0/5] Fixes to debugging facilities

2023-08-21 Thread Jinoh Kang
This is a rebased version of Andrew Cooper's debugging facilities patch: https://lore.kernel.org/xen-devel/1528120755-17455-1-git-send-email-andrew.coop...@citrix.com/ > So this started as a small fix for the vmentry failure (penultimate patch), > and has snowballed... > > I'm fairly confident tha

Re: [PATCH v6] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Juergen Gross
On 21.08.23 17:17, Anthony PERARD wrote: On Mon, Aug 21, 2023 at 10:14:22AM +0200, Juergen Gross wrote: diff --git a/tools/xenstored/.gitignore b/tools/xenstored/.gitignore new file mode 100644 index 00..edbb5d79fe --- /dev/null +++ b/tools/xenstored/.gitignore @@ -0,0 +1 @@ +xenstored

Re: [PATCH v6] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Anthony PERARD
On Mon, Aug 21, 2023 at 10:14:22AM +0200, Juergen Gross wrote: > diff --git a/tools/xenstored/.gitignore b/tools/xenstored/.gitignore > new file mode 100644 > index 00..edbb5d79fe > --- /dev/null > +++ b/tools/xenstored/.gitignore > @@ -0,0 +1 @@ > +xenstored Could you write that "/xenstor

Ping: [PATCH] mem-sharing: move (x86) / drop (Arm) arch_dump_shared_mem_info()

2023-08-21 Thread Jan Beulich
On 08.08.2023 14:02, Jan Beulich wrote: > When !MEM_SHARING no useful output is produced. Move the function into > mm/mem_sharing.c while conditionalizing the call to it, thus allowing to > drop it altogether from Arm (and eliminating the need to introduce stubs > on PPC and RISC-V). > > Signed-of

Re: [PATCH -next] xen: Fix one kernel-doc comment

2023-08-21 Thread Juergen Gross
On 31.07.23 05:00, Yang Li wrote: Use colon to separate parameter name from their specific meaning. silence the warning: drivers/xen/grant-table.c:1051: warning: Function parameter or member 'nr_pages' not described in 'gnttab_free_pages' Reported-by: Abaci Robot Closes: https://bugzilla.open

[linux-linus test] 182408: regressions - FAIL

2023-08-21 Thread osstest service owner
flight 182408 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/182408/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-xl-qemut-debianhvm-amd64 18 guest-localmigrate/x10 fail REGR. vs. 182405 test-am

Re: Community Manager update - August 2023

2023-08-21 Thread Kelly Choi
Hey Chuck, Thanks for your feedback and highlighting this to me. You're correct, they did rebrand so I will update this to 'IBM Cloud'. Many thanks, Kelly Choi Open Source Community Manager, XenServer Cloud Software Group On Sat, Aug 19, 2023 at 12:34 AM Chuck Zmudzinski wrote: > On 8/18/202

Re: [PATCH v2 3/4] virtio: use defer_call() in virtio_irqfd_notify()

2023-08-21 Thread Ilya Maximets
On 8/17/23 17:58, Stefan Hajnoczi wrote: > virtio-blk and virtio-scsi invoke virtio_irqfd_notify() to send Used > Buffer Notifications from an IOThread. This involves an eventfd > write(2) syscall. Calling this repeatedly when completing multiple I/O > requests in a row is wasteful. > > Use the de

Re: [PATCH v3 0/8] Follow-up static shared memory PART I

2023-08-21 Thread Michal Orzel
Hi Penny, On 21/08/2023 06:00, Penny Zheng wrote: > > > There are some unsolving issues on current 4.17 static shared memory > feature[1], including: > - In order to avoid keeping growing 'membank', having the shared memory > info in separate structures is preferred. > - Missing implementation o

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 21, 2023, at 18:16, Julien Grall wrote: > On 21/08/2023 10:29, Henry Wang wrote: >>> On Aug 21, 2023, at 17:18, Julien Grall wrote: >>> On 14/08/2023 05:25, Henry Wang wrote: The MMU specific code in head.S will not be used on MPU systems. Instead of introducing mor

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

2023-08-21 Thread Julien Grall
On 21/08/2023 10:29, Henry Wang wrote: On Aug 21, 2023, at 17:18, Julien Grall wrote: On 14/08/2023 05:25, Henry Wang wrote: The MMU specific code in head.S will not be used on MPU systems. Instead of introducing more #ifdefs which will bring complexity to the code, move MMU related code to

[xen-unstable test] 182406: tolerable FAIL

2023-08-21 Thread osstest service owner
flight 182406 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/182406/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict 7 xen-install fail in 182403 pass in 182406 test-amd64-i3

Re: [PATCH v5 06/13] xen/arm64: Fold setup_fixmap() to create_page_tables()

2023-08-21 Thread Henry Wang
> On Aug 21, 2023, at 17:22, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> The original assembly setup_fixmap() is actually doing two seperate >> tasks, one is enabling the early UART when earlyprintk on, and the >> other is to set up the fixmap (even when ea

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 21, 2023, at 17:18, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> The MMU specific code in head.S will not be used on MPU systems. >> Instead of introducing more #ifdefs which will bring complexity >> to the code, move MMU related code to mm

Re: [PATCH v5 06/13] xen/arm64: Fold setup_fixmap() to create_page_tables()

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: The original assembly setup_fixmap() is actually doing two seperate tasks, one is enabling the early UART when earlyprintk on, and the other is to set up the fixmap (even when earlyprintk is off). Per discussion in [1], since commit 9d267c049d92

Re: [PATCH v5 04/13] xen/arm64: Split and move MMU-specific head.S to mmu/head.S

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: The MMU specific code in head.S will not be used on MPU systems. Instead of introducing more #ifdefs which will bring complexity to the code, move MMU related code to mmu/head.S and keep common code in head.S. Two notes while moving: - As "fail" i

[XEN PATCH v2 2/2] automation: avoid pipelines on specific branches

2023-08-21 Thread Simone Ballarin
This patch avoids the execution of pipelines in the following branches: - master - smoke - coverirty-tested/.* - stable-.* The job-level exclusions have been removed as they are pointless with this new workspace-level exclusion. Signed-off-by: Simone Ballarin --- Changes in v2: - remove useless

[XEN PATCH v2 1/2] automation/eclair: avoid unintentional ECLAIR analysis

2023-08-21 Thread Simone Ballarin
With this patch, ECLAIR jobs will need to be manually started for "people/.*" pipelines and will not be triggered if the WTOKEN variable is missing. This avoids occupying the runner on analyzes that might not be used by developers. If developers want to analyze their own repositories they need to

[XEN PATCH v2 0/2] automation: avoid unnecessary analyses

2023-08-21 Thread Simone Ballarin
This series aims to reduce the analyses performed by the ECLAIR runner by avoiding some branches already excluded by other jobs and requiring analyses on people/.* to be manually triggered. --- Changes in v2: - move some changes from 1/2 to 2/2. - remove useless except clause in .yocto-test - avoi

Re: [PATCH v5 03/13] xen/arm64: prepare for moving MMU related code from head.S

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 21, 2023, at 16:44, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> From: Wei Chen >> We want to reuse head.S for MPU systems, but there are some >> code are implemented for MMU systems only. We will move such >> code to another MMU specific

Re: [PATCH v5 02/13] xen/arm: Introduce CONFIG_MMU Kconfig option

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 21, 2023, at 16:43, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> There are two types of memory system architectures available for >> Arm-based systems, namely the Virtual Memory System Architecture (VMSA) >> and the Protected Memory System

Re: [PATCH v5 03/13] xen/arm64: prepare for moving MMU related code from head.S

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: From: Wei Chen We want to reuse head.S for MPU systems, but there are some code are implemented for MMU systems only. We will move such code to another MMU specific file. But before that we will do some indentations fix in this patch to make the

Re: [PATCH v5 02/13] xen/arm: Introduce CONFIG_MMU Kconfig option

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: There are two types of memory system architectures available for Arm-based systems, namely the Virtual Memory System Architecture (VMSA) and the Protected Memory System Architecture (PMSA). According to ARM DDI 0487G.a, A VMSA provides a Memory Ma

Re: [PATCH v5 01/13] xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()

2023-08-21 Thread Henry Wang
Hi Julien, > On Aug 21, 2023, at 16:33, Julien Grall wrote: > > Hi Henry, > > On 14/08/2023 05:25, Henry Wang wrote: >> From: Wei Chen >> At the moment, on MMU system, enable_mmu() will return to an >> address in the 1:1 mapping, then each path is responsible to >> switch to virtual runtime ma

Re: [PATCH v5 01/13] xen/arm64: head.S: Introduce enable_{boot,secondary}_cpu_mm()

2023-08-21 Thread Julien Grall
Hi Henry, On 14/08/2023 05:25, Henry Wang wrote: From: Wei Chen At the moment, on MMU system, enable_mmu() will return to an address in the 1:1 mapping, then each path is responsible to switch to virtual runtime mapping. Then remove_identity_mapping() is called on the boot CPU to remove all 1:

[PATCH v6] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Juergen Gross
In tools/xenstore there are living xenstored and xenstore clients. They are no longer sharing anything apart from the "xenstore" in their names. Move the xenstored sources into a new directory tools/xenstored while dropping the "xenstored_" prefix from their names. This will make it clearer that x

Re: [PATCH v5] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Juergen Gross
On 21.08.23 09:59, Julien Grall wrote: Hi, On 18/08/2023 15:20, Andrew Cooper wrote: On 18/08/2023 3:08 pm, Juergen Gross wrote: diff --git a/.gitignore b/.gitignore index c1b73b0968..c6489c4e70 100644 --- a/.gitignore +++ b/.gitignore @@ -237,22 +237,22 @@ tools/xenmon/xentrace_setmask   tool

Re: [XEN PATCH 2/2] automation/eclair: avoid unintentional ECLAIR analysis

2023-08-21 Thread Simone Ballarin
On 14/08/2023 23:52, Stefano Stabellini wrote: On Mon, 14 Aug 2023, Stefano Stabellini wrote: On Sat, 12 Aug 2023, Simone Ballarin wrote: > On 12/08/2023 00:04, Stefano Stabellini wrote: > > On Fri, 11 Aug 2023, Simone Ballarin wrote: > > > With this patch, ECLAIR jobs will need to be manually >

Re: [PATCH v5] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Julien Grall
Hi Juergen, On 18/08/2023 15:08, Juergen Gross wrote: In tools/xenstore there are living xenstored and xenstore clients. They are no longer sharing anything apart from the "xenstore" in their names. Move the xenstored sources into a new directory tools/xenstored while dropping the "xenstored_"

Re: [PATCH v5] tools/xenstore: move xenstored sources into dedicated directory

2023-08-21 Thread Julien Grall
Hi, On 18/08/2023 15:20, Andrew Cooper wrote: On 18/08/2023 3:08 pm, Juergen Gross wrote: diff --git a/.gitignore b/.gitignore index c1b73b0968..c6489c4e70 100644 --- a/.gitignore +++ b/.gitignore @@ -237,22 +237,22 @@ tools/xenmon/xentrace_setmask tools/xenmon/xenbaked tools/xenpaging/xenp

Re: [XEN PATCH 2/2] automation/eclair: avoid unintentional ECLAIR analysis

2023-08-21 Thread Simone Ballarin
On 14/08/2023 23:45, Stefano Stabellini wrote: On Sat, 12 Aug 2023, Simone Ballarin wrote: On 12/08/2023 00:04, Stefano Stabellini wrote: > On Fri, 11 Aug 2023, Simone Ballarin wrote: > > With this patch, ECLAIR jobs will need to be manually > > started for "people/.*" pipelines. > > > > This av

Re: [PATCH] docs/misra: document gcc-specific behavior with shifting signed integers

2023-08-21 Thread Jan Beulich
On 19.08.2023 02:33, Stefano Stabellini wrote: > From: Stefano Stabellini > > Signed-off-by: Stefano Stabellini > --- > Changes in v2: > - use "shift" instead of << or >> > - use All Architectures (I haven't changed all the other instances of > x86/arm in the file yet) > --- > docs/misra/C-lang

Re: [PATCH] docs/misra: add exceptions to rules

2023-08-21 Thread Jan Beulich
On 19.08.2023 03:24, Stefano Stabellini wrote: > From: Stefano Stabellini > > During the discussions that led to the acceptable of the Rules, we > decided on a few exceptions that were not properly recorded in > rules.rst. Other times, the exceptions were decided later when it came > to enabling