[PATCH v4 03/23] libxl: Make sure devices added by pci-attach are reflected in the config

2020-11-24 Thread Paul Durrant
From: Paul Durrant Currently libxl__device_pci_add_xenstore() is broken in that does not update the domain's configuration for the first device added (which causes creation of the overall backend area in xenstore). This can be easily observed by running 'xl list -l' after adding a single device:

[PATCH v4 06/23] libxl: remove extraneous arguments to do_pci_remove() in libxl_pci.c

2020-11-24 Thread Paul Durrant
From: Paul Durrant Both 'domid' and 'pci' are available in 'pci_remove_state' so there is no need to also pass them as separate arguments. Signed-off-by: Paul Durrant --- Cc: Ian Jackson Cc: Wei Liu --- tools/libs/light/libxl_pci.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(

[PATCH v4 05/23] libxl: s/detatched/detached in libxl_pci.c

2020-11-24 Thread Paul Durrant
From: Paul Durrant Simply spelling correction. Purely cosmetic fix. Signed-off-by: Paul Durrant --- Cc: Ian Jackson Cc: Wei Liu --- tools/libs/light/libxl_pci.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/libs/light/libxl_pci.c b/tools/l

[PATCH v4 08/23] libxl: generalise 'driver_path' xenstore access functions in libxl_pci.c

2020-11-24 Thread Paul Durrant
From: Paul Durrant For the purposes of re-binding a device to its previous driver libxl__device_pci_assignable_add() writes the driver path into xenstore. This path is then read back in libxl__device_pci_assignable_remove(). The functions that support this writing to and reading from xenstore ar

[PATCH v4 02/23] libxl: make libxl__device_list() work correctly for LIBXL__DEVICE_KIND_PCI...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... devices. Currently there is an assumption built into libxl__device_list() that device backends are fully enumarated under the '/libxl' path in xenstore. This is not the case for PCI backend devices, which are only properly enumerated under '/local/domain/0/backend'. This

[PATCH v4 07/23] libxl: stop using aodev->device_config in libxl__device_pci_add()...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... to hold a pointer to the device. There is already a 'pci' field in 'pci_add_state' so simply use that from the start. This also allows the 'pci' (#3) argument to be dropped from do_pci_add(). NOTE: This patch also changes the type of the 'pci_domid' field in 'pci_ad

[PATCH v4 01/23] xl / libxl: s/pcidev/pci and remove DEFINE_DEVICE_TYPE_STRUCT_X

2020-11-24 Thread Paul Durrant
From: Paul Durrant The seemingly arbitrary use of 'pci' and 'pcidev' in the code in libxl_pci.c is confusing and also compromises use of some macros used for other device types. Indeed it seems that DEFINE_DEVICE_TYPE_STRUCT_X exists solely because of this duality. This patch purges use of 'pcid

[PATCH v4 04/23] libxl: add/recover 'rdm_policy' to/from PCI backend in xenstore

2020-11-24 Thread Paul Durrant
From: Paul Durrant Other parameters, such as 'msitranslate' and 'permissive' are dealt with but 'rdm_policy' appears to be have been completely missed. Signed-off-by: Paul Durrant --- Cc: Ian Jackson Cc: Wei Liu --- tools/libs/light/libxl_pci.c | 9 ++--- 1 file changed, 6 insertions(+),

[PATCH v4 09/23] libxl: remove unnecessary check from libxl__device_pci_add()

2020-11-24 Thread Paul Durrant
From: Paul Durrant The code currently checks explicitly whether the device is already assigned, but this is actually unnecessary as assigned devices do not form part of the list returned by libxl_device_pci_assignable_list() and hence the libxl_pci_assignable() test would have already failed. Si

[PATCH v4 00/23] xl / libxl: named PCI pass-through devices

2020-11-24 Thread Paul Durrant
From: Paul Durrant Paul Durrant (23): xl / libxl: s/pcidev/pci and remove DEFINE_DEVICE_TYPE_STRUCT_X libxl: make libxl__device_list() work correctly for LIBXL__DEVICE_KIND_PCI... libxl: Make sure devices added by pci-attach are reflected in the config libxl: add/recover 'rdm_poli

[PATCH v4 11/23] libxl: make sure callers of libxl_device_pci_list() free the list after use

2020-11-24 Thread Paul Durrant
From: Paul Durrant A previous patch introduced libxl_device_pci_list_free() which should be used by callers of libxl_device_pci_list() to properly dispose of the exported 'libxl_device_pci' types and the free the memory holding them. Whilst all current callers do ensure the memory is freed, only

[PATCH v4 20/23] docs/man: modify xl(1) in preparation for naming of assignable devices

2020-11-24 Thread Paul Durrant
From: Paul Durrant A subsequent patch will introduce code to allow a name to be specified to 'xl pci-assignable-add' such that the assignable device may be referred to by than name in subsequent operations. Signed-off-by: Paul Durrant --- Cc: Ian Jackson Cc: Wei Liu --- docs/man/xl.1.pod.in

[PATCH v4 13/23] libxl: use COMPARE_PCI() macro is_pci_in_array()...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... rather than an open-coded equivalent. This patch tidies up the is_pci_in_array() function, making it take a single 'libxl_device_pci' argument rather than separate domain, bus, device and function arguments. The already-available COMPARE_PCI() macro can then be used and it

[PATCH v4 16/23] docs/man: fix xl(1) documentation for 'pci' operations

2020-11-24 Thread Paul Durrant
From: Paul Durrant Currently the documentation completely fails to mention the existence of PCI_SPEC_STRING. This patch tidies things up, specifically clarifying that 'pci-assignable-add/remove' take arguments where as 'pci-attach/detach' take arguments (which will be enforced in a subsequent p

[PATCH v4 19/23] libxl: modify libxl_device_pci_assignable_add/remove/list/list_free()...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... to use 'libxl_pci_bdf' rather than 'libxl_device_pci'. This patch modifies the API and callers accordingly. It also modifies several internal functions in libxl_pci.c that support the API to also use 'libxl_pci_bdf'. NOTE: The OCaml bindings are adjusted to contain the in

[PATCH v4 23/23] xl / libxl: support 'xl pci-attach/detach' by name

2020-11-24 Thread Paul Durrant
From: Paul Durrant This patch adds a 'name' field into the idl for 'libxl_device_pci' and libxlu_pci_parse_spec_string() is modified to parse the new 'name' parameter of PCI_SPEC_STRING detailed in the updated documention in xl-pci-configuration(5). If the 'name' field is non-NULL then both libx

[PATCH v4 14/23] docs/man: extract documentation of PCI_SPEC_STRING from the xl.cfg manpage...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... and put it into a new xl-pci-configuration(5) manpage, akin to the xl-network-configration(5) and xl-disk-configuration(5) manpages. This patch moves the content of the section verbatim. A subsequent patch will improve the documentation, once it is in its new location. Si

[PATCH v4 10/23] libxl: remove get_all_assigned_devices() from libxl_pci.c

2020-11-24 Thread Paul Durrant
From: Paul Durrant Use of this function is a very inefficient way to check whether a device has already been assigned. This patch adds code that saves the domain id in xenstore at the point of assignment, and removes it again when the device id de-assigned (or the domain is destroyed). It is the

[PATCH v4 22/23] docs/man: modify xl-pci-configuration(5) to add 'name' field to PCI_SPEC_STRING

2020-11-24 Thread Paul Durrant
From: Paul Durrant Since assignable devices can be named, a subsequent patch will support use of a PCI_SPEC_STRING containing a 'name' parameter instead of a 'bdf'. In this case the name will be used to look up the 'bdf' in the list of assignable (or assigned) devices. Signed-off-by: Paul Durran

[PATCH v4 21/23] xl / libxl: support naming of assignable devices

2020-11-24 Thread Paul Durrant
From: Paul Durrant This patch modifies libxl_device_pci_assignable_add() to take an optional 'name' argument, which (if supplied) is saved into xenstore and can hence be used to refer to the now-assignable BDF in subsequent operations. To facilitate this, a new libxl_device_pci_assignable_name2bd

[PATCH v4 18/23] libxlu: introduce xlu_pci_parse_spec_string()

2020-11-24 Thread Paul Durrant
From: Paul Durrant This patch largely re-writes the code to parse a PCI_SPEC_STRING and enters it via the newly introduced function. The new parser also deals with 'bdf' and 'vslot' as non-positional paramaters, as per the documentation in xl-pci-configuration(5). The existing xlu_pci_parse_bdf(

[PATCH v4 15/23] docs/man: improve documentation of PCI_SPEC_STRING...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... and prepare for adding support for non-positional parsing of 'bdf' and 'vslot' in a subsequent patch. Also document 'BDF' as a first-class parameter type and fix the documentation to state that the default value of 'rdm_policy' is actually 'strict', not 'relaxed', as can b

[PATCH v4 12/23] libxl: add libxl_device_pci_assignable_list_free()...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... to be used by callers of libxl_device_pci_assignable_list(). Currently there is no API for callers of libxl_device_pci_assignable_list() to free the list. The xl function pciassignable_list() calls libxl_device_pci_dispose() on each element of the returned list, but libxl_

[PATCH v4 17/23] libxl: introduce 'libxl_pci_bdf' in the idl...

2020-11-24 Thread Paul Durrant
From: Paul Durrant ... and use in 'libxl_device_pci' This patch is preparatory work for restricting the type passed to functions that only require BDF information, rather than passing a 'libxl_device_pci' structure which is only partially filled. In this patch only the minimal mechanical changes

Re: [PATCH v2 4/8] lib: move parse_size_and_unit()

2020-11-24 Thread Jan Beulich
On 24.11.2020 01:58, Andrew Cooper wrote: > On 23/10/2020 11:17, Jan Beulich wrote: >> ... into its own CU, to build it into an archive. >> >> Signed-off-by: Jan Beulich >> --- >> xen/common/lib.c | 39 -- >> xen/lib/Makefile | 1 + >> xen/lib/parse-size.c

Re: [PATCH v2 7/8] lib: move bsearch code

2020-11-24 Thread Jan Beulich
On 24.11.2020 01:40, Andrew Cooper wrote: > On 23/11/2020 22:49, Julien Grall wrote: >> On 19/11/2020 10:27, Jan Beulich wrote: >>> On 18.11.2020 19:09, Julien Grall wrote: On 23/10/2020 11:19, Jan Beulich wrote: > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h >>>

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

2020-11-24 Thread Jan Beulich
On 23.11.2020 18:13, Julien Grall wrote: > My view on 2) can change if Jan provides enough information into why one > would want NS1650 PCI enabled by default on Arm but disable MSI. Because, like it was on x86, initially there may be no support for MSI? I have no idea what the plans are ... Jan

Re: [PATCH v2 1/3] ns16550: move PCI arrays next to the function using them

2020-11-24 Thread Rahul Singh
Hello , > On 24 Nov 2020, at 12:02 am, Stefano Stabellini > wrote: > > On Mon, 23 Nov 2020, Jan Beulich wrote: >> Pure code motion; no functional change intended. >> >> Signed-off-by: Jan Beulich > > Reviewed-by: Stefano Stabellini > Reviewed-by: Rahul Singh Regards, Rahul > >> --- >> v

Re: [PATCH v2 2/3] ns16550: "com=" command line options are x86-specific

2020-11-24 Thread Rahul Singh
Hello Jan, > On 24 Nov 2020, at 12:11 am, Stefano Stabellini > wrote: > > On Mon, 23 Nov 2020, Jan Beulich wrote: >> Pure code motion (plus the addition of "#ifdef CONFIG_X86); no >> functional change intended. >> >> Reported-by: Julien Grall >> Signed-off-by: Jan Beulich > > Great cleanup

Re: [PATCH v2 3/3] ns16550: drop stray "#ifdef CONFIG_HAS_PCI"

2020-11-24 Thread Rahul Singh
Hello , > On 24 Nov 2020, at 12:11 am, Stefano Stabellini > wrote: > > On Mon, 23 Nov 2020, Jan Beulich wrote: >> There's no point wrapping the function invocation when >> - the function body is already suitably wrapped, >> - the function itself is unconditionally available. >> >> Reported-by:

Re: NetBSD dom0 PVH: hardware interrupts stalls

2020-11-24 Thread Jan Beulich
On 23.11.2020 18:39, Manuel Bouyer wrote: > On Mon, Nov 23, 2020 at 06:06:10PM +0100, Roger Pau Monné wrote: >> OK, I'm afraid this is likely too verbose and messes with the timings. >> >> I've been looking (again) into the code, and I found something weird >> that I think could be related to the i

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

2020-11-24 Thread Julien Grall
Hi Jan, On 24/11/2020 09:47, Jan Beulich wrote: On 23.11.2020 18:13, Julien Grall wrote: My view on 2) can change if Jan provides enough information into why one would want NS1650 PCI enabled by default on Arm but disable MSI. Because, like it was on x86, initially there may be no support for

[libvirt test] 156977: regressions - FAIL

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

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

2020-11-24 Thread Jan Beulich
On 24.11.2020 11:22, Julien Grall wrote: > On 24/11/2020 09:47, Jan Beulich wrote: >> On 23.11.2020 18:13, Julien Grall wrote: >>> My view on 2) can change if Jan provides enough information into why one >>> would want NS1650 PCI enabled by default on Arm but disable MSI. >> >> Because, like it was

Re: [PATCH 2/4] x86/ACPI: fix S3 wakeup vector mapping

2020-11-24 Thread Jan Beulich
On 23.11.2020 17:14, Andrew Cooper wrote: > On 23/11/2020 16:07, Roger Pau Monné wrote: >> On Mon, Nov 23, 2020 at 04:30:05PM +0100, Jan Beulich wrote: >>> On 23.11.2020 16:24, Roger Pau Monné wrote: On Mon, Nov 23, 2020 at 01:40:12PM +0100, Jan Beulich wrote: > --- a/xen/arch/x86/acpi/pow

[PATCH] xen/arm: Add workaround for Cortex-A55 erratum #1530923

2020-11-24 Thread Bertrand Marquis
On the Cortex A55, TLB entries can be allocated by a speculative AT instruction. If this is happening during a guest context switch with an inconsistent page table state in the guest, TLBs with wrong values might be allocated. The ARM64_WORKAROUND_AT_SPECULATE workaround is used as for erratum 1165

Re: [PATCH v2] xen: add support for automatic debug key actions in case of crash

2020-11-24 Thread Jan Beulich
On 20.11.2020 14:13, Juergen Gross wrote: > @@ -507,6 +509,42 @@ void __init initialize_keytable(void) > } > } > > +#define CRASHACTION_SIZE 32 > +static char crash_debug_panic[CRASHACTION_SIZE]; > +static char crash_debug_hwdom[CRASHACTION_SIZE]; > +static char crash_debug_watchdog[CRASHA

Re: [PATCH v7 2/3] xen/events: modify struct evtchn layout

2020-11-24 Thread Jan Beulich
On 24.11.2020 08:01, Juergen Gross wrote: > In order to avoid latent races when updating an event channel put > xen_consumer and pending fields in different bytes. I think there's a little more to be said here as to what the actual risk is, as the two fields are - afaict - at present fine the way

[xen-unstable test] 156975: tolerable FAIL

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

Xen Security Advisory 355 v2 - stack corruption from XSA-346 change

2020-11-24 Thread Xen . org security team
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Xen Security Advisory XSA-355 version 2 stack corruption from XSA-346 change UPDATES IN VERSION 2 Added metadata file. Public release. ISSUE DESCRIPTION

Re: [PATCH v7 2/3] xen/events: modify struct evtchn layout

2020-11-24 Thread Jürgen Groß
On 24.11.20 12:42, Jan Beulich wrote: On 24.11.2020 08:01, Juergen Gross wrote: In order to avoid latent races when updating an event channel put xen_consumer and pending fields in different bytes. I think there's a little more to be said here as to what the actual risk is, as the two fields a

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

2020-11-24 Thread Bertrand Marquis
Hi Julien, > On 19 Nov 2020, at 19:07, 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 t

Re: NetBSD dom0 PVH: hardware interrupts stalls

2020-11-24 Thread Roger Pau Monné
On Tue, Nov 24, 2020 at 11:05:12AM +0100, Jan Beulich wrote: > On 23.11.2020 18:39, Manuel Bouyer wrote: > > On Mon, Nov 23, 2020 at 06:06:10PM +0100, Roger Pau Monné wrote: > >> OK, I'm afraid this is likely too verbose and messes with the timings. > >> > >> I've been looking (again) into the code

Re: [PATCH v2] xen: add support for automatic debug key actions in case of crash

2020-11-24 Thread Jürgen Groß
On 24.11.20 12:27, Jan Beulich wrote: On 20.11.2020 14:13, Juergen Gross wrote: @@ -507,6 +509,42 @@ void __init initialize_keytable(void) } } +#define CRASHACTION_SIZE 32 +static char crash_debug_panic[CRASHACTION_SIZE]; +static char crash_debug_hwdom[CRASHACTION_SIZE]; +static cha

Re: [PATCH 01/20] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats

2020-11-24 Thread Tejun Heo
On Wed, Nov 18, 2020 at 09:47:41AM +0100, 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 Acked-by: Tejun Heo Thanks. -- tejun

Re: [PATCH v7 2/3] xen/events: modify struct evtchn layout

2020-11-24 Thread Jan Beulich
On 24.11.2020 13:18, Jürgen Groß wrote: > On 24.11.20 12:42, Jan Beulich wrote: >> On 24.11.2020 08:01, Juergen Gross wrote: >>> @@ -94,9 +93,10 @@ struct evtchn >>> #define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. >>>*/ >>> #define ECS_IPI 6 /* Channel is

Re: Xen Security Advisory 355 v2 - stack corruption from XSA-346 change

2020-11-24 Thread Roger Pau Monné
On Tue, Nov 24, 2020 at 12:03:45PM +, Xen.org security team wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Xen Security Advisory XSA-355 > version 2 > > stack corruption from XSA-346 change > > UPDATES IN VERS

Re: [PATCH v7 2/3] xen/events: modify struct evtchn layout

2020-11-24 Thread Jürgen Groß
On 24.11.20 13:37, Jan Beulich wrote: On 24.11.2020 13:18, Jürgen Groß wrote: On 24.11.20 12:42, Jan Beulich wrote: On 24.11.2020 08:01, Juergen Gross wrote: @@ -94,9 +93,10 @@ struct evtchn #define ECS_VIRQ 5 /* Channel is bound to a virtual IRQ line. */ #define ECS_IPI

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

2020-11-24 Thread Bertrand Marquis
Hi Julien, > On 19 Nov 2020, at 19:07, Julien Grall wrote: > > 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

[PATCH 06/45] zram: remove the claim mechanism

2020-11-24 Thread Christoph Hellwig
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 be simplified as no I/O can be outstanding on a

[PATCH 11/45] block: remove a duplicate __disk_get_part prototype

2020-11-24 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn --- 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/in

[PATCH 04/45] fs: simplify freeze_bdev/thaw_bdev

2020-11-24 Thread Christoph Hellwig
Store the frozen superblock in struct block_device to avoid the awkward interface that can return a sb only used a cookie, an ERR_PTR or NULL. Signed-off-by: Christoph Hellwig --- drivers/md/dm-core.h | 5 - drivers/md/dm.c | 20 ++-- fs/block_dev.c

[PATCH 05/45] mtip32xx: remove the call to fsync_bdev on removal

2020-11-24 Thread Christoph Hellwig
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 deletions(-) diff --git a/drivers/block/mtip32xx/mtip32

[PATCH 07/45] zram: do not call set_blocksize

2020-11-24 Thread Christoph Hellwig
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 files changed, 1 insertion(+), 11 deletions(-) dif

[PATCH 10/45] dm: remove the block_device reference in struct mapped_device

2020-11-24 Thread Christoph Hellwig
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: Christoph Hellwig Acked-by: Mike Snitzer --- driv

merge struct block_device and struct hd_struct v2

2020-11-24 Thread Christoph Hellwig
Hi Jens, this series cleans up our main per-device node data structure by merging the block_device and hd_struct data structures that have the same scope, but different life times. The main effect (besides removing lots of code) is that instead of having two device sizes that need complex synchro

[PATCH 09/45] dm: simplify flush_bio initialization in __send_empty_flush

2020-11-24 Thread Christoph Hellwig
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 Acked-by: Mike Snitzer --- drivers/md/dm.c | 12 +++--

[PATCH 02/45] filemap: consistently use ->f_mapping over ->i_mapping

2020-11-24 Thread Christoph Hellwig
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 --- mm/filemap.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/mm/

[PATCH 03/45] fs: remove get_super_thawed and get_super_exclusive_thawed

2020-11-24 Thread Christoph Hellwig
Just open code the wait in the only caller of both functions. Signed-off-by: Christoph Hellwig --- fs/internal.h | 2 ++ fs/quota/quota.c | 31 +--- fs/super.c | 51 ++ include/linux/fs.h | 4 +--- 4 files chang

[PATCH 01/45] blk-cgroup: fix a hd_struct leak in blkcg_fill_root_iostats

2020-11-24 Thread Christoph Hellwig
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 Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn Acked-by: Tejun Heo --- block/blk-cgr

[PATCH 08/45] loop: do not call set_blocksize

2020-11-24 Thread Christoph Hellwig
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(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 9a27d4f1c08aac

[PATCH 12/45] block: remove a superflous check in blkpg_do_ioctl

2020-11-24 Thread Christoph Hellwig
sector_t is now always a u64, so this check is not needed. Signed-off-by: Christoph Hellwig --- block/ioctl.c | 9 - 1 file changed, 9 deletions(-) diff --git a/block/ioctl.c b/block/ioctl.c index 6b785181344fe1..0c09bb7a6ff35f 100644 --- a/block/ioctl.c +++ b/block/ioctl.c @@ -35,15 +3

[PATCH 18/45] init: refactor devt_from_partuuid

2020-11-24 Thread Christoph Hellwig
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 Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara --- init/do_mounts.c | 68 ++-- 1 file changed,

[PATCH 15/45] block: use put_device in put_disk

2020-11-24 Thread Christoph Hellwig
Use put_device to put the device instead of poking into the internals and using kobject_put. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn --- block/genhd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

[PATCH 16/45] block: change the hash used for looking up block devices

2020-11-24 Thread Christoph Hellwig
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 Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara --- fs/block_dev.c | 26 ++ 1

Re: [PATCH 38/45] block: switch partition lookup to use struct block_device

2020-11-24 Thread Coly Li
On 11/24/20 9:27 PM, Christoph Hellwig wrote: > Use struct block_device to lookup partitions on a disk. This removes > all usage of struct hd_struct from the I/O path, and this allows removing > the percpu refcount in struct hd_struct. > > Signed-off-by: Christoph Hellwig For the bcache part,

Re: [PATCH 30/45] block: remove the nr_sects field in struct hd_struct

2020-11-24 Thread Coly Li
On 11/24/20 9:27 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

Re: [PATCH 23/45] block: remove i_bdev

2020-11-24 Thread Coly Li
On 11/24/20 9:27 PM, Christoph Hellwig wrote: > Switch the block device lookup interfaces to directly work with a dev_t > so that struct block_device references are only acquired by the > blkdev_get variants (and the blk-cgroup special case). This means that > we not don't need an extra reference

[PATCH 13/45] block: add a bdev_kobj helper

2020-11-24 Thread Christoph Hellwig
Add a little helper to find the kobject for a struct block_device. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn --- drivers/md/bcache/super.c | 7 ++- drivers/md/md.c | 4 +--- fs/block_dev.c

[PATCH 40/45] block: pass a block_device to blk_alloc_devt

2020-11-24 Thread Christoph Hellwig
Pass the block_device actually needed instead of the hd_struct. Signed-off-by: Christoph Hellwig --- block/blk.h | 2 +- block/genhd.c | 14 +++--- block/partitions/core.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/block/blk.h b/block/b

[PATCH 35/45] block: move make_it_fail to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the make_it_fail flag to struct block_device an turn it into a bool in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 3 ++- block/genhd.c | 4 ++-- include/linux/blk_types.h | 3 +++ include/linux/genhd.h | 3 --- 4

[PATCH 33/45] block: move the partition_meta_info to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the partition_meta_info to struct block_device in preparation for killing struct hd_struct. Signed-off-by: Christoph Hellwig --- block/blk.h | 1 - block/genhd.c | 3 ++- block/partitions/core.c | 18 +++--- fs/block_dev.c| 1 + include

[PATCH 24/45] blk-cgroup: stop abusing get_gendisk

2020-11-24 Thread Christoph Hellwig
Properly open the device instead of relying on deep internals by using get_gendisk. Note that this uses FMODE_NDELAY without either FMODE_READ or FMODE_WRITE, which is a special open mode to allow for opening without media access, thus avoiding unexpexted interactions especially on removable media

[PATCH 38/45] block: switch partition lookup to use struct block_device

2020-11-24 Thread Christoph Hellwig
Use struct block_device to lookup partitions on a disk. This removes all usage of struct hd_struct from the I/O path, and this allows removing the percpu refcount in struct hd_struct. Signed-off-by: Christoph Hellwig --- block/bio.c| 4 +- block/blk-core.c

[PATCH 29/45] block: initialize struct block_device in bdev_alloc

2020-11-24 Thread Christoph Hellwig
Don't play tricks with slab constructors as bdev structures tends to not get reused very much, and this makes the code a lot less error prone. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/fs/block_

[PATCH 26/45] block: remove ->bd_contains

2020-11-24 Thread Christoph Hellwig
Now that each hd_struct has a reference to the corresponding block_device, there is no need for the bd_contains pointer. Add a bdev_whole() helper to look up the whole device block_device struture instead. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara -

[PATCH 42/45] block: switch disk_part_iter_* to use a struct block_device

2020-11-24 Thread Christoph Hellwig
Switch the partition iter infrastructure to iterate over block_device references instead of hd_struct ones mostly used to get at the block_device. Signed-off-by: Christoph Hellwig --- block/genhd.c | 57 +++ block/partitions/core.c | 13 +

[PATCH 39/45] block: remove the partno field from struct hd_struct

2020-11-24 Thread Christoph Hellwig
Just use the bd_partno field in struct block_device everywhere. Signed-off-by: Christoph Hellwig --- block/genhd.c | 12 ++-- block/partitions/core.c | 9 - include/linux/genhd.h | 1 - init/do_mounts.c| 2 +- 4 files changed, 11 insertions(+), 13 deletions

[PATCH 14/45] block: use disk_part_iter_exit in disk_part_iter_next

2020-11-24 Thread Christoph Hellwig
Call disk_part_iter_exit in disk_part_iter_next instead of duplicating the functionality. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn --- block/genhd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --gi

[PATCH 17/45] init: refactor name_to_dev_t

2020-11-24 Thread Christoph Hellwig
Split each case into a self-contained helper, and move the block dependent code entirely under the pre-existing #ifdef CONFIG_BLOCK. This allows to remove the blk_lookup_devt stub in genhd.h. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Joh

[PATCH 30/45] block: remove the nr_sects field in struct hd_struct

2020-11-24 Thread Christoph Hellwig
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 using the block_device field this problem also get

[PATCH 45/45] block: stop using bdget_disk for partition 0

2020-11-24 Thread Christoph Hellwig
We can just dereference the point in struct gendisk instead. Also remove the now unused export. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara --- block/genhd.c | 1 - drivers/block/nbd.c | 4 +--- drivers/block/xen-blkfr

[PATCH 23/45] block: remove i_bdev

2020-11-24 Thread Christoph Hellwig
Switch the block device lookup interfaces to directly work with a dev_t so that struct block_device references are only acquired by the blkdev_get variants (and the blk-cgroup special case). This means that we not don't need an extra reference in the inode and can generally simplify handling of st

[PATCH 37/45] block: allocate struct hd_struct as part of struct bdev_inode

2020-11-24 Thread Christoph Hellwig
Allocate hd_struct together with struct block_device to pre-load the lifetime rule changes in preparation of merging the two structures. Note that part0 was previously embedded into struct gendisk, but is a separate allocation now, and already points to the block_device instead of the hd_struct.

[PATCH 22/45] block: opencode devcgroup_inode_permission

2020-11-24 Thread Christoph Hellwig
Just call devcgroup_check_permission to avoid various superflous checks and a double conversion of the access flags. Signed-off-by: Christoph Hellwig --- fs/block_dev.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/block_dev.c b/fs/block_dev.c index 2ffa11a95f

[PATCH 31/45] block: move disk stat accounting to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the dkstats and stamp field to struct block_device in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c| 2 +- block/blk-core.c | 4 ++-- block/blk.h | 1 - block/genhd.c | 14 -- block/

[PATCH 21/45] block: refactor blkdev_get

2020-11-24 Thread Christoph Hellwig
Move more code that is only run on the outer open but not the open of the underlying whole device when opening a partition into blkdev_get, which leads to a much easier to follow structure. This allows to simplify the disk and module refcounting so that one reference is held for each open, similar

[PATCH 19/45] init: cleanup match_dev_by_uuid and match_dev_by_label

2020-11-24 Thread Christoph Hellwig
Avoid a totally pointless goto label, and use the same style of comparism for both helpers. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara Reviewed-by: Johannes Thumshirn --- init/do_mounts.c | 18 ++ 1 file changed, 6 insertions(+), 12

[PATCH 32/45] block: move the start_sect field to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the start_sect field to struct block_device in preparation of killing struct hd_struct. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 5 +++-- block/blk-lib.c | 2 +- block/genhd.c | 4 ++-- block/partitions/core.c | 17 + includ

[PATCH 25/45] block: reference struct block_device from struct hd_struct

2020-11-24 Thread Christoph Hellwig
To simplify block device lookup and a few other upcoming 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 memory. The upside will be that a lot of code can be simpl

[PATCH 43/45] f2fs: remove a few bd_part checks

2020-11-24 Thread Christoph Hellwig
bd_part is never NULL for a block device in use by a file system, so remove the checks. Signed-off-by: Christoph Hellwig --- fs/f2fs/checkpoint.c | 5 + fs/f2fs/sysfs.c | 9 - 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoin

[PATCH 20/45] block: refactor __blkdev_put

2020-11-24 Thread Christoph Hellwig
Reorder the code to have one big section for the last close, and to use bdev_is_partition. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara --- fs/block_dev.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fs/block_dev.c

Re: [PATCH] xen/arm: Add workaround for Cortex-A55 erratum #1530923

2020-11-24 Thread Rahul Singh
Hello , > On 24 Nov 2020, at 11:12 am, Bertrand Marquis > wrote: > > On the Cortex A55, TLB entries can be allocated by a speculative AT > instruction. If this is happening during a guest context switch with an > inconsistent page table state in the guest, TLBs with wrong values might > be allo

[PATCH 28/45] block: simplify part_to_disk

2020-11-24 Thread Christoph Hellwig
Now that struct hd_struct has a block_device pointer use that to find the disk. Signed-off-by: Christoph Hellwig --- include/linux/genhd.h | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/include/linux/genhd.h b/include/linux/genhd.h index d068e46f9086ae..dcf86a3d4d

[PATCH 44/45] block: merge struct block_device and struct hd_struct

2020-11-24 Thread Christoph Hellwig
Instead of having two structures that represent each block device with different life time rules, merge them into a single one. This also greatly simplifies the reference counting rules, as we can use the inode reference count as the main reference count for the new struct block_device, with the d

[PATCH 41/45] block: pass a block_device to invalidate_partition

2020-11-24 Thread Christoph Hellwig
Pass the block_device actually needed instead of looking it up using bdget_disk. Signed-off-by: Christoph Hellwig --- block/genhd.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 498c816e90df64..2985740eab084b 100644 --- a/b

[PATCH 27/45] block: simplify the block device claiming interface

2020-11-24 Thread Christoph Hellwig
Stop passing the whole device as a separate argument given that it can be trivially deducted and cleanup the !holder debug check. Signed-off-by: Christoph Hellwig Reviewed-by: Greg Kroah-Hartman Reviewed-by: Jan Kara --- drivers/block/loop.c | 12 +- fs/block_dev.c | 51 +

[PATCH 36/45] block: move the policy field to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the policy field to struct block_device and rename it to the more descriptive bd_read_only. Also turn the field into a bool as it is used as such. Signed-off-by: Christoph Hellwig --- block/blk-core.c | 2 +- block/genhd.c | 8 block/ioctl.c | 2 +-

[PATCH 34/45] block: move holder_dir to struct block_device

2020-11-24 Thread Christoph Hellwig
Move the holder_dir field to struct block_device in preparation for kill struct hd_struct. Signed-off-by: Christoph Hellwig --- block/genhd.c | 5 +++-- block/partitions/core.c | 8 fs/block_dev.c| 11 +-- include/linux/blk_types.h | 1 + include/lin

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

2020-11-24 Thread osstest service owner
flight 156982 xen-unstable-smoke real [real] http://logs.test-lab.xenproject.org/osstest/logs/156982/ 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

  1   2   3   >