12 Dec, 2020

1 commit

  • Commit cae7ed3c2cb0 ("KVM: x86: Refactor the MMIO SPTE generation handling")
    cleaned up the computation of MMIO generation SPTE masks, however it
    introduced a bug how the upper part was encoded:
    SPTE bits 52-61 were supposed to contain bits 10-19 of the current
    generation number, however a missing shift encoded bits 1-10 there instead
    (mostly duplicating the lower part of the encoded generation number that
    then consisted of bits 1-9).

    In the meantime, the upper part was shrunk by one bit and moved by
    subsequent commits to become an upper half of the encoded generation number
    (bits 9-17 of bits 0-17 encoded in a SPTE).

    In addition to the above, commit 56871d444bc4 ("KVM: x86: fix overlap between SPTE_MMIO_MASK and generation")
    has changed the SPTE bit range assigned to encode the generation number and
    the total number of bits encoded but did not update them in the comment
    attached to their defines, nor in the KVM MMU doc.
    Let's do it here, too, since it is too trivial thing to warrant a separate
    commit.

    Fixes: cae7ed3c2cb0 ("KVM: x86: Refactor the MMIO SPTE generation handling")
    Signed-off-by: Maciej S. Szmigiero
    Message-Id:
    Cc: stable@vger.kernel.org
    [Reorganize macros so that everything is computed from the bit ranges. - Paolo]
    Signed-off-by: Paolo Bonzini

    Maciej S. Szmigiero
     

08 Nov, 2020

2 commits


29 Oct, 2020

1 commit

  • No functional change; just reserve the feature bit for now so that VMMs
    can start to implement it.

    This will allow the host to indicate that MSI emulation supports 15-bit
    destination IDs, allowing up to 32768 CPUs without interrupt remapping.

    cf. https://patchwork.kernel.org/patch/11816693/ for qemu

    Signed-off-by: David Woodhouse
    Acked-by: Paolo Bonzini
    Message-Id:
    Signed-off-by: Paolo Bonzini

    David Woodhouse
     

24 Oct, 2020

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "For x86, there is a new alternative and (in the future) more scalable
    implementation of extended page tables that does not need a reverse
    map from guest physical addresses to host physical addresses.

    For now it is disabled by default because it is still lacking a few of
    the existing MMU's bells and whistles. However it is a very solid
    piece of work and it is already available for people to hammer on it.

    Other updates:

    ARM:
    - New page table code for both hypervisor and guest stage-2
    - Introduction of a new EL2-private host context
    - Allow EL2 to have its own private per-CPU variables
    - Support of PMU event filtering
    - Complete rework of the Spectre mitigation

    PPC:
    - Fix for running nested guests with in-kernel IRQ chip
    - Fix race condition causing occasional host hard lockup
    - Minor cleanups and bugfixes

    x86:
    - allow trapping unknown MSRs to userspace
    - allow userspace to force #GP on specific MSRs
    - INVPCID support on AMD
    - nested AMD cleanup, on demand allocation of nested SVM state
    - hide PV MSRs and hypercalls for features not enabled in CPUID
    - new test for MSR_IA32_TSC writes from host and guest
    - cleanups: MMU, CPUID, shared MSRs
    - LAPIC latency optimizations ad bugfixes"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (232 commits)
    kvm: x86/mmu: NX largepage recovery for TDP MMU
    kvm: x86/mmu: Don't clear write flooding count for direct roots
    kvm: x86/mmu: Support MMIO in the TDP MMU
    kvm: x86/mmu: Support write protection for nesting in tdp MMU
    kvm: x86/mmu: Support disabling dirty logging for the tdp MMU
    kvm: x86/mmu: Support dirty logging for the TDP MMU
    kvm: x86/mmu: Support changed pte notifier in tdp MMU
    kvm: x86/mmu: Add access tracking for tdp_mmu
    kvm: x86/mmu: Support invalidate range MMU notifier for TDP MMU
    kvm: x86/mmu: Allocate struct kvm_mmu_pages for all pages in TDP MMU
    kvm: x86/mmu: Add TDP MMU PF handler
    kvm: x86/mmu: Remove disallowed_hugepage_adjust shadow_walk_iterator arg
    kvm: x86/mmu: Support zapping SPTEs in the TDP MMU
    KVM: Cache as_id in kvm_memory_slot
    kvm: x86/mmu: Add functions to handle changed TDP SPTEs
    kvm: x86/mmu: Allocate and free TDP MMU roots
    kvm: x86/mmu: Init / Uninit the TDP MMU
    kvm: x86/mmu: Introduce tdp_iter
    KVM: mmu: extract spte.h and spte.c
    KVM: mmu: Separate updating a PTE from kvm_set_pte_rmapp
    ...

    Linus Torvalds
     

22 Oct, 2020

5 commits

  • Reviewed-by: Jim Mattson
    Reviewed-by: Peter Shier
    Signed-off-by: Oliver Upton
    Change-Id: I0c6355b09fedf8f9cc4cc5f51be418e2c1c82b7b
    Message-Id:
    Signed-off-by: Paolo Bonzini

    Oliver Upton
     
  • KVM unconditionally provides PV features to the guest, regardless of the
    configured CPUID. An unwitting guest that doesn't check
    KVM_CPUID_FEATURES before use could access paravirt features that
    userspace did not intend to provide. Fix this by checking the guest's
    CPUID before performing any paravirtual operations.

    Introduce a capability, KVM_CAP_ENFORCE_PV_FEATURE_CPUID, to gate the
    aforementioned enforcement. Migrating a VM from a host w/o this patch to
    a host with this patch could silently change the ABI exposed to the
    guest, warranting that we default to the old behavior and opt-in for
    the new one.

    Reviewed-by: Jim Mattson
    Reviewed-by: Peter Shier
    Signed-off-by: Oliver Upton
    Change-Id: I202a0926f65035b872bfe8ad15307c026de59a98
    Message-Id:
    Reviewed-by: Wanpeng Li
    Signed-off-by: Paolo Bonzini

    Oliver Upton
     
  • Fixes: e287d6de62f74 ("Documentation: kvm: Convert cpuid.txt to .rst")
    Signed-off-by: Li Qiang
    Message-Id:
    Signed-off-by: Paolo Bonzini

    Li Qiang
     
  • Allowing userspace to intercept reads to x2APIC MSRs when APICV is
    fully enabled for the guest simply can't work. But more in general,
    the LAPIC could be set to in-kernel after the MSR filter is setup
    and allowing accesses by userspace would be very confusing.

    We could in principle allow userspace to intercept reads and writes to TPR,
    and writes to EOI and SELF_IPI, but while that could be made it work, it
    would still be silly.

    Cc: Alexander Graf
    Cc: Aaron Lewis
    Cc: Peter Xu
    Cc: Sean Christopherson
    Signed-off-by: Paolo Bonzini

    Paolo Bonzini
     
  • Rework the resetting of the MSR bitmap for x2APIC MSRs to ignore userspace
    filtering. Allowing userspace to intercept reads to x2APIC MSRs when
    APICV is fully enabled for the guest simply can't work; the LAPIC and thus
    virtual APIC is in-kernel and cannot be directly accessed by userspace.
    To keep things simple we will in fact forbid intercepting x2APIC MSRs
    altogether, independent of the default_allow setting.

    Cc: Alexander Graf
    Cc: Aaron Lewis
    Cc: Peter Xu
    Signed-off-by: Sean Christopherson
    Message-Id:
    [Modified to operate even if APICv is disabled, adjust documentation. - Paolo]
    Signed-off-by: Paolo Bonzini

    Sean Christopherson
     

20 Oct, 2020

1 commit


17 Oct, 2020

1 commit

  • Pull documentation updates from Mauro Carvalho Chehab:
    "A series of patches addressing warnings produced by make htmldocs.
    This includes:

    - kernel-doc markup fixes

    - ReST fixes

    - Updates at the build system in order to support newer versions of
    the docs build toolchain (Sphinx)

    After this series, the number of html build warnings should reduce
    significantly, and building with Sphinx 3.1 or later should now be
    supported (although it is still recommended to use Sphinx 2.4.4).

    As agreed with Jon, I should be sending you a late pull request by the
    end of the merge window addressing remaining issues with docs build,
    as there are a number of warning fixes that depends on pull requests
    that should be happening along the merge window.

    The end goal is to have a clean htmldocs build on Kernel 5.10.

    PS. It should be noticed that Sphinx 3.0 is not currently supported,
    as it lacks support for C domain namespaces. Such feature, needed in
    order to document uAPI system calls with Sphinx 3.x, was added only on
    Sphinx 3.1"

    * tag 'docs/v5.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (75 commits)
    PM / devfreq: remove a duplicated kernel-doc markup
    mm/doc: fix a literal block markup
    workqueue: fix a kernel-doc warning
    docs: virt: user_mode_linux_howto_v2.rst: fix a literal block markup
    Input: sparse-keymap: add a description for @sw
    rcu/tree: docs: document bkvcache new members at struct kfree_rcu_cpu
    nl80211: docs: add a description for s1g_cap parameter
    usb: docs: document altmode register/unregister functions
    kunit: test.h: fix a bad kernel-doc markup
    drivers: core: fix kernel-doc markup for dev_err_probe()
    docs: bio: fix a kerneldoc markup
    kunit: test.h: solve kernel-doc warnings
    block: bio: fix a warning at the kernel-doc markups
    docs: powerpc: syscall64-abi.rst: fix a malformed table
    drivers: net: hamradio: fix document location
    net: appletalk: Kconfig: Fix docs location
    dt-bindings: fix references to files converted to yaml
    memblock: get rid of a :c:type leftover
    math64.h: kernel-docs: Convert some markups into normal comments
    media: uAPI: buffer.rst: remove a left-over documentation
    ...

    Linus Torvalds
     

16 Oct, 2020

2 commits

  • There's a missing new line for a literal block:

    .../Documentation/virt/uml/user_mode_linux_howto_v2.rst:682: WARNING: Unexpected indentation.

    Fixes: 04301bf5b072 ("docs: replace the old User Mode Linux HowTo with a new one")
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Pull char/misc driver updates from Greg KH:
    "Here is the big set of char, misc, and other assorted driver subsystem
    patches for 5.10-rc1.

    There's a lot of different things in here, all over the drivers/
    directory. Some summaries:

    - soundwire driver updates

    - habanalabs driver updates

    - extcon driver updates

    - nitro_enclaves new driver

    - fsl-mc driver and core updates

    - mhi core and bus updates

    - nvmem driver updates

    - eeprom driver updates

    - binder driver updates and fixes

    - vbox minor bugfixes

    - fsi driver updates

    - w1 driver updates

    - coresight driver updates

    - interconnect driver updates

    - misc driver updates

    - other minor driver updates

    All of these have been in linux-next for a while with no reported
    issues"

    * tag 'char-misc-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (396 commits)
    binder: fix UAF when releasing todo list
    docs: w1: w1_therm: Fix broken xref, mistakes, clarify text
    misc: Kconfig: fix a HISI_HIKEY_USB dependency
    LSM: Fix type of id parameter in kernel_post_load_data prototype
    misc: Kconfig: add a new dependency for HISI_HIKEY_USB
    firmware_loader: fix a kernel-doc markup
    w1: w1_therm: make w1_poll_completion static
    binder: simplify the return expression of binder_mmap
    test_firmware: Test partial read support
    firmware: Add request_partial_firmware_into_buf()
    firmware: Store opt_flags in fw_priv
    fs/kernel_file_read: Add "offset" arg for partial reads
    IMA: Add support for file reads without contents
    LSM: Add "contents" flag to kernel_read_file hook
    module: Call security_kernel_post_load_data()
    firmware_loader: Use security_post_load_data()
    LSM: Introduce kernel_post_load_data() hook
    fs/kernel_read_file: Add file_size output argument
    fs/kernel_read_file: Switch buffer size arg to size_t
    fs/kernel_read_file: Remove redundant size argument
    ...

    Linus Torvalds
     

13 Oct, 2020

2 commits

  • Pull documentation updates from Jonathan Corbet:
    "As hoped, things calmed down for docs this cycle; fewer changes and
    almost no conflicts at all. This includes:

    - A reworked and expanded user-mode Linux document

    - Some simplifications and improvements for submitting-patches.rst

    - An emergency fix for (some) problems with Sphinx 3.x

    - Some welcome automarkup improvements to automatically generate
    cross-references to struct definitions and other documents

    - The usual collection of translation updates, typo fixes, etc"

    * tag 'docs-5.10' of git://git.lwn.net/linux: (81 commits)
    gpiolib: Update indentation in driver.rst for code excerpts
    Documentation/admin-guide: tainted-kernels: Fix typo occured
    Documentation: better locations for sysfs-pci, sysfs-tagging
    docs: programming-languages: refresh blurb on clang support
    Documentation: kvm: fix a typo
    Documentation: Chinese translation of Documentation/arm64/amu.rst
    doc: zh_CN: index files in arm64 subdirectory
    mailmap: add entry for
    doc: seq_file: clarify role of *pos in ->next()
    docs: trace: ring-buffer-design.rst: use the new SPDX tag
    Documentation: kernel-parameters: clarify "module." parameters
    Fix references to nommu-mmap.rst
    docs: rewrite admin-guide/sysctl/abi.rst
    docs: fb: Remove vesafb scrollback boot option
    docs: fb: Remove sstfb scrollback boot option
    docs: fb: Remove matroxfb scrollback boot option
    docs: fb: Remove framebuffer scrollback boot option
    docs: replace the old User Mode Linux HowTo with a new one
    Documentation/admin-guide: blockdev/ramdisk: remove use of "rdev"
    Documentation/admin-guide: README & svga: remove use of "rdev"
    ...

    Linus Torvalds
     
  • Pull arm64 updates from Will Deacon:
    "There's quite a lot of code here, but much of it is due to the
    addition of a new PMU driver as well as some arm64-specific selftests
    which is an area where we've traditionally been lagging a bit.

    In terms of exciting features, this includes support for the Memory
    Tagging Extension which narrowly missed 5.9, hopefully allowing
    userspace to run with use-after-free detection in production on CPUs
    that support it. Work is ongoing to integrate the feature with KASAN
    for 5.11.

    Another change that I'm excited about (assuming they get the hardware
    right) is preparing the ASID allocator for sharing the CPU page-table
    with the SMMU. Those changes will also come in via Joerg with the
    IOMMU pull.

    We do stray outside of our usual directories in a few places, mostly
    due to core changes required by MTE. Although much of this has been
    Acked, there were a couple of places where we unfortunately didn't get
    any review feedback.

    Other than that, we ran into a handful of minor conflicts in -next,
    but nothing that should post any issues.

    Summary:

    - Userspace support for the Memory Tagging Extension introduced by
    Armv8.5. Kernel support (via KASAN) is likely to follow in 5.11.

    - Selftests for MTE, Pointer Authentication and FPSIMD/SVE context
    switching.

    - Fix and subsequent rewrite of our Spectre mitigations, including
    the addition of support for PR_SPEC_DISABLE_NOEXEC.

    - Support for the Armv8.3 Pointer Authentication enhancements.

    - Support for ASID pinning, which is required when sharing
    page-tables with the SMMU.

    - MM updates, including treating flush_tlb_fix_spurious_fault() as a
    no-op.

    - Perf/PMU driver updates, including addition of the ARM CMN PMU
    driver and also support to handle CPU PMU IRQs as NMIs.

    - Allow prefetchable PCI BARs to be exposed to userspace using normal
    non-cacheable mappings.

    - Implementation of ARCH_STACKWALK for unwinding.

    - Improve reporting of unexpected kernel traps due to BPF JIT
    failure.

    - Improve robustness of user-visible HWCAP strings and their
    corresponding numerical constants.

    - Removal of TEXT_OFFSET.

    - Removal of some unused functions, parameters and prototypes.

    - Removal of MPIDR-based topology detection in favour of firmware
    description.

    - Cleanups to handling of SVE and FPSIMD register state in
    preparation for potential future optimisation of handling across
    syscalls.

    - Cleanups to the SDEI driver in preparation for support in KVM.

    - Miscellaneous cleanups and refactoring work"

    * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (148 commits)
    Revert "arm64: initialize per-cpu offsets earlier"
    arm64: random: Remove no longer needed prototypes
    arm64: initialize per-cpu offsets earlier
    kselftest/arm64: Check mte tagged user address in kernel
    kselftest/arm64: Verify KSM page merge for MTE pages
    kselftest/arm64: Verify all different mmap MTE options
    kselftest/arm64: Check forked child mte memory accessibility
    kselftest/arm64: Verify mte tag inclusion via prctl
    kselftest/arm64: Add utilities and a test to validate mte memory
    perf: arm-cmn: Fix conversion specifiers for node type
    perf: arm-cmn: Fix unsigned comparison to less than zero
    arm64: dbm: Invalidate local TLB when setting TCR_EL1.HD
    arm64: mm: Make flush_tlb_fix_spurious_fault() a no-op
    arm64: Add support for PR_SPEC_DISABLE_NOEXEC prctl() option
    arm64: Pull in task_stack_page() to Spectre-v4 mitigation code
    KVM: arm64: Allow patching EL2 vectors even with KASLR is not enabled
    arm64: Get rid of arm64_ssbd_state
    KVM: arm64: Convert ARCH_WORKAROUND_2 to arm64_get_spectre_v4_state()
    KVM: arm64: Get rid of kvm_arm_have_ssbd()
    KVM: arm64: Simplify handling of ARCH_WORKAROUND_2
    ...

    Linus Torvalds
     

05 Oct, 2020

1 commit

  • Fixes: 9824c83f92bc8 ("Documentation: kvm: document CPUID bit for MSR_KVM_POLL_CONTROL")
    Signed-off-by: Li Qiang
    Link: https://lore.kernel.org/r/20201002150422.6267-1-liq3ea@163.com
    Signed-off-by: Jonathan Corbet

    Li Qiang
     

02 Oct, 2020

2 commits

  • Signed-off-by: Marc Zyngier

    Marc Zyngier
     
  • As warned with make htmldocs:

    .../Documentation/virt/kvm/devices/vcpu.rst:70: WARNING: Malformed table.
    Text in column margin in table line 2.

    ======= ======================================================
    -ENODEV: PMUv3 not supported or GIC not initialized
    -ENXIO: PMUv3 not properly configured or in-kernel irqchip not
    configured as required prior to calling this attribute
    -EBUSY: PMUv3 already initialized
    -EINVAL: Invalid filter range
    ======= ======================================================

    The ':' character for two lines are above the size of the column.
    Besides that, other tables at the file doesn't use ':', so
    just drop them.

    While here, also fix this warning also introduced at the same patch:

    .../Documentation/virt/kvm/devices/vcpu.rst:88: WARNING: Block quote ends without a blank line; unexpected unindent.

    By marking the C code as a literal block.

    Fixes: 8be86a5eec04 ("KVM: arm64: Document PMU filtering API")
    Signed-off-by: Mauro Carvalho Chehab
    Signed-off-by: Marc Zyngier
    Acked-by: Paolo Bonzini
    Link: https://lore.kernel.org/r/b5385dd0213f1f070667925bf7a807bf5270ba78.1601616399.git.mchehab+huawei@kernel.org

    Mauro Carvalho Chehab
     

29 Sep, 2020

4 commits


28 Sep, 2020

3 commits

  • It's not desireable to have all MSRs always handled by KVM kernel space. Some
    MSRs would be useful to handle in user space to either emulate behavior (like
    uCode updates) or differentiate whether they are valid based on the CPU model.

    To allow user space to specify which MSRs it wants to see handled by KVM,
    this patch introduces a new ioctl to push filter rules with bitmaps into
    KVM. Based on these bitmaps, KVM can then decide whether to reject MSR access.
    With the addition of KVM_CAP_X86_USER_SPACE_MSR it can also deflect the
    denied MSR events to user space to operate on.

    If no filter is populated, MSR handling stays identical to before.

    Signed-off-by: Alexander Graf

    Message-Id:
    Signed-off-by: Paolo Bonzini

    Alexander Graf
     
  • MSRs are weird. Some of them are normal control registers, such as EFER.
    Some however are registers that really are model specific, not very
    interesting to virtualization workloads, and not performance critical.
    Others again are really just windows into package configuration.

    Out of these MSRs, only the first category is necessary to implement in
    kernel space. Rarely accessed MSRs, MSRs that should be fine tunes against
    certain CPU models and MSRs that contain information on the package level
    are much better suited for user space to process. However, over time we have
    accumulated a lot of MSRs that are not the first category, but still handled
    by in-kernel KVM code.

    This patch adds a generic interface to handle WRMSR and RDMSR from user
    space. With this, any future MSR that is part of the latter categories can
    be handled in user space.

    Furthermore, it allows us to replace the existing "ignore_msrs" logic with
    something that applies per-VM rather than on the full system. That way you
    can run productive VMs in parallel to experimental ones where you don't care
    about proper MSR handling.

    Signed-off-by: Alexander Graf
    Reviewed-by: Jim Mattson

    Message-Id:
    Signed-off-by: Paolo Bonzini

    Alexander Graf
     
  • We forgot to update KVM_GET_SUPPORTED_HV_CPUID's documentation in api.rst
    when SynDBG leaves were added.

    While on it, fix 'KVM_GET_SUPPORTED_CPUID' copy-paste error.

    Fixes: f97f5a56f597 ("x86/kvm/hyper-v: Add support for synthetic debugger interface")
    Signed-off-by: Vitaly Kuznetsov
    Message-Id:
    Signed-off-by: Paolo Bonzini

    Vitaly Kuznetsov
     

25 Sep, 2020

1 commit

  • The new HowTo migrates the portions of the old howto which
    are still relevant to a new document, updates them to linux 5.x
    and adds documentation for vector transports and other new
    features.

    Signed-off-by: Anton Ivanov
    Link: https://lore.kernel.org/r/20200917103557.26063-1-anton.ivanov@cambridgegreys.com
    Signed-off-by: Jonathan Corbet

    Anton Ivanov
     

22 Sep, 2020

1 commit

  • Add documentation on the overview of Nitro Enclaves. Include it in the
    virtualization specific directory.

    Changelog

    v9 -> v10

    * Update commit message to include the changelog before the SoB tag(s).

    v8 -> v9

    * Move the Nitro Enclaves documentation to the "virt" directory and add
    an entry for it in the corresponding index file.

    v7 -> v8

    * Add info about the primary / parent VM CID value.
    * Update reference link for huge pages.
    * Add reference link for the x86 boot protocol.
    * Add license mention and update doc title / chapter formatting.

    v6 -> v7

    * No changes.

    v5 -> v6

    * No changes.

    v4 -> v5

    * No changes.

    v3 -> v4

    * Update doc type from .txt to .rst.
    * Update documentation based on the changes from v4.

    v2 -> v3

    * No changes.

    v1 -> v2

    * New in v2.

    Reviewed-by: Alexander Graf
    Signed-off-by: Andra Paraschiv
    Link: https://lore.kernel.org/r/20200921121732.44291-18-andraprs@amazon.com
    Signed-off-by: Greg Kroah-Hartman

    Andra Paraschiv
     

14 Sep, 2020

1 commit


12 Sep, 2020

1 commit

  • Besides disabling MMU, HVC_SOFT_RESTART also clears I+D bits. These behaviors
    are what kexec-reboot expects, so describe it more precisely.

    Signed-off-by: Pingfan Liu
    Cc: James Morse
    Cc: Marc Zyngier
    Cc: Geoff Levand
    Cc: Catalin Marinas
    Cc: Will Deacon
    Cc: Julien Thierry
    Cc: Suzuki K Poulose
    Cc: linux-doc@vger.kernel.org
    Cc: kvmarm@lists.cs.columbia.edu
    Link: https://lore.kernel.org/r/1598621998-20563-2-git-send-email-kernelfans@gmail.com
    To: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Will Deacon

    Pingfan Liu
     

11 Sep, 2020

1 commit

  • There are some warnings:

    Documentation/virt/kvm/api.rst:4354: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/virt/kvm/api.rst:4358: WARNING: Definition list ends without a blank line; unexpected unindent.
    Documentation/virt/kvm/api.rst:4363: WARNING: Definition list ends without a blank line; unexpected unindent.

    Produced by the lack of identation on a single line. That
    caused the literal block to end prematurely.

    Signed-off-by: Mauro Carvalho Chehab
    Link: https://lore.kernel.org/r/b6b3679b6c2329dc9b16d397c289b5ade0184c63.1599660067.git.mchehab+huawei@kernel.org
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

10 Sep, 2020

1 commit

  • The actual symbol that is exported and usable is
    'KVM_MEMORY_ENCRYPT_OP', not 'KVM_MEM_ENCRYPT_OP'

    $ git grep -l KVM_MEM_ENCRYPT_OP
    Documentation/virt/kvm/amd-memory-encryption.rst

    $ git grep -l KVM_MEMORY_ENCRYPT_OP
    Documentation/virt/kvm/api.rst
    arch/x86/kvm/x86.c
    include/uapi/linux/kvm.h
    tools/include/uapi/linux/kvm.h

    While we're in there, update the KVM API category for
    KVM_MEMORY_ENCRYPT_OP. It is called on a VM file descriptor.

    Signed-off-by: Connor Kuehl
    Link: https://lore.kernel.org/r/20200819211952.251984-1-ckuehl@redhat.com
    Signed-off-by: Jonathan Corbet

    Connor Kuehl
     

21 Aug, 2020

2 commits

  • arm64 requires a vcpu fd (KVM_HAS_DEVICE_ATTR vcpu ioctl) to probe
    support for steal-time. However this is unnecessary, as only a KVM
    fd is required, and it complicates userspace (userspace may prefer
    delaying vcpu creation until after feature probing). Introduce a cap
    that can be checked instead. While x86 can already probe steal-time
    support with a kvm fd (KVM_GET_SUPPORTED_CPUID), we add the cap there
    too for consistency.

    Signed-off-by: Andrew Jones
    Signed-off-by: Marc Zyngier
    Reviewed-by: Steven Price
    Link: https://lore.kernel.org/r/20200804170604.42662-7-drjones@redhat.com

    Andrew Jones
     
  • In preparation for documenting a new capability let's fix up the
    formatting of the current ones.

    Signed-off-by: Andrew Jones
    Signed-off-by: Marc Zyngier
    Reviewed-by: Steven Price
    Link: https://lore.kernel.org/r/20200804170604.42662-6-drjones@redhat.com

    Andrew Jones
     

08 Aug, 2020

1 commit

  • Pull powerpc updates from Michael Ellerman:

    - Add support for (optionally) using queued spinlocks & rwlocks.

    - Support for a new faster system call ABI using the scv instruction on
    Power9 or later.

    - Drop support for the PROT_SAO mmap/mprotect flag as it will be
    unsupported on Power10 and future processors, leaving us with no way
    to implement the functionality it requests. This risks breaking
    userspace, though we believe it is unused in practice.

    - A bug fix for, and then the removal of, our custom stack expansion
    checking. We now allow stack expansion up to the rlimit, like other
    architectures.

    - Remove the remnants of our (previously disabled) topology update
    code, which tried to react to NUMA layout changes on virtualised
    systems, but was prone to crashes and other problems.

    - Add PMU support for Power10 CPUs.

    - A change to our signal trampoline so that we don't unbalance the link
    stack (branch return predictor) in the signal delivery path.

    - Lots of other cleanups, refactorings, smaller features and so on as
    usual.

    Thanks to: Abhishek Goel, Alastair D'Silva, Alexander A. Klimov, Alexey
    Kardashevskiy, Alistair Popple, Andrew Donnellan, Aneesh Kumar K.V, Anju
    T Sudhakar, Anton Blanchard, Arnd Bergmann, Athira Rajeev, Balamuruhan
    S, Bharata B Rao, Bill Wendling, Bin Meng, Cédric Le Goater, Chris
    Packham, Christophe Leroy, Christoph Hellwig, Daniel Axtens, Dan
    Williams, David Lamparter, Desnes A. Nunes do Rosario, Erhard F., Finn
    Thain, Frederic Barrat, Ganesh Goudar, Gautham R. Shenoy, Geoff Levand,
    Greg Kurz, Gustavo A. R. Silva, Hari Bathini, Harish, Imre Kaloz, Joel
    Stanley, Joe Perches, John Crispin, Jordan Niethe, Kajol Jain, Kamalesh
    Babulal, Kees Cook, Laurent Dufour, Leonardo Bras, Li RongQing, Madhavan
    Srinivasan, Mahesh Salgaonkar, Mark Cave-Ayland, Michal Suchanek, Milton
    Miller, Mimi Zohar, Murilo Opsfelder Araujo, Nathan Chancellor, Nathan
    Lynch, Naveen N. Rao, Nayna Jain, Nicholas Piggin, Oliver O'Halloran,
    Palmer Dabbelt, Pedro Miraglia Franco de Carvalho, Philippe Bergheaud,
    Pingfan Liu, Pratik Rajesh Sampat, Qian Cai, Qinglang Miao, Randy
    Dunlap, Ravi Bangoria, Sachin Sant, Sam Bobroff, Sandipan Das, Santosh
    Sivaraj, Satheesh Rajendran, Shirisha Ganta, Sourabh Jain, Srikar
    Dronamraju, Stan Johnson, Stephen Rothwell, Thadeu Lima de Souza
    Cascardo, Thiago Jung Bauermann, Tom Lane, Vaibhav Jain, Vladis Dronov,
    Wei Yongjun, Wen Xiong, YueHaibing.

    * tag 'powerpc-5.9-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (337 commits)
    selftests/powerpc: Fix pkey syscall redefinitions
    powerpc: Fix circular dependency between percpu.h and mmu.h
    powerpc/powernv/sriov: Fix use of uninitialised variable
    selftests/powerpc: Skip vmx/vsx/tar/etc tests on older CPUs
    powerpc/40x: Fix assembler warning about r0
    powerpc/papr_scm: Add support for fetching nvdimm 'fuel-gauge' metric
    powerpc/papr_scm: Fetch nvdimm performance stats from PHYP
    cpuidle: pseries: Fixup exit latency for CEDE(0)
    cpuidle: pseries: Add function to parse extended CEDE records
    cpuidle: pseries: Set the latency-hint before entering CEDE
    selftests/powerpc: Fix online CPU selection
    powerpc/perf: Consolidate perf_callchain_user_[64|32]()
    powerpc/pseries/hotplug-cpu: Remove double free in error path
    powerpc/pseries/mobility: Add pr_debug() for device tree changes
    powerpc/pseries/mobility: Set pr_fmt()
    powerpc/cacheinfo: Warn if cache object chain becomes unordered
    powerpc/cacheinfo: Improve diagnostics about malformed cache lists
    powerpc/cacheinfo: Use name@unit instead of full DT path in debug messages
    powerpc/cacheinfo: Set pr_fmt()
    powerpc: fix function annotations to avoid section mismatch warnings with gcc-10
    ...

    Linus Torvalds
     

07 Aug, 2020

1 commit

  • Pull KVM updates from Paolo Bonzini:
    "s390:
    - implement diag318

    x86:
    - Report last CPU for debugging
    - Emulate smaller MAXPHYADDR in the guest than in the host
    - .noinstr and tracing fixes from Thomas
    - nested SVM page table switching optimization and fixes

    Generic:
    - Unify shadow MMU cache data structures across architectures"

    * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (127 commits)
    KVM: SVM: Fix sev_pin_memory() error handling
    KVM: LAPIC: Set the TDCR settable bits
    KVM: x86: Specify max TDP level via kvm_configure_mmu()
    KVM: x86/mmu: Rename max_page_level to max_huge_page_level
    KVM: x86: Dynamically calculate TDP level from max level and MAXPHYADDR
    KVM: VXM: Remove temporary WARN on expected vs. actual EPTP level mismatch
    KVM: x86: Pull the PGD's level from the MMU instead of recalculating it
    KVM: VMX: Make vmx_load_mmu_pgd() static
    KVM: x86/mmu: Add separate helper for shadow NPT root page role calc
    KVM: VMX: Drop a duplicate declaration of construct_eptp()
    KVM: nSVM: Correctly set the shadow NPT root level in its MMU role
    KVM: Using macros instead of magic values
    MIPS: KVM: Fix build error caused by 'kvm_run' cleanup
    KVM: nSVM: remove nonsensical EXITINFO1 adjustment on nested NPF
    KVM: x86: Add a capability for GUEST_MAXPHYADDR < HOST_MAXPHYADDR support
    KVM: VMX: optimize #PF injection when MAXPHYADDR does not match
    KVM: VMX: Add guest physical address check in EPT violation and misconfig
    KVM: VMX: introduce vmx_need_pf_intercept
    KVM: x86: update exception bitmap on CPUID changes
    KVM: x86: rename update_bp_intercept to update_exception_bitmap
    ...

    Linus Torvalds
     

05 Aug, 2020

1 commit

  • Pull documentation updates from Jonathan Corbet:
    "It's been a busy cycle for documentation - hopefully the busiest for a
    while to come. Changes include:

    - Some new Chinese translations

    - Progress on the battle against double words words and non-HTTPS
    URLs

    - Some block-mq documentation

    - More RST conversions from Mauro. At this point, that task is
    essentially complete, so we shouldn't see this kind of churn again
    for a while. Unless we decide to switch to asciidoc or
    something...:)

    - Lots of typo fixes, warning fixes, and more"

    * tag 'docs-5.9' of git://git.lwn.net/linux: (195 commits)
    scripts/kernel-doc: optionally treat warnings as errors
    docs: ia64: correct typo
    mailmap: add entry for
    doc/zh_CN: add cpu-load Chinese version
    Documentation/admin-guide: tainted-kernels: fix spelling mistake
    MAINTAINERS: adjust kprobes.rst entry to new location
    devices.txt: document rfkill allocation
    PCI: correct flag name
    docs: filesystems: vfs: correct flag name
    docs: filesystems: vfs: correct sync_mode flag names
    docs: path-lookup: markup fixes for emphasis
    docs: path-lookup: more markup fixes
    docs: path-lookup: fix HTML entity mojibake
    CREDITS: Replace HTTP links with HTTPS ones
    docs: process: Add an example for creating a fixes tag
    doc/zh_CN: add Chinese translation prefer section
    doc/zh_CN: add clearing-warn-once Chinese version
    doc/zh_CN: add admin-guide index
    doc:it_IT: process: coding-style.rst: Correct __maybe_unused compiler label
    futex: MAINTAINERS: Re-add selftests directory
    ...

    Linus Torvalds
     

22 Jul, 2020

1 commit

  • Power ISA v3.1 has added new performance monitoring unit (PMU) special
    purpose registers (SPRs). They are:

    Monitor Mode Control Register 3 (MMCR3)
    Sampled Instruction Event Register A (SIER2)
    Sampled Instruction Event Register B (SIER3)

    Add support to save/restore these new SPRs while entering/exiting
    guest. Also include changes to support KVM_REG_PPC_MMCR3/SIER2/SIER3.
    Add new SPRs to KVM API documentation.

    Signed-off-by: Athira Rajeev
    Signed-off-by: Michael Ellerman
    Link: https://lore.kernel.org/r/1594996707-3727-6-git-send-email-atrajeev@linux.vnet.ibm.com

    Athira Rajeev
     

13 Jul, 2020

2 commits

  • Drop the duplicated word "struct".

    Signed-off-by: Randy Dunlap
    Cc: Jonathan Corbet
    Cc: linux-doc@vger.kernel.org
    Cc: Paolo Bonzini
    Cc: kvm@vger.kernel.org
    Link: https://lore.kernel.org/r/20200707180414.10467-21-rdunlap@infradead.org
    Signed-off-by: Jonathan Corbet

    Randy Dunlap
     
  • Rationale:
    Reduces attack surface on kernel devs opening the links for MITM
    as HTTPS traffic is much harder to manipulate.

    Deterministic algorithm:
    For each file:
    If not .svg:
    For each line:
    If doesn't contain `\bxmlns\b`:
    For each link, `\bhttp://[^# \t\r\n]*(?:\w|/)`:
    If neither `\bgnu\.org/license`, nor `\bmozilla\.org/MPL\b`:
    If both the HTTP and HTTPS versions
    return 200 OK and serve the same content:
    Replace HTTP with HTTPS.

    Signed-off-by: Alexander A. Klimov
    Link: https://lore.kernel.org/r/20200713114719.33839-1-grandmaster@al2klimov.de
    Signed-off-by: Jonathan Corbet

    Alexander A. Klimov