From ea9e57d06e48239e19f67769703aa48554f6648b Mon Sep 17 00:00:00 2001 From: Jason Andryuk Date: Tue, 25 Sep 2018 07:36:55 -0400 Subject: xen: Make XEN_BACKEND selectable by DomU XEN_BACKEND doesn't actually depend on XEN_DOM0. DomUs can serve backends to other DomUs. One example is a service VM providing network backends. The original Kconfig defaulted Dom0 to y and it could be disabled. DomU could not select the option. With the new Kconfig, we default y for Dom0 and n for DomU. Either can then toggle the selection. Signed-off-by: Jason Andryuk Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- drivers/xen/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 90d387b50ab7..5ac319b5c880 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -105,8 +105,7 @@ config XEN_DEV_EVTCHN config XEN_BACKEND bool "Backend driver support" - depends on XEN_DOM0 - default y + default XEN_DOM0 help Support for backend device drivers that provide I/O services to other virtual machines. -- cgit v1.2.3 From af320de90ec864bb78fdbc9c0c3e99f28d1aab0f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 26 Sep 2018 10:43:13 +0200 Subject: xen/balloon: Grammar s/Is it/It is/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Juergen Gross --- drivers/xen/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 5ac319b5c880..60c0d1c85613 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -86,7 +86,7 @@ config XEN_SCRUB_PAGES_DEFAULT help Scrub pages before returning them to the system for reuse by other domains. This makes sure that any confidential data - is not accidentally visible to other domains. Is it more + is not accidentally visible to other domains. It is more secure, but slightly less efficient. This can be controlled with xen_scrub_pages=0 parameter and /sys/devices/system/xen_memory/xen_memory0/scrub_pages. -- cgit v1.2.3 From 3aa6c19d2f38be9c6e9a8ad5fa8e3c9d29ee3c35 Mon Sep 17 00:00:00 2001 From: Boris Ostrovsky Date: Sun, 7 Oct 2018 16:05:38 -0400 Subject: xen/balloon: Support xend-based toolstack Xend-based toolstacks don't have static-max entry in xenstore. The equivalent node for those toolstacks is memory_static_max. Fixes: 5266b8e4445c (xen: fix booting ballooned down hvm guest) Signed-off-by: Boris Ostrovsky Cc: # 4.13 Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- drivers/xen/xen-balloon.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/xen/xen-balloon.c b/drivers/xen/xen-balloon.c index 63c1494a8d73..2acbfe104e46 100644 --- a/drivers/xen/xen-balloon.c +++ b/drivers/xen/xen-balloon.c @@ -76,12 +76,15 @@ static void watch_target(struct xenbus_watch *watch, if (!watch_fired) { watch_fired = true; - err = xenbus_scanf(XBT_NIL, "memory", "static-max", "%llu", - &static_max); - if (err != 1) - static_max = new_target; - else + + if ((xenbus_scanf(XBT_NIL, "memory", "static-max", + "%llu", &static_max) == 1) || + (xenbus_scanf(XBT_NIL, "memory", "memory_static_max", + "%llu", &static_max) == 1)) static_max >>= PAGE_SHIFT - 10; + else + static_max = new_target; + target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0 : static_max - balloon_stats.target_pages; } -- cgit v1.2.3 From f1db0050483cd3d63bb7b2e8c8a772501d52031b Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Tue, 16 Oct 2018 16:33:58 +0200 Subject: xen: remove redundant 'default n' from Kconfig 'default n' is the default value for any bool or tristate Kconfig setting so there is no need to write it explicitly. Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO is not set' for visible symbols") the Kconfig behavior is the same regardless of 'default n' being present or not: ... One side effect of (and the main motivation for) this change is making the following two definitions behave exactly the same: config FOO bool config FOO bool default n With this change, neither of these will generate a '# CONFIG_FOO is not set' line (assuming FOO isn't selected/implied). That might make it clearer to people that a bare 'default n' is redundant. ... Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Juergen Gross Signed-off-by: Juergen Gross --- drivers/xen/Kconfig | 8 -------- 1 file changed, 8 deletions(-) (limited to 'drivers') diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 60c0d1c85613..815b9e9bb975 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -12,7 +12,6 @@ config XEN_BALLOON config XEN_SELFBALLOONING bool "Dynamically self-balloon kernel memory to target" depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM - default n help Self-ballooning dynamically balloons available kernel memory driven by the current usage of anonymous memory ("committed AS") and @@ -27,7 +26,6 @@ config XEN_SELFBALLOONING config XEN_BALLOON_MEMORY_HOTPLUG bool "Memory hotplug support for Xen balloon driver" - default n depends on XEN_BALLOON && MEMORY_HOTPLUG help Memory hotplug support for Xen balloon driver allows expanding memory @@ -226,7 +224,6 @@ config XEN_PCIDEV_BACKEND config XEN_PVCALLS_FRONTEND tristate "XEN PV Calls frontend driver" depends on INET && XEN - default n select XEN_XENBUS_FRONTEND help Experimental frontend for the Xen PV Calls protocol @@ -237,7 +234,6 @@ config XEN_PVCALLS_FRONTEND config XEN_PVCALLS_BACKEND bool "XEN PV Calls backend driver" depends on INET && XEN && XEN_BACKEND - default n help Experimental backend for the Xen PV Calls protocol (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It @@ -263,7 +259,6 @@ config XEN_PRIVCMD config XEN_STUB bool "Xen stub drivers" depends on XEN && X86_64 && BROKEN - default n help Allow kernel to install stub drivers, to reserve space for Xen drivers, i.e. memory hotplug and cpu hotplug, and to block native drivers loaded, @@ -274,7 +269,6 @@ config XEN_STUB config XEN_ACPI_HOTPLUG_MEMORY tristate "Xen ACPI memory hotplug" depends on XEN_DOM0 && XEN_STUB && ACPI - default n help This is Xen ACPI memory hotplug. @@ -286,7 +280,6 @@ config XEN_ACPI_HOTPLUG_CPU tristate "Xen ACPI cpu hotplug" depends on XEN_DOM0 && XEN_STUB && ACPI select ACPI_CONTAINER - default n help Xen ACPI cpu enumerating and hotplugging @@ -315,7 +308,6 @@ config XEN_ACPI_PROCESSOR config XEN_MCE_LOG bool "Xen platform mcelog" depends on XEN_DOM0 && X86_64 && X86_MCE - default n help Allow kernel fetching MCE error from Xen platform and converting it into Linux mcelog format for mcelog tools -- cgit v1.2.3 From 7a048cec598e1761cdcd63eb3a3c6e390b7661c7 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Tue, 9 Oct 2018 18:09:59 +0200 Subject: xen: drop writing error messages to xenstore xenbus_va_dev_error() will try to write error messages to Xenstore under the error//error node (with something like "device/vbd/51872"). This will fail normally and another message about this failure is added to dmesg. I believe this is a remnant from very ancient times, as it was added in the first pvops rush of commits in 2007. So remove the additional message when writing to Xenstore failed as a minimum step. Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- drivers/xen/xenbus/xenbus_client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c index a1c17000129b..e17ca8156171 100644 --- a/drivers/xen/xenbus/xenbus_client.c +++ b/drivers/xen/xenbus/xenbus_client.c @@ -278,10 +278,8 @@ static void xenbus_va_dev_error(struct xenbus_device *dev, int err, dev_err(&dev->dev, "%s\n", printf_buffer); path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename); - if (!path_buffer || - xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer)) - dev_err(&dev->dev, "failed to write error node for %s (%s)\n", - dev->nodename, printf_buffer); + if (path_buffer) + xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer); kfree(printf_buffer); kfree(path_buffer); -- cgit v1.2.3