Commit d7c02680 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-4.19c-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fixes from Juergen Gross:
 "This contains some minor cleanups and fixes:

   - a new knob for controlling scrubbing of pages returned by the Xen
     balloon driver to the Xen hypervisor to address a boot performance
     issue seen in large guests booted pre-ballooned

   - a fix of a regression in the gntdev driver which made it impossible
     to use fully virtualized guests (HVM guests) with a 4.19 based dom0

   - a fix in Xen cpu hotplug functionality which could be triggered by
     wrong admin commands (setting number of active vcpus to 0)

  One further note: the patches have all been under test for several
  days in another branch. This branch has been rebased in order to avoid
  merge conflicts"

* tag 'for-linus-4.19c-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/gntdev: fix up blockable calls to mn_invl_range_start
  xen: fix GCC warning and remove duplicate EVTCHN_ROW/EVTCHN_COL usage
  xen: avoid crash in disable_hotplug_cpu
  xen/balloon: add runtime control for scrubbing ballooned out pages
  xen/manage: don't complain about an empty value in control/sysrq node
parents eae4f885 58a57569
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -75,3 +75,12 @@ Contact: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Description:
		Amount (in KiB) of low (or normal) memory in the
		balloon.

What:		/sys/devices/system/xen_memory/xen_memory0/scrub_pages
Date:		September 2018
KernelVersion:	4.20
Contact:	xen-devel@lists.xenproject.org
Description:
		Control scrubbing pages before returning them to Xen for others domains
		use. Can be set with xen_scrub_pages cmdline
		parameter. Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.
+6 −0
Original line number Diff line number Diff line
@@ -5000,6 +5000,12 @@
			Disables the PV optimizations forcing the HVM guest to
			run as generic HVM guest with no PV drivers.

	xen_scrub_pages=	[XEN]
			Boolean option to control scrubbing pages before giving them back
			to Xen, for use by other domains. Can be also changed at runtime
			with /sys/devices/system/xen_memory/xen_memory0/scrub_pages.
			Default value controlled with CONFIG_XEN_SCRUB_PAGES_DEFAULT.

	xirc2ps_cs=	[NET,PCMCIA]
			Format:
			<irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
+7 −3
Original line number Diff line number Diff line
@@ -79,15 +79,19 @@ config XEN_BALLOON_MEMORY_HOTPLUG_LIMIT
	  This value is used to allocate enough space in internal
	  tables needed for physical memory administration.

config XEN_SCRUB_PAGES
	bool "Scrub pages before returning them to system"
config XEN_SCRUB_PAGES_DEFAULT
	bool "Scrub pages before returning them to system by default"
	depends on XEN_BALLOON
	default y
	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
	  secure, but slightly less efficient.
	  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.
	  This option only sets the default value.

	  If in doubt, say yes.

config XEN_DEV_EVTCHN
+8 −7
Original line number Diff line number Diff line
@@ -19,16 +19,17 @@ static void enable_hotplug_cpu(int cpu)

static void disable_hotplug_cpu(int cpu)
{
	if (cpu_online(cpu)) {
	if (!cpu_is_hotpluggable(cpu))
		return;
	lock_device_hotplug();
	if (cpu_online(cpu))
		device_offline(get_cpu_device(cpu));
		unlock_device_hotplug();
	}
	if (cpu_present(cpu))
	if (!cpu_online(cpu) && cpu_present(cpu)) {
		xen_arch_unregister_cpu(cpu);

		set_cpu_present(cpu, false);
	}
	unlock_device_hotplug();
}

static int vcpu_online(unsigned int cpu)
{
+1 −1
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ static int set_evtchn_to_irq(unsigned evtchn, unsigned irq)
		clear_evtchn_to_irq_row(row);
	}

	evtchn_to_irq[EVTCHN_ROW(evtchn)][EVTCHN_COL(evtchn)] = irq;
	evtchn_to_irq[row][col] = irq;
	return 0;
}

Loading