1. 09 Oct, 2018 7 commits
  2. 06 Oct, 2018 7 commits
    • Ingo Molnar's avatar
      x86/mm/doc: Enhance the x86-64 virtual memory layout descriptions · 32b89760
      Ingo Molnar authored
      After the cleanups from Baoquan He, make it even more readable:
      
       - Remove the 'bits' area size column: it's pretty pointless and was even
         wrong for some of the entries. Given that MB, GB, TB, PT are 10, 20,
         30 and 40 bits, a "8 TB" size description makes it obvious that it's
         43 bits.
      
       - Introduce an "offset" column:
      
          --------------------------------------------------------------------------------
          start addr       | offset     | end addr         |  size   | VM area description
          -----------------|------------|------------------|---------|--------------------
          ...
          ffff880000000000 | -120    TB | ffffc7ffffffffff |   64 TB | direct mapping of all physical memory (page_offset_base),
                                                                       this is what limits max physical memory supported.
      
         The -120 TB notation makes it obvious where this particular virtual memory
         region starts: 120 TB down from the top of the 64-bit virtual memory space.
         Especially the layout of the kernel mappings is a *lot* more obvious when
         written this way, plus it's much easier to compare it with the size column
         and understand/check/validate and modify the kernel's layout in the future.
      
       - Mark the part from where the 47-bit and 56-bit kernel layouts are 100% identical,
         this starts at the -512 GB offset and the EFI region.
      
       - Re-shuffle the size desciptions to be continous blocks of sizes, instead of the
         often mixed size. I.e. write "0.5 TB" instead of "512 GB" if we are still in
         the TB-granular region of the map.
      
       - Make the 47-bit and 56-bit descriptions use the *exact* same layout and wording,
         and only differ where there's a material difference. This makes it easy to compare
         the two tables side by side by switching between two terminal tabs.
      
       - Plus enhance a lot of other stylistic/typographical details: make the tables
         explicitly tabular, add headers, enhance certain entries, etc. etc.
      
      Note that there are some apparent errors in the tables as well, but I'll fix
      them in a separate patch to make it easier to review/validate.
      
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Baoquan He <bhe@redhat.com>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: corbet@lwn.net
      Cc: linux-doc@vger.kernel.org
      Cc: linux-kernel@vger.kernel.org
      Cc: thgarnie@google.com
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      32b89760
    • Baoquan He's avatar
      x86/mm/doc: Clean up the x86-64 virtual memory layout descriptions · 5b129040
      Baoquan He authored
      In Documentation/x86/x86_64/mm.txt, the description of the x86-64 virtual
      memory layout has become a confusing hodgepodge of inconsistencies:
      
       - there's a hard to read mixture of 'TB' and 'bits' notation
       - the entries sometimes mention a size in the description and sometimes not
       - sometimes they list holes by address, sometimes only as an 'unused hole' line
      
      So make it all a coherent, readable, well organized description.
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: corbet@lwn.net
      Cc: linux-doc@vger.kernel.org
      Cc: thgarnie@google.com
      Link: http://lkml.kernel.org/r/20181006084327.27467-3-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      5b129040
    • Baoquan He's avatar
      x86/KASLR: Update KERNEL_IMAGE_SIZE description · 06d4a462
      Baoquan He authored
      Currently CONFIG_RANDOMIZE_BASE=y is set by default, which makes some of the
      old comments above the KERNEL_IMAGE_SIZE definition out of date. Update them
      to the current state of affairs.
      Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@alien8.de>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Rik van Riel <riel@surriel.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: corbet@lwn.net
      Cc: linux-doc@vger.kernel.org
      Cc: thgarnie@google.com
      Link: http://lkml.kernel.org/r/20181006084327.27467-2-bhe@redhat.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
      06d4a462
    • Lianbo Jiang's avatar
      kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled · 992b649a
      Lianbo Jiang authored
      In the kdump kernel, the memory of the first kernel needs to be dumped
      into the vmcore file.
      
      If SME is enabled in the first kernel, the old memory has to be remapped
      with the memory encryption mask in order to access it properly.
      
      Split copy_oldmem_page() functionality to handle encrypted memory
      properly.
      
       [ bp: Heavily massage everything. ]
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Cc: kexec@lists.infradead.org
      Cc: tglx@linutronix.de
      Cc: mingo@redhat.com
      Cc: hpa@zytor.com
      Cc: akpm@linux-foundation.org
      Cc: dan.j.williams@intel.com
      Cc: bhelgaas@google.com
      Cc: baiyaowei@cmss.chinamobile.com
      Cc: tiwai@suse.de
      Cc: brijesh.singh@amd.com
      Cc: dyoung@redhat.com
      Cc: bhe@redhat.com
      Cc: jroedel@suse.de
      Link: https://lkml.kernel.org/r/be7b47f9-6be6-e0d1-2c2a-9125bc74b818@redhat.com
      992b649a
    • Lianbo Jiang's avatar
      iommu/amd: Remap the IOMMU device table with the memory encryption mask for kdump · 8780158c
      Lianbo Jiang authored
      The kdump kernel copies the IOMMU device table from the old device table
      which is encrypted when SME is enabled in the first kernel. So remap the
      old device table with the memory encryption mask in the kdump kernel.
      
       [ bp: Massage commit message. ]
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Acked-by: default avatarJoerg Roedel <jroedel@suse.de>
      Cc: kexec@lists.infradead.org
      Cc: tglx@linutronix.de
      Cc: mingo@redhat.com
      Cc: hpa@zytor.com
      Cc: akpm@linux-foundation.org
      Cc: dan.j.williams@intel.com
      Cc: bhelgaas@google.com
      Cc: baiyaowei@cmss.chinamobile.com
      Cc: tiwai@suse.de
      Cc: brijesh.singh@amd.com
      Cc: dyoung@redhat.com
      Cc: bhe@redhat.com
      Link: https://lkml.kernel.org/r/20180930031033.22110-4-lijiang@redhat.com
      8780158c
    • Lianbo Jiang's avatar
      kexec: Allocate decrypted control pages for kdump if SME is enabled · 9cf38d55
      Lianbo Jiang authored
      When SME is enabled in the first kernel, it needs to allocate decrypted
      pages for kdump because when the kdump kernel boots, these pages need to
      be accessed decrypted in the initial boot stage, before SME is enabled.
      
       [ bp: clean up text. ]
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Cc: kexec@lists.infradead.org
      Cc: tglx@linutronix.de
      Cc: mingo@redhat.com
      Cc: hpa@zytor.com
      Cc: akpm@linux-foundation.org
      Cc: dan.j.williams@intel.com
      Cc: bhelgaas@google.com
      Cc: baiyaowei@cmss.chinamobile.com
      Cc: tiwai@suse.de
      Cc: brijesh.singh@amd.com
      Cc: dyoung@redhat.com
      Cc: bhe@redhat.com
      Cc: jroedel@suse.de
      Link: https://lkml.kernel.org/r/20180930031033.22110-3-lijiang@redhat.com
      9cf38d55
    • Lianbo Jiang's avatar
      x86/ioremap: Add an ioremap_encrypted() helper · c3a7a61c
      Lianbo Jiang authored
      When SME is enabled, the memory is encrypted in the first kernel. In
      this case, SME also needs to be enabled in the kdump kernel, and we have
      to remap the old memory with the memory encryption mask.
      
      The case of concern here is if SME is active in the first kernel,
      and it is active too in the kdump kernel. There are four cases to be
      considered:
      
      a. dump vmcore
         It is encrypted in the first kernel, and needs be read out in the
         kdump kernel.
      
      b. crash notes
         When dumping vmcore, the people usually need to read useful
         information from notes, and the notes is also encrypted.
      
      c. iommu device table
         It's encrypted in the first kernel, kdump kernel needs to access its
         content to analyze and get information it needs.
      
      d. mmio of AMD iommu
         not encrypted in both kernels
      
      Add a new bool parameter @encrypted to __ioremap_caller(). If set,
      memory will be remapped with the SME mask.
      
      Add a new function ioremap_encrypted() to explicitly pass in a true
      value for @encrypted. Use ioremap_encrypted() for the above a, b, c
      cases.
      
       [ bp: cleanup commit message, extern defs in io.h and drop forgotten
         include. ]
      Signed-off-by: default avatarLianbo Jiang <lijiang@redhat.com>
      Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
      Reviewed-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
      Cc: kexec@lists.infradead.org
      Cc: tglx@linutronix.de
      Cc: mingo@redhat.com
      Cc: hpa@zytor.com
      Cc: akpm@linux-foundation.org
      Cc: dan.j.williams@intel.com
      Cc: bhelgaas@google.com
      Cc: baiyaowei@cmss.chinamobile.com
      Cc: tiwai@suse.de
      Cc: brijesh.singh@amd.com
      Cc: dyoung@redhat.com
      Cc: bhe@redhat.com
      Cc: jroedel@suse.de
      Link: https://lkml.kernel.org/r/20180927071954.29615-2-lijiang@redhat.com
      c3a7a61c
  3. 03 Oct, 2018 1 commit
  4. 27 Sep, 2018 19 commits
  5. 23 Sep, 2018 6 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.19-rc5 · 6bf4ca7f
      Greg Kroah-Hartman authored
      6bf4ca7f
    • Greg Kroah-Hartman's avatar
      Merge tag 'mfd-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd · d02771fb
      Greg Kroah-Hartman authored
      Lee writes:
        "MFD fixes for v4.19
         - Fix Dialog DA9063 regulator constraints issue causing failure in
           probe
         - Fix OMAP Device Tree compatible strings to match DT"
      
      * tag 'mfd-fixes-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
        mfd: omap-usb-host: Fix dts probe of children
        mfd: da9063: Fix DT probing with constraints
      d02771fb
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-linus-4.19d-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 18d49ec3
      Greg Kroah-Hartman authored
      Juergen writes:
        "xen:
         Two small fixes for xen drivers."
      
      * tag 'for-linus-4.19d-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: issue warning message when out of grant maptrack entries
        xen/x86/vpmu: Zero struct pt_regs before calling into sample handling code
      18d49ec3
    • Greg Kroah-Hartman's avatar
      Merge tag 'for-linus-20180922' of git://git.kernel.dk/linux-block · a83f87c1
      Greg Kroah-Hartman authored
      Jens writes:
        "Just a single fix in this pull request, fixing a regression in
        /proc/diskstats caused by the unification of timestamps."
      
      * tag 'for-linus-20180922' of git://git.kernel.dk/linux-block:
        block: use nanosecond resolution for iostat
      a83f87c1
    • Greg Kroah-Hartman's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 328c6333
      Greg Kroah-Hartman authored
      Thomas writes:
        "A set of fixes for x86:
      
         - Resolve the kvmclock regression on AMD systems with memory
           encryption enabled. The rework of the kvmclock memory allocation
           during early boot results in encrypted storage, which is not
           shareable with the hypervisor. Create a new section for this data
           which is mapped unencrypted and take care that the later
           allocations for shared kvmclock memory is unencrypted as well.
      
         - Fix the build regression in the paravirt code introduced by the
           recent spectre v2 updates.
      
         - Ensure that the initial static page tables cover the fixmap space
           correctly so early console always works. This worked so far by
           chance, but recent modifications to the fixmap layout can -
           depending on kernel configuration - move the relevant entries to a
           different place which is not covered by the initial static page
           tables.
      
         - Address the regressions and issues which got introduced with the
           recent extensions to the Intel Recource Director Technology code.
      
         - Update maintainer entries to document reality"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/mm: Expand static page table for fixmap space
        MAINTAINERS: Add X86 MM entry
        x86/intel_rdt: Add Reinette as co-maintainer for RDT
        MAINTAINERS: Add Borislav to the x86 maintainers
        x86/paravirt: Fix some warning messages
        x86/intel_rdt: Fix incorrect loop end condition
        x86/intel_rdt: Fix exclusive mode handling of MBA resource
        x86/intel_rdt: Fix incorrect loop end condition
        x86/intel_rdt: Do not allow pseudo-locking of MBA resource
        x86/intel_rdt: Fix unchecked MSR access
        x86/intel_rdt: Fix invalid mode warning when multiple resources are managed
        x86/intel_rdt: Global closid helper to support future fixes
        x86/intel_rdt: Fix size reporting of MBA resource
        x86/intel_rdt: Fix data type in parsing callbacks
        x86/kvm: Use __bss_decrypted attribute in shared variables
        x86/mm: Add .bss..decrypted section to hold shared variables
      328c6333
    • Greg Kroah-Hartman's avatar
      Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 52890d2a
      Greg Kroah-Hartman authored
      Thomas writes:
        "- Provide a strerror_r wrapper so lib/bpf can be built on systems
           without _GNU_SOURCE
         - Unbreak the man page generator when building out of tree"
      
      * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        perf Documentation: Fix out-of-tree asciidoctor man page generation
        tools lib bpf: Provide wrapper for strerror_r to build in !_GNU_SOURCE systems
      52890d2a