Re: [PATCH v2 2/2] Revert "xen-netback: Check for hotplug-status existence before watching"

2022-02-22 Thread Roger Pau Monné
On Tue, Feb 22, 2022 at 01:18:17AM +0100, Marek Marczykowski-Górecki wrote: > This reverts commit 2afeec08ab5c86ae21952151f726bfe184f6b23d. > > The reasoning in the commit was wrong - the code expected to setup the > watch even if 'hotplug-status' didn't exist. In fact, it relied on the > watch be

[libvirt test] 168191: regressions - FAIL

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

Re: [PATCH v2 04/70] x86/pv-shim: Don't modify the hypercall table

2022-02-22 Thread Jan Beulich
On 21.02.2022 20:21, Andrew Cooper wrote: > On 17/02/2022 10:20, Jan Beulich wrote: >> On 16.02.2022 23:17, Andrew Cooper wrote: >>> On 14/02/2022 13:56, Jan Beulich wrote: On 14.02.2022 14:50, Andrew Cooper wrote: > On 14/02/2022 13:33, Jan Beulich wrote: >> On 14.02.2022 13:50, Andre

Re: [PATCH] xen/arm: Rename psr_mode_is_32bit to regs_mode_is_32bit

2022-02-22 Thread Bertrand Marquis
Hi Michal, > On 22 Feb 2022, at 07:07, Michal Orzel wrote: > > Hi Julien, > > On 21.02.2022 16:58, Julien Grall wrote: >> Hi Michal, >> >> On 21/02/2022 10:59, Michal Orzel wrote: >>> Following a discussion [1] it seems like that renaming work has >>> been forgotten. >> >> This is in my todo

Re: [PATCH] xen/include/public: add macro for invalid grant reference

2022-02-22 Thread Jan Beulich
On 21.02.2022 16:57, Juergen Gross wrote: > On 21.02.22 16:31, Jan Beulich wrote: >> On 21.02.2022 16:05, Juergen Gross wrote: >>> On 21.02.22 15:31, Jan Beulich wrote: On 21.02.2022 15:27, Juergen Gross wrote: > On 21.02.22 15:18, Jan Beulich wrote: >> On 21.02.2022 13:42, Juergen Gro

Re: [PATCH v4] x86/mwait-idle: re-order state entry/exit code a little

2022-02-22 Thread Roger Pau Monné
On Fri, Feb 18, 2022 at 09:35:10AM +0100, Jan Beulich wrote: > The initial observation is that unlike the original ACPI idle driver we > have a 2nd cpu_is_haltable() in here. By making the actual state entry > conditional, the emitted trace records as well as the subsequent stats > update are at le

Re: [PATCH v2 2/3] SVM: sync VM-exit perf counters with known VM-exit reasons

2022-02-22 Thread Roger Pau Monné
On Wed, Jan 05, 2022 at 02:58:11PM +0100, Jan Beulich wrote: > This has gone out of sync over time, resulting in NPF and XSETBV exits > incrementing the same counter. Introduce a simplistic mechanism to > hopefully keep things in better sync going forward. > > Signed-off-by: Jan Beulich Reviewed

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Jan Beulich
On 21.02.2022 19:03, Andrew Cooper wrote: > Most IOMMU hooks are already altcall for performance reasons. Convert the > rest of them so we can harden all the hooks in Control Flow Integrity > configurations. This necessitates the use of iommu_{v,}call() in debug builds > too. > > Move the root i

Re: [PATCH] xen/include/public: add macro for invalid grant reference

2022-02-22 Thread Juergen Gross
On 22.02.22 09:55, Jan Beulich wrote: On 21.02.2022 16:57, Juergen Gross wrote: On 21.02.22 16:31, Jan Beulich wrote: On 21.02.2022 16:05, Juergen Gross wrote: On 21.02.22 15:31, Jan Beulich wrote: On 21.02.2022 15:27, Juergen Gross wrote: On 21.02.22 15:18, Jan Beulich wrote: On 21.02.2022

Re: [PATCH v4] x86/mwait-idle: re-order state entry/exit code a little

2022-02-22 Thread Jan Beulich
On 22.02.2022 10:08, Roger Pau Monné wrote: > On Fri, Feb 18, 2022 at 09:35:10AM +0100, Jan Beulich wrote: >> The initial observation is that unlike the original ACPI idle driver we >> have a 2nd cpu_is_haltable() in here. By making the actual state entry >> conditional, the emitted trace records a

Re: [PATCH v2 3/3] x86/perfc: fold HVM's VM-exit counter arrays

2022-02-22 Thread Roger Pau Monné
On Wed, Jan 05, 2022 at 02:59:03PM +0100, Jan Beulich wrote: > Only one of them can be in use at a time, so make the whole set union- > like. While doing the rename in SVM code, combine the two perf_incra(), > generalizing the range upwards of VMEXIT_NPF. > > Signed-off-by: Jan Beulich Reviewed-

Re: [PATCH v2 3/3] x86/perfc: fold HVM's VM-exit counter arrays

2022-02-22 Thread Jan Beulich
On 22.02.2022 10:40, Roger Pau Monné wrote: > On Wed, Jan 05, 2022 at 02:59:03PM +0100, Jan Beulich wrote: >> Only one of them can be in use at a time, so make the whole set union- >> like. While doing the rename in SVM code, combine the two perf_incra(), >> generalizing the range upwards of VMEXIT

Re: [PATCH] xen/arm: Rename psr_mode_is_32bit to regs_mode_is_32bit

2022-02-22 Thread Michal Orzel
Hi Bertrand, On 22.02.2022 09:48, Bertrand Marquis wrote: > Hi Michal, > >> On 22 Feb 2022, at 07:07, Michal Orzel wrote: >> >> Hi Julien, >> >> On 21.02.2022 16:58, Julien Grall wrote: >>> Hi Michal, >>> >>> On 21/02/2022 10:59, Michal Orzel wrote: Following a discussion [1] it seems like

Re: [PATCH] xen/arm: Rename psr_mode_is_32bit to regs_mode_is_32bit

2022-02-22 Thread Julien Grall
On 22/02/2022 07:07, Michal Orzel wrote: Hi Julien, Hi Michal, On 21.02.2022 16:58, Julien Grall wrote: Hi Michal, On 21/02/2022 10:59, Michal Orzel wrote: Following a discussion [1] it seems like that renaming work has been forgotten. This is in my todo list of clean-up I need to do

Re: [PATCH v2 2/2] Revert "xen-netback: Check for hotplug-status existence before watching"

2022-02-22 Thread Marek Marczykowski-Górecki
On Tue, Feb 22, 2022 at 09:31:31AM +0100, Roger Pau Monné wrote: > On Tue, Feb 22, 2022 at 01:18:17AM +0100, Marek Marczykowski-Górecki wrote: > > This reverts commit 2afeec08ab5c86ae21952151f726bfe184f6b23d. > > > > The reasoning in the commit was wrong - the code expected to setup the > > watch

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Andrew Cooper
On 22/02/2022 09:29, Jan Beulich wrote: > On 21.02.2022 19:03, Andrew Cooper wrote: >> Most IOMMU hooks are already altcall for performance reasons. Convert the >> rest of them so we can harden all the hooks in Control Flow Integrity >> configurations. This necessitates the use of iommu_{v,}call(

[PATCH v2 0/2] Rename psr_mode_is_{32bit/user} to regs_mode_is_{32bit/user}

2022-02-22 Thread Michal Orzel
The request to rename psr_mode_is_32bit to regs_mode_is_32bit was make during a discussion [1]. Because psr_mode_is_user shares the same prototype, we should rename it as well to keep the naming consistent. [1] https://marc.info/?l=xen-devel&m=156457538423787&w=2 Michal Orzel (2): xen/arm: Rena

[PATCH v2 1/2] xen/arm: Rename psr_mode_is_32bit to regs_mode_is_32bit

2022-02-22 Thread Michal Orzel
Commit aa2f5aefa8de ("xen/arm: Rework psr_mode_is_32bit()") modified the function to take a struct cpu_user_regs instead of psr. Perform renaming of psr_mode_is_32bit to regs_mode_is_32bit to reflect that change. Signed-off-by: Michal Orzel --- This change was requested following up a discussion:

[PATCH v2 2/2] xen/arm: Rename psr_mode_is_user to regs_mode_is_user

2022-02-22 Thread Michal Orzel
Perform renaming of psr_mode_is_user to regs_mode_is_user in order to reflect that it takes struct cpu_user_regs as a parameter and not psr. Signed-off-by: Michal Orzel --- Changes since v1: -new patch --- xen/arch/arm/arm64/vsysreg.c| 4 ++-- xen/arch/arm/include/asm/regs.h | 4 ++-- xen/

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Andrew Cooper
On 22/02/2022 10:54, Andrew Cooper wrote: > On 22/02/2022 09:29, Jan Beulich wrote: >> On 21.02.2022 19:03, Andrew Cooper wrote: >>> Most IOMMU hooks are already altcall for performance reasons. Convert the >>> rest of them so we can harden all the hooks in Control Flow Integrity >>> configuration

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Jan Beulich
On 22.02.2022 11:54, Andrew Cooper wrote: > On 22/02/2022 09:29, Jan Beulich wrote: >> On 21.02.2022 19:03, Andrew Cooper wrote: >>> --- a/xen/drivers/passthrough/iommu.c >>> +++ b/xen/drivers/passthrough/iommu.c >>> @@ -540,7 +540,7 @@ int __init iommu_setup(void) >>> int iommu_suspend() >>> { >

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Jan Beulich
On 22.02.2022 12:02, Andrew Cooper wrote: > On 22/02/2022 10:54, Andrew Cooper wrote: >> On 22/02/2022 09:29, Jan Beulich wrote: >>> On 21.02.2022 19:03, Andrew Cooper wrote: @@ -106,7 +104,7 @@ int iommu_setup_hpet_msi(struct msi_desc *); static inline int iommu_adjust_irq_affinities(vo

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

2022-02-22 Thread osstest service owner
flight 168189 xen-unstable real [real] flight 168192 xen-unstable real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168189/ http://logs.test-lab.xenproject.org/osstest/logs/168192/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armh

Re: [PATCH v2.1 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Andrew Cooper
On 22/02/2022 11:02, Andrew Cooper wrote: > On 22/02/2022 10:54, Andrew Cooper wrote: >> On 22/02/2022 09:29, Jan Beulich wrote: >>> On 21.02.2022 19:03, Andrew Cooper wrote: Most IOMMU hooks are already altcall for performance reasons. Convert the rest of them so we can harden all the h

[PATCH v2.2 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Andrew Cooper
Most IOMMU hooks are already altcall for performance reasons. Convert the rest of them so we can harden all the hooks in Control Flow Integrity configurations. This necessitates the use of iommu_{v,}call() in debug builds too. Switch to using an ASSERT() as all forms should resolve to &iommu_ops

Re: [PATCH] xen: use helper macro __ATTR_RW

2022-02-22 Thread Juergen Gross
On 22.02.22 12:12, Miaohe Lin wrote: Use helper macro __ATTR_RW to define hyp_sysfs_attr to make code more clear. Minor readability improvement. Signed-off-by: Miaohe Lin Reviewed-by: Juergen Gross Juergen OpenPGP_0xB0DE9DD628BF132F.asc Description: OpenPGP public key OpenPGP_signature

Re: [PATCH v2.2 8/7] x86/IOMMU: Use altcall, and __initconst_cf_clobber

2022-02-22 Thread Jan Beulich
On 22.02.2022 12:47, Andrew Cooper wrote: > Most IOMMU hooks are already altcall for performance reasons. Convert the > rest of them so we can harden all the hooks in Control Flow Integrity > configurations. This necessitates the use of iommu_{v,}call() in debug builds > too. Switch to using an

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Wojtek Porczyk
On Mon, Feb 14, 2022 at 09:50:25PM +, George Dunlap wrote: > I think it’s too much effort to ask developers to try to find the actual > minimum version of each individual dependency as things evolve. By "find the actual minimum version", do you mean to get to know the version number, or instal

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Marek Marczykowski-Górecki
On Tue, Feb 22, 2022 at 01:18:03PM +0100, Wojtek Porczyk wrote: > On Mon, Feb 14, 2022 at 09:50:25PM +, George Dunlap wrote: > > I think it’s too much effort to ask developers to try to find the actual > > minimum version of each individual dependency as things evolve. > > By "find the actual

Re: [PATCH v3 01/19] xen/arm: lpae: Rename LPAE_ENTRIES_MASK_GS to LPAE_ENTRY_MASK_GS

2022-02-22 Thread Michal Orzel
Hi Julien, On 21.02.2022 11:22, Julien Grall wrote: > From: Julien Grall > > Commit 05031fa87357 "xen/arm: guest_walk: Only generate necessary > offsets/masks" introduced LPAE_ENTRIES_MASK_GS. In a follow-up patch, > we will use it for to define LPAE_ENTRY_MASK. > for is unneddded. Should be "w

[PATCH] cirrus: update FreeBSD to 12.3

2022-02-22 Thread Roger Pau Monne
Switch from using a FreeBSD 12.2 to a 12.3 image. Signed-off-by: Roger Pau Monné --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index b17f0b6369..4ae719136e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -16,7 +16,7 @@ freebsd_templat

Re: [PATCH] cirrus: update FreeBSD to 12.3

2022-02-22 Thread Andrew Cooper
On 22/02/2022 13:56, Roger Pau Monne wrote: > Switch from using a FreeBSD 12.2 to a 12.3 image. > > Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper I presume you've got a private run showing that this is fine?

Re: [PATCH] cirrus: update FreeBSD to 12.3

2022-02-22 Thread Roger Pau Monné
On Tue, Feb 22, 2022 at 01:58:48PM +, Andrew Cooper wrote: > On 22/02/2022 13:56, Roger Pau Monne wrote: > > Switch from using a FreeBSD 12.2 to a 12.3 image. > > > > Signed-off-by: Roger Pau Monné > > Acked-by: Andrew Cooper > > I presume you've got a private run showing that this is fine?

Re: [PATCH v3 02/19] xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

2022-02-22 Thread Michal Orzel
Hi Julien, On 21.02.2022 11:22, Julien Grall wrote: > From: Julien Grall > > Currently, Xen PT helpers are only working with 4KB page granularity > and open-code the generic helpers. To allow more flexibility, we can > re-use the generic helpers and pass Xen's page granularity > (PAGE_SHIFT). >

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread George Dunlap
> On Feb 22, 2022, at 12:18 PM, Wojtek Porczyk > wrote: > > On Mon, Feb 14, 2022 at 09:50:25PM +, George Dunlap wrote: >> I think it’s too much effort to ask developers to try to find the actual >> minimum version of each individual dependency as things evolve. > > By "find the actual min

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Jan Beulich
On 22.02.2022 15:58, George Dunlap wrote: >> On Feb 22, 2022, at 12:18 PM, Wojtek Porczyk >> wrote: >> On Mon, Feb 14, 2022 at 09:50:25PM +, George Dunlap wrote: >>> I think it’s too much effort to ask developers to try to find the actual >>> minimum version of each individual dependency as t

Re: [PATCH v3 13/19] xen/arm: Move fixmap definitions in a separate header

2022-02-22 Thread Jan Beulich
On 21.02.2022 11:22, Julien Grall wrote: > From: Julien Grall > > To use properly the fixmap definitions, their user would need > also new to include . This is not very great when > the user itself is not meant to directly use ACPI definitions. > > Including in is not option because > the latt

Re: [PATCH v3 01/19] xen/arm: lpae: Rename LPAE_ENTRIES_MASK_GS to LPAE_ENTRY_MASK_GS

2022-02-22 Thread Bertrand Marquis
Hi Julien, > On 21 Feb 2022, at 10:22, Julien Grall wrote: > > From: Julien Grall > > Commit 05031fa87357 "xen/arm: guest_walk: Only generate necessary > offsets/masks" introduced LPAE_ENTRIES_MASK_GS. In a follow-up patch, > we will use it for to define LPAE_ENTRY_MASK. > > This will lead to

Re: [PATCH v3 14/19] xen/arm: add Persistent Map (PMAP) infrastructure

2022-02-22 Thread Jan Beulich
On 21.02.2022 11:22, Julien Grall wrote: > --- a/xen/common/Makefile > +++ b/xen/common/Makefile > @@ -28,6 +28,7 @@ obj-y += multicall.o > obj-y += notifier.o > obj-y += page_alloc.o > obj-$(CONFIG_HAS_PDX) += pdx.o > +obj-bin-$(CONFIG_HAS_PMAP) += pmap.init.o > obj-$(CONFIG_PERF_COUNTERS) +=

[PATCH v3 29/70] xen/misc: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- v3 * Annotations for g

[PATCH v3 03/70] x86/pv-shim: Don't modify the hypercall table

2022-02-22 Thread Andrew Cooper
From: Juergen Gross When running as pv-shim the hypercall is modified today in order to replace the functions for __HYPERVISOR_event_channel_op and __HYPERVISOR_grant_table_op hypercalls. Change this to call the related functions from the normal handlers instead when running as shim. The perform

[PATCH v3 00/70 (not all posted)] x86: Support for CET Indirect Branch Tracking

2022-02-22 Thread Andrew Cooper
To avoid spamming everyone, I have only re-sent patches with changes in v3. CET Indirect Branch Tracking is a hardware feature designed to protect against forward-edge control flow hijacking (Call/Jump oriented programming), and is a companion feature to CET Shadow Stacks added in Xen 4.14. Patch

[PATCH v3 27/70] xen/video: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- v3: * Rebase over rece

[PATCH v3 12/70] xen: CFI hardening for continue_hypercall_on_cpu()

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- v3: * Fix !CONFIG_PV_S

[PATCH v3 26/70] xen/iommu: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. AMD's parse_ppr_log_entry() has no external callers, so becomes static. Signed-

[PATCH v3 06/70] x86: Introduce support for CET-IBT

2022-02-22 Thread Andrew Cooper
CET Indirect Branch Tracking is a hardware feature designed to provide forward-edge control flow integrity, protecting against jump/call oriented programming. IBT requires the placement of ENDBR{32,64} instructions at the target of every indirect call/jmp, and every entrypoint. However, the defau

[PATCH v3 05/70] x86/kexec: Annotate embedded data with ELF metadata

2022-02-22 Thread Andrew Cooper
Scanning for embedded endbranch instructions involves parsing the .text disassembly. Data in the kexec trampoline has no ELF metadata, so objdump treats it as instructions and tries to disassemble. Convert: 82d040396108 : 82d040396108: 00 00 add%al,(%rax)

[PATCH v3 01/70] xen/sort: Switch to an extern inline implementation

2022-02-22 Thread Andrew Cooper
There are exactly 3 callers of sort() in the hypervisor. Callbacks in a tight loop like this are problematic for performance, especially with Spectre v2 protections, which is why extern inline is used commonly by libraries. Both ARM callers pass in NULL for the swap function, and while this might

[PATCH v3 08/70] xen: CFI hardening for custom_param()

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. The "watchdog_timeout" and "cpu_type" handlers were missing __init. The "numa",

Re: [PATCH v3 00/70 (not all posted)] x86: Support for CET Indirect Branch Tracking

2022-02-22 Thread Jan Beulich
On 22.02.2022 16:26, Andrew Cooper wrote: > To avoid spamming everyone, I have only re-sent patches with changes in v3. Could you enumerate which ones these are? Otherwise it's hard to tell whether everything you did send did arrive in the recipients' mailboxes. Thanks, Jan > CET Indirect Branch

[PATCH v3 46/70] x86/logdirty: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- v3: * Fix !CONFIG_SHAD

[PATCH v3 33/70] x86/emul: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. pv_emul_is_mem_write() is only used in a single file. Move it out of its header

[PATCH v3 60/70] x86: Build check for embedded endbr64 instructions

2022-02-22 Thread Andrew Cooper
From: Marek Marczykowski-Górecki An interesting corner case occurs when the byte sequence making up endb64 ends up on a non-instruction boundary. Such embedded instructions mark legal indirect branch targets as far as the CPU is concerned, which aren't legal as far as the logic is concerned. Wh

[PATCH v3 47/70] x86/shadow: CFI hardening

2022-02-22 Thread Andrew Cooper
Control Flow Integrity schemes use toolchain and optionally hardware support to help protect against call/jump/return oriented programming attacks. Use cf_check to annotate function pointer targets for the toolchain. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- v3: * Fix !CONFIG_SHAD

[PATCH v3 59/70] x86: Use control flow typechecking where possible

2022-02-22 Thread Andrew Cooper
Now all callees have been annotated, turn on typechecking to catch issues in the future. This extension isn't in a released version of GCC yet, so provide a container to use with the extention included, and add it to CI. RANDCONFIG is necessary because some stubs for compiled-out subsystems are u

[PATCH v3 64/70] x86: Introduce helpers/checks for endbr64 instructions

2022-02-22 Thread Andrew Cooper
... to prevent the optimiser creating unsafe code. See the code comment for full details. Signed-off-by: Andrew Cooper Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu v3: * Introduce ENDBR64_LEN v2: * Fix include to let the header be standalone * Add earlyclo

[PATCH 09/11] swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction

2022-02-22 Thread Christoph Hellwig
Power SVM wants to allocate a swiotlb buffer that is not restricted to low memory for the trusted hypervisor scheme. Consolidate the support for this into the swiotlb_init interface by adding a new flag. Signed-off-by: Christoph Hellwig --- arch/powerpc/include/asm/svm.h | 4 arch/p

[PATCH 10/11] swiotlb: merge swiotlb-xen initialization into swiotlb

2022-02-22 Thread Christoph Hellwig
Allow to pass a remap argument to the swiotlb initialization functions to handle the Xen/x86 remap case. ARM/ARM64 never did any remapping from xen_swiotlb_fixup, so we don't even need that quirk. Signed-off-by: Christoph Hellwig --- arch/arm/xen/mm.c | 23 +++--- arch/x86/includ

[PATCH 02/11] swiotlb: make swiotlb_exit a no-op if SWIOTLB_FORCE is set

2022-02-22 Thread Christoph Hellwig
If force bouncing is enabled we can't release the bufffers. Signed-off-by: Christoph Hellwig --- kernel/dma/swiotlb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index f1e7ea160b433..36fbf1181d285 100644 --- a/kernel/dma/swiotlb.c +++ b/kern

[PATCH 06/11] MIPS/octeon: use swiotlb_init instead of open coding it

2022-02-22 Thread Christoph Hellwig
Use the generic swiotlb initialization helper instead of open coding it. Signed-off-by: Christoph Hellwig --- arch/mips/cavium-octeon/dma-octeon.c | 15 ++- arch/mips/pci/pci-octeon.c | 2 +- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/arch/mips/cavium-

[PATCH 01/11] dma-direct: use is_swiotlb_active in dma_direct_map_page

2022-02-22 Thread Christoph Hellwig
Use the more specific is_swiotlb_active check instead of checking the global swiotlb_force variable. Signed-off-by: Christoph Hellwig --- kernel/dma/direct.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/dma/direct.h b/kernel/dma/direct.h index 4632b0f4f72eb..4dc16e0

cleanup swiotlb initialization

2022-02-22 Thread Christoph Hellwig
Hi all, this series tries to clean up the swiotlb initialization, including that of swiotlb-xen. To get there is also removes the x86 iommu table infrastructure that massively obsfucates the initialization path. Git tree: git://git.infradead.org/users/hch/misc.git swiotlb-init-cleanup Gitw

[PATCH 11/11] x86: remove cruft from

2022-02-22 Thread Christoph Hellwig
gets pulled in by all drivers using the DMA API. Remove x86 internal variables and unnecessary includes from it. Signed-off-by: Christoph Hellwig --- arch/x86/include/asm/dma-mapping.h | 11 --- arch/x86/include/asm/iommu.h | 2 ++ 2 files changed, 2 insertions(+), 11 deletions(-

[PATCH 07/11] x86: remove the IOMMU table infrastructure

2022-02-22 Thread Christoph Hellwig
The IOMMU table tries to separate the different IOMMUs into different backends, but actually requires various cross calls. Rewrite the code to do the generic swiotlb/swiotlb-xen setup directly in pci-dma.c and then just call into the IOMMU drivers. Signed-off-by: Christoph Hellwig --- arch/ia64

[PATCH 05/11] swiotlb: pass a gfp_mask argument to swiotlb_init_late

2022-02-22 Thread Christoph Hellwig
Let the caller chose a zone to allocate from. Signed-off-by: Christoph Hellwig --- arch/x86/pci/sta2x11-fixup.c | 2 +- include/linux/swiotlb.h | 2 +- kernel/dma/swiotlb.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x

[PATCH 04/11] swiotlb: rename swiotlb_late_init_with_default_size

2022-02-22 Thread Christoph Hellwig
swiotlb_late_init_with_default_size is an overly verbose name that doesn't even catch what the function is doing, given that the size is not just a default but the actual requested size. Rename it to swiotlb_init_late. Signed-off-by: Christoph Hellwig --- arch/x86/pci/sta2x11-fixup.c | 2 +- in

[PATCH 03/11] swiotlb: simplify swiotlb_max_segment

2022-02-22 Thread Christoph Hellwig
Remove the bogus Xen override that was usually larger than the actual size and just calculate the value on demand. Note that swiotlb_max_segment still doesn't make sense as an interface and should eventually be removed. Signed-off-by: Christoph Hellwig --- drivers/xen/swiotlb-xen.c | 2 -- inc

Re: [PATCH v3 02/19] xen/arm: lpae: Use the generic helpers to defined the Xen PT helpers

2022-02-22 Thread Bertrand Marquis
Hi Julien, > On 21 Feb 2022, at 10:22, Julien Grall wrote: > > From: Julien Grall > > Currently, Xen PT helpers are only working with 4KB page granularity > and open-code the generic helpers. To allow more flexibility, we can > re-use the generic helpers and pass Xen's page granularity > (PAGE

Re: [PATCH v3 00/70 (not all posted)] x86: Support for CET Indirect Branch Tracking

2022-02-22 Thread Andrew Cooper
On 22/02/2022 15:29, Jan Beulich wrote: > On 22.02.2022 16:26, Andrew Cooper wrote: >> To avoid spamming everyone, I have only re-sent patches with changes in v3. > Could you enumerate which ones these are? Otherwise it's hard to tell > whether everything you did send did arrive in the recipients'

Re: [PATCH] RFC: Version support policy

2022-02-22 Thread Marek Marczykowski-Górecki
On Tue, Feb 22, 2022 at 04:05:19PM +0100, Jan Beulich wrote: > On 22.02.2022 15:58, George Dunlap wrote: > >> On Feb 22, 2022, at 12:18 PM, Wojtek Porczyk > >> wrote: > >> On Mon, Feb 14, 2022 at 09:50:25PM +, George Dunlap wrote: > >>> I think it’s too much effort to ask developers to try to

[PATCH 08/11] swiotlb: make the swiotlb_init interface more useful

2022-02-22 Thread Christoph Hellwig
Pass a bool to pass if swiotlb needs to be enabled based on the addressing needs and replace the verbose argument with a set of flags, including one to force enable bounce buffering. Note that this patch removes the possibility to force xen-swiotlb use using swiotlb=force on the command line on x8

Re: [PATCH v3 01/70] xen/sort: Switch to an extern inline implementation

2022-02-22 Thread Julien Grall
Hi, On 22/02/2022 15:26, Andrew Cooper wrote: There are exactly 3 callers of sort() in the hypervisor. Callbacks in a tight loop like this are problematic for performance, especially with Spectre v2 protections, which is why extern inline is used commonly by libraries. Both ARM callers pass in

Re: [PATCH v3 03/19] xen/arm: p2m: Replace level_{orders, masks} arrays with XEN_PT_LEVEL_{ORDER, MASK}

2022-02-22 Thread Bertrand Marquis
Hi Julien, > On 21 Feb 2022, at 10:22, Julien Grall wrote: > > From: Julien Grall > > The array level_orders and level_masks can be replaced with the > recently introduced macros LEVEL_ORDER and LEVEL_MASK. > > Signed-off-by: Julien Grall Reviewed-by: Bertrand Marquis One open question: A

Re: [PATCH v3 03/70] x86/pv-shim: Don't modify the hypercall table

2022-02-22 Thread Jan Beulich
On 22.02.2022 16:26, Andrew Cooper wrote: > From: Juergen Gross > > When running as pv-shim the hypercall is modified today in order to > replace the functions for __HYPERVISOR_event_channel_op and > __HYPERVISOR_grant_table_op hypercalls. > > Change this to call the related functions from the n

Re: [PATCH] coverity: disable flight from crontab

2022-02-22 Thread Ian Jackson
Roger Pau Monne writes ("[PATCH] coverity: disable flight from crontab"): > We are currently doing the Coverity Scans using a github workflow. Acked-by: Ian Jackson -- Ian JacksonThese opinions are my own. Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk, that is a

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

2022-02-22 Thread osstest service owner
flight 168195 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/168195/ 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: IGD pass-through failures since 4.10.

2022-02-22 Thread Dr. Greg
On Fri, Feb 18, 2022 at 08:04:14AM +0100, Jan Beulich wrote: Good morning, I hope the week is advancing well for everyone. > On 17.02.2022 21:15, Dr. Greg wrote: > > On Mon, Feb 14, 2022 at 09:56:34AM +0100, Jan Beulich wrote: > >> On 14.02.2022 07:00, Dr. Greg wrote: > >>> It appears to be a pro

[xen-unstable test] 168193: regressions - FAIL

2022-02-22 Thread osstest service owner
flight 168193 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/168193/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: build-i3866 xen-buildfail REGR. vs. 168189 Tests which are fa

Re: [PATCH] xen/netfront: destroy queues before real_num_tx_queues is zeroed

2022-02-22 Thread Jakub Kicinski
On Mon, 21 Feb 2022 07:27:32 +0100 Juergen Gross wrote: > On 20.02.22 14:42, Marek Marczykowski-Górecki wrote: > > xennet_destroy_queues() relies on info->netdev->real_num_tx_queues to > > delete queues. Since d7dac083414eb5bb99a6d2ed53dc2c1b405224e5 > > ("net-sysfs: update the queue counts in the

[qemu-mainline test] 168194: tolerable FAIL - PUSHED

2022-02-22 Thread osstest service owner
flight 168194 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/168194/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-win7-amd64 19 guest-stopfail like 168186 test-armhf-armhf-libvirt 16 sav

[linux-linus test] 168196: tolerable FAIL - PUSHED

2022-02-22 Thread osstest service owner
flight 168196 linux-linus real [real] flight 168200 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/168196/ http://logs.test-lab.xenproject.org/osstest/logs/168200/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-amd64-

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

2022-02-22 Thread osstest service owner
flight 168198 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/168198/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-i386-xl-qemut-ws16-amd64 19 guest-stop fail like 168189 test-amd64-i386-xl-qemut-win7-amd64