Re: [PATCH 72/78] block: use disk_part_iter_exit in disk_part_iter_next

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:58 PM, Christoph Hellwig wrote: Call disk_part_iter_exit in disk_part_iter_next instead of duplicating the functionality. Signed-off-by: Christoph Hellwig --- block/genhd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index

Re: [PATCH 71/78] block: add a bdev_kobj helper

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:58 PM, Christoph Hellwig wrote: Add a little helper to find the kobject for a struct block_device. Signed-off-by: Christoph Hellwig --- drivers/md/bcache/super.c | 7 ++- drivers/md/md.c | 4 +--- fs/btrfs/sysfs.c | 15 +++ include/linux/b

Re: [PATCH 70/78] block: replace bd_mutex with a per-gendisk mutex

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:58 PM, Christoph Hellwig wrote: bd_mutex is primarily used for synchronizing the block device open and release path, which recurses from partitions to the whole disk device. The fact that we have two locks makes life unnecessarily complex due to lock order constrains. Replace the t

Re: [PATCH 69/78] block: remove the nr_sects field in struct hd_struct

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:58 PM, Christoph Hellwig wrote: Now that the hd_struct always has a block device attached to it, there is no need for having two size field that just get out of sync. Additional the field in hd_struct did not use proper serializiation, possibly allowing for torn writes. By only us

Re: [PATCH 68/78] block: remove ->bd_contains

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Now that each gendisk has a reference to the block_device referencing it, we can just use that everywhere and get rid of ->bd_contain. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsicam.c| 2 +- fs/block_dev.c| 50

Re: [PATCH 67/78] block: simplify the block device claiming interface

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Stop passing the whole device as a separate argument given that it can be trivially deducted. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 12 +++- fs/block_dev.c | 69 +++--- incl

Re: [PATCH 66/78] block: keep a block_device reference for each hd_struct

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: To simplify block device lookup and a few other upcomdin areas, make sure that we always have a struct block_device available for each disk and each partition. The only downside of this is that each device and partition uses a little more memories.

Re: [PATCH 65/78] dm: remove the block_device reference in struct mapped_device

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Get rid of the long-lasting struct block_device reference in struct mapped_device. The only remaining user is the freeze code, where we can trivially look up the block device at freeze time and release the reference at thaw time. Signed-off-by: Chri

Re: [PATCH 64/78] dm: simplify flush_bio initialization in __send_empty_flush

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: We don't really need the struct block_device to initialize a bio. So switch from using bio_set_dev to manually setting up bi_disk (bi_partno will always be zero and has been cleared by bio_init already). Signed-off-by: Christoph Hellwig --- drive

Re: [PATCH 62/78] loop: do not call set_blocksize

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: set_blocksize is used by file systems to use their preferred buffer cache block size. Block drivers should not set it. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 3 --- 1 file changed, 3 deletions(-) Reviewed-by: Hannes Reinec

Re: [PATCH 61/78] zram: do not call set_blocksize

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: set_blocksize is used by file systems to use their preferred buffer cache block size. Block drivers should not set it. Signed-off-by: Christoph Hellwig --- drivers/block/zram/zram_drv.c | 11 +-- drivers/block/zram/zram_drv.h | 1 - 2

Re: [PATCH 60/78] zram: remove the claim mechanism

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: The zram claim mechanism was added to ensure no new opens come in during teardown. But the proper way to archive that is to call del_gendisk first, which takes care of all that. Once del_gendisk is called in the right place, the reset side can also

Re: [PATCH 59/78] mtip32xx: remove the call to fsync_bdev on removal

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: del_gendisk already calls fsync_bdev for every partition, no need to do this twice. Signed-off-by: Christoph Hellwig --- drivers/block/mtip32xx/mtip32xx.c | 15 --- drivers/block/mtip32xx/mtip32xx.h | 2 -- 2 files changed, 17 delet

Re: [PATCH 58/78] init: cleanup match_dev_by_uuid and match_dev_by_label

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Avoid a totally pointless goto label, and use the same style of comparism for both helpers. Signed-off-by: Christoph Hellwig --- init/do_mounts.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) Reviewed-by: Hannes Rein

Re: [PATCH 57/78] init: refactor devt_from_partuuid

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: The code in devt_from_partuuid is very convoluted. Refactor a bit by sanitizing the goto and variable name usage. Signed-off-by: Christoph Hellwig --- init/do_mounts.c | 68 ++-- 1 file changed, 31 ins

Re: [PATCH 56/78] init: refactor name_to_dev_t

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Split each case into a self-contained helper. Signed-off-by: Christoph Hellwig --- include/linux/genhd.h | 7 +- init/do_mounts.c | 183 +- 2 files changed, 91 insertions(+), 99 deletions(-) Revie

Re: [PATCH 55/78] block: change the hash used for looking up block devices

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Adding the minor to the major creates tons of pointless conflicts. Just use the dev_t itself, which is 32-bits and thus is guaranteed to fit into ino_t. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 26 ++ 1 file c

Re: [PATCH 54/78] block: remove a duplicate __disk_get_part prototype

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig --- include/linux/genhd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 46553d6d602563..22f5b9fd96f8bf 100644 --- a/include/linux/genhd.h +++ b/include/linux

Re: [PATCH 53/78] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: disk_get_part needs to be paired with a disk_put_part. Fixes: ef45fe470e1 ("blk-cgroup: show global disk stats in root cgroup io.stat") Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bl

Re: [PATCH 34/78] block: propagate BLKROSET to all partitions

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: When setting the whole device read-only (or clearing the read-only state), also update the policy for all partitions. The s390 dasd driver has awlways been doing this and it makes a lot of sense. Signed-off-by: Christoph Hellwig --- block/ioctl.c

Re: [PATCH 33/78] block: remove __blkdev_driver_ioctl

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Just open code it in the few callers. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 25 + drivers/block/pktcdvd.c | 6 -- drivers/md/bcache/request.c | 5 +++-- drivers/md/dm.c

Re: [PATCH 32/78] block: remove set_device_ro

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Fold set_device_ro into its only remaining caller. Signed-off-by: Christoph Hellwig --- block/genhd.c | 7 --- block/ioctl.c | 2 +- include/linux/genhd.h | 1 - 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/

Re: [PATCH 31/78] loop: use set_disk_ro

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Use set_disk_ro instead of set_device_ro to match all other block drivers and to ensure all partitions mirror the read-only flag. Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

Re: [PATCH 30/78] block: don't call into the driver for BLKROSET

2020-11-19 Thread Hannes Reinecke
On 11/16/20 3:57 PM, Christoph Hellwig wrote: Now that all drivers that want to hook into setting or clearing the read-only flag use the set_read_only method, this code can be removed. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 23 --- 1 file changed, 23 deletio

[GIT PULL] xen: branch for v5.10-rc5

2020-11-19 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.10b-rc5-tag xen: branch for v5.10-rc5 It contains a single fix for avoiding WARN splats when booting a Xen guest with nosmt. Thanks. Juergen arch/x86/xen/spinlock.c | 12 +++

[xen-unstable test] 156882: tolerable FAIL

2020-11-19 Thread osstest service owner
flight 156882 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/156882/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-xl-qemuu-ws16-amd64 19 guest-stopfail like 156867 test-amd64-amd64-xl-qemuu-win7-amd64

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

2020-11-19 Thread osstest service owner
flight 156889 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/156889/ Failures :-/ but no regressions. Tests which did not succeed, but are not blocking: test-amd64-amd64-libvirt 15 migrate-support-checkfail never pass test-arm64-arm64-xl-xsm 1

Re: [PATCH RFC 6/6] xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen()

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > From: Julien Grall > > Now that map_pages_to_xen() has been extended to support 2MB mappings, > we can replace the create_mappings() calls by map_pages_to_xen() calls. > > The mapping can also be marked read-only as Xen as no business to modify > the ho

Re: [PATCH RFC 5/6] xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > From: Julien Grall > > Now that xen_pt_update_entry() is able to deal with different mapping > size, we can replace the open-coding of the page-tables update by a call > to modify_xen_mappings(). > > As the function is not meant to fail, a BUG_ON is add

Re: [PATCH RFC 4/6] xen/arm: mm: Allow other mapping size in xen_pt_update_entry()

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > From: Julien Grall > > At the moment, xen_pt_update_entry() only supports mapping at level 3 > (i.e 4KB mapping). While this is fine for most of the runtime helper, > the boot code will require to use superpage mapping. > > We don't want to allow superp

[qemu-mainline test] 156878: regressions - FAIL

2020-11-19 Thread osstest service owner
flight 156878 qemu-mainline real [real] http://logs.test-lab.xenproject.org/osstest/logs/156878/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-amd64-libvirt-vhd 19 guest-start/debian.repeat fail REGR. vs. 152631 test-amd64-amd64

Re: [PATCH RFC 2/6] xen/arm: mm: Remove ; at the end of mm_printk()

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > From: Julien Grall > > The ; at the end of mm_printk() means the following code will not build > correctly: > > if ( ... ) > mm_printk(...); > else > ... > > As we treat the macro as a function, we want to remove the ; at the end > of it. > >

Re: [PATCH v4 1/3] xen/arm: gic: acpi: Guard helpers to build the MADT with CONFIG_ACPI

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Bertrand Marquis wrote: > Hi Julien, > > > On 19 Nov 2020, at 17:08, Julien Grall wrote: > > > > From: Julien Grall > > > > gic_make_hwdom_madt() and gic_get_hwdom_madt_size() are ACPI specific. > > > > While they build fine today, this will change in a follow-up patch. >

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > On Thu, 19 Nov 2020, 23:38 Stefano Stabellini, wrote: > On Thu, 19 Nov 2020, Rahul Singh wrote: > > > On 19/11/2020 09:53, Jan Beulich wrote: > > >> On 19.11.2020 10:21, Julien Grall wrote: > > >>> Hi Jan, > > >>> > > >

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

2020-11-19 Thread Julien Grall
On Thu, 19 Nov 2020, 23:38 Stefano Stabellini, wrote: > On Thu, 19 Nov 2020, Rahul Singh wrote: > > > On 19/11/2020 09:53, Jan Beulich wrote: > > >> On 19.11.2020 10:21, Julien Grall wrote: > > >>> Hi Jan, > > >>> > > >>> On 19/11/2020 09:05, Jan Beulich wrote: > > On 18.11.2020 16:50, Julie

Re: [PATCH v3 1/2] xen/arm: gic: acpi: Use the correct length for the GICC structure

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > On 19/11/2020 15:22, Bertrand Marquis wrote: > > Hi Julien, > > Hi Bertrand, > > > > > > On 19 Nov 2020, at 12:13, Julien Grall wrote: > > > > > > From: Julien Grall > > > > > > The length of the GICC structure in the MADT ACPI table differs between

Re: [PATCH] xen/irq: Propagate the error from init_one_desc_irq() in init_irq_data()

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Julien Grall wrote: > From: Julien Grall > > init_one_desc_irq() can return an error if it is unable to allocate > memory. While this is unlikely to happen during boot (called from > init_irq_data()), it is better to harden the code by propagting the > return value. > > Spot

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Rahul Singh wrote: > > On 19/11/2020 09:53, Jan Beulich wrote: > >> On 19.11.2020 10:21, Julien Grall wrote: > >>> Hi Jan, > >>> > >>> On 19/11/2020 09:05, Jan Beulich wrote: > On 18.11.2020 16:50, Julien Grall wrote: > > On 16/11/2020 12:25, Rahul Singh wrote: >

Re: [PATCH v2] xen: EXPERT clean-up and introduce UNSUPPORTED

2020-11-19 Thread Stefano Stabellini
On Thu, 19 Nov 2020, Jan Beulich wrote: > On 18.11.2020 22:00, Stefano Stabellini wrote: > > On Wed, 18 Nov 2020, Jan Beulich wrote: > >> On 18.11.2020 01:50, Stefano Stabellini wrote: > >>> 1) It is not obvious that "Configure standard Xen features (expert > >>> users)" is actually the famous EXPE

[ovmf test] 156879: all pass - PUSHED

2020-11-19 Thread osstest service owner
flight 156879 ovmf real [real] http://logs.test-lab.xenproject.org/osstest/logs/156879/ Perfect :-) All tests in this flight passed as required version targeted for testing: ovmf 6c8dd15c4ae42501438a525ec41299f365f223cb baseline version: ovmf 6c4efc050974812d6ebee

[linux-5.4 test] 156874: tolerable FAIL - PUSHED

2020-11-19 Thread osstest service owner
flight 156874 linux-5.4 real [real] http://logs.test-lab.xenproject.org/osstest/logs/156874/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds18 guest-start/debian.repeat fail REGR. vs. 156722 Tests which did not succeed, b

[PATCH RFC 3/6] xen/arm: setup: Call unregister_init_virtual_region() after the last init function

2020-11-19 Thread Julien Grall
From: Julien Grall discard_init_modules() is an init function, if the path contains a BUG() or WARN() we still want to get the full stack trace. The init virtual region is now kept after the last init function has been called. Signed-off-by: Julien Grall --- xen/arch/arm/setup.c | 3 ++- 1 fi

[PATCH RFC 5/6] xen/arm: mm: Don't open-code Xen PT update in remove_early_mappings

2020-11-19 Thread Julien Grall
From: Julien Grall Now that xen_pt_update_entry() is able to deal with different mapping size, we can replace the open-coding of the page-tables update by a call to modify_xen_mappings(). As the function is not meant to fail, a BUG_ON is added to check the return. Signed-off-by: Julien Grall S

[PATCH RFC 1/6] xen/arm: mm: Remove special case for CPU0 in dump_hyp_walk()

2020-11-19 Thread Julien Grall
From: Stefano Stabellini There is no need to have a special case for CPU0 when converting the page-table virtual address into a physical address. The helper virt_to_maddr() is able to translate any address as long as the root page-tables is mapped in the virtual address. This is the case for all

[PATCH RFC 6/6] xen/arm: mm: Re-implement early_fdt_map() using map_pages_to_xen()

2020-11-19 Thread Julien Grall
From: Julien Grall Now that map_pages_to_xen() has been extended to support 2MB mappings, we can replace the create_mappings() calls by map_pages_to_xen() calls. The mapping can also be marked read-only as Xen as no business to modify the host Device Tree. Signed-off-by: Julien Grall --- xen/

[PATCH RFC 4/6] xen/arm: mm: Allow other mapping size in xen_pt_update_entry()

2020-11-19 Thread Julien Grall
From: Julien Grall At the moment, xen_pt_update_entry() only supports mapping at level 3 (i.e 4KB mapping). While this is fine for most of the runtime helper, the boot code will require to use superpage mapping. We don't want to allow superpage mapping by default as some of the callers may expec

[PATCH RFC 2/6] xen/arm: mm: Remove ; at the end of mm_printk()

2020-11-19 Thread Julien Grall
From: Julien Grall The ; at the end of mm_printk() means the following code will not build correctly: if ( ... ) mm_printk(...); else ... As we treat the macro as a function, we want to remove the ; at the end of it. Signed-off-by: Julien Grall --- xen/arch/arm/mm.c | 2 +- 1 file ch

[PATCH RFC 0/6] xen/arm: mm: Add limited support for superpages

2020-11-19 Thread Julien Grall
From: Julien Grall Hi all, This is a first attempt to add superpage mapping in xen_pt_update_entry(). The end goal if to remove open-coding mappings which will help to: 1) get better compliance with the Arm memory model 2) pave the way for other page size (64KB, 16KB). For now, only the ope

[linux-linus test] 156871: regressions - FAIL

2020-11-19 Thread osstest service owner
flight 156871 linux-linus real [real] http://logs.test-lab.xenproject.org/osstest/logs/156871/ Regressions :-( Tests which did not succeed and are blocking, including tests which could not be run: test-amd64-i386-xl-qemuu-dmrestrict-amd64-dmrestrict 7 xen-install fail REGR. vs. 152332 test-amd

Re: [PATCH v4 3/3] xen/arm: acpi: Allow Xen to boot with ACPI 5.1

2020-11-19 Thread Bertrand Marquis
Hi, > On 19 Nov 2020, at 17:08, Julien Grall wrote: > > From: Julien Grall > > At the moment Xen requires the FADT ACPI table to be at least version > 6.0, apparently because of some reliance on other ACPI v6.0 features. > > But actually this is overzealous, and Xen works now fine with ACPI v

Re: [PATCH v4 2/3] xen/arm: gic: acpi: Use the correct length for the GICC structure

2020-11-19 Thread Bertrand Marquis
Hi, > On 19 Nov 2020, at 17:08, Julien Grall wrote: > > From: Julien Grall > > The length of the GICC structure in the MADT ACPI table differs between > version 5.1 and 6.0, although there are no other relevant differences. > > Use the BAD_MADT_GICC_ENTRY macro, which was specifically designe

Re: [PATCH v4 1/3] xen/arm: gic: acpi: Guard helpers to build the MADT with CONFIG_ACPI

2020-11-19 Thread Bertrand Marquis
Hi Julien, > On 19 Nov 2020, at 17:08, Julien Grall wrote: > > From: Julien Grall > > gic_make_hwdom_madt() and gic_get_hwdom_madt_size() are ACPI specific. > > While they build fine today, this will change in a follow-up patch. > Rather than trying to fix the build on ACPI, it is best to avo

Re: NetBSD dom0 PVH: hardware interrupts stalls

2020-11-19 Thread Manuel Bouyer
On Thu, Nov 19, 2020 at 05:57:34PM +0100, Manuel Bouyer wrote: > On Thu, Nov 19, 2020 at 04:57:18PM +0100, Manuel Bouyer wrote: > > On Thu, Nov 19, 2020 at 03:19:15PM +0100, Roger Pau Monné wrote: > > > I've got two different debug patches for you to try. I'm attaching both > > > to this email but

[OSSTEST PATCH 3/3] sg-report-flight: Actually look at retest flights (part 2)

2020-11-19 Thread Ian Jackson
To avoid going down ratholes (especially for jobs which reuse outputs from their previous selves), the primary flight/job finder in sg-report-flight does not recurse indefinitely through build jobs. Instead, it restricts the build jobs investigated to those within the same flight as the job which m

[OSSTEST PATCH 2/3] sg-report-flight: Actually look at retest flights (part 1)

2020-11-19 Thread Ian Jackson
The existing approach does not find retest flights. This is because it starts by looking for flights whose runvars say they built the version in question, and then looks to see if they contain the relevant job. Retest flights don't contain build jobs; they reuse the builds from the primary flight

[OSSTEST PATCH 1/3] sg-report-flight: Rename "sub" to more descriptive "relevant_flights"

2020-11-19 Thread Ian Jackson
No functional change. We're going to add another WITH... Signed-off-by: Ian Jackson --- sg-report-flight | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sg-report-flight b/sg-report-flight index fd266586..40a3cc92 100755 --- a/sg-report-flight +++ b/sg-report-flight @@

Re: [PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs

2020-11-19 Thread Andrew Cooper
On 19/11/2020 17:10, Andrew Cooper wrote: > On 19/11/2020 16:37, Jan Beulich wrote: >> On 19.11.2020 17:10, Andrew Cooper wrote: >>> On 19/11/2020 15:57, Jan Beulich wrote: Found by looking for patterns similar to the one Julien did spot in pci_vtd_quirks(). Signed-off-by: Jan B

Re: [PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs

2020-11-19 Thread Andrew Cooper
On 19/11/2020 16:37, Jan Beulich wrote: > On 19.11.2020 17:10, Andrew Cooper wrote: >> On 19/11/2020 15:57, Jan Beulich wrote: >>> Found by looking for patterns similar to the one Julien did spot in >>> pci_vtd_quirks(). >>> >>> Signed-off-by: Jan Beulich >> Subject is wonky.  Is it P4 (Intel), or

[PATCH v4 3/3] xen/arm: acpi: Allow Xen to boot with ACPI 5.1

2020-11-19 Thread Julien Grall
From: Julien Grall At the moment Xen requires the FADT ACPI table to be at least version 6.0, apparently because of some reliance on other ACPI v6.0 features. But actually this is overzealous, and Xen works now fine with ACPI v5.1. Let's relax the version check for the FADT table to allow QEMU

[PATCH v4 2/3] xen/arm: gic: acpi: Use the correct length for the GICC structure

2020-11-19 Thread Julien Grall
From: Julien Grall The length of the GICC structure in the MADT ACPI table differs between version 5.1 and 6.0, although there are no other relevant differences. Use the BAD_MADT_GICC_ENTRY macro, which was specifically designed to overcome this issue. Signed-off-by: Julien Grall Signed-off-by

[PATCH v4 1/3] xen/arm: gic: acpi: Guard helpers to build the MADT with CONFIG_ACPI

2020-11-19 Thread Julien Grall
From: Julien Grall gic_make_hwdom_madt() and gic_get_hwdom_madt_size() are ACPI specific. While they build fine today, this will change in a follow-up patch. Rather than trying to fix the build on ACPI, it is best to avoid compiling the helpers and the associated callbacks when CONFIG_ACPI=n. S

[PATCH v4 0/3] xen/arm: Allow Xen to boot with ACPI 5.1

2020-11-19 Thread Julien Grall
From: Julien Grall Hi all, This series was originally called "xen/arm: Unbreak ACPI". It was renamed because only the part to allow boot with ACPI 5.1 is not merged. After this series, it is possible to boot Xen on QEMU with ACPI 5.1. Cheers, Julien Grall (3): xen/arm: gic: acpi: Guard help

Re: NetBSD dom0 PVH: hardware interrupts stalls

2020-11-19 Thread Manuel Bouyer
On Thu, Nov 19, 2020 at 04:57:18PM +0100, Manuel Bouyer wrote: > On Thu, Nov 19, 2020 at 03:19:15PM +0100, Roger Pau Monné wrote: > > I've got two different debug patches for you to try. I'm attaching both > > to this email but I think we should start with Jan's suggestion > > (conditional_print.pa

RE: [PATCH 06/10] viridian: add ExProcessorMasks variants of the flush hypercalls

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 19 November 2020 16:45 > To: p...@xen.org > Cc: 'Paul Durrant' ; 'Wei Liu' ; 'Andrew > Cooper' > ; 'Roger Pau Monné' ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 06/10] viridian: add ExProcessorMasks variants of the > flush hy

Re: [PATCH 03/10] viridian: introduce a per-cpu hypercall_vpmask and accessor functions...

2020-11-19 Thread Jan Beulich
On 19.11.2020 17:44, Durrant, Paul wrote: >> -Original Message- >> From: Jan Beulich >> Sent: 19 November 2020 16:41 >> To: p...@xen.org >> Cc: Durrant, Paul ; 'Wei Liu' ; 'Andrew >> Cooper' >> ; 'Roger Pau Monné' ; >> xen-devel@lists.xenproject.org >> Subject: RE: [EXTERNAL] [PATCH 03/1

Re: [PATCH 06/10] viridian: add ExProcessorMasks variants of the flush hypercalls

2020-11-19 Thread Jan Beulich
On 19.11.2020 17:11, Paul Durrant wrote: >> From: Jan Beulich >> Sent: 12 November 2020 09:19 >> >> On 11.11.2020 21:07, Paul Durrant wrote: >>> --- a/xen/arch/x86/hvm/viridian/viridian.c >>> +++ b/xen/arch/x86/hvm/viridian/viridian.c >>> @@ -553,6 +553,83 @@ static unsigned int vpmask_next(struct

RE: [PATCH 03/10] viridian: introduce a per-cpu hypercall_vpmask and accessor functions...

2020-11-19 Thread Durrant, Paul
> -Original Message- > From: Jan Beulich > Sent: 19 November 2020 16:41 > To: p...@xen.org > Cc: Durrant, Paul ; 'Wei Liu' ; 'Andrew > Cooper' > ; 'Roger Pau Monné' ; > xen-devel@lists.xenproject.org > Subject: RE: [EXTERNAL] [PATCH 03/10] viridian: introduce a per-cpu > hypercall_vpmas

Re: [PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Andrew Cooper
On 19/11/2020 16:40, Julien Grall wrote: > > > On 19/11/2020 16:38, Andrew Cooper wrote: >> On 19/11/2020 14:52, Julien Grall wrote: >>> Note that splat is from 4.11.4 and not staging. Although, the >>> problem is >>> still present. >>> >>> This can be solved by making the first operand unsigned in

Re: [PATCH 03/10] viridian: introduce a per-cpu hypercall_vpmask and accessor functions...

2020-11-19 Thread Jan Beulich
On 19.11.2020 17:02, Paul Durrant wrote: >> From: Jan Beulich > Sent: 12 November 2020 08:46 >> >> On 11.11.2020 21:07, Paul Durrant wrote: >>> --- a/xen/arch/x86/hvm/viridian/viridian.c >>> +++ b/xen/arch/x86/hvm/viridian/viridian.c >>> @@ -507,15 +507,41 @@ void viridian_domain_deinit(struct doma

Re: [PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Julien Grall
On 19/11/2020 16:38, Andrew Cooper wrote: On 19/11/2020 14:52, Julien Grall wrote: Note that splat is from 4.11.4 and not staging. Although, the problem is still present. This can be solved by making the first operand unsigned int. Signed-off-by: Julien Grall CR: https://code.amazon.com/r

Re: [PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Andrew Cooper
On 19/11/2020 14:52, Julien Grall wrote: > Note that splat is from 4.11.4 and not staging. Although, the problem is > still present. > > This can be solved by making the first operand unsigned int. > > Signed-off-by: Julien Grall > > CR: https://code.amazon.com/reviews/CR-38873112 IIRC, this is a

Re: [PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs

2020-11-19 Thread Jan Beulich
On 19.11.2020 17:10, Andrew Cooper wrote: > On 19/11/2020 15:57, Jan Beulich wrote: >> Found by looking for patterns similar to the one Julien did spot in >> pci_vtd_quirks(). >> >> Signed-off-by: Jan Beulich > > Subject is wonky.  Is it P4 (Intel), or Fam15 (AMD) ?  I'd be tempted to > have the

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

2020-11-19 Thread Jan Beulich
On 19.11.2020 16:54, Rahul Singh wrote: >> On 19 Nov 2020, at 10:16 am, Julien Grall wrote: >> On 19/11/2020 09:53, Jan Beulich wrote: >>> Well, see my patch suppressing building of quite a part of it. >> >> I will let Rahul figuring out whether your patch series is sufficient to fix >> compilati

Re: [PATCH] AMD/IOMMU: avoid UB in guest CR3 retrieval

2020-11-19 Thread Andrew Cooper
On 19/11/2020 15:58, Jan Beulich wrote: > Found by looking for patterns similar to the one Julien did spot in > pci_vtd_quirks(). (Not that it matters much here, considering the code > is dead right now.) > > Fixes: 3a7947b69011 ("amd-iommu: use a bitfield for DTE") > Signed-off-by: Jan Beulich A

Re: [PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs

2020-11-19 Thread Andrew Cooper
On 19/11/2020 15:57, Jan Beulich wrote: > Found by looking for patterns similar to the one Julien did spot in > pci_vtd_quirks(). > > Signed-off-by: Jan Beulich Subject is wonky.  Is it P4 (Intel), or Fam15 (AMD) ?  I'd be tempted to have the prefix as x86/nmi: either way. With that suitably adj

RE: [PATCH 08/10] viridian: log initial invocation of each type of hypercall

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 12 November 2020 09:23 > To: Paul Durrant > Cc: Paul Durrant ; Wei Liu ; Andrew Cooper > ; Roger Pau Monné ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 08/10] viridian: log initial invocation of each type of > hypercall > > O

RE: [PATCH 06/10] viridian: add ExProcessorMasks variants of the flush hypercalls

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 12 November 2020 09:19 > To: Paul Durrant > Cc: Paul Durrant ; Wei Liu ; Andrew Cooper > ; Roger Pau Monné ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 06/10] viridian: add ExProcessorMasks variants of the > flush hypercalls >

Re: [PATCH] SVM: avoid UB in intercept mask definitions

2020-11-19 Thread Andrew Cooper
On 19/11/2020 15:57, Jan Beulich wrote: > Found by looking for patterns similar to the one Julien did spot in > pci_vtd_quirks(). > > Signed-off-by: Jan Beulich Acked-by: Andrew Cooper

RE: [PATCH 05/10] viridian: use softirq batching in hvcall_ipi()

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 12 November 2020 08:53 > To: Paul Durrant > Cc: Paul Durrant ; Wei Liu ; Andrew Cooper > ; Roger Pau Monné ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 05/10] viridian: use softirq batching in hvcall_ipi() > > On 11.11.2020 21

RE: [PATCH 04/10] viridian: use hypercall_vpmask in hvcall_ipi()

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich > Sent: 12 November 2020 08:50 > To: Paul Durrant > Cc: Paul Durrant ; Wei Liu ; Andrew Cooper > ; Roger Pau Monné ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 04/10] viridian: use hypercall_vpmask in hvcall_ipi() > > On 11.11.2020 21

RE: [PATCH 03/10] viridian: introduce a per-cpu hypercall_vpmask and accessor functions...

2020-11-19 Thread Paul Durrant
> -Original Message- > From: Jan Beulich Sent: 12 November 2020 08:46 > To: Paul Durrant > Cc: Paul Durrant ; Wei Liu ; Andrew Cooper > ; Roger Pau Monné ; > xen-devel@lists.xenproject.org > Subject: Re: [PATCH 03/10] viridian: introduce a per-cpu hypercall_vpmask and > accessor functio

[PATCH] AMD/IOMMU: avoid UB in guest CR3 retrieval

2020-11-19 Thread Jan Beulich
Found by looking for patterns similar to the one Julien did spot in pci_vtd_quirks(). (Not that it matters much here, considering the code is dead right now.) Fixes: 3a7947b69011 ("amd-iommu: use a bitfield for DTE") Signed-off-by: Jan Beulich --- a/xen/drivers/passthrough/amd/iommu_guest.c +++

[PATCH] x86/Intel: avoid UB with NMI watchdog on family 15 CPUs

2020-11-19 Thread Jan Beulich
Found by looking for patterns similar to the one Julien did spot in pci_vtd_quirks(). Signed-off-by: Jan Beulich --- a/xen/arch/x86/nmi.c +++ b/xen/arch/x86/nmi.c @@ -132,7 +132,7 @@ int nmi_active; #define P4_ESCR_EVENT_SELECT(N)((N)<<25) #define P4_CCCR_OVF_PMI0 (1<<26) #defin

Re: NetBSD dom0 PVH: hardware interrupts stalls

2020-11-19 Thread Manuel Bouyer
On Thu, Nov 19, 2020 at 03:19:15PM +0100, Roger Pau Monné wrote: > I've got two different debug patches for you to try. I'm attaching both > to this email but I think we should start with Jan's suggestion > (conditional_print.patch). That patch will only print extra messages > between the ioregsel

[PATCH] SVM: avoid UB in intercept mask definitions

2020-11-19 Thread Jan Beulich
Found by looking for patterns similar to the one Julien did spot in pci_vtd_quirks(). Signed-off-by: Jan Beulich --- a/xen/include/asm-x86/hvm/svm/vmcb.h +++ b/xen/include/asm-x86/hvm/svm/vmcb.h @@ -55,7 +55,7 @@ enum GenericIntercept1bits GENERAL1_INTERCEPT_MSR_PROT = 1 << 28, GE

Re: [PATCH v3 1/3] xen/ns16550: Make ns16550 driver usable on ARM with HAS_PCI enabled.

2020-11-19 Thread Rahul Singh
Hello, > On 19 Nov 2020, at 10:16 am, Julien Grall wrote: > > > > On 19/11/2020 09:53, Jan Beulich wrote: >> On 19.11.2020 10:21, Julien Grall wrote: >>> Hi Jan, >>> >>> On 19/11/2020 09:05, Jan Beulich wrote: On 18.11.2020 16:50, Julien Grall wrote: > On 16/11/2020 12:25, Rahul Sing

Re: smmu-related clarification

2020-11-19 Thread Bertrand Marquis
Hi Jorge, > On 19 Nov 2020, at 13:16, Jorge Pereira wrote: > > Hi All, > > I’m having some smmu-related issues, I need help. > > So, in my use-case scenario I have two linux guests running in parallel – > dom0 and domU-. I have to enable the smmu because I want to passthough > devices to

Re: [PATCH v3 1/2] xen/arm: gic: acpi: Use the correct length for the GICC structure

2020-11-19 Thread Julien Grall
On 19/11/2020 15:22, Bertrand Marquis wrote: Hi Julien, Hi Bertrand, On 19 Nov 2020, at 12:13, Julien Grall wrote: From: Julien Grall The length of the GICC structure in the MADT ACPI table differs between version 5.1 and 6.0, although there are no other relevant differences. Use th

Re: [PATCH v3 1/2] xen/arm: gic: acpi: Use the correct length for the GICC structure

2020-11-19 Thread Bertrand Marquis
Hi Julien, > On 19 Nov 2020, at 12:13, Julien Grall wrote: > > From: Julien Grall > > The length of the GICC structure in the MADT ACPI table differs between > version 5.1 and 6.0, although there are no other relevant differences. > > Use the BAD_MADT_GICC_ENTRY macro, which was specifically

Re: [PATCH 17/20] filemap: consistently use ->f_mapping over ->i_mapping

2020-11-19 Thread Matthew Wilcox
On Wed, Nov 18, 2020 at 09:47:57AM +0100, Christoph Hellwig wrote: > @@ -2887,13 +2887,13 @@ EXPORT_SYMBOL(filemap_map_pages); > vm_fault_t filemap_page_mkwrite(struct vm_fault *vmf) > { > struct page *page = vmf->page; > - struct inode *inode = file_inode(vmf->vma->vm_file); > + st

Re: [PATCH] xen/irq: Propagate the error from init_one_desc_irq() in init_irq_data()

2020-11-19 Thread Roger Pau Monné
On Thu, Nov 19, 2020 at 02:54:34PM +, Julien Grall wrote: > From: Julien Grall > > init_one_desc_irq() can return an error if it is unable to allocate > memory. While this is unlikely to happen during boot (called from > init_irq_data()), it is better to harden the code by propagting the > re

Re: [PATCH] xen/irq: Propagate the error from init_one_desc_irq() in init_irq_data()

2020-11-19 Thread Bertrand Marquis
Hi, > On 19 Nov 2020, at 14:54, Julien Grall wrote: > > From: Julien Grall > > init_one_desc_irq() can return an error if it is unable to allocate > memory. While this is unlikely to happen during boot (called from > init_irq_data()), it is better to harden the code by propagting the > return

Re: [PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Julien Grall
Hi Jan, On 19/11/2020 15:02, Jan Beulich wrote: On 19.11.2020 15:52, Julien Grall wrote: From: Julien Grall When booting Xen with CONFIG_USBAN=y on Sandy Bridge, UBSAN will throw the following splat: (XEN) (XEN

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

2020-11-19 Thread osstest service owner
flight 156867 xen-unstable real [real] http://logs.test-lab.xenproject.org/osstest/logs/156867/ Failures :-/ but no regressions. Regressions which are regarded as allowable (not blocking): test-armhf-armhf-xl-rtds18 guest-start/debian.repeat fail REGR. vs. 156857 Tests which did not succeed

Re: [PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Jan Beulich
On 19.11.2020 15:52, Julien Grall wrote: > From: Julien Grall > > When booting Xen with CONFIG_USBAN=y on Sandy Bridge, UBSAN will throw > the following splat: > > (XEN) > > (XEN) UBSAN: Undefined behaviour in quir

Re: [PATCH 18/20] fs: remove get_super_thawed and get_super_exclusive_thawed

2020-11-19 Thread Jan Kara
On Wed 18-11-20 09:47:58, Christoph Hellwig wrote: > Just open code the wait in the only caller of both functions. > > Signed-off-by: Christoph Hellwig As far as I remember, Al (added to CC) generally objected against exporting bits from fs/super.c (like put_super(), __get_super()) in the past.

[PATCH] xen/irq: Propagate the error from init_one_desc_irq() in init_irq_data()

2020-11-19 Thread Julien Grall
From: Julien Grall init_one_desc_irq() can return an error if it is unable to allocate memory. While this is unlikely to happen during boot (called from init_irq_data()), it is better to harden the code by propagting the return value. Spotted by coverity. CID: 106529 Signed-off-by: Julien Gral

Re: [PATCH 17/20] filemap: consistently use ->f_mapping over ->i_mapping

2020-11-19 Thread Jan Kara
On Wed 18-11-20 09:47:57, Christoph Hellwig wrote: > Use file->f_mapping in all remaining places that have a struct file > available to properly handle the case where inode->i_mapping != > file_inode(file)->i_mapping. > > Signed-off-by: Christoph Hellwig Looks good. You can add: Reviewed-by: Ja

[PATCH] xen/iommu: vtd: Fix undefined behavior pci_vtd_quirks()

2020-11-19 Thread Julien Grall
From: Julien Grall When booting Xen with CONFIG_USBAN=y on Sandy Bridge, UBSAN will throw the following splat: (XEN) (XEN) UBSAN: Undefined behaviour in quirks.c:449:63 (XEN) left shift of 1 by 31 places cannot be

Re: [PATCH 16/20] block: stop using bdget_disk for partition 0

2020-11-19 Thread Jan Kara
On Wed 18-11-20 09:47:56, Christoph Hellwig wrote: > We can just dereference the point in struct gendisk instead. Also > remove the now unused export. > > Signed-off-by: Christoph Hellwig Looks good to me. You can add: Reviewed-by: Jan Kara

  1   2   >