Today the non-essential pv devices are hard coded in the xenbus driver
and this list is lacking multiple entries.
This series reworks the detection logic of non-essential devices by
adding a flag for that purpose to struct xenbus_driver.
Juergen Gross (5):
xen: add "not_essential" flag to struct xenbus_driver
xen: flag xen_drm_front to be not essential for system boot
xen: flag hvc_xen to be not essential for system boot
xen: flag pvcalls-front to be not essential for system boot
xen: flag xen_snd_front to be not essential for system boot
drivers/gpu/drm/xen/xen_drm_front.c | 1 +
drivers/input/misc/xen-kbdfront.c | 1 +
drivers/tty/hvc/hvc_xen.c | 1 +
drivers/video/fbdev/xen-fbfront.c | 1 +
drivers/xen/pvcalls-front.c | 1 +
drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++-----------
include/xen/xenbus.h | 1 +
sound/xen/xen_snd_front.c | 1 +
8 files changed, 10 insertions(+), 11 deletions(-)
--
2.26.2
The Xen pv sound driver is not essential for booting. Set the respective
flag.
Signed-off-by: Juergen Gross <[email protected]>
---
sound/xen/xen_snd_front.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c
index 2cb0a19be2b8..7be9fbcf788f 100644
--- a/sound/xen/xen_snd_front.c
+++ b/sound/xen/xen_snd_front.c
@@ -358,6 +358,7 @@ static struct xenbus_driver xen_driver = {
.probe = xen_drv_probe,
.remove = xen_drv_remove,
.otherend_changed = sndback_changed,
+ .not_essential = true;
};
static int __init xen_drv_init(void)
--
2.26.2
The Xen pvcalls device is not essential for booting. Set the respective
flag.
Signed-off-by: Juergen Gross <[email protected]>
---
drivers/xen/pvcalls-front.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c
index 7984645b5956..3c9ae156b597 100644
--- a/drivers/xen/pvcalls-front.c
+++ b/drivers/xen/pvcalls-front.c
@@ -1275,6 +1275,7 @@ static struct xenbus_driver pvcalls_front_driver = {
.probe = pvcalls_front_probe,
.remove = pvcalls_front_remove,
.otherend_changed = pvcalls_front_changed,
+ .not_essential = true,
};
static int __init pvcalls_frontend_init(void)
--
2.26.2
The Xen pv console driver is not essential for boot. Set the respective
flag.
Signed-off-by: Juergen Gross <[email protected]>
---
drivers/tty/hvc/hvc_xen.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/hvc/hvc_xen.c b/drivers/tty/hvc/hvc_xen.c
index f0bf01ea069a..71e0dd2c0ce5 100644
--- a/drivers/tty/hvc/hvc_xen.c
+++ b/drivers/tty/hvc/hvc_xen.c
@@ -522,6 +522,7 @@ static struct xenbus_driver xencons_driver = {
.remove = xencons_remove,
.resume = xencons_resume,
.otherend_changed = xencons_backend_changed,
+ .not_essential = true,
};
#endif /* CONFIG_HVC_XEN_FRONTEND */
--
2.26.2
Similar to the virtual frame buffer (vfb) the pv display driver is not
essential for booting the system. Set the respective flag.
Signed-off-by: Juergen Gross <[email protected]>
---
drivers/gpu/drm/xen/xen_drm_front.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
index 9f14d99c763c..bc7605324db3 100644
--- a/drivers/gpu/drm/xen/xen_drm_front.c
+++ b/drivers/gpu/drm/xen/xen_drm_front.c
@@ -773,6 +773,7 @@ static struct xenbus_driver xen_driver = {
.probe = xen_drv_probe,
.remove = xen_drv_remove,
.otherend_changed = displback_changed,
+ .not_essential = true,
};
static int __init xen_drv_init(void)
--
2.26.2
On 22.10.2021 08:47, Juergen Gross wrote:
> Today the non-essential pv devices are hard coded in the xenbus driver
> and this list is lacking multiple entries.
>
> This series reworks the detection logic of non-essential devices by
> adding a flag for that purpose to struct xenbus_driver.
I'm wondering whether it wouldn't better be the other way around: The
(hopefully few) essential ones get flagged, thus also making it more
prominent during patch review that a flag gets added (and justification
provided), instead of having to spot the lack of a flag getting set.
Jan
On 22.10.21 09:24, Jan Beulich wrote:
> On 22.10.2021 08:47, Juergen Gross wrote:
>> Today the non-essential pv devices are hard coded in the xenbus driver
>> and this list is lacking multiple entries.
>>
>> This series reworks the detection logic of non-essential devices by
>> adding a flag for that purpose to struct xenbus_driver.
>
> I'm wondering whether it wouldn't better be the other way around: The
> (hopefully few) essential ones get flagged, thus also making it more
> prominent during patch review that a flag gets added (and justification
> provided), instead of having to spot the lack of a flag getting set.
Not flagging a non-essential one is less problematic than not flagging
an essential driver IMO.
For some drivers I'm on the edge, BTW. The pv 9pfs driver ought to be
non-essential in most cases, but there might be use cases where it is
needed, so I didn't set its non_essential flag.
Same applies to pv-usb and maybe pv-scsi, while pv-tpm probably really
is essential.
With the current series I'm ending up with 6 non-essential drivers and
6 essential ones, so either way needs the same number of drivers
modified.
Juergen
Hi, Juergen!
On 22.10.21 09:47, Juergen Gross wrote:
> Similar to the virtual frame buffer (vfb) the pv display driver is not
> essential for booting the system. Set the respective flag.
>
> Signed-off-by: Juergen Gross <[email protected]>
Reviewed-by: Oleksandr Andrushchenko <[email protected]>
> ---
> drivers/gpu/drm/xen/xen_drm_front.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c
> index 9f14d99c763c..bc7605324db3 100644
> --- a/drivers/gpu/drm/xen/xen_drm_front.c
> +++ b/drivers/gpu/drm/xen/xen_drm_front.c
> @@ -773,6 +773,7 @@ static struct xenbus_driver xen_driver = {
> .probe = xen_drv_probe,
> .remove = xen_drv_remove,
> .otherend_changed = displback_changed,
> + .not_essential = true,
> };
>
> static int __init xen_drv_init(void)
Hi, Juergen!
On 22.10.21 09:48, Juergen Gross wrote:
> The Xen pv sound driver is not essential for booting. Set the respective
> flag.
>
> Signed-off-by: Juergen Gross <[email protected]>
Reviewed-by: Oleksandr Andrushchenko <[email protected]>
> ---
> sound/xen/xen_snd_front.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/xen/xen_snd_front.c b/sound/xen/xen_snd_front.c
> index 2cb0a19be2b8..7be9fbcf788f 100644
> --- a/sound/xen/xen_snd_front.c
> +++ b/sound/xen/xen_snd_front.c
> @@ -358,6 +358,7 @@ static struct xenbus_driver xen_driver = {
> .probe = xen_drv_probe,
> .remove = xen_drv_remove,
> .otherend_changed = sndback_changed,
> + .not_essential = true;
> };
>
> static int __init xen_drv_init(void)
Hi Juergen,
I love your patch! Yet something to improve:
[auto build test ERROR on xen-tip/linux-next]
[also build test ERROR on tty/tty-testing tiwai-sound/for-next hid/for-next linus/master v5.15 next-20211106]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Juergen-Gross/xen-cleanup-detection-of-non-essential-pv-devices/20211022-145043
base: https://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git linux-next
config: arm64-randconfig-r005-20211025 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project a461fa64bb37cffd73f683c74f6b0780379fc2ca)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/ed8f15a6cafc5414c3821aad66273c580034c3c0
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Juergen-Gross/xen-cleanup-detection-of-non-essential-pv-devices/20211022-145043
git checkout ed8f15a6cafc5414c3821aad66273c580034c3c0
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash sound/xen/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
>> sound/xen/xen_snd_front.c:361:23: error: unexpected ';' before '}'
.not_essential = true;
^
1 error generated.
vim +361 sound/xen/xen_snd_front.c
355
356 static struct xenbus_driver xen_driver = {
357 .ids = xen_drv_ids,
358 .probe = xen_drv_probe,
359 .remove = xen_drv_remove,
360 .otherend_changed = sndback_changed,
> 361 .not_essential = true;
362 };
363
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
On 22.10.21 08:47, Juergen Gross wrote:
> Today the non-essential pv devices are hard coded in the xenbus driver
> and this list is lacking multiple entries.
>
> This series reworks the detection logic of non-essential devices by
> adding a flag for that purpose to struct xenbus_driver.
>
> Juergen Gross (5):
> xen: add "not_essential" flag to struct xenbus_driver
> xen: flag xen_drm_front to be not essential for system boot
> xen: flag hvc_xen to be not essential for system boot
> xen: flag pvcalls-front to be not essential for system boot
> xen: flag xen_snd_front to be not essential for system boot
>
> drivers/gpu/drm/xen/xen_drm_front.c | 1 +
> drivers/input/misc/xen-kbdfront.c | 1 +
> drivers/tty/hvc/hvc_xen.c | 1 +
> drivers/video/fbdev/xen-fbfront.c | 1 +
> drivers/xen/pvcalls-front.c | 1 +
> drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++-----------
> include/xen/xenbus.h | 1 +
> sound/xen/xen_snd_front.c | 1 +
> 8 files changed, 10 insertions(+), 11 deletions(-)
>
Any further comments?
Juergen
On 11/22/21 3:20 AM, Juergen Gross wrote:
> On 22.10.21 08:47, Juergen Gross wrote:
>> Today the non-essential pv devices are hard coded in the xenbus driver
>> and this list is lacking multiple entries.
>>
>> This series reworks the detection logic of non-essential devices by
>> adding a flag for that purpose to struct xenbus_driver.
>>
>> Juergen Gross (5):
>> xen: add "not_essential" flag to struct xenbus_driver
>> xen: flag xen_drm_front to be not essential for system boot
>> xen: flag hvc_xen to be not essential for system boot
>> xen: flag pvcalls-front to be not essential for system boot
>> xen: flag xen_snd_front to be not essential for system boot
>>
>> drivers/gpu/drm/xen/xen_drm_front.c | 1 +
>> drivers/input/misc/xen-kbdfront.c | 1 +
>> drivers/tty/hvc/hvc_xen.c | 1 +
>> drivers/video/fbdev/xen-fbfront.c | 1 +
>> drivers/xen/pvcalls-front.c | 1 +
>> drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++-----------
>> include/xen/xenbus.h | 1 +
>> sound/xen/xen_snd_front.c | 1 +
>> 8 files changed, 10 insertions(+), 11 deletions(-)
>>
>
> Any further comments?
>
Reviewed-by: Boris Ostrovsky <[email protected]>
(I'll fix the semicolon typo in the last patch, no need to resend)
On 11/22/21 3:20 AM, Juergen Gross wrote:
> On 22.10.21 08:47, Juergen Gross wrote:
>> Today the non-essential pv devices are hard coded in the xenbus driver
>> and this list is lacking multiple entries.
>>
>> This series reworks the detection logic of non-essential devices by
>> adding a flag for that purpose to struct xenbus_driver.
>>
>> Juergen Gross (5):
>> xen: add "not_essential" flag to struct xenbus_driver
>> xen: flag xen_drm_front to be not essential for system boot
>> xen: flag hvc_xen to be not essential for system boot
>> xen: flag pvcalls-front to be not essential for system boot
>> xen: flag xen_snd_front to be not essential for system boot
>>
>> drivers/gpu/drm/xen/xen_drm_front.c | 1 +
>> drivers/input/misc/xen-kbdfront.c | 1 +
>> drivers/tty/hvc/hvc_xen.c | 1 +
>> drivers/video/fbdev/xen-fbfront.c | 1 +
>> drivers/xen/pvcalls-front.c | 1 +
>> drivers/xen/xenbus/xenbus_probe_frontend.c | 14 +++-----------
>> include/xen/xenbus.h | 1 +
>> sound/xen/xen_snd_front.c | 1 +
>> 8 files changed, 10 insertions(+), 11 deletions(-)
>>
>
Applied to for-linus-5.16c
-boris