diff options
| -rw-r--r-- | MAINTAINERS | 1 | ||||
| -rw-r--r-- | arch/x86/xen/platform-pci-unplug.c | 4 | ||||
| -rw-r--r-- | arch/x86/xen/spinlock.c | 33 | ||||
| -rw-r--r-- | arch/x86/xen/xen-pvh.S | 2 | ||||
| -rw-r--r-- | drivers/xen/Kconfig | 13 | ||||
| -rw-r--r-- | drivers/xen/xen-balloon.c | 13 | ||||
| -rw-r--r-- | drivers/xen/xenbus/xenbus_client.c | 6 |
7 files changed, 30 insertions, 42 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 49ee13372e5b..e8e1d86bd505 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -16317,6 +16317,7 @@ F: arch/arm64/include/asm/xen/ | |||
| 16317 | XEN HYPERVISOR INTERFACE | 16317 | XEN HYPERVISOR INTERFACE |
| 16318 | M: Boris Ostrovsky <boris.ostrovsky@oracle.com> | 16318 | M: Boris Ostrovsky <boris.ostrovsky@oracle.com> |
| 16319 | M: Juergen Gross <jgross@suse.com> | 16319 | M: Juergen Gross <jgross@suse.com> |
| 16320 | R: Stefano Stabellini <sstabellini@kernel.org> | ||
| 16320 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) | 16321 | L: xen-devel@lists.xenproject.org (moderated for non-subscribers) |
| 16321 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git | 16322 | T: git git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git |
| 16322 | S: Supported | 16323 | S: Supported |
diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c index 66ab96a4e2b3..96d7f7d39cb9 100644 --- a/arch/x86/xen/platform-pci-unplug.c +++ b/arch/x86/xen/platform-pci-unplug.c | |||
| @@ -134,6 +134,10 @@ void xen_unplug_emulated_devices(void) | |||
| 134 | { | 134 | { |
| 135 | int r; | 135 | int r; |
| 136 | 136 | ||
| 137 | /* PVH guests don't have emulated devices. */ | ||
| 138 | if (xen_pvh_domain()) | ||
| 139 | return; | ||
| 140 | |||
| 137 | /* user explicitly requested no unplug */ | 141 | /* user explicitly requested no unplug */ |
| 138 | if (xen_emul_unplug & XEN_UNPLUG_NEVER) | 142 | if (xen_emul_unplug & XEN_UNPLUG_NEVER) |
| 139 | return; | 143 | return; |
diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 23f6793af88a..441c88262169 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen/spinlock.c | |||
| @@ -39,34 +39,25 @@ static void xen_qlock_kick(int cpu) | |||
| 39 | */ | 39 | */ |
| 40 | static void xen_qlock_wait(u8 *byte, u8 val) | 40 | static void xen_qlock_wait(u8 *byte, u8 val) |
| 41 | { | 41 | { |
| 42 | unsigned long flags; | ||
| 42 | int irq = __this_cpu_read(lock_kicker_irq); | 43 | int irq = __this_cpu_read(lock_kicker_irq); |
| 43 | 44 | ||
| 44 | /* If kicker interrupts not initialized yet, just spin */ | 45 | /* If kicker interrupts not initialized yet, just spin */ |
| 45 | if (irq == -1) | 46 | if (irq == -1 || in_nmi()) |
| 46 | return; | 47 | return; |
| 47 | 48 | ||
| 48 | /* clear pending */ | 49 | /* Guard against reentry. */ |
| 49 | xen_clear_irq_pending(irq); | 50 | local_irq_save(flags); |
| 50 | barrier(); | ||
| 51 | |||
| 52 | /* | ||
| 53 | * We check the byte value after clearing pending IRQ to make sure | ||
| 54 | * that we won't miss a wakeup event because of the clearing. | ||
| 55 | * | ||
| 56 | * The sync_clear_bit() call in xen_clear_irq_pending() is atomic. | ||
| 57 | * So it is effectively a memory barrier for x86. | ||
| 58 | */ | ||
| 59 | if (READ_ONCE(*byte) != val) | ||
| 60 | return; | ||
| 61 | 51 | ||
| 62 | /* | 52 | /* If irq pending already clear it. */ |
| 63 | * If an interrupt happens here, it will leave the wakeup irq | 53 | if (xen_test_irq_pending(irq)) { |
| 64 | * pending, which will cause xen_poll_irq() to return | 54 | xen_clear_irq_pending(irq); |
| 65 | * immediately. | 55 | } else if (READ_ONCE(*byte) == val) { |
| 66 | */ | 56 | /* Block until irq becomes pending (or a spurious wakeup) */ |
| 57 | xen_poll_irq(irq); | ||
| 58 | } | ||
| 67 | 59 | ||
| 68 | /* Block until irq becomes pending (or perhaps a spurious wakeup) */ | 60 | local_irq_restore(flags); |
| 69 | xen_poll_irq(irq); | ||
| 70 | } | 61 | } |
| 71 | 62 | ||
| 72 | static irqreturn_t dummy_handler(int irq, void *dev_id) | 63 | static irqreturn_t dummy_handler(int irq, void *dev_id) |
diff --git a/arch/x86/xen/xen-pvh.S b/arch/x86/xen/xen-pvh.S index b0e471506cd8..1f8825bbaffb 100644 --- a/arch/x86/xen/xen-pvh.S +++ b/arch/x86/xen/xen-pvh.S | |||
| @@ -170,7 +170,7 @@ canary: | |||
| 170 | .fill 48, 1, 0 | 170 | .fill 48, 1, 0 |
| 171 | 171 | ||
| 172 | early_stack: | 172 | early_stack: |
| 173 | .fill 256, 1, 0 | 173 | .fill BOOT_STACK_SIZE, 1, 0 |
| 174 | early_stack_end: | 174 | early_stack_end: |
| 175 | 175 | ||
| 176 | ELFNOTE(Xen, XEN_ELFNOTE_PHYS32_ENTRY, | 176 | ELFNOTE(Xen, XEN_ELFNOTE_PHYS32_ENTRY, |
diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index 90d387b50ab7..815b9e9bb975 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig | |||
| @@ -12,7 +12,6 @@ config XEN_BALLOON | |||
| 12 | config XEN_SELFBALLOONING | 12 | config XEN_SELFBALLOONING |
| 13 | bool "Dynamically self-balloon kernel memory to target" | 13 | bool "Dynamically self-balloon kernel memory to target" |
| 14 | depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM | 14 | depends on XEN && XEN_BALLOON && CLEANCACHE && SWAP && XEN_TMEM |
| 15 | default n | ||
| 16 | help | 15 | help |
| 17 | Self-ballooning dynamically balloons available kernel memory driven | 16 | Self-ballooning dynamically balloons available kernel memory driven |
| 18 | by the current usage of anonymous memory ("committed AS") and | 17 | by the current usage of anonymous memory ("committed AS") and |
| @@ -27,7 +26,6 @@ config XEN_SELFBALLOONING | |||
| 27 | 26 | ||
| 28 | config XEN_BALLOON_MEMORY_HOTPLUG | 27 | config XEN_BALLOON_MEMORY_HOTPLUG |
| 29 | bool "Memory hotplug support for Xen balloon driver" | 28 | bool "Memory hotplug support for Xen balloon driver" |
| 30 | default n | ||
| 31 | depends on XEN_BALLOON && MEMORY_HOTPLUG | 29 | depends on XEN_BALLOON && MEMORY_HOTPLUG |
| 32 | help | 30 | help |
| 33 | Memory hotplug support for Xen balloon driver allows expanding memory | 31 | Memory hotplug support for Xen balloon driver allows expanding memory |
| @@ -86,7 +84,7 @@ config XEN_SCRUB_PAGES_DEFAULT | |||
| 86 | help | 84 | help |
| 87 | Scrub pages before returning them to the system for reuse by | 85 | Scrub pages before returning them to the system for reuse by |
| 88 | other domains. This makes sure that any confidential data | 86 | other domains. This makes sure that any confidential data |
| 89 | is not accidentally visible to other domains. Is it more | 87 | is not accidentally visible to other domains. It is more |
| 90 | secure, but slightly less efficient. This can be controlled with | 88 | secure, but slightly less efficient. This can be controlled with |
| 91 | xen_scrub_pages=0 parameter and | 89 | xen_scrub_pages=0 parameter and |
| 92 | /sys/devices/system/xen_memory/xen_memory0/scrub_pages. | 90 | /sys/devices/system/xen_memory/xen_memory0/scrub_pages. |
| @@ -105,8 +103,7 @@ config XEN_DEV_EVTCHN | |||
| 105 | 103 | ||
| 106 | config XEN_BACKEND | 104 | config XEN_BACKEND |
| 107 | bool "Backend driver support" | 105 | bool "Backend driver support" |
| 108 | depends on XEN_DOM0 | 106 | default XEN_DOM0 |
| 109 | default y | ||
| 110 | help | 107 | help |
| 111 | Support for backend device drivers that provide I/O services | 108 | Support for backend device drivers that provide I/O services |
| 112 | to other virtual machines. | 109 | to other virtual machines. |
| @@ -227,7 +224,6 @@ config XEN_PCIDEV_BACKEND | |||
| 227 | config XEN_PVCALLS_FRONTEND | 224 | config XEN_PVCALLS_FRONTEND |
| 228 | tristate "XEN PV Calls frontend driver" | 225 | tristate "XEN PV Calls frontend driver" |
| 229 | depends on INET && XEN | 226 | depends on INET && XEN |
| 230 | default n | ||
| 231 | select XEN_XENBUS_FRONTEND | 227 | select XEN_XENBUS_FRONTEND |
| 232 | help | 228 | help |
| 233 | Experimental frontend for the Xen PV Calls protocol | 229 | Experimental frontend for the Xen PV Calls protocol |
| @@ -238,7 +234,6 @@ config XEN_PVCALLS_FRONTEND | |||
| 238 | config XEN_PVCALLS_BACKEND | 234 | config XEN_PVCALLS_BACKEND |
| 239 | bool "XEN PV Calls backend driver" | 235 | bool "XEN PV Calls backend driver" |
| 240 | depends on INET && XEN && XEN_BACKEND | 236 | depends on INET && XEN && XEN_BACKEND |
| 241 | default n | ||
| 242 | help | 237 | help |
| 243 | Experimental backend for the Xen PV Calls protocol | 238 | Experimental backend for the Xen PV Calls protocol |
| 244 | (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It | 239 | (https://xenbits.xen.org/docs/unstable/misc/pvcalls.html). It |
| @@ -264,7 +259,6 @@ config XEN_PRIVCMD | |||
| 264 | config XEN_STUB | 259 | config XEN_STUB |
| 265 | bool "Xen stub drivers" | 260 | bool "Xen stub drivers" |
| 266 | depends on XEN && X86_64 && BROKEN | 261 | depends on XEN && X86_64 && BROKEN |
| 267 | default n | ||
| 268 | help | 262 | help |
| 269 | Allow kernel to install stub drivers, to reserve space for Xen drivers, | 263 | Allow kernel to install stub drivers, to reserve space for Xen drivers, |
| 270 | i.e. memory hotplug and cpu hotplug, and to block native drivers loaded, | 264 | i.e. memory hotplug and cpu hotplug, and to block native drivers loaded, |
| @@ -275,7 +269,6 @@ config XEN_STUB | |||
| 275 | config XEN_ACPI_HOTPLUG_MEMORY | 269 | config XEN_ACPI_HOTPLUG_MEMORY |
| 276 | tristate "Xen ACPI memory hotplug" | 270 | tristate "Xen ACPI memory hotplug" |
| 277 | depends on XEN_DOM0 && XEN_STUB && ACPI | 271 | depends on XEN_DOM0 && XEN_STUB && ACPI |
| 278 | default n | ||
| 279 | help | 272 | help |
| 280 | This is Xen ACPI memory hotplug. | 273 | This is Xen ACPI memory hotplug. |
| 281 | 274 | ||
| @@ -287,7 +280,6 @@ config XEN_ACPI_HOTPLUG_CPU | |||
| 287 | tristate "Xen ACPI cpu hotplug" | 280 | tristate "Xen ACPI cpu hotplug" |
| 288 | depends on XEN_DOM0 && XEN_STUB && ACPI | 281 | depends on XEN_DOM0 && XEN_STUB && ACPI |
| 289 | select ACPI_CONTAINER | 282 | select ACPI_CONTAINER |
| 290 | default n | ||
| 291 | help | 283 | help |
| 292 | Xen ACPI cpu enumerating and hotplugging | 284 | Xen ACPI cpu enumerating and hotplugging |
| 293 | 285 | ||
| @@ -316,7 +308,6 @@ config XEN_ACPI_PROCESSOR | |||
| 316 | config XEN_MCE_LOG | 308 | config XEN_MCE_LOG |
| 317 | bool "Xen platform mcelog" | 309 | bool "Xen platform mcelog" |
| 318 | depends on XEN_DOM0 && X86_64 && X86_MCE | 310 | depends on XEN_DOM0 && X86_64 && X86_MCE |
| 319 | default n | ||
| 320 | help | 311 | help |
| 321 | Allow kernel fetching MCE error from Xen platform and | 312 | Allow kernel fetching MCE error from Xen platform and |
| 322 | converting it into Linux mcelog format for mcelog tools | 313 | converting it into Linux mcelog format for mcelog tools |
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, | |||
| 76 | 76 | ||
| 77 | if (!watch_fired) { | 77 | if (!watch_fired) { |
| 78 | watch_fired = true; | 78 | watch_fired = true; |
| 79 | err = xenbus_scanf(XBT_NIL, "memory", "static-max", "%llu", | 79 | |
| 80 | &static_max); | 80 | if ((xenbus_scanf(XBT_NIL, "memory", "static-max", |
| 81 | if (err != 1) | 81 | "%llu", &static_max) == 1) || |
| 82 | static_max = new_target; | 82 | (xenbus_scanf(XBT_NIL, "memory", "memory_static_max", |
| 83 | else | 83 | "%llu", &static_max) == 1)) |
| 84 | static_max >>= PAGE_SHIFT - 10; | 84 | static_max >>= PAGE_SHIFT - 10; |
| 85 | else | ||
| 86 | static_max = new_target; | ||
| 87 | |||
| 85 | target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0 | 88 | target_diff = (xen_pv_domain() || xen_initial_domain()) ? 0 |
| 86 | : static_max - balloon_stats.target_pages; | 89 | : static_max - balloon_stats.target_pages; |
| 87 | } | 90 | } |
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, | |||
| 278 | dev_err(&dev->dev, "%s\n", printf_buffer); | 278 | dev_err(&dev->dev, "%s\n", printf_buffer); |
| 279 | 279 | ||
| 280 | path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename); | 280 | path_buffer = kasprintf(GFP_KERNEL, "error/%s", dev->nodename); |
| 281 | if (!path_buffer || | 281 | if (path_buffer) |
| 282 | xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer)) | 282 | xenbus_write(XBT_NIL, path_buffer, "error", printf_buffer); |
| 283 | dev_err(&dev->dev, "failed to write error node for %s (%s)\n", | ||
| 284 | dev->nodename, printf_buffer); | ||
| 285 | 283 | ||
| 286 | kfree(printf_buffer); | 284 | kfree(printf_buffer); |
| 287 | kfree(path_buffer); | 285 | kfree(path_buffer); |
