Re: [RFC PATCH v1 10/15] KVM: VMX: Use WRMSRNS or its immediate form when available

2025-03-31 Thread Konrad Rzeszutek Wilk
On Mon, Mar 31, 2025 at 01:22:46AM -0700, Xin Li (Intel) wrote: > Signed-off-by: Xin Li (Intel) > --- > arch/x86/include/asm/msr-index.h | 6 ++ > arch/x86/kvm/vmx/vmenter.S | 28 > 2 files changed, 30 insertions(+), 4 deletions(-) > > diff --git a/arch/x8

Re: [PATCH] MAINTAINERS: Update livepatch maintainers

2024-04-09 Thread Konrad Rzeszutek Wilk
gt; Signed-off-by: Ross Lagerwall Acked-by: Konrad Rzeszutek Wilk Thank you for picking it up! > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1bd22fd75f0e..4bc45ded4130 100644 > --- a/MAINTAINERS

Re: [PATCH v3] iscsi_ibft: Fix finding the iBFT under Xen Dom 0

2023-06-09 Thread Konrad Rzeszutek Wilk
Usually I put it in my tree (ibft) but since it is so simple and the user is Xen it would make more sense to do it via the Xen tree (Juergen). Thx On Fri, Jun 9, 2023, 11:16 AM Dave Hansen wrote: > On 6/5/23 03:28, Ross Lagerwall wrote: > > The result of these changes is that it is possible to

Re: [PATCH v3] iscsi_ibft: Fix finding the iBFT under Xen Dom 0

2023-06-09 Thread Konrad Rzeszutek Wilk
Feel free to add my Acked-by. Dave, are you OK with the change in where the reserve call is made? Thx On Fri, Jun 9, 2023, 11:08 AM Juergen Gross wrote: > On 05.06.23 12:28, Ross Lagerwall wrote: > > To facilitate diskless iSCSI boot, the firmware can place a table of > > configuration details

Re: [PATCH v3] iscsi_ibft: Fix finding the iBFT under Xen Dom 0

2023-06-08 Thread Konrad Rzeszutek Wilk
It looks fine to me, but could I ask you to triple check that on non-Xen it still detects the iBFT? Thx! On Mon, Jun 5, 2023 at 6:28 AM Ross Lagerwall wrote: > > To facilitate diskless iSCSI boot, the firmware can place a table of > configuration details in memory called the iBFT. The presence o

Re: [PATCH v3] livepatch: account for patch offset when applying NOP patch

2022-04-08 Thread Konrad Rzeszutek Wilk
On Fri, Apr 08, 2022 at 10:19:54AM +0200, Roger Pau Monné wrote: > On Thu, Apr 07, 2022 at 03:44:16PM +, Ross Lagerwall wrote: > > > From: Jan Beulich > > > Sent: Thursday, March 31, 2022 9:42 AM > > > To: Roger Pau Monne > > > Cc: xen-devel@lists.xenproject.org ; Ross > > > Lagerwall ; Konr

Re: cleanup swiotlb initialization v8

2022-04-06 Thread Konrad Rzeszutek Wilk
t; - better document the lower bound swiotlb size for xen-swiotlb > - improve the nslabs calculation for the retry case in >swiotlb_init_remap and swiotlb_init_late Hey Christoph, Feel free to tack on Reviewed-by: Konrad Rzeszutek Wilk on them if you would like. Thank you for doing the spring cleaning of this codebase!

Re: [PATCH 10/15] swiotlb: add a SWIOTLB_ANY flag to lift the low memory restriction

2022-04-06 Thread Konrad Rzeszutek Wilk
nder why the '|=' instead of just '=' ? Either way: Reviewed-by: Konrad Rzeszutek Wilk Thank you!

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

2022-04-06 Thread Konrad Rzeszutek Wilk
'structured' way with dependencies. Hence this creation... But as Christoph points out - it has gotten out of hand. So smashing it back to a more simplistic mechanism is good. Reviewed-by: Konrad Rzeszutek Wilk Thank you! > --- > arch/ia64/include/asm/iommu_table.h| 7 --

Re: [PATCH v3 2/2] xen/x86: Livepatch: support patching CET-enhanced functions

2022-03-08 Thread Konrad Rzeszutek Wilk
64_LEN; > > This won't work for cf_clobber targets, I don't think.  The ENDBR gets > converted to NOP4 and fails this check, but the altcalls calling > old_func had their displacements adjusted by +4. > > The is_endbr64() check will fail, and the 5-byte jmp will be written at > the start of the function, and corrupt the instruction stream for the > altcall()'d callers. > > Let me write an incremental patch to help. Please add Acked-by: Konrad Rzeszutek Wilk on the patches. Thank you > > ~Andrew

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

2022-03-01 Thread Konrad Rzeszutek Wilk
> -#include > - > -/* > - * History lesson: > - * The execution chain of IOMMUs in 2.6.36 looks as so: > - * > - *[xen-swiotlb] > - * | > - * +[swiotlb *]--+ > - */ | \ > - * / | \ > - *[GART] [Calgary]

Re: [PATCH 10/13] x86/Swiotlb: Add Swiotlb bounce buffer remap function for HV IVM

2021-07-29 Thread Konrad Rzeszutek Wilk
On Wed, Jul 28, 2021 at 10:52:25AM -0400, Tianyu Lan wrote: > From: Tianyu Lan > > In Isolation VM with AMD SEV, bounce buffer needs to be accessed via > extra address space which is above shared_gpa_boundary > (E.G 39 bit address line) reported by Hyper-V CPUID ISOLATION_CONFIG. > The access phy

Re: [PATCH v2] dma-mapping: use vmalloc_to_page for vmalloc addresses

2021-07-13 Thread Konrad Rzeszutek Wilk
On Tue, Jun 22, 2021 at 04:34:14PM +0300, Roman Skakun wrote: > This commit is dedicated to fix incorrect conversion from > cpu_addr to page address in cases when we get virtual > address which allocated in the vmalloc range. > As the result, virt_to_page() cannot convert this address > properly an

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-13 Thread Konrad Rzeszutek Wilk
..snip.. > > > I think the main question I have is how would you like to see patches for > > > 5.15? i.e. as patches on top of devel/for-linus-5.14 or something else? > > > > Yes that would be perfect. If there are any dependencies on the rc1, I > > can rebase it on top of that. > > Yes, please,

Re: [PATCH v2 0/3] xen: harden blkfront against malicious backends

2021-07-08 Thread Konrad Rzeszutek Wilk
On Thu, Jul 08, 2021 at 02:43:42PM +0200, Juergen Gross wrote: > Xen backends of para-virtualized devices can live in dom0 kernel, dom0 > user land, or in a driver domain. This means that a backend might > reside in a less trusted environment than the Xen core components, so > a backend should not

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-06 Thread Konrad Rzeszutek Wilk
On Tue, Jul 06, 2021 at 05:57:21PM +0100, Will Deacon wrote: > On Tue, Jul 06, 2021 at 10:46:07AM -0400, Konrad Rzeszutek Wilk wrote: > > On Tue, Jul 06, 2021 at 04:05:13PM +0200, Christoph Hellwig wrote: > > > On Tue, Jul 06, 2021 at 03:01:04PM +0100, Robin Murphy wrote:

Re: [PATCH v15 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-07-06 Thread Konrad Rzeszutek Wilk
On Tue, Jul 06, 2021 at 04:05:13PM +0200, Christoph Hellwig wrote: > On Tue, Jul 06, 2021 at 03:01:04PM +0100, Robin Murphy wrote: > > FWIW I was pondering the question of whether to do something along those > > lines or just scrap the default assignment entirely, so since I hadn't got > > round

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-24 Thread Konrad Rzeszutek Wilk
On Thu, Jun 24, 2021 at 11:58:57PM +0800, Claire Chang wrote: > On Thu, Jun 24, 2021 at 11:56 PM Konrad Rzeszutek Wilk > wrote: > > > > On Thu, Jun 24, 2021 at 10:10:51AM -0400, Qian Cai wrote: > > > > > > > > > On 6/24/2021 7:48 AM, Will Deacon wr

Re: [PATCH v15 00/12] Restricted DMA

2021-06-24 Thread Konrad Rzeszutek Wilk
On Thu, Jun 24, 2021 at 11:55:14PM +0800, Claire Chang wrote: > This series implements mitigations for lack of DMA access control on > systems without an IOMMU, which could result in the DMA accessing the > system memory at unexpected times and/or unexpected addresses, possibly > leading to data le

Re: [PATCH v14 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-24 Thread Konrad Rzeszutek Wilk
On Thu, Jun 24, 2021 at 10:10:51AM -0400, Qian Cai wrote: > > > On 6/24/2021 7:48 AM, Will Deacon wrote: > > Ok, diff below which attempts to tackle the offset issue I mentioned as > > well. Qian Cai -- please can you try with these changes? > > This works fine. Cool. Let me squash this patch i

Re: [PATCH v14 00/12] Restricted DMA

2021-06-23 Thread Konrad Rzeszutek Wilk
On Sat, Jun 19, 2021 at 11:40:31AM +0800, Claire Chang wrote: > This series implements mitigations for lack of DMA access control on > systems without an IOMMU, which could result in the DMA accessing the > system memory at unexpected times and/or unexpected addresses, possibly > leading to data le

Re: [PATCH v10 03/12] swiotlb: Set dev->dma_io_tlb_mem to the swiotlb pool used

2021-06-15 Thread Konrad Rzeszutek Wilk
On Tue, Jun 15, 2021 at 09:27:02PM +0800, Claire Chang wrote: > Always have the pointer to the swiotlb pool used in struct device. This > could help simplify the code for other pools. Applying: swiotlb: Set dev->dma_io_tlb_mem to the swiotlb pool used error: patch failed: kernel/dma/swiotlb.c:339

Re: simplify gendisk and request_queue allocation for blk-mq based drivers

2021-06-04 Thread Konrad Rzeszutek Wilk
On Wed, Jun 02, 2021 at 09:53:15AM +0300, Christoph Hellwig wrote: > Hi all, Hi! You wouldn't have a nice git repo to pull so one can test it easily? Thank you! Cc-ing Boris/Juergen - pls see below xen. > > this series is the scond part of cleaning up lifetimes and allocation of > the gendisk

Re: [PATCH v7 01/15] swiotlb: Refactor swiotlb init functions

2021-05-24 Thread Konrad Rzeszutek Wilk
> > do the set_memory_decrypted()+memset(). Is this okay or should > > swiotlb_init_io_tlb_mem() add an additional argument to do this > > conditionally? > > I'm actually not sure if this it okay. If not, will add an additional > argument for it. Any observations discovered? (Want to make sure my

Re: [PATCH v7 05/15] swiotlb: Add a new get_io_tlb_mem getter

2021-05-24 Thread Konrad Rzeszutek Wilk
On Tue, May 18, 2021 at 02:51:52PM +0800, Claire Chang wrote: > Still keep this function because directly using dev->dma_io_tlb_mem > will cause issues for memory allocation for existing devices. The pool > can't support atomic coherent allocation so we need to distinguish the > per device pool and

Re: [PATCH v7 04/15] swiotlb: Add restricted DMA pool initialization

2021-05-24 Thread Konrad Rzeszutek Wilk
On Tue, May 18, 2021 at 02:48:35PM +0800, Claire Chang wrote: > I didn't move this to a separate file because I feel it might be > confusing for swiotlb_alloc/free (and need more functions to be > non-static). > Maybe instead of moving to a separate file, we can try to come up with > a better namin

Re: [PATCH 12/14] swiotlb: move global variables into a new io_tlb_mem structure

2021-03-17 Thread Konrad Rzeszutek Wilk
On Wed, Mar 17, 2021 at 06:57:42PM +0100, Christoph Hellwig wrote: > On Wed, Mar 17, 2021 at 01:51:56PM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Mar 17, 2021 at 02:53:27PM +0100, Christoph Hellwig wrote: > > > On Wed, Mar 17, 2021 at 01:42:07PM +, Konrad Rz

Re: [PATCH 12/14] swiotlb: move global variables into a new io_tlb_mem structure

2021-03-17 Thread Konrad Rzeszutek Wilk
On Wed, Mar 17, 2021 at 02:53:27PM +0100, Christoph Hellwig wrote: > On Wed, Mar 17, 2021 at 01:42:07PM +0000, Konrad Rzeszutek Wilk wrote: > > > - alloc_size = PAGE_ALIGN(io_tlb_nslabs * sizeof(size_t)); > > > - io_tlb_alloc_size = memblock_alloc(alloc_size, P

Re: [PATCH 12/14] swiotlb: move global variables into a new io_tlb_mem structure

2021-03-17 Thread Konrad Rzeszutek Wilk
..snip.. > int __init swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int > verbose) > { ..snip.. > /* >* Allocate and initialize the free list array. This array is used >* to find contiguous free memory regions of size up to IO_TLB_SEGSIZE > - * between io_tlb

Re: [PATCH 03/14] swiotlb: move orig addr and size validation into swiotlb_bounce

2021-03-16 Thread Konrad Rzeszutek Wilk
gt; a better code structure. Reviewed-by: Konrad Rzeszutek Wilk

Re: [PATCH 02/14] swiotlb: remove the alloc_size parameter to swiotlb_tbl_unmap_single

2021-03-16 Thread Konrad Rzeszutek Wilk
On Mon, Mar 01, 2021 at 08:44:24AM +0100, Christoph Hellwig wrote: > Now that swiotlb remembers the allocation size there is no need to pass > it back to swiotlb_tbl_unmap_single. Reviewed-by: Konrad Rzeszutek Wilk

Re: [PATCH 3/8] xen-swiotlb: use io_tlb_end in xen_swiotlb_dma_supported

2021-02-19 Thread Konrad Rzeszutek Wilk
> Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Christoph Hellwig > --- > drivers/xen/swiotlb-xen.c | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c > index a4026822a889f7..4

Re: [PATCH 2/8] xen-swiotlb: use is_swiotlb_buffer in is_xen_swiotlb_buffer

2021-02-19 Thread Konrad Rzeszutek Wilk
for it that went through phys_to_virt. > Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Christoph Hellwig > --- > drivers/xen/swiotlb-xen.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swi

Re: [PATCH RFC v1 5/6] xen-swiotlb: convert variables to arrays

2021-02-19 Thread Konrad Rzeszutek Wilk
On Sun, Feb 07, 2021 at 04:56:01PM +0100, Christoph Hellwig wrote: > On Thu, Feb 04, 2021 at 09:40:23AM +0100, Christoph Hellwig wrote: > > So one thing that has been on my mind for a while: I'd really like > > to kill the separate dma ops in Xen swiotlb. If we compare xen-swiotlb > > to swiotlb

Re: [PATCH RFC v1 2/6] swiotlb: convert variables to arrays

2021-02-04 Thread Konrad Rzeszutek Wilk
On Thu, Feb 04, 2021 at 11:49:23AM +, Robin Murphy wrote: > On 2021-02-04 07:29, Christoph Hellwig wrote: > > On Wed, Feb 03, 2021 at 03:37:05PM -0800, Dongli Zhang wrote: > > > This patch converts several swiotlb related variables to arrays, in > > > order to maintain stat/status for different

Re: [PATCH] xen/arm: livepatch: Include xen/mm.h rather than asm/mm.h

2021-01-15 Thread Konrad Rzeszutek Wilk
r than asm/mm.h. > > Fixes: ced9795c6cb4 ("mm: split out mfn_t / gfn_t / pfn_t definitions and > helpers") Reviewed-by: Konrad Rzeszutek Wilk Thank you! > Signed-off-by: Julien Grall > --- > xen/arch/arm/livepatch.c | 2 +- > 1 file changed, 1 insertio

Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-07 Thread Konrad Rzeszutek Wilk
On Thu, Jan 07, 2021 at 10:09:14AM -0800, Florian Fainelli wrote: > On 1/7/21 9:57 AM, Konrad Rzeszutek Wilk wrote: > > On Fri, Jan 08, 2021 at 01:39:18AM +0800, Claire Chang wrote: > >> Hi Greg and Konrad, > >> > >> This change is intended to be non-ar

Re: [RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-07 Thread Konrad Rzeszutek Wilk
On Fri, Jan 08, 2021 at 01:39:43AM +0800, Claire Chang wrote: > On Thu, Jan 7, 2021 at 2:58 AM Konrad Rzeszutek Wilk > wrote: > > > > On Wed, Jan 06, 2021 at 11:41:23AM +0800, Claire Chang wrote: > > > Introduce the new compatible string, restricted-dma-pool, for re

Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-07 Thread Konrad Rzeszutek Wilk
On Fri, Jan 08, 2021 at 01:39:18AM +0800, Claire Chang wrote: > Hi Greg and Konrad, > > This change is intended to be non-arch specific. Any arch that lacks DMA > access > control and has devices not behind an IOMMU can make use of it. Could you > share > why you think this should be arch specif

Re: [RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-06 Thread Konrad Rzeszutek Wilk
On Wed, Jan 06, 2021 at 11:41:23AM +0800, Claire Chang wrote: > Introduce the new compatible string, restricted-dma-pool, for restricted > DMA. One can specify the address and length of the restricted DMA memory > region by restricted-dma-pool in the device tree. > > Signed-off-by: Claire Chang >

Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-06 Thread Konrad Rzeszutek Wilk
Hello! In this file: > diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c > index e4368159f88a..7fb2ac087d23 100644 > --- a/kernel/dma/swiotlb.c > +++ b/kernel/dma/swiotlb.c .. > +static const struct reserved_mem_ops rmem_swiotlb_ops = { > + .device_init= rmem_swiotlb_device_init,

Re: [PATCH v2 4/4] livepatch: adjust a stale comment

2020-12-15 Thread Konrad Rzeszutek Wilk
On Tue, Dec 15, 2020 at 05:13:43PM +0100, Jan Beulich wrote: > As of 005de45c887e ("xen: do live patching only from main idle loop") > the comment ahead of livepatch_do_action() has been stale. > Reviewed-by: Konrad Rzeszutek Wilk Thank you! > Signed-off-by: Jan Beulich

Re: [PATCH for-5.10] swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single

2020-11-10 Thread Konrad Rzeszutek Wilk
On Tue, Nov 10, 2020 at 10:14:21AM +0100, Christoph Hellwig wrote: > On Wed, Nov 04, 2020 at 09:04:38AM -0500, Konrad Rzeszutek Wilk wrote: > > On Tue, Nov 03, 2020 at 10:46:43AM +0100, Christoph Hellwig wrote: > > > ping? > > > > Hopefully this goes through. I am in

Re: [PATCH for-5.10] swiotlb: remove the tbl_dma_addr argument to swiotlb_tbl_map_single

2020-11-04 Thread Konrad Rzeszutek Wilk
On Tue, Nov 03, 2020 at 10:46:43AM +0100, Christoph Hellwig wrote: > ping? Hopefully this goes through. I am in the process of testing it but ran into testing issues that I believe are unrelated. > > On Fri, Oct 23, 2020 at 08:33:09AM +0200, Christoph Hellwig wrote: > > The tbl_dma_addr argumen

Re: [PATCH] fix swiotlb panic on Xen

2020-10-27 Thread Konrad Rzeszutek Wilk
-by: Stefano Stabellini Reviewed-by: Christoph Hellwig CC: sta...@vger.kernel.org Signed-off-by: Konrad Rzeszutek Wilk --- kernel/dma/swiotlb.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c index 465a567678d9..e08cac39c0ba 100

Re: [PATCH] fix swiotlb panic on Xen

2020-10-27 Thread Konrad Rzeszutek Wilk
On Mon, Oct 26, 2020 at 05:02:14PM -0700, Stefano Stabellini wrote: > From: Stefano Stabellini > > kernel/dma/swiotlb.c:swiotlb_init gets called first and tries to > allocate a buffer for the swiotlb. It does so by calling > > memblock_alloc_low(PAGE_ALIGN(bytes), PAGE_SIZE); > > If the alloc

Re: [PATCH] xen-blkback: add a parameter for disabling of persistent grants

2020-09-24 Thread Konrad Rzeszutek Wilk
.snip.. > > For the reason, I'd like to suggest to keep this as is for now and expand it > > with the 'exceptions list' idea or something better, if a real use case > > comes > > out later. > > I agree. I'm happy to take patches to implement more fine grained > control, but that shouldn't prevent

Re: [PATCH] xen-blkback: add a parameter for disabling of persistent grants

2020-09-23 Thread Konrad Rzeszutek Wilk
On Tue, Sep 22, 2020 at 09:01:25AM +0200, SeongJae Park wrote: > From: SeongJae Park > > Persistent grants feature provides high scalability. On some small > systems, however, it could incur data copy overhead[1] and thus it is > required to be disabled. But, there is no option to disable it.

Re: [PATCH] x86/pci: fix xen.c build error when CONFIG_ACPI is not set

2020-08-20 Thread Konrad Rzeszutek Wilk
you mean ‘acpi_irq_get’? > > [-Werror=implicit-function-declaration] > > acpi_noirq_set(); > > > > Fixes: 88e9ca161c13 ("xen/pci: Use acpi_noirq_set() helper to avoid #ifdef") > > Signed-off-by: Randy Dunlap > > Cc: Andy Shevchenko > > C

Re: [PATCH] xen/swiotlb: correct the check for xen_destroy_contiguous_region

2020-04-28 Thread Konrad Rzeszutek Wilk
On Tue, Apr 28, 2020 at 12:19:41PM +0200, Jürgen Groß wrote: > On 28.04.20 10:25, Peng Fan wrote: Adding Joe Jin. Joe, didn't you have some ideas on how this could be implemented? > > > Subject: Re: [PATCH] xen/swiotlb: correct the check for > > > xen_destroy_contiguous_region > > > > > > On 28

[Xen-devel] [PATCH] MAINTAINERS: Remove myself from REST and Public interfaces

2020-03-03 Thread Konrad Rzeszutek Wilk
.due to -ENOTIME. Been busy with management and have had not much chance to do anything besides that. Signed-off-by: Konrad Rzeszutek Wilk --- MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e8b7be537d..f3fa0c7351 100644 --- a/MAINTAINERS +++ b

Re: [Xen-devel] [PATCH] xen: do live patching only from main idle loop

2020-03-02 Thread Konrad Rzeszutek Wilk
On Mon, Mar 02, 2020 at 03:28:55PM +0100, Jan Beulich wrote: > On 11.02.2020 10:31, Juergen Gross wrote: > > One of the main design goals of core scheduling is to avoid actions > > which are not directly related to the domain currently running on a > > given cpu or core. Live patching is one of tho

Re: [Xen-devel] [PATCH v2 1/4] x86/microcode: Improve documentation and parsing for ucode=

2020-01-21 Thread Konrad Rzeszutek Wilk
On Tue, Jan 21, 2020 at 10:27:47AM +0100, Jan Beulich wrote: > On 21.01.2020 00:50, Eslam Elnikety wrote: > > On 20.01.20 09:42, Jan Beulich wrote: > >> On 17.01.2020 20:06, Eslam Elnikety wrote: > >>> On 20.12.19 10:53, Jan Beulich wrote: > On 19.12.2019 22:08, Eslam Elnikety wrote: > > O

Re: [Xen-devel] [PATCH] livepatch: use proper rc variable in livepatch_do_action()

2020-01-06 Thread Konrad Rzeszutek Wilk
57467 > Fixes: 6047104c3c ("livepatch: Add per-function applied/reverted state > tracking marker") > Signed-off-by: Pawel Wieczorkiewicz > Reported-by: Andrew Cooper Reviewed-by: Konrad Rzeszutek Wilk > --- > xen/common/livepatch.c | 2 +- > 1 file changed, 1

Re: [Xen-devel] [PATCH] livepatch: Fix typos and other errors in tests Makefile

2019-12-20 Thread Konrad Rzeszutek Wilk
e fixed on commit. > > > > > Signed-off-by: Pawel Wieczorkiewicz > > Tested-by: Julien Grall Reviewed-by: Konrad Rzeszutek Wilk But I see it is already checked in. Thank you for fixing that! > > Cheers, > > -- > Julien Grall

Re: [Xen-devel] [PATCH for-4.13] clang: do not enable live-patching support

2019-12-02 Thread Konrad Rzeszutek Wilk
On Mon, Dec 02, 2019 at 03:55:04PM +, Andrew Cooper wrote: > On 02/12/2019 15:53, Konrad Rzeszutek Wilk wrote: > >>> I plan to release ack the patch in case the missing maintainer's acks > >>> are not coming in too late. > >> I think Andy's obj

Re: [Xen-devel] [PATCH for-4.13] clang: do not enable live-patching support

2019-12-02 Thread Konrad Rzeszutek Wilk
> > I plan to release ack the patch in case the missing maintainer's acks > > are not coming in too late. > > I think Andy's objection was that there has been zero testing of > livepatching on gcc. Maybe we can find someone to do a smoke-test. As in integrate livepatch-build tools in osstest smo

Re: [Xen-devel] [PATCH v5 00/12] livepatch: new features and fixes

2019-11-20 Thread Konrad Rzeszutek Wilk
> Yes, this hunk is missing (somehow it did not make it to the v5 patchset, > sorry): > > diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c > index 7747ea83aa..0b21a6aca4 100644 > --- a/tools/libxc/xc_misc.c > +++ b/tools/libxc/xc_misc.c > @@ -976,6 +976,7 @@ static int _xc_livepatch_act

Re: [Xen-devel] [PATCH v5 00/12] livepatch: new features and fixes

2019-11-19 Thread Konrad Rzeszutek Wilk
On Thu, Nov 14, 2019 at 01:06:41PM +, Pawel Wieczorkiewicz wrote: > This series introduces new features to the livepatch functionality as > briefly discussed during Xen Developer Summit 2019: [a] and [b]. > It also provides a few fixes and some small improvements. > > Main changes in v4: > - F

Re: [Xen-devel] [PATCH v2] build: provide option to disambiguate symbol names

2019-11-08 Thread Konrad Rzeszutek Wilk
ffect, which in turn allows > SUPPRESS_DUPLICATE_SYMBOL_WARNINGS to simply depend on > !ENFORCE_UNIQUE_SYMBOLS. > > Signed-off-by: Jan Beulich Acked-by: Konrad Rzeszutek Wilk > --- > v2: Re-base. Conditionalize COVERAGE's select. > > The clang behavior may re

Re: [Xen-devel] [PATCH 2/2] x86/livepatch: Prevent patching with active waitqueues

2019-11-06 Thread Konrad Rzeszutek Wilk
-EBUSY, which is preforable to the fireworks which occur from trying to unwind > the old stack frame at a later point. > > Signed-off-by: Andrew Cooper > --- > CC: Konrad Rzeszutek Wilk Reviewed-by: Konrad Rzeszutek Wilk > CC: Ross Lagerwall > CC: Juergen Gross >

Re: [Xen-devel] [PATCH 1/2] xen/livepatch: Add a return value to load hooks

2019-11-06 Thread Konrad Rzeszutek Wilk
ation (design doc?) Thanks. > Signed-off-by: Andrew Cooper > --- > CC: Konrad Rzeszutek Wilk > CC: Ross Lagerwall > CC: Juergen Gross > > For several years, the following patch in the series has been shipped in every > XenServer livepatch, implemented as a void load hook which

Re: [Xen-devel] [PATCH v3 5/7] x86/livepatch: Fail the build if duplicate symbols exist

2019-10-23 Thread Konrad Rzeszutek Wilk
On October 23, 2019 10:46:37 AM EDT, "Jürgen Groß" wrote: >On 23.10.19 15:58, Andrew Cooper wrote: >> From: Ross Lagerwall >> >> The binary diffing algorithm used by xen-livepatch depends on having >unique >> symbols. >> >> Signed-off-by: Ross Lagerwall >> >> The livepatch loading algorithm u

Re: [Xen-devel] [PATCH v4 00/12] livepatch: new features and fixes

2019-10-18 Thread Konrad Rzeszutek Wilk
On Sat, Sep 28, 2019 at 03:12:53PM +, Pawel Wieczorkiewicz wrote: > This series introduces new features to the livepatch functionality as > briefly discussed during Xen Developer Summit 2019: [a] and [b]. > It also provides a few fixes and some small improvements. Heya, Is there an v5 of the

Re: [Xen-devel] [PATCH v3 1/3] x86/boot: Introduce the kernel_info

2019-10-11 Thread Konrad Rzeszutek Wilk
> >>> +be prefixed with header/magic and its size, e.g.: > >>> + > >>> + kernel_info: > >>> + .ascii "LToP" /* Header, Linux top (structure). */ > >>> + .long kernel_info_var_len_data - kernel_info > >>> + .long kernel_info_end - kernel_info > >>> +

Re: [Xen-devel] [PATCH v3 10/12] livepatch: Handle arbitrary size names with the list operation

2019-09-17 Thread Konrad Rzeszutek Wilk
On Tue, Sep 17, 2019 at 08:55:22AM +, Wieczorkiewicz, Pawel wrote: > > > > On 17. Sep 2019, at 10:48, Jan Beulich wrote: > > > > On 17.09.2019 10:40, Wieczorkiewicz, Pawel wrote: > >> > >> > >> On 17. Sep 2019, at 10:27, Jan Beulich > >> mailto:jbeul...@suse.com>> wrote: > >> > >> On

Re: [Xen-devel] [ANNOUNCE] Xen 4.13 Development Update

2019-09-06 Thread Konrad Rzeszutek Wilk
> == Hypervisor == > > * Per-cpu tasklet > - XEN-28 > - Konrad Rzeszutek Wilk I haven't gotten to them since the posting three years ago? I don't think I will get to them anytime soom too :-( Would love if someone took them over.. P.S: http://xenbits

Re: [Xen-devel] [PATCH 09/11] swiotlb-xen: simplify cache maintainance

2019-09-06 Thread Konrad Rzeszutek Wilk
an say a BUILD_BUG_ON(). > > > (with corrected Juergen's email) > > I know about IS_ENABLED() but I didn't realize that this is allowed for > compile-time inlines and such as well. > > Anyway, for non-ARM bits > > Reviewed-by: Boris Ostrovsky Acked-by: Konrad

Re: [Xen-devel] [PATCH v2 00/12] livepatch: new features and fixes

2019-09-05 Thread Konrad Rzeszutek Wilk
On Tue, Aug 27, 2019 at 08:46:12AM +, Pawel Wieczorkiewicz wrote: > This series introduces new features to the livepatch functionality as > briefly discussed during Xen Developer Summit 2019: [a] and [b]. > It also provides a few fixes and some small improvements. > > Main changes in v2: > - a

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-09-05 Thread Konrad Rzeszutek Wilk
> diff --git a/docs/misc/livepatch.pandoc b/docs/misc/livepatch.pandoc > index 6ab7f4c2d2..92a424e918 100644 > --- a/docs/misc/livepatch.pandoc > +++ b/docs/misc/livepatch.pandoc > @@ -300,6 +300,7 @@ which describe the functions to be patched: > /* Added to livepatch payload version 2: */

Re: [Xen-devel] [PATCH v2 11/12] livepatch: Add metadata runtime retrieval mechanism

2019-08-29 Thread Konrad Rzeszutek Wilk
On Tue, Aug 27, 2019 at 08:46:23AM +, Pawel Wieczorkiewicz wrote: > Extend the livepatch list operation to fetch also payloads' metadata. > This is achieved by extending the sysctl list interface with 2 extra > guest handles: > * metadata - an array of arbitrary size strings > * metadata_le

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> Ah, I forgot about endianness of course... > I am sending an improved patch. I hope it works this time as expected. Works nicely! (Tested only on ARM64, hadn't tried ARM32 yet). ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.x

Re: [Xen-devel] [PATCH v2 00/12] livepatch: new features and fixes

2019-08-29 Thread Konrad Rzeszutek Wilk
> Pawel Wieczorkiewicz (12): > [1] livepatch: Always check hypervisor build ID upon hotpatch upload > [2] livepatch: Allow to override inter-modules buildid dependency > [3] livepatch: Export payload structure via livepatch_payload.h > [4] livepatch: Implement pre-|post- apply|revert hooks

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
On Thu, Aug 29, 2019 at 04:16:13PM +, Wieczorkiewicz, Pawel wrote: > > > On 29. Aug 2019, at 17:58, Konrad Rzeszutek Wilk > mailto:konrad.w...@oracle.com>> wrote: > > +CODE_GET_EXPECT=$(shell objdump -d --insn-width=1 $(1) | grep -A6 -E > '<'$(

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> +CODE_GET_EXPECT=$(shell objdump -d --insn-width=1 $(1) | grep -A6 -E > '<'$(2)'>:' | tail -n +2 | awk 'BEGIN {printf "{"} {printf "0x%s,", $$2}' | > sed 's/,$$/}/g') Ony my Hikey 960 when I compile using an native compiler I get: gcc -DBUILD_ID -fno-strict-aliasing -std=gnu99 -Wall -Wstrict

Re: [Xen-devel] [PATCH v2 08/12] livepatch: Add support for inline asm hotpatching expectations

2019-08-29 Thread Konrad Rzeszutek Wilk
> diff --git a/xen/test/livepatch/Makefile b/xen/test/livepatch/Makefile > index 23113d3418..067861903f 100644 > --- a/xen/test/livepatch/Makefile > +++ b/xen/test/livepatch/Makefile > @@ -27,6 +27,8 @@ LIVEPATCH_ACTION_HOOKS_NOFUNC := > xen_action_hooks_nofunc.livepatch > LIVEPATCH_ACTION_HOOKS_

Re: [Xen-devel] [PATCH v2 05/12] livepatch: Add support for apply|revert action replacement hooks

2019-08-27 Thread Konrad Rzeszutek Wilk
On August 27, 2019 4:46:17 AM EDT, Pawel Wieczorkiewicz wrote: >By default, in the quiescing zone, a hotpatch payload is applied with >apply_payload() and reverted with revert_payload() functions. Both of >the functions receive the payload struct pointer as a parameter. The >functions are also a

Re: [Xen-devel] [PATCH] livepatch: Identify the object file create-diff-object dislikes

2019-08-27 Thread Konrad Rzeszutek Wilk
On August 27, 2019 11:38:39 AM EDT, Andrew Cooper wrote: >... rather than leaving the user with no hint as to where to debug >next. > >Signed-off-by: Andrew Cooper >--- >CC: Konrad Rzeszutek Wilk Reviewed-by: Konrad Rzeszutek Wilk >CC: Ross Lagerwall >--- > live

Re: [Xen-devel] [PATCH 06/14] livepatch: Add support for apply|revert action replacement hooks

2019-08-26 Thread Konrad Rzeszutek Wilk
> Yes, I could do that. But, I would like to discuss (get guidelines about) the > expected test coverage. > With this sort of changes, there is an unlimited set of test-cases to be > created. So, I would like to focus on a few most important. > I am missing knowledge how these test cases are supp

Re: [Xen-devel] [PATCH 08/20] livepatch-build: detect special section group sizes

2019-08-21 Thread Konrad Rzeszutek Wilk
+# Using xen-syms built in the previous step by build_full(). +SPECIAL_VARS=$(readelf -wi "$OUTPUT/xen-syms" | What version of readelf supports this? Asking as in the past there were some options with binutils that had conflicting options and we had to add some custom hackery code to

Re: [Xen-devel] [PATCH lp-metadata 2/3] livepatch: Handle arbitrary size names with the list operation

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/15/19 12:29 PM, Andrew Cooper wrote: On 15/08/2019 16:42, Wieczorkiewicz, Pawel wrote: Thanks Julien. I will do that next time (unless you guys want me to re-send all this ;-)). BTW, I also pushed my changes onto the xenbits server: http://xenbits.xenproject.org/gitweb/?p=people/wipawel/li

Re: [Xen-devel] [PATCH 06/14] livepatch: Add support for apply|revert action replacement hooks

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: By default, in the quiescing zone, a hotpatch payload is applied with apply_payload() and reverted with revert_payload() functions. Both of the functions receive the payload struct pointer as a parameter. The functions are also a place where standar

Re: [Xen-devel] [PATCH 10/14] livepatch: Add support for inline asm hotpatching expectations

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: typedef enum livepatch_func_state { LIVEPATCH_FUNC_NOT_APPLIED = 0, LIVEPATCH_FUNC_APPLIED = 1 @@ -838,11 +850,12 @@ struct livepatch_func { uint32_t new_size; uint32_t old_size; uint8_t version;/* MUST be LIV

Re: [Xen-devel] [PATCH 09/14] livepatch: Add per-function applied/reverted state tracking marker

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: struct livepatch_func { const char *name; /* Name of function to be patched. */ void *new_addr; @@ -834,6 +839,10 @@ struct livepatch_func { uint32_t old_size; uint8_t version;/* MUST be LIVEPATCH_PAYLOAD_VERS

Re: [Xen-devel] [PATCH 01/14] livepatch: Always check hypervisor build ID upon hotpatch upload

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/21/19 4:19 AM, Pawel Wieczorkiewicz wrote: This change is part of a independant stacked hotpatch modules feature. This feature allows to bypass dependencies between modules upon loading, but still verifies Xen build ID matching. In order to prevent (up)loading any hotpatches built for diffe

Re: [Xen-devel] [livepatch-hooks-2 PATCH 4/4] livepatch: Add per-function applied/reverted state tracking marker

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/14/19 4:39 AM, Pawel Wieczorkiewicz wrote: #ifdef __XEN__ +typedef enum livepatch_func_state { +LIVEPATCH_FUNC_NOT_APPLIED = 0, +LIVEPATCH_FUNC_APPLIED = 1 +} livepatch_func_state_t; + struct livepatch_func { const char *name; /* Name of function to be patched. */

Re: [Xen-devel] [livepatch-hooks-2 PATCH 2/4] create-diff-object: Add support for applied/reverted marker

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/14/19 4:38 AM, Pawel Wieczorkiewicz wrote: With version 2 of a payload structure additional field is supported to track whether given function has been applied or reverted. There also comes additional 8-byte alignment padding to reserve place for future flags and options. The new fields are

Re: [Xen-devel] [livepatch-hooks-2 PATCH 3/4] livepatch: Add support for apply|revert action replacement hooks

2019-08-21 Thread Konrad Rzeszutek Wilk
On 8/14/19 4:38 AM, Pawel Wieczorkiewicz wrote: By default, in the quiescing zone, a hotpatch payload is applied with apply_payload() and reverted with revert_payload() functions. Both of the functions receive the payload struct pointer as a parameter. The functions are also a place where standar

Re: [Xen-devel] [PATCH] swiotlb: fix phys_addr_t overflow warning

2019-06-19 Thread Konrad Rzeszutek Wilk
On Mon, Jun 17, 2019 at 09:13:16AM -0700, Stefano Stabellini wrote: > On Mon, 17 Jun 2019, Arnd Bergmann wrote: > > On architectures that have a larger dma_addr_t than phys_addr_t, > > the swiotlb_tbl_map_single() function truncates its return code > > in the failure path, making it impossible to i

Re: [Xen-devel] [PATCH v2] xen/swiotlb: don't initialize swiotlb twice on arm64

2019-06-13 Thread Konrad Rzeszutek Wilk
> > > > #2 patch says: > > > > "> To be symmetric with setting the flag only after having made the > > region > > > contiguous, and to avoid (perhaps just theoretical) races, wouldn't > > it be > > > better to clear the flag before calling > > xen_destroy_contiguous_region()? > >

Re: [Xen-devel] [PATCH v2] xen/swiotlb: don't initialize swiotlb twice on arm64

2019-06-13 Thread Konrad Rzeszutek Wilk
On Wed, Jun 05, 2019 at 04:24:06PM +0200, Juergen Gross wrote: > On 05.06.19 16:13, Konrad Rzeszutek Wilk wrote: > > On Tue, Jun 04, 2019 at 03:41:40PM -0400, Boris Ostrovsky wrote: > > > On 6/4/19 12:51 PM, Stefano Stabellini wrote: > > > > On Mon, 3 Jun 2019, Boris

Re: [Xen-devel] [PATCH v2] xen/swiotlb: don't initialize swiotlb twice on arm64

2019-06-05 Thread Konrad Rzeszutek Wilk
On Tue, Jun 04, 2019 at 03:41:40PM -0400, Boris Ostrovsky wrote: > On 6/4/19 12:51 PM, Stefano Stabellini wrote: > > On Mon, 3 Jun 2019, Boris Ostrovsky wrote: > >> On 6/3/19 2:25 PM, Stefano Stabellini wrote: > >>> On Tue, 28 May 2019, Boris Ostrovsky wrote: > On 5/28/19 6:48 PM, Stefano Stab

Re: [Xen-devel] [PATCH] xen-blkfront: switch kcalloc to kvcalloc for large array allocation

2019-05-31 Thread Konrad Rzeszutek Wilk
On May 31, 2019 10:41:16 AM EDT, Juergen Gross wrote: >On 06/05/2019 10:11, Juergen Gross wrote: >> On 03/05/2019 17:04, Roger Pau Monne wrote: >>> There's no reason to request physically contiguous memory for those >>> allocations. >>> >>> Reported-by: Ian Jackson >>> Signed-off-by: Roger Pau Mo

Re: [Xen-devel] [stable] xen/pciback: Don't disable PCI_COMMAND on PCI device reset.

2019-05-30 Thread Konrad Rzeszutek Wilk
On 5/30/19 8:16 AM, Ben Hutchings wrote: I'm looking at CVE-2015-8553 which is fixed by: commit 7681f31ec9cdacab4fd10570be924f2cef6669ba Author: Konrad Rzeszutek Wilk Date:   Wed Feb 13 18:21:31 2019 -0500 xen/pciback: Don't disable PCI_COMMAND on PCI device reset. I'm

[Xen-devel] [GIT PULL] (swiotlb) stable/for-linus-5.2

2019-05-07 Thread Konrad Rzeszutek Wilk
Hi Linus, Please git pull the following branch: git pull git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git stable/for-linus-5.2 which has cleanups in the swiotlb code and extra debugfs knobs to help with the field diagnostics. Thank you! Christoph Hellwig (4): swiotlb-x

Re: [Xen-devel] Criteria / validation proposal: drop Xen

2019-04-26 Thread Konrad Rzeszutek Wilk
t; > On Fri, Apr 26, 2019 at 10:33 AM Adam Williamson < > > adamw...@fedoraproject.org> wrote: > > > >> On Thu, 2017-07-06 at 13:19 -0700, Adam Williamson wrote: > >> > On Thu, 2017-07-06 at 15:59 -0400, Konrad Rzeszutek Wilk wrote: > >> >

Re: [Xen-devel] a few xen swiotlb cleanups

2019-04-25 Thread Konrad Rzeszutek Wilk
On Thu, Apr 11, 2019 at 09:19:56AM +0200, Christoph Hellwig wrote: > Hi all, I will slurp these up.. right after I test them for correctness. > > below are a couple of cleanups for swiotlb-xen.c. They were done in > preparation of eventually using the dma-noncoherent.h cache flushing > hooks, b

Re: [Xen-devel] [livepatch-build-tools part2 4/6] livepatch-build: detect special section group sizes

2019-04-24 Thread Konrad Rzeszutek Wilk
On Tue, Apr 16, 2019 at 12:07:14PM +, Pawel Wieczorkiewicz wrote: > Hard-coding the special section group sizes is unreliable. Instead, > determine them dynamically by finding the related struct definitions > in the DWARF metadata. > > This is a livepatch backport of kpatch upstream commit [1]

Re: [Xen-devel] [livepatch-build-tools part3 1/3] create-diff-object: Do not create empty .livepatch.funcs section

2019-04-24 Thread Konrad Rzeszutek Wilk
On Tue, Apr 16, 2019 at 12:22:39PM +, Pawel Wieczorkiewicz wrote: > When there is no changed function in the generated payload, do not > create an empty .livepatch.funcs section. Hypervisor code considers > such payloads as broken and rejects to load them. > > Such payloads without any changed

Re: [Xen-devel] [livepatch-build-tools: independ. modules] livepatch-build: Embed hypervisor build id into every hotpatch

2019-04-24 Thread Konrad Rzeszutek Wilk
On Tue, Apr 16, 2019 at 12:57:14PM +, Pawel Wieczorkiewicz wrote: > This change is part of a independant stacked hotpatch modules > feature. This feature allows to bypass dependencies between modules > upon loading, but still verifies Xen build ID matching. > > With stacked hotpatch modules it

  1   2   3   >