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

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

Re: [PATCH 12/26] block: remove blk_flush_policy

2024-06-17 Thread Chaitanya Kulkarni
On 6/16/24 23:04, Christoph Hellwig wrote: > Fold blk_flush_policy into the only caller to prepare for pending changes > to it. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Bart Van Assche > Reviewed-by: Damien Le Moal > Reviewed-by: Hannes Reinecke > --- > Looks good.

Re: [PATCH 11/26] block: freeze the queue in queue_attr_store

2024-06-17 Thread Chaitanya Kulkarni
On 6/16/24 23:04, Christoph Hellwig wrote: > queue_attr_store updates attributes used to control generating I/O, and > can cause malformed bios if changed with I/O in flight. Freeze the queue > in common code instead of adding it to almost every attribute. > > Signed-off-by: Christoph Hellwig >

Re: [PATCH 09/26] virtio_blk: remove virtblk_update_cache_mode

2024-06-17 Thread Chaitanya Kulkarni
On 6/16/24 23:04, Christoph Hellwig wrote: > virtblk_update_cache_mode boils down to a single call to > blk_queue_write_cache. Remove it in preparation for moving the cache > control flags into the queue_limits. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Bart Van Assche > Reviewed-by:

Re: [PATCH 02/26] sd: remove sd_is_zoned

2024-06-17 Thread Chaitanya Kulkarni
On 6/16/24 23:04, Christoph Hellwig wrote: > Since commit 7437bb73f087 ("block: remove support for the host aware zone > model"), only ZBC devices expose a zoned access model. sd_is_zoned is > used to check for that and thus return false for host aware devices. > > Replace the helper with the

Re: [XEN PATCH for-4.19 v2 3/3] automation/eclair_analysis: add more clean MISRA guidelines

2024-06-17 Thread Stefano Stabellini
On Mon, 10 Jun 2024, Nicola Vetrini wrote: > On 2024-06-10 09:43, Jan Beulich wrote: > > On 07.06.2024 22:13, Nicola Vetrini wrote: > > > Rules 20.9, 20.12 and 14.4 are now clean on ARM and x86, so they are added > > > to the list of clean guidelines. > > > > Why is 20.9 being mentioned here when

Re: [XEN PATCH for-4.19 v2 2/3] automation/eclair_analysis: address remaining violations of MISRA C Rule 20.12

2024-06-17 Thread Stefano Stabellini
On Fri, 7 Jun 2024, Nicola Vetrini wrote: > The DEFINE macro in asm-offsets.c (for all architectures) still generates > violations despite the file(s) being excluded from compliance, due to the > fact that in its expansion it sometimes refers entities in non-excluded files. > These corner cases

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Demi Marie Obenour
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Jun 17, 2024 at 10:46:13PM +0200, Marek Marczykowski-Górecki wrote: > On Mon, Jun 17, 2024 at 09:46:29AM +0200, Roger Pau Monné wrote: > > On Sun, Jun 16, 2024 at 08:38:19PM -0400, Demi Marie Obenour wrote: > > > In both cases, the device

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Marek Marczykowski-Górecki
On Mon, Jun 17, 2024 at 09:46:29AM +0200, Roger Pau Monné wrote: > On Sun, Jun 16, 2024 at 08:38:19PM -0400, Demi Marie Obenour wrote: > > In both cases, the device physical > > addresses are identical to dom0’s physical addresses. > > Yes, but a PV dom0 physical address space can be very

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

2024-06-17 Thread osstest service owner
flight 186381 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/186381/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-qcow2 8 xen-boot fail in 186377 pass in 186381 test-armhf-armhf-xl-raw 8

[PATCH] xen/ubsan: Fix UB in type_descriptor declaration

2024-06-17 Thread Andrew Cooper
struct type_descriptor is arranged with a NUL terminated string following the kind/info fields. The only reason this doesn't trip UBSAN detection itself (on more modern compilers at least) is because struct type_descriptor is only referenced in suppressed regions. Switch the declaration to be a

[PATCH for-4.19 v4 0/7] x86/xstate: Fixes to size calculations

2024-06-17 Thread Andrew Cooper
Only minor changes in v4 vs v3. See patches for details. The end result has been tested across the entire XenServer hardware lab. This found several false assupmtion about how the dynamic sizes behave. Patches 1 and 6 the main bugfixes from this series. There's still lots more work to do in

[PATCH v4 2/7] x86/xstate: Cross-check dynamic XSTATE sizes at boot

2024-06-17 Thread Andrew Cooper
Right now, xstate_ctxt_size() performs a cross-check of size with CPUID in for every call. This is expensive, being used for domain create/migrate, as well as to service certain guest CPUID instructions. Instead, arrange to check the sizes once at boot. See the code comments for details. Right

[PATCH v4 6/7] x86/cpuid: Fix handling of XSAVE dynamic leaves

2024-06-17 Thread Andrew Cooper
First, if XSAVE is available in hardware but not visible to the guest, the dynamic leaves shouldn't be filled in. Second, the comment concerning XSS state is wrong. VT-x doesn't manage host/guest state automatically, but there is provision for "host only" bits to be set, so the implications are

[PATCH v4 1/7] x86/xstate: Fix initialisation of XSS cache

2024-06-17 Thread Andrew Cooper
The clobbering of this_cpu(xcr0) and this_cpu(xss) to architecturally invalid values is to force the subsequent set_xcr0() and set_msr_xss() to reload the hardware register. While XCR0 is reloaded in xstate_init(), MSR_XSS isn't. This causes get_msr_xss() to return the invalid value, and logic

[PATCH v4 5/7] x86/cpu-policy: Simplify recalculate_xstate()

2024-06-17 Thread Andrew Cooper
Make use of xstate_uncompressed_size() helper rather than maintaining the running calculation while accumulating feature components. The rest of the CPUID data can come direct from the raw cpu policy. All per-component data form an ABI through the behaviour of the X{SAVE,RSTOR}* instructions.

[PATCH v4 3/7] x86/boot: Collect the Raw CPU Policy earlier on boot

2024-06-17 Thread Andrew Cooper
This is a tangle, but it's a small step in the right direction. In the following change, xstate_init() is going to start using the Raw policy. calculate_raw_cpu_policy() is sufficiently separate from the other policies to safely move like this. No functional change. Signed-off-by: Andrew

[PATCH v4 7/7] x86/defns: Clean up X86_{XCR0,XSS}_* constants

2024-06-17 Thread Andrew Cooper
With the exception of one case in read_bndcfgu() which can use ilog2(), the *_POS defines are unused. Drop them. X86_XCR0_X87 is the name used by both the SDM and APM, rather than X86_XCR0_FP. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC:

[PATCH v4 4/7] x86/xstate: Rework xstate_ctxt_size() as xstate_uncompressed_size()

2024-06-17 Thread Andrew Cooper
We're soon going to need a compressed helper of the same form. The size of the uncompressed image depends on the single element with the largest offset + size. Sadly this isn't always the element with the largest index. Name the per-xstate-component cpu_policy struture, for legibility of the

Re: [PATCH 3/7] x86/boot: Collect the Raw CPU Policy earlier on boot

2024-06-17 Thread Andrew Cooper
On 17/06/2024 11:25 am, Jan Beulich wrote: > On 14.06.2024 20:26, Andrew Cooper wrote: >> On 23/05/2024 4:44 pm, Jan Beulich wrote: >>> On 23.05.2024 13:16, Andrew Cooper wrote: This is a tangle, but it's a small step in the right direction. xstate_init() is shortly going to want

[ovmf test] 186382: all pass - PUSHED

2024-06-17 Thread osstest service owner
flight 186382 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/186382/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 128513afcdfa77e94c9637e643898e61c8218e34 baseline version: ovmf

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Demi Marie Obenour
On Mon, Jun 17, 2024 at 05:39:23PM +0200, Jan Beulich wrote: > On 17.06.2024 17:17, Demi Marie Obenour wrote: > > On Mon, Jun 17, 2024 at 11:07:54AM +0200, Jan Beulich wrote: > >> On 14.06.2024 18:44, Demi Marie Obenour wrote: > >>> On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: >

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Jan Beulich
On 17.06.2024 17:17, Demi Marie Obenour wrote: > On Mon, Jun 17, 2024 at 11:07:54AM +0200, Jan Beulich wrote: >> On 14.06.2024 18:44, Demi Marie Obenour wrote: >>> On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: On 14.06.2024 09:21, Roger Pau Monné wrote: > I'm not sure it's

Re: [OSSTEST PATCH] preseed_base: Use "keep" NIC NamePolicy when "force-mac-address"

2024-06-17 Thread Andrew Cooper
On 17/06/2024 3:40 pm, Anthony PERARD wrote: > diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm > index 3545f3fd..d974fea5 100644 > --- a/Osstest/Debian.pm > +++ b/Osstest/Debian.pm > @@ -972,7 +972,19 @@ END > # is going to be added to dom0's initrd, which is used by some guests >

Re: [XEN PATCH v10 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:00, Jiqian Chen wrote: > Some type of domain don't have PIRQs, like PVH, it doesn't do > PHYSDEVOP_map_pirq for each gsi. When passthrough a device > to guest base on PVH dom0, callstack > pci_add_dm_done->XEN_DOMCTL_irq_permission will fail at function > domain_pirq_to_irq,

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Demi Marie Obenour
On Mon, Jun 17, 2024 at 11:07:54AM +0200, Jan Beulich wrote: > On 14.06.2024 18:44, Demi Marie Obenour wrote: > > On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: > >> On 14.06.2024 09:21, Roger Pau Monné wrote: > >>> I'm not sure it's possible to ensure that when using system RAM such

Re: [XEN PATCH v10 4/5] tools: Add new function to get gsi from dev

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:00, Jiqian Chen wrote: > 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 > irq number is alloced from small to large, but the applying > gsi number is

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Demi Marie Obenour
On Mon, Jun 17, 2024 at 09:46:29AM +0200, Roger Pau Monné wrote: > On Sun, Jun 16, 2024 at 08:38:19PM -0400, Demi Marie Obenour wrote: > > On Fri, Jun 14, 2024 at 10:39:37AM +0200, Roger Pau Monné wrote: > > > On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: > > > > On 14.06.2024

[Volunteers needed] - Host a local Xen Meetup

2024-06-17 Thread Kelly Choi
Hello Xen Community! I'm on the lookout for volunteers who are willing to host some local Xen events or workshops. The goal of our meetups is to connect our community members. Meetups allow members (that’s you) to network, collaborate, and have a pulse on their local network. We welcome

Re: [XEN PATCH v10 3/5] x86/pvh: Add PHYSDEVOP_setup_gsi for PVH dom0

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:00, Jiqian Chen wrote: > The gsi of a passthrough device must be configured for it to be > able to be mapped into a hvm domU. > But When dom0 is PVH, the gsis don't get registered, it causes > the info of apic, pin and irq not be added into irq_2_pin list, > and the handler of

Re: [XEN PATCH v10 2/5] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:00, Jiqian Chen wrote: > If run Xen with PVH dom0 and hvm domU, hvm will map a pirq for > a passthrough device by using gsi, see qemu code > xen_pt_realize->xc_physdev_map_pirq and libxl code > pci_add_dm_done->xc_physdev_map_pirq. Then xc_physdev_map_pirq > will call into Xen,

[OSSTEST PATCH] preseed_base: Use "keep" NIC NamePolicy when "force-mac-address"

2024-06-17 Thread Anthony PERARD
From: Anthony PERARD We have a few machine (arndale-*) that have a nic without mac address, so the kernel assign a random one. For those there's a flags "force-mac-address" which tells osstest to make it so that the machine changes the mac address to a predefined one at boot. This normally tells

Re: [PATCH] x86/xen/time: Reduce Xen timer tick

2024-06-17 Thread Roger Pau Monné
On Mon, Jun 17, 2024 at 04:22:21PM +0200, Jan Beulich wrote: > On 17.06.2024 16:13, Frediano Ziglio wrote: > > Current timer tick is causing some deadline to fail. > > The current high value constant was probably due to an old > > bug in the Xen timer implementation causing errors if the > >

Re: [PATCH 26/26] block: move the bounce flag into the features field

2024-06-17 Thread Keith Busch
On Mon, Jun 17, 2024 at 08:04:53AM +0200, Christoph Hellwig wrote: > @@ -352,7 +355,6 @@ enum blk_bounce { No more users of "enum blk_bounce" after this, so you can delete that too. > struct queue_limits { > unsigned intfeatures; > unsigned intflags; > -

Re: ACPI NVS range conflicting with Dom0 page tables (or kernel image)

2024-06-17 Thread Jan Beulich
On 17.06.2024 16:03, Marek Marczykowski-Górecki wrote: > On Mon, Jun 17, 2024 at 01:22:37PM +0200, Jan Beulich wrote: >> Hello, >> >> while it feels like we had a similar situation before, I can't seem to be >> able to find traces thereof, or associated (Linux) commits. > > Is it some AMD

Re: [PATCH] x86/xen/time: Reduce Xen timer tick

2024-06-17 Thread Jan Beulich
On 17.06.2024 16:13, Frediano Ziglio wrote: > Current timer tick is causing some deadline to fail. > The current high value constant was probably due to an old > bug in the Xen timer implementation causing errors if the > deadline was in the future. > This was fixed in Xen commit: > 19c6cbd90965

Re: [XEN PATCH v10 1/5] xen/vpci: Clear all vpci status of device

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:00, Jiqian Chen wrote: > --- a/xen/drivers/pci/physdev.c > +++ b/xen/drivers/pci/physdev.c > @@ -2,11 +2,17 @@ > #include > #include > #include > +#include > > #ifndef COMPAT > typedef long ret_t; > #endif > > +static const struct pci_device_state_reset_method > +

[PATCH] x86/xen/time: Reduce Xen timer tick

2024-06-17 Thread Frediano Ziglio
Current timer tick is causing some deadline to fail. The current high value constant was probably due to an old bug in the Xen timer implementation causing errors if the deadline was in the future. This was fixed in Xen commit: 19c6cbd90965 xen/vcpu: ignore VCPU_SSHOTTMR_future Signed-off-by:

Re: ACPI NVS range conflicting with Dom0 page tables (or kernel image)

2024-06-17 Thread Marek Marczykowski-Górecki
On Mon, Jun 17, 2024 at 01:22:37PM +0200, Jan Beulich wrote: > Hello, > > while it feels like we had a similar situation before, I can't seem to be > able to find traces thereof, or associated (Linux) commits. Is it some AMD Threadripper system by a chance? Previous thread on this issue:

Re: [PATCH 2/2] x86/e820 address violations of MISRA C:2012 Rule 5.3

2024-06-17 Thread Jan Beulich
On 14.06.2024 18:12, Alessandro Zucchelli wrote: > --- a/xen/arch/x86/e820.c > +++ b/xen/arch/x86/e820.c > @@ -593,79 +593,79 @@ int __init e820_add_range(uint64_t s, uint64_t e, > uint32_t type) > } > > int __init e820_change_range_type( > -struct e820map *e820, uint64_t s, uint64_t e, >

Re: [PATCH 1/2] x86/mm address violations of MISRA C:2012 Rule 5.3

2024-06-17 Thread Jan Beulich
On 14.06.2024 18:12, Alessandro Zucchelli wrote: > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -4703,7 +4703,7 @@ long arch_memory_op(unsigned long cmd, > XEN_GUEST_HANDLE_PARAM(void) arg) > { > struct xen_foreign_memory_map fmap; > struct domain *d; > -

Re: [PATCH] public/sysctl: address violations of MISRA C: 2012 Rule 7.3

2024-06-17 Thread Jan Beulich
On 13.06.2024 16:58, Alessandro Zucchelli wrote: > This addresses violations of MISRA C:2012 Rule 7.3 which states as > following: The lowercase character `l' shall not be used in a literal > suffix. > > Changed moreover suffixes 'u' in 'U' for better readability next to > the 'L's. > > No

Re: [RFC PATCH] iommu/xen: Add Xen PV-IOMMU driver

2024-06-17 Thread Jan Beulich
On 17.06.2024 15:36, Teddy Astie wrote: > Le 13/06/2024 à 16:32, Jan Beulich a écrit : >> On 13.06.2024 15:50, Teddy Astie wrote: >>> @@ -214,6 +215,38 @@ struct xen_add_to_physmap_range { >>> }; >>> DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap_range); >>> >>> +/* >>> + * With some legacy

[ovmf test] 186379: all pass - PUSHED

2024-06-17 Thread osstest service owner
flight 186379 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/186379/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 9fc61309bf56aa7863e36b8f418a49ca6d8364d0 baseline version: ovmf

Re: [PATCH v3 3/3] x86/irq: forward pending interrupts to new destination in fixup_irqs()

2024-06-17 Thread Jan Beulich
On 13.06.2024 18:56, Roger Pau Monne wrote: > fixup_irqs() is used to evacuate interrupts from to be offlined CPUs. Given > the CPU is to become offline, the normal migration logic used by Xen where the > vector in the previous target(s) is left configured until the interrupt is > received on the

Re: [RFC PATCH] iommu/xen: Add Xen PV-IOMMU driver

2024-06-17 Thread Teddy Astie
Le 13/06/2024 à 16:32, Jan Beulich a écrit : > On 13.06.2024 15:50, Teddy Astie wrote: >> @@ -214,6 +215,38 @@ struct xen_add_to_physmap_range { >> }; >> DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap_range); >> >> +/* >> + * With some legacy devices, certain guest-physical addresses cannot

Re: [PATCH v3 for-4.19 2/3] x86/irq: handle moving interrupts in _assign_irq_vector()

2024-06-17 Thread Jan Beulich
On 13.06.2024 18:56, Roger Pau Monne wrote: > Currently there's logic in fixup_irqs() that attempts to prevent > _assign_irq_vector() from failing, as fixup_irqs() is required to evacuate all > interrupts from the CPUs not present in the input mask. The current logic in > fixup_irqs() is

Re: [PATCH v3 for-4.19 1/3] x86/irq: deal with old_cpu_mask for interrupts in movement in fixup_irqs()

2024-06-17 Thread Jan Beulich
On 13.06.2024 18:56, Roger Pau Monne wrote: > Given the current logic it's possible for ->arch.old_cpu_mask to get out of > sync: if a CPU set in old_cpu_mask is offlined and then onlined > again without old_cpu_mask having been updated the data in the mask will no > longer be accurate, as when

[linux-linus test] 186377: regressions - FAIL

2024-06-17 Thread osstest service owner
flight 186377 linux-linus real [real] flight 186380 linux-linus real-retest [real] http://logs.test-lab.xenproject.org/osstest/logs/186377/ http://logs.test-lab.xenproject.org/osstest/logs/186380/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be

Re: [XEN PATCH] xen: add explicit comment to identify notifier patterns

2024-06-17 Thread Federico Serafini
On 17/06/24 12:03, Jan Beulich wrote: On 17.06.2024 11:49, Federico Serafini wrote: MISRA C Rule 16.4 states that every `switch' statement shall have a `default' label" and a statement or a comment prior to the terminating break statement. This patch addresses some violations of the rule

Re: for_each_set_bit() clean-up (API RFC)

2024-06-17 Thread Jan Beulich
On 17.06.2024 13:18, Andrew Cooper wrote: > On 17/06/2024 10:54 am, Jan Beulich wrote: >> On 14.06.2024 19:07, Andrew Cooper wrote: >>> More fallout from looking at the code generation... >>> >>> for_each_set_bit() forces it's bitmap parameter out into memory.  For an >>> arbitrary sized bitmap,

ACPI NVS range conflicting with Dom0 page tables (or kernel image)

2024-06-17 Thread Jan Beulich
Hello, while it feels like we had a similar situation before, I can't seem to be able to find traces thereof, or associated (Linux) commits. With (XEN) Dom0 kernel: 64-bit, PAE, lsb, paddr 0x100 -> 0x400 ... (XEN) Dom0 alloc.: 00044000->00044800 (619175 pages to be

Re: for_each_set_bit() clean-up (API RFC)

2024-06-17 Thread Andrew Cooper
On 17/06/2024 10:54 am, Jan Beulich wrote: > On 14.06.2024 19:07, Andrew Cooper wrote: >> More fallout from looking at the code generation... >> >> for_each_set_bit() forces it's bitmap parameter out into memory.  For an >> arbitrary sized bitmap, this is fine - and likely preferable as it's an >>

Re: [PATCH 26/26] block: move the bounce flag into the features field

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the bounce flag into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-settings.c| 1 - block/blk.h | 2 +- drivers/scsi/scsi_lib.c | 2 +-

Re: [PATCH 25/26] block: move the skip_tagset_quiesce flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the skip_tagset_quiesce flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c

Re: [PATCH 24/26] block: move the pci_p2pdma flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the pci_p2pdma flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/nvme/host/core.c | 8

Re: [PATCH 23/26] block: move the zone_resetall flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the zone_resetall flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 -

Re: [PATCH 22/26] block: move the zoned flag into the features field

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the zoned flags into the features field to reclaim a little bit of space. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-settings.c | 5 ++--- drivers/block/null_blk/zoned.c | 2 +-

Re: [PATCH 21/26] block: move the poll flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the poll flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Stacking drivers are simplified in that they now can simply set the flag, and blk_stack_limits will clear it when the features is not

Re: [PATCH 20/26] block: move the dax flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the dax flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c | 1 - drivers/md/dm-table.c| 4

Re: [PATCH 19/26] block: move the nowait flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the nowait flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Stacking drivers are simplified in that they now can simply set the flag, and blk_stack_limits will clear it when the features is not

Re: [PATCH 18/26] block: move the synchronous flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the synchronous flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Signed-off-by: Christoph Hellwig Reviewed-by: Damien Le Moal --- block/blk-mq-debugfs.c| 1 - drivers/block/brd.c

Re: [PATCH 17/26] block: move the stable_writes flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the stable_writes flag into the queue_limits feature field so that it can be set atomically with the queue frozen. The flag is now inherited by blk_stack_limits, which greatly simplifies the code in dm, and fixed md which previously did not pass

Re: [PATCH 16/26] block: move the io_stat flag setting to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the io_stat flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Simplify md and dm to set the flag unconditionally instead of avoiding setting a simple flag for cases where it already is set by other

Re: [PATCH 15/26] block: move the add_random flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the add_random flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Note that this also removes code from dm to clear the flag based on the underlying devices, which can't be reached as dm devices will

Re: [PATCH 14/26] block: move the nonrot flag to queue_limits

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the nonrot flag into the queue_limits feature field so that it can be set atomically with the queue frozen. Use the chance to switch to defaulting to non-rotational and require the driver to opt into rotational, which matches the polarity of the

Re: [PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move the cache control settings into the queue_limits so that the flags can be set atomically with the device queue frozen. Add new features and flags field for the driver set flags, and internal (usually sysfs-controlled) flags in the block layer.

Re: [PATCH 3/7] x86/boot: Collect the Raw CPU Policy earlier on boot

2024-06-17 Thread Jan Beulich
On 14.06.2024 20:26, Andrew Cooper wrote: > On 23/05/2024 4:44 pm, Jan Beulich wrote: >> On 23.05.2024 13:16, Andrew Cooper wrote: >>> This is a tangle, but it's a small step in the right direction. >>> >>> xstate_init() is shortly going to want data from the Raw policy. >>>

Re: [PATCH 2/7] x86/xstate: Cross-check dynamic XSTATE sizes at boot

2024-06-17 Thread Jan Beulich
On 14.06.2024 15:56, Andrew Cooper wrote: > On 23/05/2024 4:34 pm, Jan Beulich wrote: >> On 23.05.2024 13:16, Andrew Cooper wrote: >>> Right now, xstate_ctxt_size() performs a cross-check of size with CPUID in >>> for >>> every call. This is expensive, being used for domain create/migrate, as

Re: [PATCH 03/26] sd: move zone limits setup out of sd_read_block_characteristics

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: Move a bit of code that sets up the zone flag and the write granularity into sd_zbc_read_zones to be with the rest of the zoned limits. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 21 + drivers/scsi/sd_zbc.c |

Re: [PATCH 01/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-17 Thread Hannes Reinecke
On 6/17/24 08:04, Christoph Hellwig wrote: blkfront always had a robust negotiation protocol for detecting a write cache. Stop simply disabling cache flushes in the block layer as the flags handling is moving to the atomic queue limits API that needs user context to freeze the queue for that.

Re: [XEN PATCH] xen: add explicit comment to identify notifier patterns

2024-06-17 Thread Jan Beulich
On 17.06.2024 11:49, Federico Serafini wrote: > MISRA C Rule 16.4 states that every `switch' statement shall have a > `default' label" and a statement or a comment prior to the > terminating break statement. > > This patch addresses some violations of the rule related to the > "notifier pattern":

[ovmf test] 186378: all pass - PUSHED

2024-06-17 Thread osstest service owner
flight 186378 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/186378/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 587100a95d7bfddc60bc5699ae0cca45914f1d81 baseline version: ovmf

Re: for_each_set_bit() clean-up (API RFC)

2024-06-17 Thread Jan Beulich
On 14.06.2024 19:07, Andrew Cooper wrote: > More fallout from looking at the code generation... > > for_each_set_bit() forces it's bitmap parameter out into memory.  For an > arbitrary sized bitmap, this is fine - and likely preferable as it's an > in-memory to begin with. > > However, more than

[XEN PATCH] xen: add explicit comment to identify notifier patterns

2024-06-17 Thread Federico Serafini
MISRA C Rule 16.4 states that every `switch' statement shall have a `default' label" and a statement or a comment prior to the terminating break statement. This patch addresses some violations of the rule related to the "notifier pattern": a frequently-used pattern whereby only a few values are

Re: [XEN PATCH v10 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

2024-06-17 Thread Chen, Jiqian
Hi Daniel, On 2024/6/17 17:00, Jiqian Chen wrote: > Some type of domain don't have PIRQs, like PVH, it doesn't do > PHYSDEVOP_map_pirq for each gsi. When passthrough a device > to guest base on PVH dom0, callstack > pci_add_dm_done->XEN_DOMCTL_irq_permission will fail at function >

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Jan Beulich
On 17.06.2024 02:38, Demi Marie Obenour wrote: > On Fri, Jun 14, 2024 at 10:39:37AM +0200, Roger Pau Monné wrote: >> On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: >>> On 14.06.2024 09:21, Roger Pau Monné wrote: On Fri, Jun 14, 2024 at 08:38:51AM +0200, Jan Beulich wrote: >

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Jan Beulich
On 14.06.2024 18:44, Demi Marie Obenour wrote: > On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: >> On 14.06.2024 09:21, Roger Pau Monné wrote: >>> I'm not sure it's possible to ensure that when using system RAM such >>> memory comes from the guest rather than the host, as it would

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Jan Beulich
On 14.06.2024 18:35, Demi Marie Obenour wrote: > On Fri, Jun 14, 2024 at 08:38:51AM +0200, Jan Beulich wrote: >> On 13.06.2024 20:43, Demi Marie Obenour wrote: >>> 2. Add support for `XEN_DOMCTL_memory_mapping` to use system RAM, not >>>just IOMEM. Mappings made with

[XEN PATCH v10 4/5] tools: Add new function to get gsi from dev

2024-06-17 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 irq number is alloced from small to large, but the applying gsi number is not, may gsi 38 comes before gsi 28, that causes the

[XEN PATCH v10 5/5] domctl: Add XEN_DOMCTL_gsi_permission to grant gsi

2024-06-17 Thread Jiqian Chen
Some type of domain don't have PIRQs, like PVH, it doesn't do PHYSDEVOP_map_pirq for each gsi. When passthrough a device to guest base on PVH dom0, callstack pci_add_dm_done->XEN_DOMCTL_irq_permission will fail at function domain_pirq_to_irq, because PVH has no mapping of gsi, pirq and irq on Xen

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

2024-06-17 Thread Jiqian Chen
Hi All, This is v10 series to support passthrough when dom0 is PVH v9->v10 changes: * patch#2: Indent the comments above PHYSDEVOP_map_pirq according to the code style. * patch#3: Modified the description in the commit message, changing "it calls" to "it will need to call", indicating

[XEN PATCH v10 2/5] x86/pvh: Allow (un)map_pirq when dom0 is PVH

2024-06-17 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 qemu code xen_pt_realize->xc_physdev_map_pirq and libxl code 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

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

2024-06-17 Thread Jiqian Chen
The gsi of a passthrough device must be configured for it to be able to be mapped into a hvm domU. But When dom0 is PVH, the gsis don't get registered, it causes the info of apic, pin and irq not be added into irq_2_pin list, and the handler of irq_desc is not set, then when passthrough a device,

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

2024-06-17 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

[XEN PATCH v2 1/6][RESEND] automation/eclair: address violations of MISRA C Rule 20.7

2024-06-17 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". The helper macro bitmap_switch has parameters that cannot be parenthesized in order to comply with the rule, as that would break its functionality. Moreover, the risk of

[XEN PATCH v2 0/6][RESEND] address violations of MISRA C Rule 20.7

2024-06-17 Thread Nicola Vetrini
Hi all, this series addresses several violations of Rule 20.7, as well as a small fix to the ECLAIR integration scripts that do not influence the current behaviour, but were mistakenly part of the upstream configuration. Note that by applying this series the rule has a few leftover violations.

[XEN PATCH v2 6/6][RESEND] automation/eclair_analysis: clean ECLAIR configuration scripts

2024-06-17 Thread Nicola Vetrini
Remove from the ECLAIR integration scripts an unused option, which was already ignored, and make the help texts consistent with the rest of the scripts. No functional change. Signed-off-by: Nicola Vetrini --- automation/eclair_analysis/ECLAIR/analyze.sh | 3 +-- 1 file changed, 1 insertion(+),

[XEN PATCH v2 5/6][RESEND] x86/irq: address violations of MISRA C Rule 20.7

2024-06-17 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly

[XEN PATCH v2 4/6][RESEND] automation/eclair_analysis: address violations of MISRA C Rule 20.7

2024-06-17 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". The local helpers GRP2 and XADD in the x86 emulator use their first argument as the constant expression for a case label. This pattern is deviated project-wide, because it is

[XEN PATCH v2 3/6][RESEND] xen/guest_access: address violations of MISRA rule 20.7

2024-06-17 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly

[XEN PATCH v2 2/6][RESEND] xen/self-tests: address violations of MISRA rule 20.7

2024-06-17 Thread Nicola Vetrini
MISRA C Rule 20.7 states: "Expressions resulting from the expansion of macro parameters shall be enclosed in parentheses". Therefore, some macro definitions should gain additional parentheses to ensure that all current and future users will be safe with respect to expansions that can possibly

[xen-unstable test] 186376: tolerable FAIL

2024-06-17 Thread osstest service owner
flight 186376 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/186376/ Failures :-/ but no regressions. Tests which are failing intermittently (not blocking): test-armhf-armhf-xl-rtds 8 xen-boot fail pass in 186367 Tests which did not succeed,

Re: [PATCH for-4.19? v6 3/9] xen: Refactor altp2m options into a structured format

2024-06-17 Thread Christian Lindig
> On 11 Jun 2024, at 10:14, Jan Beulich wrote: > > On 11.06.2024 10:00, Petr Beneš wrote: >> On Tue, Jun 11, 2024 at 8:41 AM Jan Beulich wrote: >>> >>> On 10.06.2024 19:10, Petr Beneš wrote: From: Petr Beneš Encapsulate the altp2m options within a struct. This change is

Re: [PATCH 01/26] xen-blkfront: don't disable cache flushes when they fail

2024-06-17 Thread Roger Pau Monné
On Mon, Jun 17, 2024 at 08:04:28AM +0200, Christoph Hellwig wrote: > blkfront always had a robust negotiation protocol for detecting a write > cache. Stop simply disabling cache flushes in the block layer as the > flags handling is moving to the atomic queue limits API that needs > user context

Re: Design session notes: GPU acceleration in Xen

2024-06-17 Thread Roger Pau Monné
On Sun, Jun 16, 2024 at 08:38:19PM -0400, Demi Marie Obenour wrote: > On Fri, Jun 14, 2024 at 10:39:37AM +0200, Roger Pau Monné wrote: > > On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: > > > On 14.06.2024 09:21, Roger Pau Monné wrote: > > > > On Fri, Jun 14, 2024 at 08:38:51AM

Re: [PATCH V3 (resend) 01/19] x86: Create per-domain mapping of guest_root_pt

2024-06-17 Thread Roger Pau Monné
On Fri, Jun 14, 2024 at 08:23:30AM +0200, Jan Beulich wrote: > On 13.06.2024 18:31, Elias El Yandouzi wrote: > > On 16/05/2024 08:17, Jan Beulich wrote: > >> On 15.05.2024 20:25, Elias El Yandouzi wrote: > >>> However, I noticed quite a weird bug while doing some testing. I may > >>> need your

Re: [PATCH 19/26] block: move the nowait flag to queue_limits

2024-06-17 Thread Damien Le Moal
On 6/17/24 15:04, Christoph Hellwig wrote: > Move the nowait flag into the queue_limits feature field so that it can > be set atomically with the queue frozen. > > Stacking drivers are simplified in that they now can simply set the > flag, and blk_stack_limits will clear it when the features is

Re: [PATCH 16/26] block: move the io_stat flag setting to queue_limits

2024-06-17 Thread Damien Le Moal
On 6/17/24 15:04, Christoph Hellwig wrote: > Move the io_stat flag into the queue_limits feature field so that it can > be set atomically with the queue frozen. > > Simplify md and dm to set the flag unconditionally instead of avoiding > setting a simple flag for cases where it already is set by

Re: [PATCH 13/26] block: move cache control settings out of queue->flags

2024-06-17 Thread Damien Le Moal
On 6/17/24 15:04, Christoph Hellwig wrote: > Move the cache control settings into the queue_limits so that the flags > can be set atomically with the device queue frozen. > > Add new features and flags field for the driver set flags, and internal > (usually sysfs-controlled) flags in the block

  1   2   >