]> Git Repo - linux.git/commitdiff
Merge tag 'for-linus-5.3a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <[email protected]>
Fri, 19 Jul 2019 18:41:26 +0000 (11:41 -0700)
committerLinus Torvalds <[email protected]>
Fri, 19 Jul 2019 18:41:26 +0000 (11:41 -0700)
Pull xen updates from Juergen Gross:
 "Fixes and features:

   - A series to introduce a common command line parameter for disabling
     paravirtual extensions when running as a guest in virtualized
     environment

   - A fix for int3 handling in Xen pv guests

   - Removal of the Xen-specific tmem driver as support of tmem in Xen
     has been dropped (and it was experimental only)

   - A security fix for running as Xen dom0 (XSA-300)

   - A fix for IRQ handling when offlining cpus in Xen guests

   - Some small cleanups"

* tag 'for-linus-5.3a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: let alloc_xenballooned_pages() fail if not enough memory free
  xen/pv: Fix a boot up hang revealed by int3 self test
  x86/xen: Add "nopv" support for HVM guest
  x86/paravirt: Remove const mark from x86_hyper_xen_hvm variable
  xen: Map "xen_nopv" parameter to "nopv" and mark it obsolete
  x86: Add "nopv" parameter to disable PV extensions
  x86/xen: Mark xen_hvm_need_lapic() and xen_x2apic_para_available() as __init
  xen: remove tmem driver
  Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"
  xen/events: fix binding user event channels to cpus

1  2 
Documentation/admin-guide/kernel-parameters.txt
drivers/xen/balloon.c

index f0461456d91033528ea0e7137b0937144a530ec7,2d990585402ccf3f1dd8971b2c80b3749265b59e..46b826fcb5ad55fed0d8ca92ab10751baabf64a9
  
        blkdevparts=    Manual partition parsing of block device(s) for
                        embedded devices based on command line input.
 -                      See Documentation/block/cmdline-partition.txt
 +                      See Documentation/block/cmdline-partition.rst
  
        boot_delay=     Milliseconds to delay each printk during boot.
                        Values larger than 10 seconds (10000) are changed to
                        [KNL, x86_64] select a region under 4G first, and
                        fall back to reserve region above 4G when '@offset'
                        hasn't been specified.
 -                      See Documentation/kdump/kdump.rst for further details.
 +                      See Documentation/admin-guide/kdump/kdump.rst for further details.
  
        crashkernel=range1:size1[,range2:size2,...][@offset]
                        [KNL] Same as above, but depends on the memory
                        in the running system. The syntax of range is
                        start-[end] where start and end are both
                        a memory unit (amount[KMG]). See also
 -                      Documentation/kdump/kdump.rst for an example.
 +                      Documentation/admin-guide/kdump/kdump.rst for an example.
  
        crashkernel=size[KMG],high
                        [KNL, x86_64] range could be above 4G. Allow kernel
                        edid/1680x1050.bin, or edid/1920x1080.bin is given
                        and no file with the same name exists. Details and
                        instructions how to build your own EDID data are
 -                      available in Documentation/EDID/howto.rst. An EDID
 +                      available in Documentation/driver-api/edid.rst. An EDID
                        data set will only be used for a particular connector,
                        if its name and a colon are prepended to the EDID
                        name. Each connector may use a unique EDID data
  
        elevator=       [IOSCHED]
                        Format: { "mq-deadline" | "kyber" | "bfq" }
 -                      See Documentation/block/deadline-iosched.txt,
 -                      Documentation/block/kyber-iosched.txt and
 -                      Documentation/block/bfq-iosched.txt for details.
 +                      See Documentation/block/deadline-iosched.rst,
 +                      Documentation/block/kyber-iosched.rst and
 +                      Documentation/block/bfq-iosched.rst for details.
  
        elfcorehdr=[size[KMG]@]offset[KMG] [IA64,PPC,SH,X86,S390]
                        Specifies physical address of start of kernel core
                        image elf header and optionally the size. Generally
                        kexec loader will pass this option to capture kernel.
 -                      See Documentation/kdump/kdump.rst for details.
 +                      See Documentation/admin-guide/kdump/kdump.rst for details.
  
        enable_mtrr_cleanup [X86]
                        The kernel tries to adjust MTRR layout from continuous
                        See also Documentation/fault-injection/.
  
        floppy=         [HW]
 -                      See Documentation/blockdev/floppy.txt.
 +                      See Documentation/admin-guide/blockdev/floppy.rst.
  
        force_pal_cache_flush
                        [IA-64] Avoid check_sal_cache_flush which may hang on
                        Built with CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF=y,
                        the default is off.
  
 +      kprobe_event=[probe-list]
 +                      [FTRACE] Add kprobe events and enable at boot time.
 +                      The probe-list is a semicolon delimited list of probe
 +                      definitions. Each definition is same as kprobe_events
 +                      interface, but the parameters are comma delimited.
 +                      For example, to add a kprobe event on vfs_read with
 +                      arg1 and arg2, add to the command line;
 +
 +                            kprobe_event=p,vfs_read,$arg1,$arg2
 +
 +                      See also Documentation/trace/kprobetrace.rst "Kernel
 +                      Boot Parameter" section.
 +
        kpti=           [ARM64] Control page table isolation of user
                        and kernel address spaces.
                        Default: enabled on cores which need mitigation.
        memblock=debug  [KNL] Enable memblock debug messages.
  
        load_ramdisk=   [RAM] List of ramdisks to load from floppy
 -                      See Documentation/blockdev/ramdisk.txt.
 +                      See Documentation/admin-guide/blockdev/ramdisk.rst.
  
        lockd.nlm_grace_period=P  [NFS] Assign grace period.
                        Format: <integer>
                        /sys/module/printk/parameters/console_suspend) to
                        turn on/off it dynamically.
  
 +      novmcoredd      [KNL,KDUMP]
 +                      Disable device dump. Device dump allows drivers to
 +                      append dump data to vmcore so you can collect driver
 +                      specified debug info.  Drivers can append the data
 +                      without any limit and this data is stored in memory,
 +                      so this may cause significant memory stress.  Disabling
 +                      device dump can help save memory but the driver debug
 +                      data will be no longer available.  This parameter
 +                      is only available when CONFIG_PROC_VMCORE_DEVICE_DUMP
 +                      is set.
 +
        noaliencache    [MM, NUMA, SLAB] Disables the allocation of alien
                        caches in the slab allocator.  Saves per-node memory,
                        but will impact performance.
        numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
                        'node', 'default' can be specified
                        This can be set from sysctl after boot.
 -                      See Documentation/sysctl/vm.txt for details.
 +                      See Documentation/admin-guide/sysctl/vm.rst for details.
  
        ohci1394_dma=early      [HW] enable debugging via the ohci1394 driver.
                        See Documentation/debugging-via-ohci1394.txt for more
  
        pcd.            [PARIDE]
                        See header of drivers/block/paride/pcd.c.
 -                      See also Documentation/blockdev/paride.txt.
 +                      See also Documentation/admin-guide/blockdev/paride.rst.
  
        pci=option[,option...]  [PCI] various PCI subsystem options.
  
                        needed on a platform with proper driver support.
  
        pd.             [PARIDE]
 -                      See Documentation/blockdev/paride.txt.
 +                      See Documentation/admin-guide/blockdev/paride.rst.
  
        pdcchassis=     [PARISC,HW] Disable/Enable PDC Chassis Status codes at
                        boot time.
                        and performance comparison.
  
        pf.             [PARIDE]
 -                      See Documentation/blockdev/paride.txt.
 +                      See Documentation/admin-guide/blockdev/paride.rst.
  
        pg.             [PARIDE]
 -                      See Documentation/blockdev/paride.txt.
 +                      See Documentation/admin-guide/blockdev/paride.rst.
  
        pirq=           [SMP,APIC] Manual mp-table setup
                        See Documentation/x86/i386/IO-APIC.rst.
  
        prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
                        before loading.
 -                      See Documentation/blockdev/ramdisk.txt.
 +                      See Documentation/admin-guide/blockdev/ramdisk.rst.
  
        psi=            [KNL] Enable or disable pressure stall information
                        tracking.
        pstore.backend= Specify the name of the pstore backend to use
  
        pt.             [PARIDE]
 -                      See Documentation/blockdev/paride.txt.
 +                      See Documentation/admin-guide/blockdev/paride.rst.
  
        pti=            [X86_64] Control Page Table Isolation of user and
                        kernel address spaces.  Disabling this feature
                        See Documentation/admin-guide/md.rst.
  
        ramdisk_size=   [RAM] Sizes of RAM disks in kilobytes
 -                      See Documentation/blockdev/ramdisk.txt.
 +                      See Documentation/admin-guide/blockdev/ramdisk.rst.
  
        random.trust_cpu={on,off}
                        [KNL] Enable or disable trusting the use of the
  
        relax_domain_level=
                        [KNL, SMP] Set scheduler's default relax_domain_level.
 -                      See Documentation/cgroup-v1/cpusets.rst.
 +                      See Documentation/admin-guide/cgroup-v1/cpusets.rst.
  
        reserve=        [KNL,BUGS] Force kernel to ignore I/O ports or memory
                        Format: <base1>,<size1>[,<base2>,<size2>,...]
                        Format: <integer>
  
        sonypi.*=       [HW] Sony Programmable I/O Control Device driver
 -                      See Documentation/laptops/sonypi.txt
 +                      See Documentation/admin-guide/laptops/sonypi.rst
  
        spectre_v2=     [X86] Control mitigation of Spectre variant 2
                        (indirect branch speculation) vulnerability.
        swapaccount=[0|1]
                        [KNL] Enable accounting of swap in memory resource
                        controller if no parameter or 1 is given or disable
 -                      it if 0 is given (See Documentation/cgroup-v1/memory.rst)
 +                      it if 0 is given (See Documentation/admin-guide/cgroup-v1/memory.rst)
  
        swiotlb=        [ARM,IA-64,PPC,MIPS,X86]
                        Format: { <int> | force | noforce }
                        Force threading of all interrupt handlers except those
                        marked explicitly IRQF_NO_THREAD.
  
-       tmem            [KNL,XEN]
-                       Enable the Transcendent memory driver if built-in.
-       tmem.cleancache=0|1 [KNL, XEN]
-                       Default is on (1). Disable the usage of the cleancache
-                       API to send anonymous pages to the hypervisor.
-       tmem.frontswap=0|1 [KNL, XEN]
-                       Default is on (1). Disable the usage of the frontswap
-                       API to send swap pages to the hypervisor. If disabled
-                       the selfballooning and selfshrinking are force disabled.
-       tmem.selfballooning=0|1 [KNL, XEN]
-                       Default is on (1). Disable the driving of swap pages
-                       to the hypervisor.
-       tmem.selfshrinking=0|1 [KNL, XEN]
-                       Default is on (1). Partial swapoff that immediately
-                       transfers pages from Xen hypervisor back to the
-                       kernel based on different criteria.
        topology=       [S390]
                        Format: {off | on}
                        Specify if the kernel should make use of the cpu
  
        vga=            [BOOT,X86-32] Select a particular video mode
                        See Documentation/x86/boot.rst and
 -                      Documentation/svga.txt.
 +                      Documentation/admin-guide/svga.rst.
                        Use vga=ask for menu.
                        This is actually a boot loader parameter; the value is
                        passed to the kernel using a special protocol.
        xen_nopv        [X86]
                        Disables the PV optimizations forcing the HVM guest to
                        run as generic HVM guest with no PV drivers.
+                       This option is obsoleted by the "nopv" option, which
+                       has equivalent effect for XEN platform.
  
        xen_scrub_pages=        [XEN]
                        Boolean option to control scrubbing pages before giving them back
                        improve timer resolution at the expense of processing
                        more timer interrupts.
  
+       nopv=           [X86,XEN,KVM,HYPER_V,VMWARE]
+                       Disables the PV optimizations forcing the guest to run
+                       as generic guest with no PV drivers. Currently support
+                       XEN HVM, KVM, HYPER_V and VMWARE guest.
        xirc2ps_cs=     [NET,PCMCIA]
                        Format:
                        <irq>,<irq_mask>,<io>,<full_duplex>,<do_sound>,<lockup_hack>[,<irq2>[,<irq3>[,<irq4>]]]
diff --combined drivers/xen/balloon.c
index 37a36c6b9f937399dadd98f948d1b3c22e7cebfd,559768dc2567b8e35ed4b0b52ed468c33a67eec2..4e11de6cde81f398ead5005c3ca003d2e1fbcfc6
@@@ -77,6 -77,9 +77,6 @@@ static int xen_hotplug_unpopulated
  
  #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
  
 -static int zero;
 -static int one = 1;
 -
  static struct ctl_table balloon_table[] = {
        {
                .procname       = "hotplug_unpopulated",
@@@ -84,8 -87,8 +84,8 @@@
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = proc_dointvec_minmax,
 -              .extra1         = &zero,
 -              .extra2         = &one,
 +              .extra1         = SYSCTL_ZERO,
 +              .extra2         = SYSCTL_ONE,
        },
        { }
  };
@@@ -535,8 -538,15 +535,15 @@@ static void balloon_process(struct work
                                state = reserve_additional_memory();
                }
  
-               if (credit < 0)
-                       state = decrease_reservation(-credit, GFP_BALLOON);
+               if (credit < 0) {
+                       long n_pages;
+                       n_pages = min(-credit, si_mem_available());
+                       state = decrease_reservation(n_pages, GFP_BALLOON);
+                       if (state == BP_DONE && n_pages != -credit &&
+                           n_pages < totalreserve_pages)
+                               state = BP_EAGAIN;
+               }
  
                state = update_schedule(state);
  
@@@ -575,6 -585,9 +582,9 @@@ static int add_ballooned_pages(int nr_p
                }
        }
  
+       if (si_mem_available() < nr_pages)
+               return -ENOMEM;
        st = decrease_reservation(nr_pages, GFP_USER);
        if (st != BP_DONE)
                return -ENOMEM;
@@@ -707,7 -720,7 +717,7 @@@ static int __init balloon_init(void
        balloon_stats.schedule_delay = 1;
        balloon_stats.max_schedule_delay = 32;
        balloon_stats.retry_count = 1;
-       balloon_stats.max_retry_count = RETRY_UNLIMITED;
+       balloon_stats.max_retry_count = 4;
  
  #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
        set_online_page_callback(&xen_online_page);
This page took 0.077661 seconds and 4 git commands to generate.