[PATCH v4 28/34] KVM: SVM: Add NMI support for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky The GHCB specification defines how NMIs are to be handled for an SEV-ES guest. To detect the completion of an NMI the hypervisor must not intercept the IRET instruction (because a #VC while running the NMI will issue an IRET) and, instead, must receive an NMI Complete exit

[PATCH v4 30/34] KVM: SVM: Update ASID allocation to support SEV-ES guests

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky SEV and SEV-ES guests each have dedicated ASID ranges. Update the ASID allocation routine to return an ASID in the respective range. Signed-off-by: Tom Lendacky --- arch/x86/kvm/svm/sev.c | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-)

[PATCH v4 34/34] KVM: SVM: Provide support to launch and run an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky An SEV-ES guest is started by invoking a new SEV initialization ioctl, KVM_SEV_ES_INIT. This identifies the guest as an SEV-ES guest, which is used to drive the appropriate ASID allocation, VMSA encryption, etc. Before being able to run an SEV-ES vCPU, the vCPU VMSA must be

Re: [PATCH 1/2] f2fs: add disable_auto_compr mount option

2020-11-17 Thread Jaegeuk Kim
On 11/17, Daeho Jeong wrote: > From: Daeho Jeong > > We will add a new disable_auto_compr mount option to turn off the > automaic compression on the compression enabled file, in order to > give discretion of choosing the target file and the timing of > compression to the user. The aim would be

[PATCH v4 25/34] KVM: SVM: Do not report support for SMM for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky SEV-ES guests do not currently support SMM. Update the has_emulated_msr() kvm_x86_ops function to take a struct kvm parameter so that the capability can be reported at a VM level. Since this op is also called during KVM initialization and before a struct kvm instance is

[PATCH v4 17/34] KVM: SVM: Create trace events for VMGEXIT MSR protocol processing

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Add trace events for entry to and exit from VMGEXIT MSR protocol processing. The vCPU will be common for the trace events. The MSR protocol processing is guided by the GHCB GPA in the VMCB, so the GHCB GPA will represent the input and output values for the entry and exit

[PATCH v4 20/34] KVM: SVM: Add support for EFER write traps for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For SEV-ES guests, the interception of EFER write access is not recommended. EFER interception occurs prior to EFER being modified and the hypervisor is unable to modify EFER itself because the register is located in the encrypted register state. SEV-ES support introduces a

[PATCH v4 24/34] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Since many of the registers used by the SEV-ES are encrypted and cannot be read or written, adjust the __get_sregs() / __set_sregs() to take into account whether the VMSA/guest state is encrypted. For __get_sregs(), return the actual value that is in use by the guest for all

[PATCH v4 12/34] KVM: SVM: Add initial support for a VMGEXIT VMEXIT

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky SEV-ES adds a new VMEXIT reason code, VMGEXIT. Initial support for a VMGEXIT includes mapping the GHCB based on the guest GPA, which is obtained from a new VMCB field, and then validating the required inputs for the VMGEXIT exit reason. Since many of the VMGEXIT exit reasons

[PATCH v4 22/34] KVM: SVM: Add support for CR4 write traps for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the

[PATCH v4 18/34] KVM: SVM: Support MMIO for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For an SEV-ES guest, MMIO is performed to a shared (un-encrypted) page so that both the hypervisor and guest can read or write to it and each see the contents. The GHCB specification provides software-defined VMGEXIT exit codes to indicate a request for an MMIO read or an

[PATCH v4 21/34] KVM: SVM: Add support for CR0 write traps for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the

[PATCH v4 15/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x004

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x004 is a request for CPUID information. Only a single CPUID result register can be sent per

[PATCH v4 23/34] KVM: SVM: Add support for CR8 write traps for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For SEV-ES guests, the interception of control register write access is not recommended. Control register interception occurs prior to the control register being modified and the hypervisor is unable to modify the control register itself because the register is located in the

[PATCH v4 16/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x100

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x100 is a request for termination of the guest. The guest has encountered some situation for which it

[PATCH v4 27/34] KVM: SVM: Add support for booting APs for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Typically under KVM, an AP is booted using the INIT-SIPI-SIPI sequence, where the guest vCPU register state is updated and then the vCPU is VMRUN to begin execution of the AP. For an SEV-ES guest, this won't work because the guest register state is encrypted. Following the

[PATCH v4 10/34] KVM: SVM: Cannot re-initialize the VMCB after shutdown with SEV-ES

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky When a SHUTDOWN VMEXIT is encountered, normally the VMCB is re-initialized so that the guest can be re-launched. But when a guest is running as an SEV-ES guest, the VMSA cannot be re-initialized because it has been encrypted. For now, just return -EINVAL to prevent a possible

[PATCH v4 13/34] KVM: SVM: Create trace events for VMGEXIT processing

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Add trace events for entry to and exit from VMGEXIT processing. The vCPU id and the exit reason will be common for the trace events. The exit info fields will represent the input and output values for the entry and exit events, respectively. Signed-off-by: Tom Lendacky ---

[PATCH v4 11/34] KVM: SVM: Prepare for SEV-ES exit handling in the sev.c file

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky This is a pre-patch to consolidate some exit handling code into callable functions. Follow-on patches for SEV-ES exit handling will then be able to use them from the sev.c file. Signed-off-by: Tom Lendacky --- arch/x86/kvm/svm/svm.c | 64

[PATCH v4 14/34] KVM: SVM: Add support for SEV-ES GHCB MSR protocol function 0x002

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky The GHCB specification defines a GHCB MSR protocol using the lower 12-bits of the GHCB MSR (in the hypervisor this corresponds to the GHCB GPA field in the VMCB). Function 0x002 is a request to set the GHCB MSR value to the SEV INFO as per the specification via the VMCB GHCB

[PATCH v4 19/34] KVM: SVM: Support string IO operations for an SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky For an SEV-ES guest, string-based port IO is performed to a shared (un-encrypted) page so that both the hypervisor and guest can read or write to it and each see the contents. For string-based port IO operations, invoke SEV-ES specific routines that can complete the operation

[PATCH v4 26/34] KVM: SVM: Guest FPU state save/restore not needed for SEV-ES guest

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky The guest FPU state is automatically restored on VMRUN and saved on VMEXIT by the hardware, so there is no reason to do this in KVM. Eliminate the allocation of the guest_fpu save area and key off that to skip operations related to the guest FPU state. Signed-off-by: Tom

[PATCH v4 07/34] KVM: SVM: Add required changes to support intercepts under SEV-ES

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky When a guest is running under SEV-ES, the hypervisor cannot access the guest register state. There are numerous places in the KVM code where certain registers are accessed that are not allowed to be accessed (e.g. RIP, CR0, etc). Add checks to prevent register accesses and add

[PATCH v4 06/34] KVM: x86: Mark GPRs dirty when written

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky When performing VMGEXIT processing for an SEV-ES guest, register values will be synced between KVM and the GHCB. Prepare for detecting when a GPR has been updated (marked dirty) in order to determine whether to sync the register to the GHCB. Signed-off-by: Tom Lendacky ---

Re: [RFC][PATCH v2 00/21] x86/pti: Defer CR3 switch to C code

2020-11-17 Thread Borislav Petkov
On Tue, Nov 17, 2020 at 09:19:01AM +0100, Alexandre Chartre wrote: > We are not reversing PTI, we are extending it. You're reversing it in the sense that you're mapping more kernel memory into the user page table than what is mapped now. > PTI removes all kernel mapping from the user page-table.

Re: [PATCH v6 0/7] resource: introduce union(), intersection() API

2020-11-17 Thread Rafael J. Wysocki
On Mon, Nov 16, 2020 at 5:59 PM Rafael J. Wysocki wrote: > > On Mon, Nov 16, 2020 at 5:51 PM Andy Shevchenko > wrote: > > > > On Tue, Nov 03, 2020 at 10:45:03PM +0200, Andy Shevchenko wrote: > > > Some users may want to use resource library to manage their own resources, > > > besides existing

[PATCH v4 08/34] KVM: SVM: Prevent debugging under SEV-ES

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Since the guest register state of an SEV-ES guest is encrypted, debugging is not supported. Update the code to prevent guest debugging when the guest has protected state. Additionally, an SEV-ES guest must only and always intercept DR7 reads and writes. Update

[PATCH v4 05/34] KVM: SVM: Add support for the SEV-ES VMSA

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Allocate a page during vCPU creation to be used as the encrypted VM save area (VMSA) for the SEV-ES guest. Provide a flag in the kvm_vcpu_arch structure that indicates whether the guest state is protected. When freeing a VMSA page that has been encrypted, the cache contents

[PATCH v4 09/34] KVM: SVM: Do not allow instruction emulation under SEV-ES

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky When a guest is running as an SEV-ES guest, it is not possible to emulate instructions. Add support to prevent instruction emulation. Signed-off-by: Tom Lendacky --- arch/x86/kvm/svm/svm.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/x86/kvm/svm/svm.c

[PATCH v4 04/34] KVM: SVM: Add GHCB accessor functions for retrieving fields

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Update the GHCB accessor functions to add functions for retrieve GHCB fields by name. Update existing code to use the new accessor functions. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/svm.h | 10 ++ arch/x86/kernel/cpu/vmware.c | 12 ++-- 2

[PATCH v4 03/34] KVM: SVM: Add support for SEV-ES capability in KVM

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky Add support to KVM for determining if a system is capable of supporting SEV-ES as well as determining if a guest is an SEV-ES guest. Signed-off-by: Tom Lendacky --- arch/x86/kvm/Kconfig | 3 ++- arch/x86/kvm/svm/sev.c | 47 ++

[PATCH v4 01/34] x86/cpu: Add VM page flush MSR availablility as a CPUID feature

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky On systems that do not have hardware enforced cache coherency between encrypted and unencrypted mappings of the same physical page, the hypervisor can use the VM page flush MSR (0xc001011e) to flush the cache contents of an SEV guest page. When a small number of pages are

[PATCH v4 00/34] SEV-ES hypervisor support

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky This patch series provides support for running SEV-ES guests under KVM. Secure Encrypted Virtualization - Encrypted State (SEV-ES) expands on the SEV support to protect the guest register state from the hypervisor. See "AMD64 Architecture Programmer's Manual Volume 2: System

Re: BananaPi M2 support

2020-11-17 Thread Sergey Suloev
Hi, ChenYu, I have tried to build and run linux-next  by tag  "next-20201117". Now the boot log looks different but the kernel still hangs. See https://pastebin.com/gFk7XuBc Thank you, Sergey On 17.11.2020 11:06, Chen-Yu Tsai wrote: Hi, Please try linux-next. There were some

[PATCH v4 02/34] KVM: SVM: Remove the call to sev_platform_status() during setup

2020-11-17 Thread Tom Lendacky
From: Tom Lendacky When both KVM support and the CCP driver are built into the kernel instead of as modules, KVM initialization can happen before CCP initialization. As a result, sev_platform_status() will return a failure when it is called from sev_hardware_setup(), when this isn't really an

Re: [PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Jaegeuk Kim
On 11/17, Theodore Y. Ts'o wrote: > On Tue, Nov 17, 2020 at 04:03:14AM +, Daniel Rosenberg wrote: > > This shifts the responsibility of setting up dentry operations from > > fscrypt to the individual filesystems, allowing them to have their own > > operations while still setting fscrypt's

Re: [PATCH] scsi: ufs: show lba and length for unmap commands

2020-11-17 Thread Jaegeuk Kim
On 11/16, Martin K. Petersen wrote: > > Hi Jaegeuk! > > > From: Leo Liou > > > > We have lba and length for unmap commands. > > > > Signed-off-by: Leo Liou > > Doesn't apply to 5.11/scsi-queue. > > Also needs a Signed-off-by: tag from you. Hi Martin, Could you please consider this patch

Re: [RFC][PATCH v2 12/21] x86/pti: Use PTI stack instead of trampoline stack

2020-11-17 Thread Alexandre Chartre
On 11/17/20 4:52 PM, Andy Lutomirski wrote: On Tue, Nov 17, 2020 at 7:07 AM Alexandre Chartre wrote: On 11/16/20 7:34 PM, Andy Lutomirski wrote: On Mon, Nov 16, 2020 at 10:10 AM Alexandre Chartre wrote: On 11/16/20 5:57 PM, Andy Lutomirski wrote: On Mon, Nov 16, 2020 at 6:47 AM

Re: [PATCH V2] cpufreq: stats: Use local_clock() instead of jiffies

2020-11-17 Thread Rafael J. Wysocki
On Tue, Nov 17, 2020 at 12:32 PM Viresh Kumar wrote: > > local_clock() has better precision and accuracy as compared to jiffies, > lets use it for time management in cpufreq stats. > > Signed-off-by: Viresh Kumar > --- > V2: > - Doesn't change the units to msec and use local_clock() instead of >

Re: [PATCH v2 07/22] drm/msm: Do rpm get sooner in the submit path

2020-11-17 Thread Rob Clark
On Thu, Nov 5, 2020 at 11:16 PM Viresh Kumar wrote: > > On 05-11-20, 11:24, Rob Clark wrote: > > On Tue, Nov 3, 2020 at 7:04 PM Viresh Kumar wrote: > > > > > > On 03-11-20, 08:50, Rob Clark wrote: > > > > sorry, it didn't apply cleanly (which I guess is due to some other > > > > dependencies

[PATCH v5 4/7] scsi: ufs: use WQ_HIGHPRI for gating work

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim Must have WQ_MEM_RECLAIM ``WQ_MEM_RECLAIM`` All wq which might be used in the memory reclaim paths **MUST** have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Signed-off-by: Jaegeuk Kim Reviewed-by: Asutosh

[PATCH v5 1/7] scsi: ufs: avoid to call REQ_CLKS_OFF to CLKS_OFF

2020-11-17 Thread Jaegeuk Kim
Once UFS was gated with CLKS_OFF, it should not call REQ_CLKS_OFF again, which caused hibern8_enter failure. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

Re: [PATCH v3] swiotlb: Adjust SWIOTBL bounce buffer size for SEV guests.

2020-11-17 Thread Konrad Rzeszutek Wilk
.snip.. > > > > Lets break this down: > > > > > > > > How does the performance improve for one single device if you increase > > > > the SWIOTLB? > > > > Is there a specific device/driver that you can talk about that improve > > > > with this patch? > > > > > > > > > > > > > > Yes, these are

[PATCH v5 3/7] scsi: ufs: clear UAC for FFU and RPMB LUNs

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim In order to conduct FFU or RPMB operations, UFS needs to clear UAC. This patch clears it explicitly, so that we could get no failure given early execution. Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 70 +++

Re: Time to re-enable Runtime PM per default for PCI devcies?

2020-11-17 Thread Rafael J. Wysocki
On Tue, Nov 17, 2020 at 5:38 PM Bjorn Helgaas wrote: > > [+to Rafael, author of the commit you mentioned, > +cc Mika, Kai Heng, Lukas, linux-pm, linux-kernel] > > On Tue, Nov 17, 2020 at 04:56:09PM +0100, Heiner Kallweit wrote: > > More than 10 yrs ago Runtime PM was disabled per default by

Re: [PATCH v5 8/8] rpmsg: Turn name service into a stand alone driver

2020-11-17 Thread Guennadi Liakhovetski
On Tue, Nov 17, 2020 at 05:44:05PM +0100, Arnaud POULIQUEN wrote: > > > On 11/17/20 5:03 PM, Guennadi Liakhovetski wrote: > > On Tue, Nov 17, 2020 at 12:42:30PM +0100, Arnaud POULIQUEN wrote: > > > > [snip] > > > >> diff --git a/drivers/rpmsg/rpmsg_ns.c b/drivers/rpmsg/rpmsg_ns.c > >> index

[PATCH v5 7/7] scsi: ufs: show lba and length for unmap commands

2020-11-17 Thread Jaegeuk Kim
From: Leo Liou We have lba and length for unmap commands. Signed-off-by: Leo Liou Reviewed-by: Stanley Chu Signed-off-by: Jaegeuk Kim --- drivers/scsi/ufs/ufshcd.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[PATCH v5 0/5] scsi: ufs: add some fixes

2020-11-17 Thread Jaegeuk Kim
Change log from v4: - add more fixes Change log from v3: - use __ufshcd_release with a fix in __ufshcd_release Change log from v2: - use active_req-- instead of __ufshcd_release to avoid UFS timeout Change log from v1: - remove clkgating_enable check in __ufshcd_release - use

[PATCH v5 2/7] scsi: ufs: atomic update for clkgating_enable

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim When giving a stress test which enables/disables clkgating, we hit device timeout sometimes. This patch avoids subtle racy condition to address it. Note that, this requires a patch to address the device stuck by REQ_CLKS_OFF in __ufshcd_release(). The fix is "scsi: ufs: avoid

[PATCH v5 6/7] scsi: ufs: fix clkgating on/off correctly

2020-11-17 Thread Jaegeuk Kim
The below call stack prevents clk_gating at every IO completion. We can remove the condition, ufshcd_any_tag_in_use(), since clkgating_work will check it again. ufshcd_complete_requests(struct ufs_hba *hba) ufshcd_transfer_req_compl() __ufshcd_transfer_req_compl()

[PATCH v5 5/7] scsi: add more contexts in the ufs tracepoints

2020-11-17 Thread Jaegeuk Kim
From: Jaegeuk Kim This adds user-friendly tracepoints with group id. Signed-off-by: Jaegeuk Kim Reviewed-by: Can Guo --- drivers/scsi/ufs/ufshcd.c | 6 -- include/trace/events/ufs.h | 21 + 2 files changed, 21 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 0/6] Enable Qualcomm Crypto Engine on sdm845

2020-11-17 Thread Eric Biggers
On Tue, Nov 17, 2020 at 08:47:08AM -0500, Thara Gopinath wrote: > Qualcomm crypto engine supports hardware accelerated algorithms for > encryption and authentication. Enable support for aes,des,3des encryption > algorithms and sha1,sha256, hmac(sha1),hmac(sha256) authentication > algorithms on

Re: [RFC][PATCH v2 00/21] x86/pti: Defer CR3 switch to C code

2020-11-17 Thread Borislav Petkov
On Tue, Nov 17, 2020 at 08:56:23AM +0100, Alexandre Chartre wrote: > The main goal of ASI is to provide KVM address space isolation to > mitigate guest-to-host speculative attacks like L1TF or MDS. Because the current L1TF and MDS mitigations are lacking or why? > Current proposal of ASI is

Re: [PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
On Wed, Nov 18, 2020 at 12:49:19AM +0800, Hui Su wrote: > page->lru bit 0 can tell whether the page is > avtive page or not. > page->lru bit 1 can tell whether the page is > file page or not. > > Signed-off-by: Hui Su > --- > include/linux/mmzone.h | 4 ++-- > 1 file changed, 2 insertions(+), 2

Re: [PATCH v4] mm: Optional full ASLR for mmap() and mremap()

2020-11-17 Thread Matthew Wilcox
On Mon, Oct 26, 2020 at 06:05:18PM +0200, Topi Miettinen wrote: > Writing a new value of 3 to /proc/sys/kernel/randomize_va_space > enables full randomization of memory mappings created with mmap(NULL, > ...). With 2, the base of the VMA used for such mappings is random, > but the mappings are

[PATCH] PCI: dwc: Set 32-bit DMA mask for MSI target address allocation

2020-11-17 Thread Vidya Sagar
Set DMA mask to 32-bit while allocating the MSI target address so that the address is usable for both 32-bit and 64-bit MSI capable devices. Throw a warning if it fails to set the mask to 32-bit to alert that devices that are only 32-bit MSI capable may not work properly. Signed-off-by: Vidya

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Andy Shevchenko
On Tue, Nov 17, 2020 at 6:45 PM Andy Shevchenko wrote: > On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult > wrote: > > > > The of_match_ptr(foo) macro evaluates to foo, only if > > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > > CONFIG_ACPI. That's very helpful

[PATCH] mm/lru: simplify is_file_lru() and is_active_lru()

2020-11-17 Thread Hui Su
page->lru bit 0 can tell whether the page is avtive page or not. page->lru bit 1 can tell whether the page is file page or not. Signed-off-by: Hui Su --- include/linux/mmzone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h

Re: [block, scsi, ide] 3e3b42fee6: kmsg.sd#:#:#:#:[sdf]Asking_for_cache_data_failed

2020-11-17 Thread Bart Van Assche
On 11/17/20 8:00 AM, kernel test robot wrote: on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): If you fix the issue, kindly add following tag Reported-by: kernel test robot

Re: [PATCH v5 8/8] rpmsg: Turn name service into a stand alone driver

2020-11-17 Thread Arnaud POULIQUEN
On 11/17/20 5:03 PM, Guennadi Liakhovetski wrote: > On Tue, Nov 17, 2020 at 12:42:30PM +0100, Arnaud POULIQUEN wrote: > > [snip] > >> diff --git a/drivers/rpmsg/rpmsg_ns.c b/drivers/rpmsg/rpmsg_ns.c >> index 5bda7cb44618..80c2cc23bada 100644 >> --- a/drivers/rpmsg/rpmsg_ns.c >> +++

Re: [PATCH 4/9] platform/surface: aggregator: Add trace points

2020-11-17 Thread Steven Rostedt
On Sun, 15 Nov 2020 20:21:38 +0100 Maximilian Luz wrote: > Add trace points to the Surface Aggregator subsystem core. These trace > points can be used to track packets, requests, and allocations. They are > further intended for debugging and testing/validation, specifically in > combination with

Re: [PATCH RFC 04/12] vdpa: add vdpa simulator for block device

2020-11-17 Thread Stefan Hajnoczi
On Tue, Nov 17, 2020 at 03:16:20PM +0100, Stefano Garzarella wrote: > On Tue, Nov 17, 2020 at 11:11:21AM +, Stefan Hajnoczi wrote: > > On Fri, Nov 13, 2020 at 02:47:04PM +0100, Stefano Garzarella wrote: > > > +static void vdpasim_blk_work(struct work_struct *work) > > > +{ > > > + struct

Re: [PATCH v2 8/8] powernv/memtrace: don't abuse memory hot(un)plug infrastructure for memory allocations

2020-11-17 Thread Oscar Salvador
On Wed, Nov 11, 2020 at 03:53:22PM +0100, David Hildenbrand wrote: > Suggested-by: Michal Hocko > Cc: Michael Ellerman > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Rashmica Gupta > Cc: Andrew Morton > Cc: Mike Rapoport > Cc: Michal Hocko > Cc: Oscar Salvador > Cc: Wei Yang >

Re: [PATCH] drivers: gpio: use of_match_ptr() and ACPI_PTR() macros

2020-11-17 Thread Andy Shevchenko
On Tue, Nov 17, 2020 at 5:45 PM Enrico Weigelt, metux IT consult wrote: > > The of_match_ptr(foo) macro evaluates to foo, only if > CONFIG_OF is set, otherwise to NULL. Same does ACPI_PTR with > CONFIG_ACPI. That's very helpful for drivers that can be used > with or without oftree / acpi. > >

Re: [PATCH v2] mfd: syscon: Add syscon_regmap_lookup_by_phandle_optional() function.

2020-11-17 Thread Arnd Bergmann
On Tue, Nov 17, 2020 at 5:07 PM Lee Jones wrote: > On Tue, 17 Nov 2020, Matthias Brugger wrote: > > On 17/11/2020 13:37, Lee Jones wrote: > > > On Tue, 17 Nov 2020, Matthias Brugger wrote: > > > > If you want to go the route for me rebasing my tree on top of for-mfd-next > > then I'd like to have

Re: [RFC PATCH v3 9/9] ipu3-cio2: Add functionality allowing software_node connections to sensors on platforms designed for Windows

2020-11-17 Thread Andy Shevchenko
On Tue, Nov 17, 2020 at 2:02 PM Dan Scally wrote: > > On 16/11/2020 16:16, Andy Shevchenko wrote: > > On Mon, Nov 16, 2020 at 02:15:01PM +, Dan Scally wrote: > >> On 16/11/2020 14:10, Laurent Pinchart wrote: > >>> I thought we were looking for ACPI devices, not companion devices, in > >>>

Re: [f2fs-dev] [PATCH v3] f2fs: avoid race condition for shinker count

2020-11-17 Thread Jaegeuk Kim
On 11/12, Chao Yu wrote: > On 2020/11/12 13:40, Jaegeuk Kim wrote: > > Light reported sometimes shinker gets nat_cnt < dirty_nat_cnt resulting in > > wrong do_shinker work. Let's avoid to get stale data by using nat_tree_lock. > > > > Reported-by: Light Hsieh > > Signed-off-by: Jaegeuk Kim > >

drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used

2020-11-17 Thread kernel test robot
-r005-20201117 (attached as .config) compiler: arceb-elf-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel

[PATCH v2 net-next 3/5] ptp: clockmatrix: remove 5 second delay before entering write phase mode

2020-11-17 Thread min.li.xe
From: Min Li Remove write phase mode 5 second setup delay, not needed. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 22 -- drivers/ptp/ptp_clockmatrix.h | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/ptp/ptp_clockmatrix.c

Re: Time to re-enable Runtime PM per default for PCI devcies?

2020-11-17 Thread Bjorn Helgaas
[+to Rafael, author of the commit you mentioned, +cc Mika, Kai Heng, Lukas, linux-pm, linux-kernel] On Tue, Nov 17, 2020 at 04:56:09PM +0100, Heiner Kallweit wrote: > More than 10 yrs ago Runtime PM was disabled per default by bb910a7040 > ("PCI/PM Runtime: Make runtime PM of PCI devices inactive

Re: [RFC, v1 0/3] msi support for platform devices

2020-11-17 Thread Vikas Gupta
Hi Eric, On Tue, Nov 17, 2020 at 1:55 PM Auger Eric wrote: > > Hi Vikas, > > On 11/17/20 9:05 AM, Auger Eric wrote: > > Hi Vikas, > > > > On 11/17/20 7:25 AM, Vikas Gupta wrote: > >> Hi Eric, > >> > >> On Mon, Nov 16, 2020 at 6:44 PM Auger Eric wrote: > >>> > >>> Hi Vikas, > >>> > >>> On

Re: [PATCH v2 01/13] seqnum_ops: Introduce Sequence Number Ops

2020-11-17 Thread Shuah Khan
On 11/13/20 2:03 PM, Matthew Wilcox wrote: +== +Sequence Number Operations +== + +:Author: Shuah Khan +:Copyright: |copy| 2020, The Linux Foundation +:Copyright: |copy| 2020, Shuah Khan + +Sequence Number api provides interfaces for unsigned up

Re: [RFC PATCH 7/9] cxl/mem: Implement polled mode mailbox

2020-11-17 Thread Ben Widawsky
On 20-11-17 15:31:22, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:43:54 -0800 > Ben Widawsky wrote: > > > Create a function to handle sending a command, optionally with a > > payload, to the memory device, polling on a result, and then optionally > > copying out the payload. The algorithm

[PATCH] kcsan: Avoid scheduler recursion by using non-instrumented preempt_disable()

2020-11-17 Thread Marco Elver
When enabling KCSAN for kernel/sched (remove KCSAN_SANITIZE := n from kernel/sched/Makefile), with CONFIG_DEBUG_PREEMPT=y, we can observe recursion due to: check_access() [via instrumentation] kcsan_setup_watchpoint() reset_kcsan_skip()

Re: possible deadlock in brd_probe

2020-11-17 Thread Christoph Hellwig
I think this is a false positive due to the cycling through different bd_mutex instances. I think my next big series aimed at 5.11 will fix this as a side effect, so I plan to ignore this for now, but will test the reproducer with the follow on work applied eventually. On Tue, Nov 17, 2020 at

Re: [PATCH 0/8] cppc_cpufreq: fix, clarify and improve support

2020-11-17 Thread Rafael J. Wysocki
On Tue, Nov 17, 2020 at 4:32 PM Ionela Voinescu wrote: > > Hi Rafael, > > On Tuesday 17 Nov 2020 at 15:59:24 (+0100), Rafael J. Wysocki wrote: > > On Thu, Nov 5, 2020 at 1:56 PM Ionela Voinescu > > wrote: > > > > > > Hi guys, > > > > > > I found myself staring a bit too much at this driver in

[PATCH v9 3/9] set_memory: allow set_direct_map_*_noflush() for multiple pages

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The underlying implementations of set_direct_map_invalid_noflush() and set_direct_map_default_noflush() allow updating multiple contiguous pages at once. Add numpages parameter to set_direct_map_*_noflush() to expose this ability with these APIs. Signed-off-by: Mike

[PATCH v9 7/9] PM: hibernate: disable when there are active secretmem users

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport It is unsafe to allow saving of secretmem areas to the hibernation snapshot as they would be visible after the resume and this essentially will defeat the purpose of secret memory mappings. Prevent hibernation whenever there are active secret memory users. Signed-off-by:

[PATCH v9 4/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Introduce "memfd_secret" system call with the ability to create memory areas visible only in the context of the owning process and not mapped not only to other processes but in the kernel page tables as well. The user will create a file descriptor using the memfd_secret()

[PATCH v9 8/9] arch, mm: wire up memfd_secret system call were relevant

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Wire up memfd_secret system call on architectures that define ARCH_HAS_SET_DIRECT_MAP, namely arm64, risc-v and x86. Signed-off-by: Mike Rapoport Acked-by: Palmer Dabbelt Acked-by: Arnd Bergmann --- arch/arm64/include/asm/unistd.h| 2 +-

Re: md: dm-writeback: add __noreturn to BUG-ging function

2020-11-17 Thread Mike Snitzer
On Mon, Nov 16 2020 at 6:00pm -0500, Randy Dunlap wrote: > On 11/15/20 11:30 PM, Christian Borntraeger wrote: > > > > > > On 13.11.20 23:52, Randy Dunlap wrote: > >> Building on arch/s390/ flags this as an error, so add the > >> __noreturn attribute modifier to prevent the build error. > >> >

[PATCH v9 9/9] secretmem: test: add basic selftest for memfd_secret(2)

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The test verifies that file descriptor created with memfd_secret does not allow read/write operations, that secret memory mappings respect RLIMIT_MEMLOCK and that remote accesses with process_vm_read() and ptrace() to the secret memory fail. Signed-off-by: Mike Rapoport ---

Re: [PATCH][next] mwifiex: Fix fall-through warnings for Clang

2020-11-17 Thread Gustavo A. R. Silva
On Tue, Nov 17, 2020 at 08:15:59AM -0800, Joe Perches wrote: > On Tue, 2020-11-17 at 10:09 -0600, Gustavo A. R. Silva wrote: > > In preparation to enable -Wimplicit-fallthrough for Clang, fix multiple > > warnings by explicitly adding multiple break statements instead of > > letting the code fall

[PATCH v9 2/9] mmap: make mlock_future_check() global

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport It will be used by the upcoming secret memory implementation. Signed-off-by: Mike Rapoport --- mm/internal.h | 3 +++ mm/mmap.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mm/internal.h b/mm/internal.h index c43ccdddb0f6..ae146a260b14

[PATCH v9 6/9] secretmem: add memcg accounting

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Account memory consumed by secretmem to memcg. The accounting is updated when the memory is actually allocated and freed. Signed-off-by: Mike Rapoport --- mm/filemap.c | 3 ++- mm/secretmem.c | 36 +++- 2 files changed, 37 insertions(+),

[PATCH v2 net-next 4/5] ptp: clockmatrix: Fix non-zero phase_adj is lost after snap

2020-11-17 Thread min.li.xe
From: Min Li Fix non-zero phase_adj is lost after snap. Use ktime_sub to do ktime_t subtraction. Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 210 +- drivers/ptp/ptp_clockmatrix.h | 5 +- 2 files changed, 190 insertions(+), 25

[PATCH] namespace: make timens_on_fork() return nothing

2020-11-17 Thread Hui Su
timens_on_fork() always return 0, and maybe not need to judge the return value in copy_namespaces(). So make timens_on_fork() return nothing and do not judge its return val in copy_namespaces(). Signed-off-by: Hui Su --- include/linux/time_namespace.h | 6 +++--- kernel/nsproxy.c

[PATCH v9 1/9] mm: add definition of PMD_PAGE_ORDER

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport The definition of PMD_PAGE_ORDER denoting the number of base pages in the second-level leaf page is already used by DAX and maybe handy in other cases as well. Several architectures already have definition of PMD_ORDER as the size of second level page table, so to avoid

[PATCH v9 5/9] secretmem: use PMD-size pages to amortize direct map fragmentation

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Removing a PAGE_SIZE page from the direct map every time such page is allocated for a secret memory mapping will cause severe fragmentation of the direct map. This fragmentation can be reduced by using PMD-size pages as a pool for small pages for secret memory mappings. Add

[PATCH v2 net-next 0/5] ptp_clockmatrix bug fix and improvement

2020-11-17 Thread min.li.xe
From: Min Li This patch series is aiming at submitting the latest bug fixes and code improvements of PHC driver for Renesas CLOCKMATRIX timing card. The code has been thouroughly tested in both customer labs and Renesas internal lab using the latest linuxptp program on Xilinx ZCU102 platform.

[PATCH v2 net-next 5/5] ptp: clockmatrix: deprecate firmware older than 4.8.7

2020-11-17 Thread min.li.xe
From: Min Li Add deprecated flag to indicate < v4.8.7. Fix idtcm_enable_tod() call correct settime(). Signed-off-by: Min Li --- drivers/ptp/ptp_clockmatrix.c | 69 --- drivers/ptp/ptp_clockmatrix.h | 11 +++ 2 files changed, 45 insertions(+), 35

[PATCH v9 0/9] mm: introduce memfd_secret system call to create "secret" memory areas

2020-11-17 Thread Mike Rapoport
From: Mike Rapoport Hi, This is an implementation of "secret" mappings backed by a file descriptor. The file descriptor backing secret memory mappings is created using a dedicated memfd_secret system call The desired protection mode for the memory is configured using flags parameter of the

Re: [External] RE: [PATCH v4 00/21] Free some vmemmap pages of hugetlb page

2020-11-17 Thread Muchun Song
On Tue, Nov 17, 2020 at 7:08 PM Song Bao Hua (Barry Song) wrote: > > > > > -Original Message- > > From: Muchun Song [mailto:songmuc...@bytedance.com] > > Sent: Tuesday, November 17, 2020 11:50 PM > > To: Song Bao Hua (Barry Song) > > Cc: cor...@lwn.net; mike.krav...@oracle.com;

Re: [PATCH] USB: serial: mos7720: defer state restore to a workqueue

2020-11-17 Thread Johan Hovold
On Mon, Nov 16, 2020 at 02:31:02PM -0800, Davidlohr Bueso wrote: > On Mon, 16 Nov 2020, Johan Hovold wrote: > > >On Fri, Nov 13, 2020 at 08:27:25PM -0800, Davidlohr Bueso wrote: > >> @@ -1883,21 +1724,17 @@ static void mos7720_release(struct usb_serial > >> *serial) > >>if

Re: [PATCH v4 00/16] Overhaul multi-page lookups for THP

2020-11-17 Thread Hugh Dickins
On Tue, 17 Nov 2020, Matthew Wilcox wrote: > On Mon, Nov 16, 2020 at 02:34:34AM -0800, Hugh Dickins wrote: > > Fix to [PATCH v4 15/16] mm/truncate,shmem: Handle truncates that split THPs. > > One machine ran fine, swapping and building in ext4 on loop0 on huge tmpfs; > > one machine got occasional

Re: [PATCH 1/2] kbuild: Hoist '--orphan-handling' into Kconfig

2020-11-17 Thread Nathan Chancellor
On Tue, Nov 17, 2020 at 10:03:29PM +1100, Michael Ellerman wrote: > Nathan Chancellor writes: > > Currently, '--orphan-handling=warn' is spread out across four different > > architectures in their respective Makefiles, which makes it a little > > unruly to deal with in case it needs to be

[RFC PATCH 05/12] iio: core: split __iio_device_attr_init() to init only the attr object

2020-11-17 Thread Alexandru Ardelean
The __iio_device_attr_init() function initializes a device_attribute object, but mostly it just does a lot of name creation logic. We will want to re-use this logic for name-creation, so this change re-purposes the __iio_device_attr_init() to be a __iio_attr_init() function which just handles the

[RFC PATCH 01/12] iio: core: register chardev only if needed

2020-11-17 Thread Alexandru Ardelean
We only need a chardev if we need to support buffers and/or events. With this change, a chardev will be created only if an IIO buffer is attached OR an event_interface is configured. Otherwise, no chardev will be created, and the IIO device will get registered with the 'device_add()' call.

[RFC PATCH 04/12] iio: buffer: add index to the first IIO buffer dir and symlink it back

2020-11-17 Thread Alexandru Ardelean
This change makes it so that the first buffer directory is named 'buffer0' and moves the 'scan_elements' under it. For backwards compatibility these folders are symlinked back to the original folders. Signed-off-by: Alexandru Ardelean --- drivers/iio/industrialio-buffer.c | 38

[RFC PATCH 03/12] iio: buffer: rework buffer & scan_elements dir creation

2020-11-17 Thread Alexandru Ardelean
When adding more than one IIO buffer per IIO device, we will need to create a buffer & scan_elements directory for each buffer. We also want to move the 'scan_elements' to be a sub-directory of the 'buffer' folder. The format we want to reach is, for a iio:device0 folder, for 2 buffers [for

<    5   6   7   8   9   10   11   12   13   14   >