[PATCH v2 0/4] mm: Break COW for pinned pages during fork()

2020-09-25 Thread Peter Xu
Due to the rebase to latest rc6, the major pte copy patch changed a lot. So maybe not that useful to write a changelog any more. However all the comments should be addressed as long as discussed in previous thread. Please shoot if I missed anything important. This series is majorly inspired by

[PATCH v2 2/4] mm/fork: Pass new vma pointer into copy_page_range()

2020-09-25 Thread Peter Xu
This prepares for the future work to trigger early cow on pinned pages during fork(). No functional change intended. Signed-off-by: Peter Xu --- include/linux/mm.h | 2 +- kernel/fork.c | 2 +- mm/memory.c| 14 +- 3 files changed, 11 insertions(+), 7 deletions(-)

Re: [PATCH 0/3 v2] tracing/mm: Add tracepoint_enabled() helper function for headers

2020-09-25 Thread Mathieu Desnoyers
No worries, I'll get it from lore. Thanks, Mathieu - Steven Rostedt wrote: > > Bah, My cut-and-paste of my "quilt mail --send" chopped off Mathieu's email. > > Mathieu, I didn't meant to not Cc you on this. Do you need me to bounce > the rest to you or you can get it from lore? > > --

Re: [PATCH v2 0/4] [RFC] Implement Trampoline File Descriptor

2020-09-25 Thread Madhavan T. Venkataraman
On 9/24/20 3:52 PM, Florian Weimer wrote: > * Madhavan T. Venkataraman: > >> Otherwise, using an ABI quirk or a calling convention side effect to >> load the PC into a GPR is, IMO, non-standard or non-compliant or >> non-approved or whatever you want to call it. I would be >> conservative and

Re: [PATCH v8 5/8] KVM: x86: SVM: Prevent MSR passthrough when MSR access is denied

2020-09-25 Thread Paolo Bonzini
On 25/09/20 16:34, Alexander Graf wrote: > We will introduce the concept of MSRs that may not be handled in kernel > space soon. Some MSRs are directly passed through to the guest, effectively > making them handled by KVM from user space's point of view. > > This patch introduces all logic

Re: [RFC Patch 0/2] KVM: SVM: Cgroup support for SVM SEV ASIDs

2020-09-25 Thread Vipin Sharma
On Thu, Sep 24, 2020 at 02:55:18PM -0500, Tom Lendacky wrote: > On 9/24/20 2:21 PM, Sean Christopherson wrote: > > On Tue, Sep 22, 2020 at 02:14:04PM -0700, Vipin Sharma wrote: > > > On Mon, Sep 21, 2020 at 06:48:38PM -0700, Sean Christopherson wrote: > > > > On Mon, Sep 21, 2020 at 05:40:22PM

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-25 Thread Linus Torvalds
On Fri, Sep 25, 2020 at 2:13 PM Peter Xu wrote: > > On Fri, Sep 25, 2020 at 12:56:05PM -0700, Linus Torvalds wrote: > > So I think we can simply add a > > > > if (page_mapcount(page) != 1) > > return false; > > > > to page_maybe_dma_pinned(), and that very naturally

Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b

2020-09-25 Thread Martin Blumenstingl
Hi Vladimir, On Sat, Sep 26, 2020 at 12:03 AM Vladimir Oltean wrote: [...] > > Any recommendations/suggestions/ideas/hints are welcome! > > Thank you and best regards, > > Martin > > > > > > [0] > >

Re: [PATCH v6 06/10] PCI/RCEC: Add pcie_link_rcec() to associate RCiEPs

2020-09-25 Thread Bjorn Helgaas
On Tue, Sep 22, 2020 at 02:38:55PM -0700, Sean V Kelley wrote: > From: Sean V Kelley > > A Root Complex Event Collector provides support for > terminating error and PME messages from associated RCiEPs. > > Make use of the RCEC Endpoint Association Extended Capability > to identify associated

Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b

2020-09-25 Thread Andrew Lunn
On Fri, Sep 25, 2020 at 11:47:18PM +0200, Martin Blumenstingl wrote: > Hello, > > Amlogic's 12nm SoC generation requires some RGMII timing calibration > within the Ethernet controller glue registers. > This calibration is only needed for the RGMII modes, not for the > (internal) RMII PHY. > With

Re: [PATCH v6 04/10] PCI/AER: Extend AER error handling to RCECs

2020-09-25 Thread Sean V Kelley
On 25 Sep 2020, at 14:14, Bjorn Helgaas wrote: [+cc Sinan, who's been reviewing changes in this area (thanks, Sinan!)] On Tue, Sep 22, 2020 at 02:38:53PM -0700, Sean V Kelley wrote: From: Jonathan Cameron Currently the kernel does not handle AER errors for Root Complex integrated End

Re: [PATCH] drm/nouveau/kms/nv50-: Fix clock checking algorithm in nv50_dp_mode_valid()

2020-09-25 Thread Lyude Paul
On Tue, 2020-09-22 at 17:22 -0400, Ilia Mirkin wrote: > On Tue, Sep 22, 2020 at 5:14 PM Lyude Paul wrote: > > On Tue, 2020-09-22 at 17:10 -0400, Ilia Mirkin wrote: > > > Can we use 6bpc on arbitrary DP monitors, or is there a capability for > > > it? Maybe only use 6bpc if display_info.bpc == 6

Bug with data getting dropped on a pty

2020-09-25 Thread Corey Minyard
I've been trying to track down a bug in a library I support (named gensio; it does all kinds of stream I/O) and I have figured out that the problem is not in the library, it's in the kernel. I have attached a reproducer program, more on how to run it later. Basically, if you have a pty master

[PATCH v5 12/17] device-dax: add dis-contiguous resource support

2020-09-25 Thread Dan Williams
Break the requirement that device-dax instances are physically contiguous. With this constraint removed it allows fragmented available capacity to be fully allocated. This capability is useful to mitigate the "noisy neighbor" problem with memory-side-cache management for virtual machines, or any

Re: [PATCH v2 03/15] KVM: VMX: Rename "vmx_find_msr_index" to "vmx_find_loadstore_msr_slot"

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:03, Sean Christopherson wrote: > Add "loadstore" to vmx_find_msr_index() to differentiate it from the so > called shared MSRs helpers (which will soon be renamed), and replace > "index" with "slot" to better convey that the helper returns slot in the > array, not the MSR index (the

Re: RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b

2020-09-25 Thread Vladimir Oltean
Hi Martin, On Fri, Sep 25, 2020 at 11:47:18PM +0200, Martin Blumenstingl wrote: > Hello, > > Amlogic's 12nm SoC generation requires some RGMII timing calibration > within the Ethernet controller glue registers. > This calibration is only needed for the RGMII modes, not for the > (internal) RMII

Re: [PATCH v8 5/8] KVM: x86: SVM: Prevent MSR passthrough when MSR access is denied

2020-09-25 Thread Paolo Bonzini
On 25/09/20 16:34, Alexander Graf wrote: > We will introduce the concept of MSRs that may not be handled in kernel > space soon. Some MSRs are directly passed through to the guest, effectively > making them handled by KVM from user space's point of view. > > This patch introduces all logic

Re: [PATCH v3 5/7] rtc: New driver for RTC in Netronix embedded controller

2020-09-25 Thread Jonathan Neuschäfer
On Fri, Sep 25, 2020 at 11:36:14AM +0200, Alexandre Belloni wrote: > Hi, > > On 24/09/2020 21:24:53+0200, Jonathan Neuschäfer wrote: ... > > v3: ... > > - Relicense as GPLv2 or later > > I don't think you had to relicense. The kernel is GPL 2 only, you are > free to license your code under GPL 2

Re: [PATCH 1/3 v2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-25 Thread Steven Rostedt
On Fri, 25 Sep 2020 14:36:37 -0700 Axel Rasmussen wrote: > > +In a C file:: > > + > > + void do_trace_foo_bar_wrapper(args) > > + { > > + trace_foo_bar(args); > > + } > > + > > +In the header file:: > > + > > + DECLEARE_TRACEPOINT(foo_bar); > > Should be

Re: [PATCH v6 05/10] PCI/AER: Apply function level reset to RCiEP on fatal error

2020-09-25 Thread Bjorn Helgaas
On Tue, Sep 22, 2020 at 02:38:54PM -0700, Sean V Kelley wrote: > From: Qiuxu Zhuo > > Attempt to do function level reset for an RCiEP associated with an > RCEC device on fatal error. > > Signed-off-by: Qiuxu Zhuo > --- > drivers/pci/pcie/err.c | 31 ++- > 1 file

[PATCH] net: stmmac: dwmac-meson8b: add calibration registers

2020-09-25 Thread Martin Blumenstingl
The Amlogic dwmac Ethernet IP glue has two registers: - PRG_ETH0 with various configuration bits - PRG_ETH1 with various calibration and information related bits Add the register definitions with comments from different drivers in Amlogic's vendor u-boot and Linux. The most important part is

Re: [PATCH bpf-next 1/4] bpf: sockmap: enable map_update_elem from bpf_iter

2020-09-25 Thread Martin KaFai Lau
On Fri, Sep 25, 2020 at 10:56:27AM +0100, Lorenz Bauer wrote: [ ... ] > diff --git a/net/core/sock_map.c b/net/core/sock_map.c > index e1f05e3fa1d0..497e7df466d4 100644 > --- a/net/core/sock_map.c > +++ b/net/core/sock_map.c > @@ -610,6 +610,9 @@ static int sock_map_update_elem(struct bpf_map

Re: [PATCH v6 03/10] PCI/RCEC: Cache RCEC capabilities in pci_init_capabilities()

2020-09-25 Thread Sean V Kelley
On 25 Sep 2020, at 13:13, Bjorn Helgaas wrote: On Tue, Sep 22, 2020 at 02:38:52PM -0700, Sean V Kelley wrote: From: Sean V Kelley Extend support for Root Complex Event Collectors by decoding and caching the RCEC Endpoint Association Extended Capabilities when enumerating. Use that cached

Re: [PATCH 00/13] x86: Trenchboot secure dynamic launch Linux kernel support

2020-09-25 Thread Daniel P. Smith
On 9/25/20 1:30 AM, Jarkko Sakkinen wrote: > On Thu, Sep 24, 2020 at 10:58:28AM -0400, Ross Philipson wrote: >> The Trenchboot project focus on boot security has led to the enabling of >> the Linux kernel to be directly invocable by the x86 Dynamic Launch >> instruction(s) for establishing a

RGMII timing calibration (on 12nm Amlogic SoCs) - integration into dwmac-meson8b

2020-09-25 Thread Martin Blumenstingl
Hello, Amlogic's 12nm SoC generation requires some RGMII timing calibration within the Ethernet controller glue registers. This calibration is only needed for the RGMII modes, not for the (internal) RMII PHY. With "incorrect" calibration settings Ethernet speeds up to 100Mbit/s will still work

Re: [PATCH v2 0/7] KVM: x86: Tracepoint improvements and fixes

2020-09-25 Thread Paolo Bonzini
On 23/09/20 22:13, Sean Christopherson wrote: > As noted by Vitaly, these changes break trace-cmd[*]. I hereby pinky > swear that, if this series is merged, I will send patches to update > trace-cmd. > > [*] git://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git Actually I think we should

Re: [PATCH net] net: phy: realtek: fix rtl8211e rx/tx delay config

2020-09-25 Thread Jakub Kicinski
On Fri, 25 Sep 2020 15:25:15 +0800 Willy Liu wrote: > There are two chip pins named TXDLY and RXDLY which actually adds the 2ns > delays to TXC and RXC for TXD/RXD latching. These two pins can config via > 4.7k-ohm resistor to 3.3V hw setting, but also config via software setting > (extension page

Re: [PATCH v6 02/10] PCI/RCEC: Bind RCEC devices to the Root Port driver

2020-09-25 Thread Sean V Kelley
On 25 Sep 2020, at 12:59, Bjorn Helgaas wrote: On Tue, Sep 22, 2020 at 02:38:51PM -0700, Sean V Kelley wrote: From: Qiuxu Zhuo If a Root Complex Integrated Endpoint (RCiEP) is implemented, errors may optionally be sent to a corresponding Root Complex Event Collector (RCEC). Each RCiEP must

[PATCH] Input: Add nopnp quirk for Acer Aspire 5 A515

2020-09-25 Thread Jiri Kosina
From: Jiri Kosina Touchpad on this laptop is not detected properly during boot, as PNP enumerates (wrongly) AUX port as disabled on this machine. Fix that by adding this board (with admittedly quite funny DMI identifiers) to nopnp quirk list. Reported-by: Andrés Barrantes Silman

Re: [PATCH v3 4/4] PCI: Limit pci_alloc_irq_vectors() to housekeeping CPUs

2020-09-25 Thread Nitesh Narayan Lal
On 9/25/20 4:23 PM, Bjorn Helgaas wrote: > On Fri, Sep 25, 2020 at 02:26:54PM -0400, Nitesh Narayan Lal wrote: >> If we have isolated CPUs dedicated for use by real-time tasks, we try to >> move IRQs to housekeeping CPUs from the userspace to reduce latency >> overhead on the isolated CPUs. >> >>

Re: [PATCH 1/3 v2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-25 Thread Axel Rasmussen
On Fri, Sep 25, 2020 at 2:18 PM Steven Rostedt wrote: > > From: "Steven Rostedt (VMware)" > > As tracepoints are discouraged from being added in a header because it can > cause side effects if other tracepoints are in headers, as well as bloat the > kernel as the trace_() function is not a small

Re: [PATCH v2 0/7] KVM: nVMX: Bug fixes and cleanup

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:44, Sean Christopherson wrote: > Fix for a brutal segment caching bug that manifested as random nested > VM-Enter failures when running with unrestricted guest disabled. A few > more bug fixes and cleanups for stuff found by inspection when hunting > down the caching issue. > >

Re: [PATCH v3 3/7] mfd: Add base driver for Netronix embedded controller

2020-09-25 Thread Jonathan Neuschäfer
On Fri, Sep 25, 2020 at 12:29:45PM +0300, Andy Shevchenko wrote: > On Thu, Sep 24, 2020 at 10:26 PM Jonathan Neuschäfer > wrote: > > > > The Netronix embedded controller is a microcontroller found in some > > e-book readers designed by the ODM Netronix, Inc. It contains RTC, > > battery

Re: [PATCH v2 3/7] KVM: nVMX: Explicitly check for valid guest state for !unrestricted guest

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:44, Sean Christopherson wrote: > +bool __vmx_guest_state_valid(struct kvm_vcpu *vcpu) > { > - if (enable_unrestricted_guest) > - return true; > - > /* real mode guest state checks */ > if (!is_protmode(vcpu) || (vmx_get_rflags(vcpu) & X86_EFLAGS_VM)) { >

[PATCH v5 09/17] device-dax: add resize support

2020-09-25 Thread Dan Williams
Make the device-dax 'size' attribute writable to allow capacity to be split between multiple instances in a region. The intended consumers of this capability are users that want to split a scarce memory resource between device-dax and System-RAM access, or users that want to have multiple

[PATCH] ASoC: dt-bindings: sgtl5000: Add common clock properties

2020-09-25 Thread Krzysztof Kozlowski
Add common properties appearing in DTSes (assigned-clocks and similar) to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dt.yaml: audio-codec@a: 'assigned-clock-parents', 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes:

[PATCH] dt-bindings: serial: fsl-imx-uart: fix i.MX 53 and 6 compatible matching

2020-09-25 Thread Krzysztof Kozlowski
The i.MX 53 and i.MX6Q DTS use two compatibles, i.MX 6SL/6SLL/SX three so update the binding to fix dtbs_check warnings like: serial@21ec000: compatible: ['fsl,imx6q-uart', 'fsl,imx21-uart'] is not valid under any of the given schemas Signed-off-by: Krzysztof Kozlowski ---

Re: [PATCH v2 0/8] KVM: x86/mmu: ITLB multi-hit workaround fixes

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:37, Sean Christopherson wrote: > Patch 1 is a minor fix for a very theoretical bug where KVM could skip > the final "commit zap" when recovering shadow pages for the NX huge > page mitigation. > > Patch 2 is cleanup that's made possible by patch 1. > > Patches 3-5 are the main

Re: [PATCH 0/3 v2] tracing/mm: Add tracepoint_enabled() helper function for headers

2020-09-25 Thread Steven Rostedt
Bah, My cut-and-paste of my "quilt mail --send" chopped off Mathieu's email. Mathieu, I didn't meant to not Cc you on this. Do you need me to bounce the rest to you or you can get it from lore? -- Steve On Fri, 25 Sep 2020 17:12:06 -0400 Steven Rostedt wrote: > Tracepoints are not safe to

[PATCH] dt-bindings: pwm: imx: document i.MX compatibles

2020-09-25 Thread Krzysztof Kozlowski
Document all ARMv5, ARMv6 and ARMv7 i.MX compatibles to fix dtbs_check warnings like: arch/arm/boot/dts/imx6dl-colibri-eval-v3.dt.yaml: pwm@208: compatible:0: 'fsl,imx6q-pwm' is not one of ['fsl,imx8mm-pwm', 'fsl,imx8mn-pwm', 'fsl,imx8mp-pwm', 'fsl,imx8mq-pwm'] Signed-off-by:

Re: [PATCH v2 6/8] KVM: x86/mmu: Rename 'hlevel' to 'level' in FNAME(fetch)

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:37, Sean Christopherson wrote: > Rename 'hlevel', which presumably stands for 'host level', to simply > 'level' in FNAME(fetch). The variable hasn't tracked the host level for > quite some time. One could say that it stands for "huge" level... I am not too attached to it, the

[PATCH 10/22] kvm: mmu: Add TDP MMU PF handler

2020-09-25 Thread Ben Gardon
Add functions to handle page faults in the TDP MMU. These page faults are currently handled in much the same way as the x86 shadow paging based MMU, however the ordering of some operations is slightly different. Future patches will add eager NX splitting, a fast page fault handler, and parallel

[PATCH 04/22] kvm: mmu: Allocate and free TDP MMU roots

2020-09-25 Thread Ben Gardon
The TDP MMU must be able to allocate paging structure root pages and track the usage of those pages. Implement a similar, but separate system for root page allocation to that of the x86 shadow paging implementation. When future patches add synchronization model changes to allow for parallel page

[PATCH 07/22] kvm: mmu: Support zapping SPTEs in the TDP MMU

2020-09-25 Thread Ben Gardon
Add functions to zap SPTEs to the TDP MMU. These are needed to tear down TDP MMU roots properly and implement other MMU functions which require tearing down mappings. Future patches will add functions to populate the page tables, but as for this patch there will not be any work for these functions

[PATCH 11/22] kvm: mmu: Factor out allocating a new tdp_mmu_page

2020-09-25 Thread Ben Gardon
Move the code to allocate a struct kvm_mmu_page for the TDP MMU out of the root allocation code to support allocating a struct kvm_mmu_page for every page of page table memory used by the TDP MMU, in the next commit. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine.

[PATCH 03/22] kvm: mmu: Init / Uninit the TDP MMU

2020-09-25 Thread Ben Gardon
The TDP MMU offers an alternative mode of operation to the x86 shadow paging based MMU, optimized for running an L1 guest with TDP. The TDP MMU will require new fields that need to be initialized and torn down. Add hooks into the existing KVM MMU initialization process to do that initialization /

Re: [Linaro-mm-sig] [PATCH v5 05/38] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-09-25 Thread Alex Deucher
On Tue, Sep 22, 2020 at 2:28 AM Marek Szyprowski wrote: > > Hi Alex, > > On 22.09.2020 01:15, Alex Goins wrote: > > Tested-by: Alex Goins > > > > This change fixes a regression with drm_prime_sg_to_page_addr_arrays() and > > AMDGPU in v5.9. > > Thanks for testing! > > > Commit 39913934 similarly

[PATCH 21/22] kvm: mmu: Support MMIO in the TDP MMU

2020-09-25 Thread Ben Gardon
In order to support MMIO, KVM must be able to walk the TDP paging structures to find mappings for a given GFN. Support this walk for the TDP MMU. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be viewed in

[PATCH 15/22] kvm: mmu: Support changed pte notifier in tdp MMU

2020-09-25 Thread Ben Gardon
In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. Add a hook and handle the change_pte MMU notifier. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no

[PATCH 19/22] kvm: mmu: Support write protection for nesting in tdp MMU

2020-09-25 Thread Ben Gardon
To support nested virtualization, KVM will sometimes need to write protect pages which are part of a shadowed paging structure or are not writable in the shadowed paging structure. Add a function to write protect GFN mappings for this purpose. Tested by running kvm-unit-tests and KVM selftests on

[PATCH 16/22] kvm: mmu: Add dirty logging handler for changed sptes

2020-09-25 Thread Ben Gardon
Add a function to handle the dirty logging bookkeeping associated with SPTE changes. This will be important for future commits which will allow the TDP MMU to log dirty pages the same way the x86 shadow paging based MMU does. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell

[PATCH 18/22] kvm: mmu: Support disabling dirty logging for the tdp MMU

2020-09-25 Thread Ben Gardon
Dirty logging ultimately breaks down MMU mappings to 4k granularity. When dirty logging is no longer needed, these granaular mappings represent a useless performance penalty. When dirty logging is disabled, search the paging structure for mappings that could be re-constituted into a large page

[PATCH 13/22] kvm: mmu: Support invalidate range MMU notifier for TDP MMU

2020-09-25 Thread Ben Gardon
In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. Add hooks to handle the invalidate range family of MMU notifiers. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This

[PATCH 20/22] kvm: mmu: NX largepage recovery for TDP MMU

2020-09-25 Thread Ben Gardon
When KVM maps a largepage backed region at a lower level in order to make it executable (i.e. NX large page shattering), it reduces the TLB performance of that region. In order to avoid making this degradation permanent, KVM must periodically reclaim shattered NX largepages by zapping them and

[PATCH 17/22] kvm: mmu: Support dirty logging for the TDP MMU

2020-09-25 Thread Ben Gardon
Dirty logging is a key feature of the KVM MMU and must be supported by the TDP MMU. Add support for both the write protection and PML dirty logging modes. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This series can be

[PATCH 22/22] kvm: mmu: Don't clear write flooding count for direct roots

2020-09-25 Thread Ben Gardon
Direct roots don't have a write flooding count because the guest can't affect that paging structure. Thus there's no need to clear the write flooding count on a fast CR3 switch for direct roots. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced

[PATCH 12/22] kvm: mmu: Allocate struct kvm_mmu_pages for all pages in TDP MMU

2020-09-25 Thread Ben Gardon
Attach struct kvm_mmu_pages to every page in the TDP MMU to track metadata, facilitate NX reclaim, and enable inproved parallelism of MMU operations in future patches. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This

[PATCH 06/22] kvm: mmu: Make address space ID a property of memslots

2020-09-25 Thread Ben Gardon
Save address space ID as a field in each memslot so that functions that do not use rmaps (which implicitly encode the id) can handle multiple address spaces correctly. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced no new failures. This

[PATCH 08/22] kvm: mmu: Separate making non-leaf sptes from link_shadow_page

2020-09-25 Thread Ben Gardon
The TDP MMU page fault handler will need to be able to create non-leaf SPTEs to build up the paging structures. Rather than re-implementing the function, factor the SPTE creation out of link_shadow_page. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series

[PATCH 14/22] kvm: mmu: Add access tracking for tdp_mmu

2020-09-25 Thread Ben Gardon
In order to interoperate correctly with the rest of KVM and other Linux subsystems, the TDP MMU must correctly handle various MMU notifiers. The main Linux MM uses the access tracking MMU notifiers for swap and other features. Add hooks to handle the test/flush HVA (range) family of MMU notifiers.

[PATCH 09/22] kvm: mmu: Remove disallowed_hugepage_adjust shadow_walk_iterator arg

2020-09-25 Thread Ben Gardon
In order to avoid creating executable hugepages in the TDP MMU PF handler, remove the dependency between disallowed_hugepage_adjust and the shadow_walk_iterator. This will open the function up to being used by the TDP MMU PF handler in a future patch. Tested by running kvm-unit-tests and KVM

[PATCH 02/22] kvm: mmu: Introduce tdp_iter

2020-09-25 Thread Ben Gardon
The TDP iterator implements a pre-order traversal of a TDP paging structure. This iterator will be used in future patches to create an efficient implementation of the KVM MMU for the TDP case. Tested by running kvm-unit-tests and KVM selftests on an Intel Haswell machine. This series introduced

[PATCH 05/22] kvm: mmu: Add functions to handle changed TDP SPTEs

2020-09-25 Thread Ben Gardon
The existing bookkeeping done by KVM when a PTE is changed is spread around several functions. This makes it difficult to remember all the stats, bitmaps, and other subsystems that need to be updated whenever a PTE is modified. When a non-leaf PTE is marked non-present or becomes a leaf PTE, page

[PATCH 00/22] Introduce the TDP MMU

2020-09-25 Thread Ben Gardon
Over the years, the needs for KVM's x86 MMU have grown from running small guests to live migrating multi-terabyte VMs with hundreds of vCPUs. Where we previously depended on shadow paging to run all guests, we now have two dimensional paging (TDP). This patch set introduces a new implementation of

[PATCH 01/22] kvm: mmu: Separate making SPTEs from set_spte

2020-09-25 Thread Ben Gardon
Separate the functions for generating leaf page table entries from the function that inserts them into the paging structure. This refactoring will facilitate changes to the MMU sychronization model to use atomic compare / exchanges (which are not guaranteed to succeed) instead of a monolithic MMU

Re: [PATCH 5.8 00/56] 5.8.12-rc1 review

2020-09-25 Thread Jeffrin Jose T
On Fri, 2020-09-25 at 14:47 +0200, Greg Kroah-Hartman wrote: > This is the start of the stable review cycle for the 5.8.12 release. > There are 56 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, > please > let me know. >

Re: [PATCH net-next v2] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-25 Thread Vladimir Oltean
On Fri, Sep 25, 2020 at 02:12:34PM -0700, David Miller wrote: > From: Florian Fainelli > Date: Thu, 24 Sep 2020 17:27:44 -0700 > > Applied, thanks Florian. Uh-oh, that 'negative value stored in unsigned variable' issue that the build bot reported was on v2, wasn't it?

Re: REGRESSION: 37f4a24c2469: blk-mq: centralise related handling into blk_mq_get_driver_tag

2020-09-25 Thread Shakeel Butt
On Fri, Sep 25, 2020 at 1:56 PM Roman Gushchin wrote: > > On Fri, Sep 25, 2020 at 12:19:02PM -0700, Shakeel Butt wrote: > > On Fri, Sep 25, 2020 at 10:58 AM Shakeel Butt > > wrote: > > > > > [snip] > > > > > > I don't think you can ignore the flushing. The __free_once() in > > > ___cache_free()

[PATCH 2/3 v2] mm/page_ref: Convert the open coded tracepoint enabled to the new helper

2020-09-25 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" As more use cases of checking if a tracepoint is enabled in a header are coming to fruition, a helper macro, tracepoint_enabled(), has been added to check if a tracepoint is enabled or not, and can be used with minimal header requirements (avoid "include hell").

[PATCH 3/3 v2] x86: Use tracepoint_enabled() for msr tracepoints instead of open coding it

2020-09-25 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" 7f47d8cc039f ("x86, tracing, perf: Add trace point for MSR accesses") added tracing of msr read and write, but because of complexity in having tracepoints in headers, and even more so for a core header like msr.h, not to mention the bloat a tracepoint adds to

[PATCH 0/3 v2] tracing/mm: Add tracepoint_enabled() helper function for headers

2020-09-25 Thread Steven Rostedt
Tracepoints are not safe to be called directly from header files as they may be included by C code that has CREATE_TRACE_POINTS defined, and this would cause side effects and possibly break the build in hard to debug ways. Not to mention it also will bloat the code being in commonly used inline

Re: [PATCH 1/2] ext4/xfs: add page refcount helper

2020-09-25 Thread Ralph Campbell
On 9/25/20 1:51 PM, Dan Williams wrote: On Fri, Sep 25, 2020 at 1:45 PM Ralph Campbell wrote: There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail.

[PATCH] arm64: dts: amlogic: meson-g12: use the G12A specific dwmac compatible

2020-09-25 Thread Martin Blumenstingl
We have a dedicated "amlogic,meson-g12a-dwmac" compatible string for the Ethernet controller since commit 3efdb92426bf4 ("dt-bindings: net: dwmac-meson: Add a compatible string for G12A onwards"). Using the AXG compatible string worked fine so far because the dwmac-meson8b driver doesn't handle

[PATCH 1/3 v2] tracepoints: Add helper to test if tracepoint is enabled in a header

2020-09-25 Thread Steven Rostedt
From: "Steven Rostedt (VMware)" As tracepoints are discouraged from being added in a header because it can cause side effects if other tracepoints are in headers, as well as bloat the kernel as the trace_() function is not a small inline, the common workaround is to add a function call that

[PATCH v5 14/17] device-dax: make align a per-device property

2020-09-25 Thread Dan Williams
From: Joao Martins Introduce @align to struct dev_dax. When creating a new device, we still initialize to the default dax_region @align. Child devices belonging to a region may wish to keep a different alignment property instead of a global region-defined one. Link:

Re: [PATCHv5 kselftest next] selftests/run_kselftest.sh: make each test individually selectable

2020-09-25 Thread Kees Cook
On Fri, Sep 25, 2020 at 01:51:53PM +0530, Naresh Kamboju wrote: > On Mon, 14 Sep 2020 at 07:53, Hangbin Liu wrote: > > > > Currently, after generating run_kselftest.sh, there is no way to choose > > which test we could run. All the tests are listed together and we have > > to run all every time.

Re: [PATCH v6 04/10] PCI/AER: Extend AER error handling to RCECs

2020-09-25 Thread Bjorn Helgaas
[+cc Sinan, who's been reviewing changes in this area (thanks, Sinan!)] On Tue, Sep 22, 2020 at 02:38:53PM -0700, Sean V Kelley wrote: > From: Jonathan Cameron > > Currently the kernel does not handle AER errors for Root Complex > integrated End Points (RCiEPs)[0]. These devices sit on a root

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-25 Thread Peter Xu
On Fri, Sep 25, 2020 at 12:56:05PM -0700, Linus Torvalds wrote: > So I think we can simply add a > > if (page_mapcount(page) != 1) > return false; > > to page_maybe_dma_pinned(), and that very naturally protects against > the "is the page count perhaps elevated due to a

Re: [PATCH] pci: meson: build as module by default

2020-09-25 Thread Rob Herring
On Fri, Sep 18, 2020 at 11:12:51AM -0700, Kevin Hilman wrote: > Enable pci-meson to build as a module whenever ARCH_MESON is enabled. > > Cc: Yue Wang > Signed-off-by: Kevin Hilman > --- > Tested on Khadas VIM3 and Khadas VIM3 using NVMe SSD devices. > > drivers/pci/controller/dwc/Kconfig

Re: [PATCH net-next v2] net: vlan: Avoid using BUG() in vlan_proto_idx()

2020-09-25 Thread David Miller
From: Florian Fainelli Date: Thu, 24 Sep 2020 17:27:44 -0700 > While we should always make sure that we specify a valid VLAN protocol > to vlan_proto_idx(), killing the machine when an invalid value is > specified is too harsh and not helpful for debugging. All callers are > capable of dealing

[GIT PULL] MIPS fixes for v5.9

2020-09-25 Thread Thomas Bogendoerfer
The following changes since commit b959b97860d0fee8c8f6a3e641d3c2ad76eab6be: MIPS: SNI: Fix spurious interrupts (2020-09-16 22:40:58 +0200) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/ tags/mips_fixes_5.9_3 for you to fetch changes

[PATCH v5 06/17] device-dax: introduce 'struct dev_dax' typed-driver operations

2020-09-25 Thread Dan Williams
In preparation for introducing seed devices the dax-bus core needs to be able to intercept ->probe() and ->remove() operations. Towards that end arrange for the bus and drivers to switch from raw 'struct device' driver operations to 'struct dev_dax' typed operations. Cc: Jason Yan Cc: Vishal

Re: KASLR support on ARM with Kernel 4.9 and 4.14

2020-09-25 Thread Ard Biesheuvel
On Fri, 25 Sep 2020 at 22:47, Kees Cook wrote: > > On Fri, Sep 25, 2020 at 10:37:01PM +0200, Ard Biesheuvel wrote: > > On Fri, 25 Sep 2020 at 22:28, Kees Cook wrote: > > > > > > On Fri, Sep 25, 2020 at 08:33:59PM +0530, Pintu Agarwal wrote: > > > > This is regarding the KASLR feature support on

Re: [PATCH v2 seccomp 3/6] seccomp/cache: Add "emulator" to check if filter is arg-dependent

2020-09-25 Thread Andy Lutomirski
On Fri, Sep 25, 2020 at 1:37 PM Kees Cook wrote: > > On Fri, Sep 25, 2020 at 12:51:20PM -0700, Andy Lutomirski wrote: > > > > > > > On Sep 25, 2020, at 12:42 PM, Kees Cook wrote: > > > > > > On Fri, Sep 25, 2020 at 11:45:05AM -0500, YiFei Zhu wrote: > > >> On Thu, Sep 24, 2020 at 10:04 PM YiFei

Re: [PATCH 1/5] mm: Introduce mm_struct.has_pinned

2020-09-25 Thread Linus Torvalds
On Fri, Sep 25, 2020 at 12:56 PM Linus Torvalds wrote: > > And honestly, since this is all getting fairly late in the rc, and it > took longer than I thought, I think we should do the GFP_ATOMIC > approach for now - not great, but since it only triggers for this case > that really should never

Re: [PATCH 0/2] KVM: VMX: Super early file refactor for TDX

2020-09-25 Thread Paolo Bonzini
On 23/09/20 20:31, Sean Christopherson wrote: > Rename vmx/ops.h to vmx/vmx_ops.h, and move VMX's posted interrupt support > to dedicated files in preparation for future Trust Domain Extensions (TDX) > enabling. > > These changes are somewhat premature, as full TDX enabling is months away, > but

Re: [PATCH v5 00/17] device-dax: support sub-dividing soft-reserved ranges

2020-09-25 Thread Joao Martins
On 9/25/20 10:01 PM, Dan Williams wrote: > On Fri, Sep 25, 2020 at 1:52 PM Joao Martins > wrote: >> >> Hey Dan, >> >> On 9/25/20 8:11 PM, Dan Williams wrote: >>> Changes since v4 [1]: >>> - Rebased on >>> device-dax-move-instance-creation-parameters-to-struct-dev_dax_data.patch >>> in -mm

Re: [RFC PATCH 3/3] KVM: x86: Use KVM_BUG/KVM_BUG_ON to handle bugs that are fatal to the VM

2020-09-25 Thread Paolo Bonzini
On 25/09/20 19:12, Sean Christopherson wrote: >> Do we actually want to prevent *all* ioctls? E.g. when 'vm bugged' >> condition is triggered userspace may want to extract some information to >> assist debugging but even things like KVM_GET_[S]REGS will just return >> -EIO. I'm not sure it is

Re: [RFC PATCH 0/3] KVM: Introduce "VM bugged" concept

2020-09-25 Thread Paolo Bonzini
On 25/09/20 18:32, Marc Zyngier wrote: > I'm quite like the idea. However, I wonder whether preventing the > vcpus from re-entering the guest is enough. When something goes really > wrong, is it safe to allow the userspace process to terminate normally > and free the associated memory? And is it

Re: [PATCH 0/2] iommu/iova: Solve longterm IOVA issue

2020-09-25 Thread Cong Wang
On Fri, Sep 25, 2020 at 2:56 AM John Garry wrote: > > This series contains a patch to solve the longterm IOVA issue which > leizhen originally tried to address at [0]. > > I also included the small optimisation from Cong Wang, which never seems > to be have been accepted [1]. There was some

Re: [PATCH] [v2] blk-mq: add cond_resched() in __blk_mq_alloc_rq_maps()

2020-09-25 Thread Jens Axboe
On 9/17/20 2:13 AM, Xianting Tian wrote: > We found it takes more time of blk_mq_alloc_rq_maps() in kernel space when > testing nvme hot-plugging. The test and anlysis as below. > > Debug code, > 1, blk_mq_alloc_rq_maps(): > u64 start, end; > depth = set->queue_depth; >

[PATCH v5 05/17] device-dax: add an allocation interface for device-dax instances

2020-09-25 Thread Dan Williams
;In preparation for a facility that enables dax regions to be sub-divided, introduce infrastructure to track and allocate region capacity. The new dax_region/available_size attribute is only enabled for volatile hmem devices, not pmem devices that are defined by nvdimm namespace boundaries. This

Re: [PATCH 1/2] perf stat: Fix segfault when counting armv8_pmu events

2020-09-25 Thread Jiri Olsa
On Thu, Sep 24, 2020 at 11:36:23PM +0900, Namhyung Kim wrote: > On Wed, Sep 23, 2020 at 10:19:00PM +0200, Jiri Olsa wrote: > > On Wed, Sep 23, 2020 at 11:15:06PM +0900, Namhyung Kim wrote: > > > I think the problem is that armv8_pmu has a cpumask, > > > and the user requested per-task events. > >

Re: [PATCH v2 3/3] ARM: tegra: add mXT1386 compatible

2020-09-25 Thread Dmitry Osipenko
25.09.2020 16:52, Jiada Wang пишет: > Add mXT1386 compatible for "touchscreen@4c". > > Signed-off-by: Jiada Wang > --- > arch/arm/boot/dts/tegra20-acer-a500-picasso.dts | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm/boot/dts/tegra20-acer-a500-picasso.dts >

Re: [PATCH v5 00/17] device-dax: support sub-dividing soft-reserved ranges

2020-09-25 Thread Dan Williams
On Fri, Sep 25, 2020 at 1:52 PM Joao Martins wrote: > > Hey Dan, > > On 9/25/20 8:11 PM, Dan Williams wrote: > > Changes since v4 [1]: > > - Rebased on > > device-dax-move-instance-creation-parameters-to-struct-dev_dax_data.patch > > in -mm [2]. I.e. patches that did not need fixups from v4

Re: [PATCH v2 1/3] dt-bindings: input: atmel: add compatible for mXT1386

2020-09-25 Thread Dmitry Osipenko
25.09.2020 16:52, Jiada Wang пишет: > Document the mXT1386 compatible string. > > Signed-off-by: Jiada Wang > --- > Documentation/devicetree/bindings/input/atmel,maxtouch.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt >

Re: [PATCH v2 2/3] Input: atmel_mxt_ts - implement I2C retries for mXT1368

2020-09-25 Thread Dmitry Osipenko
25.09.2020 16:52, Jiada Wang пишет: > According to datasheet, mXT1386 chip has a WAKE line, it is used > to wake the chip up from deep sleep mode before communicating with > it via the I2C-compatible interface. > > if the WAKE line is connected to a GPIO line, the line must be > asserted 25 ms

[RFC PATCH 0/3] l3mdev icmp error route lookup fixes

2020-09-25 Thread Mathieu Desnoyers
Hi, Here is an updated series of fixes for ipv4 and ipv6 which which ensure the route lookup is performed on the right routing table in VRF configurations when sending TTL expired icmp errors (useful for traceroute). It includes tests for both ipv4 and ipv6. These fixes address specifically

[RFC PATCH 1/3] ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2)

2020-09-25 Thread Mathieu Desnoyers
As per RFC792, ICMP errors should be sent to the source host. However, in configurations with Virtual Routing and Forwarding tables, looking up which routing table to use is currently done by using the destination net_device. commit 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to

Re: [RFC PATCH v2] tools/x86: add kcpuid tool to show raw CPU features

2020-09-25 Thread Borislav Petkov
On Fri, Sep 25, 2020 at 04:40:47PM -0400, Arvind Sankar wrote: > They're not the same, but aren't there going to be quite a few common > flags between the definitions in cpufeatures.h and the definitions in > cpuid.txt? If they're both living in the kernel repo, it would be nice > for them to not

<    1   2   3   4   5   6   7   8   9   10   >