Re: [RFC XEN PATCH v4 5/5] libxl: Use gsi instead of irq for mapping pirq

2024-01-04 Thread Jan Beulich
On 05.01.2024 08:09, Jiqian Chen wrote: > --- a/tools/libs/light/libxl_pci.c > +++ b/tools/libs/light/libxl_pci.c > @@ -1479,8 +1479,14 @@ static void pci_add_dm_done(libxl__egc *egc, > fclose(f); > if (!pci_supp_legacy_irq()) > goto out_no_irq; > -sysfs_path =

Re: [PATCH] x86/mwait-idle: fix ubsan warning

2024-01-04 Thread Jan Beulich
On 04.01.2024 18:13, Tamas K Lengyel wrote: > Fix warning: > (XEN) UBSAN: Undefined behaviour in arch/x86/cpu/mwait-idle.c:1300:44 > (XEN) left shift of 15 by 28 places cannot be represented in type 'int' > > Signed-off-by: Tamas K Lengyel > Fixes: 5a211704e88 ("mwait-idle: prevent SKL-H boot

[RFC QEMU PATCH v4 1/1] xen: Use gsi instead of irq for mapping pirq

2024-01-04 Thread Jiqian Chen
In PVH dom0, it uses the linux local interrupt mechanism, when it allocs irq for a gsi, it is dynamic, and follow the principle of applying first, distributing first. And the irq number is alloced from small to large, but the applying gsi number is not, may gsi 38 comes before gsi 28, that causes

[RFC QEMU PATCH v4 0/1] Support device passthrough when dom0 is PVH on Xen

2024-01-04 Thread Jiqian Chen
Hi All, This is v4 series to support passthrough on Xen when dom0 is PVH. v3->v4 changes: * Add gsi into struct XenHostPCIDevice and use gsi number that read from gsi sysfs if it exists, if there is no gsi sysfs, still use irq. v2->v3 changes: * du to changes in the implementation of the second

[RFC XEN PATCH v4 0/5] Support device passthrough when dom0 is PVH on Xen

2024-01-04 Thread Jiqian Chen
Hi All, This is v4 series to support passthrough when dom0 is PVH v3->v4 changes: * patch#1: change the comment of PHYSDEVOP_pci_device_state_reset; move printings behind pcidevs_unlock * patch#2: add check to prevent PVH self map * patch#3: new patch, The implementation of adding

[RFC XEN PATCH v4 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0

2024-01-04 Thread Jiqian Chen
On PVH dom0, the gsis don't get registered, but the gsi of a passthrough device must be configured for it to be able to be mapped into a hvm domU. On Linux kernel side, it calles PHYSDEVOP_setup_gsi for passthrough devices to register gsi when dom0 is PVH. So, add PHYSDEVOP_setup_gsi for above

[RFC XEN PATCH v4 5/5] libxl: Use gsi instead of irq for mapping pirq

2024-01-04 Thread Jiqian Chen
In PVH dom0, it uses the linux local interrupt mechanism, when it allocs irq for a gsi, it is dynamic, and follow the principle of applying first, distributing first. And the irq number is alloced from small to large, but the applying gsi number is not, may gsi 38 comes before gsi 28, that causes

[RFC XEN PATCH v4 4/5] domctl: Use gsi to grant/revoke irq permission

2024-01-04 Thread Jiqian Chen
Some type of domain don't have PIRQ, like PVH, current implementation is not suitable for those domain. When passthrough a device to guest on PVH dom0, this pci_add_dm_done->XEN_DOMCTL_irq_permission will failed at domain_pirq_to_irq. So, change it to use gsi to grant/revoke irq permission. And

[RFC XEN PATCH v4 2/5] x86/pvh: Allow (un)map_pirq when caller isn't DOMID_SELF

2024-01-04 Thread Jiqian Chen
If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for a passthrough device by using gsi, see xen_pt_realize->xc_physdev_map_pirq and pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq will call into Xen, but in hvm_physdev_op, PHYSDEVOP_map_pirq is not allowed because currd is

[RFC XEN PATCH v4 1/5] xen/vpci: Clear all vpci status of device

2024-01-04 Thread Jiqian Chen
When a device has been reset on dom0 side, the vpci on Xen side won't get notification, so the cached state in vpci is all out of date compare with the real device state. To solve that problem, add a new hypercall to clear all vpci device state. When the state of device is reset on dom0 side, dom0

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Jan Beulich
On 04.01.2024 16:33, Jan Beulich wrote: > On 04.01.2024 15:33, Andrew Cooper wrote: >> On 04/01/2024 1:41 pm, Jan Beulich wrote: >>> Furthermore this initialize-to-self is a well known pattern to suppress the >>> -Wuninitialized induced warnings, originally used by Linux'es >>>

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Jan Beulich
On 04.01.2024 21:43, Roberto Bagnara wrote: > On 2024-01-04 15:33, Andrew Cooper wrote: >> On 04/01/2024 1:41 pm, Jan Beulich wrote: >>> On 28.12.2023 20:39, Andrew Cooper wrote: The use of uninitialised data is undefined behaviour. At -O2 with trivial examples, both Clang and GCC

[RFC KERNEL PATCH v4 1/3] xen/pci: Add xen_reset_device_state function

2024-01-04 Thread Jiqian Chen
When device on dom0 side has been reset, the vpci on Xen side won't get notification, so that the cached state in vpci is all out of date with the real device state. To solve that problem, add a new function to clear all vpci device state when device is reset on dom0 side. And call that function

[RFC KERNEL PATCH v4 2/3] xen/pvh: Setup gsi for passthrough device

2024-01-04 Thread Jiqian Chen
In PVH dom0, the gsis don't get registered, but the gsi of a passthrough device must be configured for it to be able to be mapped into a domU. When assign a device to passthrough, proactively setup the gsi of the device during that process. Co-developed-by: Huang Rui Signed-off-by: Jiqian Chen

[RFC KERNEL PATCH v4 3/3] PCI/sysfs: Add gsi sysfs for pci_dev

2024-01-04 Thread Jiqian Chen
There is a need for some scenarios to use gsi sysfs. For example, when xen passthrough a device to dumU, it will use gsi to map pirq, but currently userspace can't get gsi number. So, add gsi sysfs for that and for other potential scenarios. Co-developed-by: Huang Rui Signed-off-by: Jiqian Chen

[RFC KERNEL PATCH v4 0/3] Support device passthrough when dom0 is PVH on Xen

2024-01-04 Thread Jiqian Chen
Hi All, This is v4 series to support passthrough on Xen when dom0 is PVH. v3->v4 changes: * patch#1: change the comment of PHYSDEVOP_pci_device_state_reset; use a new function pcistub_reset_device_state to wrap __pci_reset_function_locked and xen_reset_device_state, and call

Re: [PATCH RFC v3 for-6.8/block 04/17] mtd: block2mtd: use bdev apis

2024-01-04 Thread Christoph Hellwig
On Thu, Jan 04, 2024 at 12:28:55PM +0100, Jan Kara wrote: > What do you think? Because when we are working with the folios it is rather > natural to use their mapping for dirty balancing? The real problem is that block2mtd pokes way to deep into block internals. I think the saviour here is

Re: [PATCH RFC v3 for-6.8/block 02/17] xen/blkback: use bdev api in xen_update_blkif_status()

2024-01-04 Thread Christoph Hellwig
On Thu, Jan 04, 2024 at 12:06:31PM +0100, Jan Kara wrote: > This function uses invalidate_inode_pages2() while invalidate_bdev() ends > up using mapping_try_invalidate() and there are subtle behavioral > differences between these two (for example invalidate_inode_pages2() tries > to clean dirty

Re: [PATCH RFC v3 for-6.8/block 11/17] erofs: use bdev api

2024-01-04 Thread Gao Xiang
On 2024/1/4 20:32, Yu Kuai wrote: Hi, Jan! 在 2024/01/04 20:02, Jan Kara 写道: On Thu 21-12-23 16:58:26, Yu Kuai wrote: From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_device. Signed-off-by: Yu Kuai I'm not erofs maintainer but IMO this is quite

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

2024-01-04 Thread osstest service owner
flight 184252 linux-linus real [real] flight 184254 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/184252/ http://logs.test-lab.xenproject.org/osstest/logs/184254/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking):

Re: [PATCH] xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import

2024-01-04 Thread Stefano Stabellini
On Thu, 4 Jan 2024, Oleksandr Tyshchenko wrote: > From: Oleksandr Tyshchenko > > DO NOT access the underlying struct page of an sg table exported > by DMA-buf in dmabuf_imp_to_refs(), this is not allowed. > Please see drivers/dma-buf/dma-buf.c:mangle_sg_table() for details. > > Fortunately,

Re: AMD EPYC VM to VM performance investigation

2024-01-04 Thread Stefano Stabellini
On Thu, 4 Jan 2024, David Morel wrote: > Hello, > > We have a customer and multiple users on our forum having performances that > seems quite low related to the general performance of the machines on AMD EPYC > Zen hosts when doing VM to VM networking. By "VM to VM networking" I take you mean

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Stefano Stabellini
On Thu, 4 Jan 2024, Roberto Bagnara wrote: > On 2024-01-04 15:33, Andrew Cooper wrote: > > On 04/01/2024 1:41 pm, Jan Beulich wrote: > > > On 28.12.2023 20:39, Andrew Cooper wrote: > > > > The use of uninitialised data is undefined behaviour. At -O2 with > > > > trivial > > > > examples, both

Re: [PATCH v5 01/13] xen/common: add cache coloring common code

2024-01-04 Thread Stefano Stabellini
On Thu, 4 Jan 2024, Julien Grall wrote: > Hi, > > On 02/01/2024 09:51, Carlo Nonato wrote: > > This commit adds the Last Level Cache (LLC) coloring common header, Kconfig > > options and functions. Since this is an arch specific feature, actual > > implementation is postponed to later patches and

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Tamas K Lengyel
> > Getting ~0 back is strictly less bad than getting stack rubble because > > at least it's obviously wrong. > > But then why not change things so there's no issue anymore? Plus I'm not > sure how / whether "obviously wrong" would manifest. I expect it would > be an entirely unobvious boot hang,

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Roberto Bagnara
On 2024-01-04 15:33, Andrew Cooper wrote: On 04/01/2024 1:41 pm, Jan Beulich wrote: On 28.12.2023 20:39, Andrew Cooper wrote: The use of uninitialised data is undefined behaviour. At -O2 with trivial examples, both Clang and GCC delete the variable, and in the case of a function return, the

Re: [PATCH v5 01/13] xen/common: add cache coloring common code

2024-01-04 Thread Julien Grall
Hi, On 02/01/2024 09:51, Carlo Nonato wrote: This commit adds the Last Level Cache (LLC) coloring common header, Kconfig options and functions. Since this is an arch specific feature, actual implementation is postponed to later patches and Kconfig options are placed under xen/arch. LLC colors

Re: [PATCH v5 03/13] xen/arm: add Dom0 cache coloring support

2024-01-04 Thread Julien Grall
Hi Carlo, On 02/01/2024 09:51, Carlo Nonato wrote: This commit allows the user to set the cache coloring configuration for Dom0 via a command line parameter. Since cache coloring and static memory are incompatible, direct mapping Dom0 isn't possible when coloring is enabled. A common

Re: [PATCH v5 02/13] xen/arm: add cache coloring initialization

2024-01-04 Thread Julien Grall
Hi Carlo, On 02/01/2024 09:51, Carlo Nonato wrote: This commit implements functions declared in the LLC coloring common header for arm64 and adds documentation. It also adds two command line options: a runtime switch for the cache coloring feature and the LLC way size parameter. The feature

[PATCH] xen/gntdev: Fix the abuse of underlying struct page in DMA-buf import

2024-01-04 Thread Oleksandr Tyshchenko
From: Oleksandr Tyshchenko DO NOT access the underlying struct page of an sg table exported by DMA-buf in dmabuf_imp_to_refs(), this is not allowed. Please see drivers/dma-buf/dma-buf.c:mangle_sg_table() for details. Fortunately, here (for special Xen device) we can avoid using pages and

Re: [PATCH v5 01/13] xen/common: add cache coloring common code

2024-01-04 Thread Julien Grall
Hi Carlo, On 02/01/2024 09:51, Carlo Nonato wrote: This commit adds the Last Level Cache (LLC) coloring common header, Kconfig options and functions. Since this is an arch specific feature, actual implementation is postponed to later patches and Kconfig options are placed under xen/arch. LLC

Re: [PATCH v5 00/13] Arm cache coloring

2024-01-04 Thread Stefano Stabellini
On Thu, 4 Jan 2024, Michal Orzel wrote: > On 04/01/2024 10:37, Carlo Nonato wrote: > > Hi Stefano, > > > > On Thu, Jan 4, 2024 at 2:55 AM Stefano Stabellini > > wrote: > >> > >> On Wed, 3 Jan 2024, Stefano Stabellini wrote: > >>> Also I tried this patch series on the "staging" branch and Xen

Re: [PATCH] x86/mwait-idle: fix ubsan warning

2024-01-04 Thread Andrew Cooper
On 04/01/2024 5:13 pm, Tamas K Lengyel wrote: > Fix warning: > (XEN) UBSAN: Undefined behaviour in arch/x86/cpu/mwait-idle.c:1300:44 > (XEN) left shift of 15 by 28 places cannot be represented in type 'int' > > Signed-off-by: Tamas K Lengyel > Fixes: 5a211704e88 ("mwait-idle: prevent SKL-H boot

[PATCH] x86/mwait-idle: fix ubsan warning

2024-01-04 Thread Tamas K Lengyel
Fix warning: (XEN) UBSAN: Undefined behaviour in arch/x86/cpu/mwait-idle.c:1300:44 (XEN) left shift of 15 by 28 places cannot be represented in type 'int' Signed-off-by: Tamas K Lengyel Fixes: 5a211704e88 ("mwait-idle: prevent SKL-H boot failure when C8+C9+C10 enabled") ---

Re: [PATCH v11 11/17] vpci/header: program p2m with guest BAR view

2024-01-04 Thread Stewart Hildebrand
On 12/21/23 10:59, Roger Pau Monné wrote: > On Sat, Dec 02, 2023 at 01:27:05AM +, Volodymyr Babchuk wrote: >> From: Oleksandr Andrushchenko >> >> Take into account guest's BAR view and program its p2m accordingly: >> gfn is guest's view of the BAR and mfn is the physical BAR value. >> This

AMD EPYC VM to VM performance investigation

2024-01-04 Thread David Morel
Hello, We have a customer and multiple users on our forum having performances that seems quite low related to the general performance of the machines on AMD EPYC Zen hosts when doing VM to VM networking. Below you'll find a write up about what we had a look at and what's in the TODO on our side,

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Jan Beulich
On 04.01.2024 15:33, Andrew Cooper wrote: > On 04/01/2024 1:41 pm, Jan Beulich wrote: >> On 28.12.2023 20:39, Andrew Cooper wrote: >>> The use of uninitialised data is undefined behaviour. At -O2 with trivial >>> examples, both Clang and GCC delete the variable, and in the case of a >>> function

Re: [PATCH RFC v3 for-6.8/block 02/17] xen/blkback: use bdev api in xen_update_blkif_status()

2024-01-04 Thread Jan Kara
Hi Kuai! On Thu 04-01-24 20:19:05, Yu Kuai wrote: > 在 2024/01/04 19:06, Jan Kara 写道: > > On Thu 21-12-23 16:56:57, Yu Kuai wrote: > > > From: Yu Kuai > > > > > > Avoid to access bd_inode directly, prepare to remove bd_inode from > > > block_devcie. > > > > > > Signed-off-by: Yu Kuai > > > ---

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Andrew Cooper
On 04/01/2024 1:41 pm, Jan Beulich wrote: > On 28.12.2023 20:39, Andrew Cooper wrote: >> The use of uninitialised data is undefined behaviour. At -O2 with trivial >> examples, both Clang and GCC delete the variable, and in the case of a >> function return, the caller gets whatever was stale in

Re: [PATCH v2 29/39] xen/riscv: add definition of __read_mostly

2024-01-04 Thread Jan Beulich
On 21.12.2023 16:23, Andrew Cooper wrote: > On 12/12/2023 5:04 pm, Jan Beulich wrote: >> On 24.11.2023 11:30, Oleksii Kurochko wrote: >>> The definition of __read_mostly should be removed in: >>> https://lore.kernel.org/xen-devel/f25eb5c9-7c14-6e23-8535-2c66772b3...@suse.com/ >> Andrew, can we

Re: [PATCH] xen: Use -Wuninitialized and -Winit-self

2024-01-04 Thread Jan Beulich
On 28.12.2023 20:39, Andrew Cooper wrote: > The use of uninitialised data is undefined behaviour. At -O2 with trivial > examples, both Clang and GCC delete the variable, and in the case of a > function return, the caller gets whatever was stale in %rax prior to the call. > > Clang includes

Re: [PATCH] xen/livepatch: Make check_for_livepatch_work() faster in the common case

2024-01-04 Thread Andrew Cooper
On 04/01/2024 1:24 pm, Jan Beulich wrote: > On 22.12.2023 23:00, Andrew Cooper wrote: >> When livepatching is enabled, this function is used all the time. Really do >> check the fastpath first, and annotate it likely() as this is the right >> answer >> 100% of the time (to many significant

Re: [PATCH] xen/livepatch: Make check_for_livepatch_work() faster in the common case

2024-01-04 Thread Jan Beulich
On 22.12.2023 23:00, Andrew Cooper wrote: > When livepatching is enabled, this function is used all the time. Really do > check the fastpath first, and annotate it likely() as this is the right answer > 100% of the time (to many significant figures). > > This cuts out 3 pointer dereferences in

Re: hvmloader - allow_memory_relocate overlaps

2024-01-04 Thread Jan Beulich
On 22.12.2023 16:49, Neowutran wrote: > Full logs without my patch to set allow-memory-relocate > (https://github.com/neowutran/qubes-vmm-xen/blob/allowmemoryrelocate/ALLOWMEMORYRELOCATE.patch) > https://pastebin.com/g > QGg55WZ > (GPU passthrough doesn't work, hvmloader overlaps with guest

Re: Serial console stuck during boot, unblocked with xl debug-key

2024-01-04 Thread Marek Marczykowski-Górecki
On Thu, Jan 04, 2024 at 12:59:28PM +0100, Jan Beulich wrote: > On 29.12.2023 10:50, Marek Marczykowski-Górecki wrote: > > Hi, > > > > This is continuation from matrix chat. There is an occasional failure on > > qubes-hw2 gitlab runner that console become stuck during boot. I can now > > reproduce

[libvirt test] 184250: tolerable all pass - PUSHED

2024-01-04 Thread osstest service owner
flight 184250 libvirt real [real] http://logs.test-lab.xenproject.org/osstest/logs/184250/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-armhf-armhf-libvirt 16 saverestore-support-checkfail like 184208 test-armhf-armhf-libvirt-qcow2 15

Re: Xen 4.19 release schedule proposal

2024-01-04 Thread Jan Beulich
On 02.01.2024 17:59, Oleksii wrote: > I'd like to propose the release schedule for Xen 4.19. > > Based on the previous release schedules [1] and [2], it seems the next > release date should be on Wednesday, July 10, 2024: > > ** Proposed option: Wed Jul 10, 2024 ** > (+9 months from Xen 4.18

Re: [PATCH RFC v3 for-6.8/block 11/17] erofs: use bdev api

2024-01-04 Thread Yu Kuai
Hi, Jan! 在 2024/01/04 20:02, Jan Kara 写道: On Thu 21-12-23 16:58:26, Yu Kuai wrote: From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_device. Signed-off-by: Yu Kuai I'm not erofs maintainer but IMO this is quite ugly and grows erofs_buf unnecessarily.

Re: [PATCH RFC v3 for-6.8/block 04/17] mtd: block2mtd: use bdev apis

2024-01-04 Thread Yu Kuai
Hi, 在 2024/01/04 19:28, Jan Kara 写道: On Thu 21-12-23 16:56:59, Yu Kuai wrote: From: Yu Kuai On the one hand covert to use folio while reading bdev inode, on the other hand prevent to access bd_inode directly. Signed-off-by: Yu Kuai ... + for (p = folio_address(folio); p <

Re: [PATCH RFC v3 for-6.8/block 14/17] buffer: add a new helper to read sb block

2024-01-04 Thread Jan Kara
On Thu 21-12-23 16:58:53, Yu Kuai wrote: > From: Yu Kuai > > Unlike __bread_gfp(), ext4 has special handing while reading sb block: > > 1) __GFP_NOFAIL is not set, and memory allocation can fail; > 2) If buffer write failed before, set buffer uptodate and don't read >block from disk; > 3)

[ovmf test] 184251: all pass - PUSHED

2024-01-04 Thread osstest service owner
flight 184251 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/184251/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf e449451770193c8eb36e4dc3a770c8ee353183aa baseline version: ovmf

Re: [PATCH RFC v3 for-6.8/block 02/17] xen/blkback: use bdev api in xen_update_blkif_status()

2024-01-04 Thread Yu Kuai
Hi, Jan! 在 2024/01/04 19:06, Jan Kara 写道: On Thu 21-12-23 16:56:57, Yu Kuai wrote: From: Yu Kuai Avoid to access bd_inode directly, prepare to remove bd_inode from block_devcie. Signed-off-by: Yu Kuai --- drivers/block/xen-blkback/xenbus.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [PATCH v6 03/11] virtio-gpu: Support context init feature with virglrenderer

2024-01-04 Thread Akihiko Odaki
On 2023/12/19 16:53, Huang Rui wrote: Patch "virtio-gpu: CONTEXT_INIT feature" has added the context_init feature flags. We would like to enable the feature with virglrenderer, so add to create virgl renderer context with flags using context_id when valid. Originally-by: Antonio Caggiano

Re: [PATCH RFC v3 for-6.8/block 13/17] jbd2: use bdev apis

2024-01-04 Thread Jan Kara
On Thu 21-12-23 16:58:46, Yu Kuai wrote: > From: Yu Kuai > > Avoid to access bd_inode directly, prepare to remove bd_inode from > block_device. > > Signed-off-by: Yu Kuai Looks good to me. Feel free to add: Reviewed-by: Jan Kara But note there are changes pending to this code for the

Re: [PATCH v3 0/5] Make Big QEMU Lock naming consistent

2024-01-04 Thread Akihiko Odaki
On 2024/01/03 0:35, Stefan Hajnoczi wrote: v3: - Rebase - Define bql_lock() macro on a single line [Akihiko Odaki] v2: - Rename APIs bql_*() [PeterX] - Spell out "Big QEMU Lock (BQL)" in doc comments [PeterX] - Rename "iolock" variables in hw/remote/mpqemu-link.c [Harsh] - Fix bql_auto_lock()

Re: [PATCH v3 07/34] xen/asm-generic: introdure nospec.h

2024-01-04 Thread Jan Beulich
On 04.01.2024 12:13, Andrew Cooper wrote: > On 04/01/2024 11:06 am, Jan Beulich wrote: >> On 22.12.2023 16:12, Oleksii Kurochko wrote: >>> The header is similar between Arm, PPC, and RISC-V, >>> so it has been moved to asm-generic. >>> >>> Signed-off-by: Oleksii Kurochko >> Acked-by: Jan Beulich

Re: [PATCH RFC v3 for-6.8/block 11/17] erofs: use bdev api

2024-01-04 Thread Jan Kara
On Thu 21-12-23 16:58:26, Yu Kuai wrote: > From: Yu Kuai > > Avoid to access bd_inode directly, prepare to remove bd_inode from > block_device. > > Signed-off-by: Yu Kuai I'm not erofs maintainer but IMO this is quite ugly and grows erofs_buf unnecessarily. I'd rather store 'sb' pointer in

Re: Serial console stuck during boot, unblocked with xl debug-key

2024-01-04 Thread Jan Beulich
On 29.12.2023 10:50, Marek Marczykowski-Górecki wrote: > Hi, > > This is continuation from matrix chat. There is an occasional failure on > qubes-hw2 gitlab runner that console become stuck during boot. I can now > reproduce it _much_ more often on another system, and the serial console > output

Re: [PATCH RFC v3 for-6.8/block 09/17] btrfs: use bdev apis

2024-01-04 Thread Jan Kara
On Sat 23-12-23 17:31:55, Matthew Wilcox wrote: > On Thu, Dec 21, 2023 at 04:57:04PM +0800, Yu Kuai wrote: > > @@ -3674,16 +3670,17 @@ struct btrfs_super_block > > *btrfs_read_dev_one_super(struct block_device *bdev, > > * Drop the page of the primary superblock, so later read will >

Re: xenpm cpufrequency settings don't work

2024-01-04 Thread Jan Beulich
On 28.12.2023 12:28, flamv3421 wrote: > I used xenpm to disable turbo mode and set the maximum frequency to 80 > and governor to powersave, but my laptop fans are still running at full speed > when I am using xen and the average frequency shown does not match the > maximum frequency I set

Re: [PATCH RFC v3 for-6.8/block 04/17] mtd: block2mtd: use bdev apis

2024-01-04 Thread Jan Kara
On Thu 21-12-23 16:56:59, Yu Kuai wrote: > From: Yu Kuai > > On the one hand covert to use folio while reading bdev inode, on the > other hand prevent to access bd_inode directly. > > Signed-off-by: Yu Kuai ... > + for (p = folio_address(folio); p < max; p++) >

[xen-unstable test] 184249: tolerable FAIL

2024-01-04 Thread osstest service owner
flight 184249 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/184249/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-libvirt-qcow2 13 guest-startfail in 184244 pass in 184249

Xen Summit 2024

2024-01-04 Thread Kelly Choi
Hi Xen Community, Happy New Year! It's my pleasure to announce Xen Summit 2024. Our annual event brings the community’s brilliant minds and power users together. This conference is a celebration of idea exchange, showcasing the latest advancements, sharing invaluable experiences, fostering

Re: [PATCH v6 11/11] virtio-gpu: make blob scanout use dmabuf fd

2024-01-04 Thread Pierre-Eric Pelloux-Prayer
Le 21/12/2023 à 07:25, Akihiko Odaki a écrit : On 2023/12/19 16:53, Huang Rui wrote: From: Robert Beckett This relies on a virglrenderer change to include the dmabuf fd when returning resource info. Signed-off-by: Robert Beckett Signed-off-by: Huang Rui --- Changes in v6: - Add

Re: [PATCH] libxl: Disable relocating memory for qemu-xen in stubdomain too

2024-01-04 Thread Andrew Cooper
On 27/12/2023 2:35 am, Marek Marczykowski-Górecki wrote: > According to comments (and experiments) qemu-xen cannot handle memory > reolcation done by hvmloader. The code was already disabled when running > qemu-xen in dom0 (see libxl__spawn_local_dm()), but it was missed when > adding qemu-xen

Re: [PATCH v3 07/34] xen/asm-generic: introdure nospec.h

2024-01-04 Thread Andrew Cooper
On 04/01/2024 11:06 am, Jan Beulich wrote: > On 22.12.2023 16:12, Oleksii Kurochko wrote: >> The header is similar between Arm, PPC, and RISC-V, >> so it has been moved to asm-generic. >> >> Signed-off-by: Oleksii Kurochko > Acked-by: Jan Beulich > > A word may want saying though on ... > >>

Re: [PATCH] libxl: Disable relocating memory for qemu-xen in stubdomain too

2024-01-04 Thread Jan Beulich
On 27.12.2023 17:54, Neowutran wrote: > On 2023-12-27 03:12, Marek Marczykowski-Górecki wrote: >> According to comments (and experiments) qemu-xen cannot handle memory >> reolcation done by hvmloader. The code was already disabled when running >> qemu-xen in dom0 (see libxl__spawn_local_dm()), but

Re: [PATCH v3 07/34] xen/asm-generic: introdure nospec.h

2024-01-04 Thread Jan Beulich
On 22.12.2023 16:12, Oleksii Kurochko wrote: > The header is similar between Arm, PPC, and RISC-V, > so it has been moved to asm-generic. > > Signed-off-by: Oleksii Kurochko Acked-by: Jan Beulich A word may want saying though on ... > --- a/xen/arch/arm/include/asm/nospec.h > +++

Re: [PATCH RFC v3 for-6.8/block 02/17] xen/blkback: use bdev api in xen_update_blkif_status()

2024-01-04 Thread Jan Kara
On Thu 21-12-23 16:56:57, Yu Kuai wrote: > From: Yu Kuai > > Avoid to access bd_inode directly, prepare to remove bd_inode from > block_devcie. > > Signed-off-by: Yu Kuai > --- > drivers/block/xen-blkback/xenbus.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git

Re: [PATCH v3 06/34] xen: avoid generation of empty asm/iommu.h

2024-01-04 Thread Jan Beulich
On 22.12.2023 16:12, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko The change looks okay-ish, but again needs a description: You want to explain why you use the absolute minimum of the scopes the two (or, in principle, possibly more) #ifdef-s cover. Jan > ---

Re: [PATCH v3 03/34] xen: add support in public/hvm/save.h for PPC and RISC-V

2024-01-04 Thread Jan Beulich
On 22.12.2023 16:12, Oleksii Kurochko wrote: > Signed-off-by: Oleksii Kurochko Since you change how PPC is handled, this can't go without description (i.e. justification). Jan > --- a/xen/include/public/hvm/save.h > +++ b/xen/include/public/hvm/save.h > @@ -89,8 +89,8 @@

Re: [PATCH v5 00/13] Arm cache coloring

2024-01-04 Thread Michal Orzel
On 04/01/2024 10:37, Carlo Nonato wrote: > > > Hi Stefano, > > On Thu, Jan 4, 2024 at 2:55 AM Stefano Stabellini > wrote: >> >> On Wed, 3 Jan 2024, Stefano Stabellini wrote: >>> Also I tried this patch series on the "staging" branch and Xen failed to >>> boot, no messages at all from Xen so

Re: Xen 4.19 release schedule proposal

2024-01-04 Thread Oleksii
On Wed, 2024-01-03 at 06:53 +0100, Juergen Gross wrote: > On 02.01.24 17:59, Oleksii wrote: > > Dear community, > > > > Wishing you a Happy New Year! > > > > I'd like to propose the release schedule for Xen 4.19. > > > > Based on the previous release schedules [1] and [2], it seems the > > next

Re: [PATCH v5 00/13] Arm cache coloring

2024-01-04 Thread Carlo Nonato
Hi Stefano, On Thu, Jan 4, 2024 at 2:55 AM Stefano Stabellini wrote: > > On Wed, 3 Jan 2024, Stefano Stabellini wrote: > > Also I tried this patch series on the "staging" branch and Xen failed to > > boot, no messages at all from Xen so it must be an early boot failure. I > > am passing this

[PATCH v3 15/33] tools/xenlogd: add 9pfs read request support

2024-01-04 Thread Juergen Gross
Add the read request of the 9pfs protocol. For now support only reading plain files (no directories). Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - make error check more readable (Jason Andryuk) --- tools/xen-9pfsd/io.c | 64 1

[PATCH v3 27/33] tools/xenstored: rework ring page (un)map functions

2024-01-04 Thread Juergen Gross
When [un]mapping the ring page of a Xenstore client, different actions are required for "normal" guests and dom0. Today this distinction is made at call site. Move this distinction into [un]map_interface() instead, avoiding code duplication and preparing special handling for [un]mapping the stub

[PATCH v3 31/33] tools/xenstored: add helpers for filename handling

2024-01-04 Thread Juergen Gross
Add some helpers for handling filenames which might need different implementations between stubdom and daemon environments: - expansion of relative filenames (those are not really defined today, just expand them to be relative to /var/lib/xen/xenstore) - expansion of xenstore_daemon_rundir()

[PATCH v3 10/33] tools/xenlogd: add 9pfs open request support

2024-01-04 Thread Juergen Gross
Add the open request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - don't allow to open symbolic link V3: - use openat() (Jason Andryuk) - use common error handling in p9_open() --- tools/xen-9pfsd/io.c| 139 tools/xen-9pfsd/xen-9pfsd.h

[PATCH v3 16/33] tools/libs/light: add backend type for 9pfs PV devices

2024-01-04 Thread Juergen Gross
Make the backend type of 9pfs PV devices configurable. The default is "qemu" with the related Xenstore backend-side directory being "9pfs". Add another type "xen-9pfsd" with the related Xenstore backend-side directory "xen_9pfs". As additional security features it is possible to specify: -

[PATCH v3 12/33] tools/xenlogd: add 9pfs create request support

2024-01-04 Thread Juergen Gross
Add the create request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - set permissions correctly (Jason Andryuk) V3: - use opendirat() etc. (Jason Andryuk) - rework error handling a little bit --- tools/xen-9pfsd/io.c | 155 +++ 1 file

[PATCH v3 17/33] tools/xl: support new 9pfs backend xen-9pfsd

2024-01-04 Thread Juergen Gross
Add support for the new 9pfs backend "xen-9pfsd". For this backend type the tag defaults to "Xen" and the host side path to "/var/log/xen/guests/". Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V2: - test max_files and max_open_files, too (Jason Andryuk) ---

[PATCH v3 33/33] tools/xenstored: have a single do_control_memreport()

2024-01-04 Thread Juergen Gross
With 9pfs now available in Xenstore-stubdom, there is no reason to have distinct do_control_memreport() variants for the daemon and the stubdom implementations. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xenstored/control.c | 27 +++ 1 file

[PATCH v3 23/33] tools/xenstored: move systemd handling to posix.c

2024-01-04 Thread Juergen Gross
Move systemd handling to a new late_init() function in posix.c. This prepares a future removal of the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch --- tools/xenstored/core.c | 17 + tools/xenstored/core.h | 1 + tools/xenstored/minios.c | 4

[PATCH v3 19/33] tools/xenstored: rename xenbus_evtchn()

2024-01-04 Thread Juergen Gross
Rename the xenbus_evtchn() function to get_xenbus_evtchn() in order to avoid two externally visible symbols with the same name when Xenstore- stubdom is being built with a Mini-OS with CONFIG_XENBUS set. Signed-off-by: Juergen Gross Reviewed-by: Julien Grall Reviewed-by: Jason Andryuk ---

[PATCH v3 11/33] tools/xenlogd: add 9pfs clunk request support

2024-01-04 Thread Juergen Gross
Add the clunk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V3: - use unlinkat() (Jason Andryuk) --- tools/xen-9pfsd/io.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index

[PATCH v3 22/33] tools/xenstored: add early_init() function

2024-01-04 Thread Juergen Gross
Some xenstored initialization needs to be done in the daemon case only, so split it out into a new early_init() function being a stub in the stubdom case. Remove the call of talloc_enable_leak_report_full(), as it serves no real purpose: the daemon only ever exits due to a crash, in which case a

[PATCH v3 13/33] tools/xenlogd: add 9pfs stat request support

2024-01-04 Thread Juergen Gross
Add the stat request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V3: - use fstatat() (Jason Andryuk) --- tools/xen-9pfsd/io.c | 93 1 file changed, 93 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index

[PATCH v3 14/33] tools/xenlogd: add 9pfs write request support

2024-01-04 Thread Juergen Gross
Add the write request of the 9pfs protocol. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/xen-9pfsd/io.c | 54 1 file changed, 54 insertions(+) diff --git a/tools/xen-9pfsd/io.c b/tools/xen-9pfsd/io.c index

[PATCH v3 08/33] tools/xenlogd: add 9pfs attach request support

2024-01-04 Thread Juergen Gross
Add the attach request of the 9pfs protocol. This introduces the "fid" scheme of the 9pfs protocol. As this will be needed later, use a dedicated memory allocation function in alloc_fid() and prepare a fid reference count. For filling the qid data take the approach from the qemu 9pfs backend

[PATCH v3 24/33] tools/xenstored: move all log-pipe handling into posix.c

2024-01-04 Thread Juergen Gross
All of the log-pipe handling is needed only when running as daemon. Move it into posix.c. This requires to have a service function in the main event loop for handling the related requests and one for setting the fds[] array. Use a generic name for those functions, as socket handling can be added

[PATCH v3 26/33] tools/xenstored: get own domid in stubdom case

2024-01-04 Thread Juergen Gross
Obtain the own domid when running as stubdom. Signed-off-by: Juergen Gross --- V2: - replacement of V1 patch (Andrew Cooper) V3: - rename called function to get_domid() (Julien Grall) - change stub_domid type to domid_t (Julien Grall) --- tools/xenstored/core.c | 1 + tools/xenstored/core.h

[PATCH v3 32/33] tools/xenstored: support complete log capabilities in stubdom

2024-01-04 Thread Juergen Gross
With 9pfs being fully available in Xenstore-stubdom now, there is no reason to not fully support all logging capabilities in stubdom. Open the logfile on stubdom only after the 9pfs file system has been mounted. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V3: - remove now stale

[PATCH v3 09/33] tools/xenlogd: add 9pfs walk request support

2024-01-04 Thread Juergen Gross
Add the walk request of the 9pfs protocol. Signed-off-by: Juergen Gross --- V2: - don't allow walking across symbolic links --- tools/xen-9pfsd/io.c| 172 tools/xen-9pfsd/xen-9pfsd.h | 1 + 2 files changed, 173 insertions(+) diff --git

[PATCH v3 20/33] stubdom: extend xenstore stubdom configs

2024-01-04 Thread Juergen Gross
Extend the config files of the Xenstore stubdoms to include XENBUS and 9PFRONT items in order to support file based logging. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- stubdom/xenstore-minios.cfg| 2 +- stubdom/xenstorepvh-minios.cfg | 2 +- 2 files changed, 2

[PATCH v3 25/33] tools/xenstored: move all socket handling into posix.c

2024-01-04 Thread Juergen Gross
All of the socket handling is needed only when running as daemon. Move it into posix.c, allowing to remove the NO_SOCKETS macro. Signed-off-by: Juergen Gross --- V3: - new patch --- tools/xenstored/Makefile.common | 4 - tools/xenstored/core.c | 156 +---

[PATCH v3 18/33] tools/helpers: allocate xenstore event channel for xenstore stubdom

2024-01-04 Thread Juergen Gross
In order to prepare support of PV frontends in xenstore-stubdom, add allocation of a Xenstore event channel to init-xenstore-domain.c. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- tools/helpers/init-xenstore-domain.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH v3 30/33] tools/xenstored: mount 9pfs device in stubdom

2024-01-04 Thread Juergen Gross
Mount the 9pfs device in stubdom enabling it to use files. This has to happen in a worker thread in order to allow the main thread handling the required Xenstore accesses in parallel. Signed-off-by: Juergen Gross Reviewed-by: Jason Andryuk --- V3: - add logging in case of errors (Julien Grall)

[PATCH v3 29/33] tools/xenstored: map stubdom interface

2024-01-04 Thread Juergen Gross
When running as stubdom, map the stubdom's Xenstore ring page in order to support using the 9pfs frontend. Use the same pattern as in dom0_init() when running as daemon in dom0 (introduce the own domain, then send an event to the client side to signal Xenstore is ready to communicate).

[PATCH v3 28/33] tools/xenstored: split domain_init()

2024-01-04 Thread Juergen Gross
Today domain_init() is called either just before calling dom0_init() in case no live update is being performed, or it is called after reading the global state from read_state_global(), as the event channel fd is needed. Split up domain_init() into a preparation part which can be called

[PATCH v3 21/33] tools: add 9pfs device to xenstore-stubdom

2024-01-04 Thread Juergen Gross
Add a 9pfs device to Xenstore stubdom in order to allow it to do e.g. logging into a dom0 file. Use the following parameters for the new device: - tag = "xen" - type = "xen-9pfsd" - path = "/var/lib/xen/xenstore" - security-model = "none" For now don't limit allowed file space or number of

  1   2   >