Re: [PATCH] Enable SR-IOV instantiation through /sys file

2017-11-06 Thread Bjorn Helgaas
On Tue, Oct 24, 2017 at 01:04:26PM -0700, Jeff Kirsher wrote: > From: Liang-Min Wang > > When a SR-IOV supported device is bound with vfio-pci, the driver > could not create SR-IOV instance through /sys/bus/pci/devices/... > /sriov_numvfs. This patch re-activates this capability for a PCIe > dev

[PATCH v2 3/3] clk: actions: Add clock driver for Actions S900 SoC

2017-11-06 Thread Manivannan Sadhasivam
Add clock driver for Actions Semi OWL series S900 SoC Signed-off-by: Manivannan Sadhasivam --- Changes in v2: 1. Changed the directory structure to actions/ and used owl- prefix for sources. 2. Fixed MAINTAINERS and added Andreas as Designated Reviewer (R:). 3. Introduced new Kconfig for S900

[PATCH v2 0/3] Add clock driver for Actions S900 SoC

2017-11-06 Thread Manivannan Sadhasivam
This patchset adds clock driver for Actions Semi OWL series S900 SoC with relevant clock bindings and device tree data. This series also addresses the review comments from previous submission happened last year. https://patchwork.kernel.org/patch/9254471/ Driver has been validated on Bubblegum-9

[PATCH v2 2/3] arm64: dts: actions: Add S900 clock management unit nodes

2017-11-06 Thread Manivannan Sadhasivam
Add Actions Semi S900 Clock Management Unit (CMU) nodes Signed-off-by: Manivannan Sadhasivam --- Changes in v2: 1. Fixed commit message 2. Changed "diff_24M" to "diff24M" 3. Changed clock-controller node name to "cmu" 4. Added clocks property 5. Moved "cmu" node under "soc" node 6. Sorted header

[PATCH v2 1/3] dt-bindings: clock: Add Actions S900 clock bindings

2017-11-06 Thread Manivannan Sadhasivam
Add Actions Semi S900 clock bindings. Signed-off-by: Manivannan Sadhasivam --- Changes in v2: 1. Added binding header to this patch 2. Changed clock-controller node name to cmu 3. Added clocks property to cmu node 4. Changed compatible property value to "actions,s900-cmu" 5. Fixed example UART c

Re: [PATCH v2] staging: fsl-mc: move bus driver out of staging

2017-11-06 Thread Roy Pledge
>> struct dpaa2_io { >> atomic_t refs; >> >> That's a kref, please use it instead of trying to roll your own. >> >> And even for this, your locking is not correct (i.e. you do not have >> any), that needs to be fixed so that teardown works correctly. > > I think we can drop this refcount

Re: [PATCH] PCI: designware: move dw_pcie_iatu_unroll_enabled to pcie-designware.c

2017-11-06 Thread Bjorn Helgaas
On Tue, Oct 24, 2017 at 07:10:55PM +0530, Pankaj Dubey wrote: > On 20 October 2017 at 23:11, Bjorn Helgaas wrote: > > > > On Thu, Oct 12, 2017 at 10:11:08AM +0530, Pankaj Dubey wrote: > > > IATU unroll feature can be enabled in EP mode as well, so we need to > > > have this check in pcie-designwar

[PATCH] ARCv2: Accomodate NS48 MMUv5 by releaxing MMU ver checking

2017-11-06 Thread Vineet Gupta
HS48 cpus will have a new MMUv5, although Linux is currently not explicitly supporting the newer features (so remains at V4). The existing software/hardware version check is very tight and causes boot abort. Given that the MMUv5 hardware is backwards compatible, relax the boot check to allow curren

Re: [PATCH] PCI: dwc: designware: don't sleep in atomic context

2017-11-06 Thread Bjorn Helgaas
On Fri, Oct 20, 2017 at 01:19:17PM -0500, Bjorn Helgaas wrote: > On Fri, Oct 13, 2017 at 09:10:38AM +0530, Pankaj Dubey wrote: > > > > > > On 10/12/2017 04:09 PM, David Laight wrote: > > >From: Pankaj Dubey > > >>Sent: 12 October 2017 08:55 > > >>In pcie-designware.c many places we are calling "u

Re: BUG: looking up invalid subclass: 8

2017-11-06 Thread Takashi Iwai
On Mon, 06 Nov 2017 19:36:14 +0100, syzbot wrote: > > Hello, > > syzkaller hit the following crash on > 5a3517e009e979f21977d362212b7729c5165d92 > git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/master > compiler: gcc (GCC) 7.1.1 20170620 > .config is attached > Raw console outp

Re: [PATCH] PCI: endpoint: handle probable NULL pointer access

2017-11-06 Thread Bjorn Helgaas
On Sat, Oct 28, 2017 at 04:13:56PM +0530, Pankaj Dubey wrote: > On 25 October 2017 at 17:32, Kishon Vijay Abraham I wrote: > > Hi, > > > > On Wednesday 25 October 2017 01:32 AM, Bjorn Helgaas wrote: > >> On Thu, Oct 12, 2017 at 09:27:57AM +0530, Pankaj Dubey wrote: > >>> controller_group allocatio

Re: UBSAN: Undefined behaviour in mm/sparse.c:81:17

2017-11-06 Thread Corentin Labbe
On Sun, Nov 05, 2017 at 01:57:33PM +0100, Corentin Labbe wrote: > Hello > > At least since next-20171102 I hit the following boot crash: > [0.00] Booting Linux on physical CPU 0x00 [0x410fd034] > [0.00] Linux version 4.14.0-rc7-next-20171103+ (compile@Red) (gcc > version 6

Re: Excessive logging in thunderbolt driver

2017-11-06 Thread Andreas Noever
On Wed, Nov 1, 2017 at 8:41 AM, Mika Westerberg wrote: > On Tue, Oct 31, 2017 at 10:45:46PM +0100, Stephen Hemminger wrote: >> The thunderbolt driver needs to stop logging. >> All these debug messages and the laptop is on battery with no devices >> connected. >> (I did use a USB key, but that is

Re: [PATCH] get_maintainer: Add a couple more --self-test options

2017-11-06 Thread Joe Perches
On Mon, 2017-11-06 at 13:12 -0600, Tom Saeger wrote: > Hi Joe, > This is good! I had something similar cooking - specifically for SCM > validation. > > My SCM attempt caught a few more issues: > - check git branch if specified > - check validitiy of "T:" entry, otherwise warn of malf

Re: [PATCH 2/2] PCI: mvebu: Check DRAM window size

2017-11-06 Thread Bjorn Helgaas
On Thu, Oct 05, 2017 at 04:16:50PM -0500, Bjorn Helgaas wrote: > On Mon, Sep 25, 2017 at 06:56:58PM -0500, Bjorn Helgaas wrote: > > On Mon, Aug 28, 2017 at 05:25:17PM +0200, Jan Luebbe wrote: > > > The sum of the DRAM windows may exceed 4GB (at least on Armada XP). > > > Return an error in that cas

Re: [PATCH] MAINTAINERS: Add git tree for Thunderbolt development

2017-11-06 Thread Andreas Noever
On Mon, Nov 6, 2017 at 6:12 PM, Mika Westerberg wrote: > I will be gathering Thunderbolt related patches to this git tree with > help of other Thunderbolt maintainers. > > Signed-off-by: Mika Westerberg > --- > Hi Andreas and Greg, > > If you are fine, I can pick up Thunderbolt related patches to

Re: [PATCH] usb: dwc2: host: fix isoc urb actual length

2017-11-06 Thread Alan Stern
On Mon, 6 Nov 2017, wlf wrote: > Hi Minas, > > 在 2017年11月06日 17:28, Minas Harutyunyan 写道: > > Hi, > > > > On 11/6/2017 12:46 PM, William Wu wrote: > >> The actual_length in dwc2_hcd_urb structure is used > >> to indicate the total data length transferred so far, > >> but in dwc2_update_isoc_urb_s

Re: [PATCH] get_maintainer: Add a couple more --self-test options

2017-11-06 Thread Tom Saeger
Hi Joe, This is good! I had something similar cooking - specifically for SCM validation. My SCM attempt caught a few more issues: - check git branch if specified - check validitiy of "T:" entry, otherwise warn of malformed entry. Example malformed (current next has two instances):

Re: [PATCH 3.16-stable 82/87] MIPS: ip27: Disable qlge driver in defconfig

2017-11-06 Thread Ben Hutchings
On Fri, 2017-05-05 at 21:47 +0200, Arnd Bergmann wrote: > Commit c64ebe32d3fc90c52277257d6c9fa7d589877cc2 upstream. > > One of the last remaining failures in kernelci.org is for a gcc bug: > > drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: error: insn does not > satisfy its constraints: >

Re: [PATCH 06/17] coresight: tmc: Make ETR SG table circular

2017-11-06 Thread Mathieu Poirier
On Thu, Oct 19, 2017 at 06:15:42PM +0100, Suzuki K Poulose wrote: > Make the ETR SG table Circular buffer so that we could start > at any of the SG pages and use the entire buffer for tracing. > This can be achieved by : > > 1) Keeping an additional LINK pointer at the very end of the > SG table,

Re: [PATCH v4] lib/dlock-list: Scale dlock_lists_empty()

2017-11-06 Thread Waiman Long
On 11/06/2017 01:47 PM, Davidlohr Bueso wrote: > Instead of the current O(N) implementation, at the cost > of adding an atomic counter, we can convert the call to > an atomic_read(). The counter only serves for accounting > empty to non-empty transitions, and vice versa; therefore > only modified t

Re: BUG: sleeping function called from invalid context at ./include/linux/uaccess.h:LINE

2017-11-06 Thread Dmitry Vyukov
On Mon, Nov 6, 2017 at 5:14 PM, Paolo Bonzini wrote: > On 06/11/2017 17:01, David Hildenbrand wrote: >> On 06.11.2017 16:10, Nick Desaulniers wrote: >>> Does it have to be stack allocated? >> >> We can't use kmalloc and friends in emulate.c. We would have to >> introduce new emulator callbacks. >>

Re: [PATCH AUTOSEL for 4.9 43/50] regulator: core: Don't use regulators as supplies until the parent is bound

2017-11-06 Thread Mark Brown
On Mon, Nov 06, 2017 at 06:19:46PM +, Levin, Alexander (Sasha Levin) wrote: > On Wed, Oct 25, 2017 at 10:06:36AM +0200, Mark Brown wrote: > >In general I would be extremely wary of backporting anything like this > >that affects things like device instantiation ordering, even without any > >kno

Re: [tip:x86/mm] mm/sparsemem: Allocate mem_section at runtime for CONFIG_SPARSEMEM_EXTREME=y

2017-11-06 Thread Bjorn Andersson
On Thu, Nov 2, 2017 at 7:12 AM, Kirill A. Shutemov wrote: [..] > Could you try the patch below instead? > > From 4a9d843f9d939d958612b0079ebe5743f265e1e0 Mon Sep 17 00:00:00 2001 > From: "Kirill A. Shutemov" > Date: Thu, 2 Nov 2017 17:02:29 +0300 > Subject: [PATCH] mm, sparse: Fix boot on arm64 >

RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnects to SMB Direct session

2017-11-06 Thread Long Li
> -Original Message- > From: Matthew Wilcox > Sent: Monday, November 6, 2017 10:10 AM > To: Long Li ; Pavel Shilovsky > Cc: linux-cifs ; Stephen Hemminger > ; linux-r...@vger.kernel.org; Kernel Mailing > List ; Steve French > Subject: RE: [Patch v5 08/21] CIFS: SMBD: Upper layer reconnect

Re: [PATCH v2 08/16] iommu: introduce device fault data

2017-11-06 Thread Jean-Philippe Brucker
Hi Yi, Sorry for the late reply, I seem to have missed this. On 20/10/17 11:07, Liu, Yi L wrote: [...] >>> + >>> +/* Generic fault types, can be expanded IRQ remapping fault */ enum >>> +iommu_fault_type { >>> + IOMMU_FAULT_DMA_UNRECOV = 1,/* unrecoverable fault */ >>> + IOMMU_FAULT_PAGE

Re: [PATCH] refcount_t: documentation for memory ordering differences

2017-11-06 Thread Randy Dunlap
On 11/06/2017 05:32 AM, Elena Reshetova wrote: > Some functions from refcount_t API provide different > memory ordering guarantees that their atomic counterparts. > This adds a document outlining the differences and > showing examples. > > Signed-off-by: Elena Reshetova > --- > Documentation/ref

Re: get_online_cpus() from a preemptible() context (bug?)

2017-11-06 Thread James Morse
Hi Peter, (combining your replies) On 06/11/17 10:32, Peter Zijlstra wrote: > On Fri, Nov 03, 2017 at 02:45:45PM +, James Morse wrote: >> I'm trying to work out what stops a thread being pre-empted and migrated >> between >> calling get_online_cpus() and put_online_cpus(). > Nothing; why wo

[PATCH v4] lib/dlock-list: Scale dlock_lists_empty()

2017-11-06 Thread Davidlohr Bueso
Instead of the current O(N) implementation, at the cost of adding an atomic counter, we can convert the call to an atomic_read(). The counter only serves for accounting empty to non-empty transitions, and vice versa; therefore only modified twice for each of the lists during the lifetime of the dl

[PATCH v3] kbuild: fix linker feature test macros when cross compiling with Clang

2017-11-06 Thread Nick Desaulniers
I was not seeing my linker flags getting added when using ld-option when cross compiling with Clang. Upon investigation, this seems to be due to a difference in how GCC vs Clang handle cross compilation. GCC is configured at build time to support one backend, that is implicit when compiling. Clan

Re: [PATCH v2] kbuild: fix linker feature test macros when cross compiling with Clang

2017-11-06 Thread Nick Desaulniers
Comparing make V=1 with the suggested config before my patch, after my patch, and after Masahiro's suggestion to add $(LDFLAGS): before: ... ld -m elf_i386 -pie-T arch/x86/boot/compressed/vmlinux.lds ... ... after my: ... ld -m elf_i386 -T arch/x86/boot/compressed/vmlinux.lds ... ... af

[PATCH 3/4] arm64: mm: Remove arch_apei_flush_tlb_one()

2017-11-06 Thread James Morse
Nothing calls arch_apei_flush_tlb_one() anymore, instead relying on __set_fixmap() to do the invalidation. Remove it. Move the IPI-considered-harmful comment to __set_fixmap(). Signed-off-by: James Morse Acked-by: Will Deacon Tested-by: Tyler Baicar --- arch/arm64/include/asm/acpi.h | 12

[PATCH 4/4] ACPI / APEI: Remove arch_apei_flush_tlb_one()

2017-11-06 Thread James Morse
Nothing calls arch_apei_flush_tlb_one() anymore, instead relying on __set_pte_vaddr() to do the invalidation when called from clear_fixmap() Remove arch_apei_flush_tlb_one(). Signed-off-by: James Morse Reviewed-by: Borislav Petkov --- arch/x86/kernel/acpi/apei.c | 5 - include/acpi/apei.h

[PATCH 1/4] ACPI / APEI: Replace ioremap_page_range() with fixmap

2017-11-06 Thread James Morse
Replace ghes_io{re,un}map_pfn_{nmi,irq}()s use of ioremap_page_range() with __set_fixmap() as ioremap_page_range() may sleep to allocate a new level of page-table, even if its passed an existing final-address to use in the mapping. The GHES driver can only be enabled for architectures that select

[PATCH 2/4] ACPI / APEI: Remove ghes_ioremap_area

2017-11-06 Thread James Morse
Now that nothing is using the ghes_ioremap_area pages, rip them out. Signed-off-by: James Morse Reviewed-by: Borislav Petkov Tested-by: Tyler Baicar --- drivers/acpi/apei/ghes.c | 39 ++- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/drivers

[PATCH 0/4] Switch GHES ioremap_page_range() to use fixmap

2017-11-06 Thread James Morse
GHES is doing ioremap_page_range() in both NMI and irq context, neither are safe as it may sleep to allocate intermediate levels of page table. Replace the NMI/irq GHES_IOREMAP_PAGES to use a fixmap entry each. After this nothing uses ghes_ioremap_area or arch_apei_flush_tlb_one(), rip them out.

Re: [PATCH] iommu/vt-d: Fix scatterlist offset handling

2017-11-06 Thread Jacob Pan
On Fri, 6 Oct 2017 16:43:09 +0200 Joerg Roedel wrote: > On Tue, Oct 03, 2017 at 07:05:17PM +0100, Robin Murphy wrote: > > Now, there are indeed plenty of drivers and subsystems which do > > work on lists of explicitly single pages - anything doing some > > variant of "addr = kmap_atomic(sg_page(s

Re: [RFC/RFT PATCH 0/6] Switch GHES ioremap_page_range() to use fixmap

2017-11-06 Thread James Morse
On 01/11/17 18:20, Kani, Toshimitsu wrote: > On Wed, 2017-11-01 at 16:30 +0100, Borislav Petkov wrote: >> On Wed, Nov 01, 2017 at 02:58:33PM +, James Morse wrote: >>> Does anyone have an x86 machine that does firmware-first using NOTIFY_NMI? >> AFAIK, the only one who has access to a reportedl

Re: general protection fault in asn1_ber_decoder

2017-11-06 Thread Eric Biggers
On Mon, Nov 06, 2017 at 10:36:00AM -0800, syzbot wrote: > kasan: GPF could be caused by NULL-ptr deref or user memory access > general protection fault: [#1] SMP KASAN > Dumping ftrace buffer: >(ftrace buffer empty) > Modules linked in: > CPU: 3 PID: 2984 Comm: syzkaller229187 Not tainted

Re: [RFC/RFT PATCH 3/6] ACPI / APEI: Replace ioremap_page_range() with fixmap

2017-11-06 Thread James Morse
Hi gengdongjiu On 02/11/17 12:01, gengdongjiu wrote: > James Morse wrote: >> Can I take that as a 'Tested-by:'? >> >> These tags also let us record who has a system that can test changes to this >> driver. > > sure. > Thanks for the fixing. > Qiang Zheng who is my colleague have tested it. > >

Re: [PATCH][RFC] usb: hub: Cycle HUB power when initialization fails

2017-11-06 Thread Alan Stern
On Sun, 5 Nov 2017, Mike Looijmans wrote: > On 03-11-17 18:27, Alan Stern wrote: > > On Fri, 3 Nov 2017, Mike Looijmans wrote: > > > >> Sometimes the USB device gets confused about the state of the > >> initialization and > >> the connection fails. In particular, the device thinks that it's alr

[PATCH v2 1/2] x86/mm/kasan: don't use vmemmap_populate() to initialize shadow

2017-11-06 Thread Pavel Tatashin
From: Andrey Ryabinin The kasan shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for kasan, which requires zeroed shadow memory. Add kasan_popula

[PATCH v2 0/2] don't use vmemmap_populate() to initialize shadow

2017-11-06 Thread Pavel Tatashin
Corrected "From" fields in these two patches to preserve the original authorship. Andrey Ryabinin (1): x86/mm/kasan: don't use vmemmap_populate() to initialize shadow Will Deacon (1): arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow arch/arm64/Kconfig | 2 +- arc

[PATCH v2 2/2] arm64/mm/kasan: don't use vmemmap_populate() to initialize shadow

2017-11-06 Thread Pavel Tatashin
From: Will Deacon The kasan shadow is currently mapped using vmemmap_populate() since that provides a semi-convenient way to map pages into init_top_pgt. However, since that no longer zeroes the mapped pages, it is not suitable for kasan, which requires zeroed shadow memory. Add kasan_populate_s

Re: [PATCH v2] video: atmel_lcdfb: Use unique error messages in atmel_lcdfb_of_init()

2017-11-06 Thread Joe Perches
On Mon, 2017-11-06 at 19:14 +0100, SF Markus Elfring wrote: > A duplicate error message was used so far in this function implementation. > Thus use a consistent message format instead together with property names > where constant merging can be applied by the compiler in four cases. [] > diff --git

[PATCH v2] pid: restore the old behaviour of the ns_last_pid sysctl

2017-11-06 Thread Andrei Vagin
CRIU uses ns_last_pid to fork a process with a specified pid. For example, if we need to create a process with the pid of 1, we write into /proc/sys/kernel/ns_last_pid $ echo > /proc/sys/kernel/ns_last_pid; sh -c 'echo $$' 1 This behaviour has been broken and now if we write 999

[PATCH v2 1/2] cgroup: export list of delegatable control files using sysfs

2017-11-06 Thread Roman Gushchin
Delegatable cgroup v2 control files may require special handling (e.g. chowning), and the exact list of such files varies between kernel versions (and likely to be extended in the future). To guarantee correctness of this list and simplify the life of userspace (systemd, first of all), let's expor

[PATCH v2 2/2] cgroup: export list of cgroups v2 features using sysfs

2017-11-06 Thread Roman Gushchin
The active development of cgroups v2 sometimes leads to a creation of interfaces, which are not turned on by default (to provide backward compatibility). It's handy to know from userspace, which cgroup v2 features are supported without calculating it based on the kernel version. So, let's export th

[Part2 PATCH v8 01/38] Documentation/virtual/kvm: Add AMD Secure Encrypted Virtualization (SEV)

2017-11-06 Thread Brijesh Singh
Create a Documentation entry to describe the AMD Secure Encrypted Virtualization (SEV) feature. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Jonathan Corbet Cc: Borislav Petkov Cc: Tom Lendacky Cc: k...@vger.kernel.org Cc: x...@kernel.or

[Part2 PATCH v8 04/38] kvm: svm: Add SEV feature definitions to KVM

2017-11-06 Thread Brijesh Singh
From: Tom Lendacky Define the SEV enable bit for the VMCB control structure. The hypervisor will use this bit to enable SEV in the guest. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: x...@kernel.org

[Part2 PATCH v8 05/38] KVM: SVM: Prepare to reserve asid for SEV guest

2017-11-06 Thread Brijesh Singh
Currently, ASID allocation start at 1. Add a svm_vcpu_data.min_asid which allows supplying a dynamic start ASID. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@

Re: [kernel-hardening] Re: [PATCH v3] scripts: add leaking_addresses.pl

2017-11-06 Thread Pavel Vasilyev
 ./leaking_addresses.pl --dont_walk_abs /proc --dont_walk_abs /sys Unknown option: dont_walk_abs Unknown option: dont_walk_abs 06.11.2017 20:27, Linus Torvalds пишет: > David - you can see the patch on patchwork: > >     https://patchwork.kernel.org/patch/10042605/ > > and try it out yourself. >

[Part2 PATCH v8 06/38] KVM: X86: Extend CPUID range to include new leaf

2017-11-06 Thread Brijesh Singh
This CPUID leaf provides the memory encryption support information on AMD Platform. Its complete description is available in APM volume 2, Section 15.34 Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom

[Part2 PATCH v8 03/38] kvm: svm: prepare for new bit definition in nested_ctl

2017-11-06 Thread Brijesh Singh
From: Tom Lendacky Currently the nested_ctl variable in the vmcb_control_area structure is used to indicate nested paging support. The nested paging support field is actually defined as bit 0 of the field. In order to support a new feature flag the usage of the nested_ctl and nested paging suppor

[Part2 PATCH v8 07/38] KVM: Introduce KVM_MEMORY_ENCRYPT_OP ioctl

2017-11-06 Thread Brijesh Singh
If the hardware supports memory encryption then the KVM_MEMORY_ENCRYPT_OP ioctl can be used by qemu to issue a platform specific memory encryption commands. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc:

[Part2 PATCH v8 10/38] crypto: ccp: Define SEV userspace ioctl and command id

2017-11-06 Thread Brijesh Singh
Add a include file which defines the ioctl and command id used for issuing SEV platform management specific commands. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kernel.org Cc: linux-ker

[Part2 PATCH v8 09/38] crypto: ccp: Build the AMD secure processor driver only with AMD CPU support

2017-11-06 Thread Brijesh Singh
From: Borislav Petkov This is AMD-specific hardware so present it in Kconfig only when AMD CPU support is enabled or on ARM64 where it is also used. Signed-off-by: Borislav Petkov Signed-off-by: Brijesh Singh Reviewed-by: Gary R Hook Cc: Brijesh Singh Cc: Tom Lendacky Cc: Gary Hook Cc: Her

Re: [PATCH v4] i2c: aspeed: Deassert reset in probe

2017-11-06 Thread Wolfram Sang
On Wed, Nov 01, 2017 at 10:53:30AM +1030, Joel Stanley wrote: > In order to use i2c from a cold boot, the i2c peripheral must be taken > out of reset. We request a shared reset controller each time a bus > driver is loaded, as the reset is shared between the 14 i2c buses. > > On remove the reset i

[Part2 PATCH v8 11/38] crypto: ccp: Define SEV key management command id

2017-11-06 Thread Brijesh Singh
Define Secure Encrypted Virtualization (SEV) key management command id and structure. The command definition is available in SEV KM spec 0.14 (http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf) Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Ho

[Part2 PATCH v8 15/38] crypto: ccp: Implement SEV_PLATFORM_STATUS ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PLATFORM_STATUS command can be used by the platform owner to get the current status of the platform. The command is defined in SEV spec section 5.5. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org

[Part2 PATCH v8 13/38] crypto: ccp: Add Secure Encrypted Virtualization (SEV) command support

2017-11-06 Thread Brijesh Singh
AMD's new Secure Encrypted Virtualization (SEV) feature allows the memory contents of virtual machines to be transparently encrypted with a key unique to the VM. The programming and management of the encryption keys are handled by the AMD Secure Processor (AMD-SP) which exposes the commands for the

[Part2 PATCH v8 14/38] crypto: ccp: Implement SEV_FACTORY_RESET ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_FACTORY_RESET command can be used by the platform owner to reset the non-volatile SEV related data. The command is defined in SEV spec section 5.4 Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org C

Re: A test of the philosophical impact of what I have been talking about

2017-11-06 Thread Ywe Cærlyn
Den 11/6/2017 11:00, skrev Ywe Cærlyn: Den 11/4/2017 23:53, skrev Ywe Cærlyn: Den 11/3/2017 07:46, skrev Ywe Cærlyn: Den 10/29/2017 17:21, skrev Ywe Cærlyn: Den 10/29/2017 17:00, skrev Ywe Cærlyn: Den 10/27/2017 23:28, skrev Ywe Cærlyn: Den 10/27/2017 23:01, skrev Ywe Cærlyn: Philosophical r

[PATCH] media: ddbridge: fix build warnings

2017-11-06 Thread Randy Dunlap
From: Randy Dunlap Fix 2 build warnings. These functions are void, so drop the "return"s. ./drivers/media/pci/ddbridge/ddbridge-io.h: warning: 'return' with a value, in function returning void [enabled by default]: => 50:2, 55:2 Signed-off-by: Randy Dunlap Cc: Daniel Scheller Cc: Ma

Re: [PATCH V9 2/4] MIPS: Implement dma_map_ops::get_cache_alignment()

2017-11-06 Thread Christoph Hellwig
This doesn't apply to the current dma mapping tree: http://git.infradead.org/users/hch/dma-mapping.git/shortlog/refs/heads/for-next so even if I were to get the proper ACKs it would need a resend.

Hello dear good day from

2017-11-06 Thread Jessica

[Part2 PATCH v8 19/38] crypto: ccp: Implement SEV_PEK_CERT_IMPORT ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PEK_CERT_IMPORT command can be used to import the signed PEK certificate. The command is defined in SEV spec section 5.8. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kernel.org C

Re: [PATCH AUTOSEL for 4.9 43/50] regulator: core: Don't use regulators as supplies until the parent is bound

2017-11-06 Thread Levin, Alexander (Sasha Levin)
On Wed, Oct 25, 2017 at 10:06:36AM +0200, Mark Brown wrote: >On Wed, Oct 25, 2017 at 01:56:02AM +, Levin, Alexander (Sasha Levin) wrote: > >> When regulators are successfully registered, we check to see if the >> regulator is a supply for any other registered regulator and if so >> add the new

[Part2 PATCH v8 21/38] KVM: X86: Add CONFIG_KVM_AMD_SEV

2017-11-06 Thread Brijesh Singh
The config option can be used to enable SEV support on AMD Processors. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kern

[Part2 PATCH v8 20/38] crypto: ccp: Implement SEV_PDH_CERT_EXPORT ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PDH_CERT_EXPORT command can be used to export the PDH and its certificate chain. The command is defined in SEV spec section 5.10. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kern

[Part2 PATCH v8 23/38] KVM: SVM: Add sev module_param

2017-11-06 Thread Brijesh Singh
The module parameter can be used to control the SEV feature support. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel

[Part2 PATCH v8 16/38] crypto: ccp: Implement SEV_PEK_GEN ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PEK_GEN command is used to generate a new Platform Endorsement Key (PEK). The command is defined in SEV spec section 5.6. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kernel.org C

[Part2 PATCH v8 33/38] KVM: SVM: Add support for SEV DEBUG_ENCRYPT command

2017-11-06 Thread Brijesh Singh
The command copies a plaintext into guest memory and encrypts it using the VM encryption key. The command will be used for debug purposes (e.g setting breakpoints through gdbserver) Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel

Re: [PATCH V9 1/4] dma-mapping: Rework dma_get_cache_alignment()

2017-11-06 Thread Christoph Hellwig
Looks like there hasn't been much interest in reworking this to make stable backporting easier. I can apply patch 1 to the dma-mapping tree if that's still the plan, but for the other patches I'd need ACKs from the other maintainers.

Re: [PATCH] mm, sparse: do not swamp log with huge vmemmap allocation failures

2017-11-06 Thread Michal Hocko
On Mon 06-11-17 11:14:27, Khalid Aziz wrote: > On Mon, 2017-11-06 at 10:22 +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > While doing a memory hotplug tests under a heavy memory pressure we > > have > > noticed too many page allocation failures when allocating vmemmap > > memmap > > ba

[Part2 PATCH v8 32/38] KVM: SVM: Add support for SEV DEBUG_DECRYPT command

2017-11-06 Thread Brijesh Singh
The command is used for decrypting a guest memory region for debug purposes. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vge

Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-06 Thread Sinan Kaya
On 11/6/2017 1:03 PM, Robin Murphy wrote: >> #ifdef CONFIG_ACPI >> ret = strcmp(acpi_device_hid(adev), "QCOM8062"); >> +if (ret) >> +ret = strcmp(acpi_device_hid(adev), "QCOM8063"); > This string-juggling looks to have already hit the point at which it

[Part2 PATCH v8 30/38] KVM: SVM: Add support for SEV LAUNCH_FINISH command

2017-11-06 Thread Brijesh Singh
The command is used for finializing the SEV guest launch process. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.or

[Part2 PATCH v8 34/38] KVM: SVM: Add support for SEV LAUNCH_SECRET command

2017-11-06 Thread Brijesh Singh
The command is used for injecting a secret into the guest memory region. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vger.ke

RE: drivers/x86: add thinkpad-wmi

2017-11-06 Thread Mario.Limonciello
> -Original Message- > From: platform-driver-x86-ow...@vger.kernel.org [mailto:platform-driver-x86- > ow...@vger.kernel.org] On Behalf Of Corentin Chary > Sent: Saturday, November 4, 2017 10:23 AM > To: Limonciello, Mario > Cc: Darren Hart ; Andy Shevchenko > ; platform-driver-...@vger.k

[Part2 PATCH v8 38/38] KVM: X86: Restart the guest when insn_len is zero and SEV is enabled

2017-11-06 Thread Brijesh Singh
On AMD platforms, under certain conditions insn_len may be zero on #NPF. This can happen if a guest gets a page-fault on data access but the HW table walker is not able to read the instruction page (e.g instruction page is not present in memory). Typically, when insn_len is zero, x86_emulate_instr

[Part2 PATCH v8 35/38] KVM: SVM: Pin guest memory when SEV is active

2017-11-06 Thread Brijesh Singh
The SEV memory encryption engine uses a tweak such that two identical plaintext pages at different location will have different ciphertext. So swapping or moving ciphertext of two pages will not result in plaintext being swapped. Relocating (or migrating) physical backing pages for a SEV guest will

[Part2 PATCH v8 36/38] KVM: SVM: Clear C-bit from the page fault address

2017-11-06 Thread Brijesh Singh
When SEV is active, on #VMEXIT the page fault address will contain the C-bit. We must clear the C-bit before handling the fault. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@ker

[Part2 PATCH v8 31/38] KVM: SVM: Add support for SEV GUEST_STATUS command

2017-11-06 Thread Brijesh Singh
The command is used for querying the SEV guest information. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Sign

[Part2 PATCH v8 37/38] KVM: SVM: Do not install #UD intercept when SEV is enabled

2017-11-06 Thread Brijesh Singh
On #UD, x86_emulate_instruction() fetches the data from guest memory and decodes the instruction bytes to assist further. When SEV is enabled, the instruction bytes will be encrypted using the guest-specific key and the hypervisor will no longer able to fetch the instruction bytes to assist UD hand

Re: [PATCH] mm, sparse: do not swamp log with huge vmemmap allocation failures

2017-11-06 Thread Khalid Aziz
On Mon, 2017-11-06 at 10:22 +0100, Michal Hocko wrote: > From: Michal Hocko > > While doing a memory hotplug tests under a heavy memory pressure we > have > noticed too many page allocation failures when allocating vmemmap > memmap > backed by huge page > . deleted . > + > +

[Part2 PATCH v8 22/38] KVM: SVM: Reserve ASID range for SEV guest

2017-11-06 Thread Brijesh Singh
A SEV-enabled guest must use ASIDs from the defined subset, while non-SEV guests can use the remaining ASID range. The range of allowed SEV guest ASIDs is [1 - CPUID_8000_001F[ECX][31:0]]. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg

[Part2 PATCH v8 24/38] KVM: Define SEV key management command id

2017-11-06 Thread Brijesh Singh
Define Secure Encrypted Virtualization (SEV) key management command id and structure. The command definition is available in SEV KM spec 0.14 (http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf) and Documentation/virtual/kvm/amd-memory-encryption.txt. Cc: Thomas Gleixner Cc: Ingo

[PATCH v2] video: atmel_lcdfb: Use unique error messages in atmel_lcdfb_of_init()

2017-11-06 Thread SF Markus Elfring
From: Markus Elfring Date: Mon, 6 Nov 2017 19:00:58 +0100 A duplicate error message was used so far in this function implementation. Thus use a consistent message format instead together with property names where constant merging can be applied by the compiler in four cases. This issue was detec

Re: [PATCH v2 1/4] x86/kvm/cpuid: Fix CPUID function for word 6 (80000001_ECX)

2017-11-06 Thread Krish Sadhukhan
On 11/06/2017 09:44 AM, Janakarajan Natarajan wrote: The function for CPUID 8001 ECX is set to 0xc001. Set it to 0x8001. Signed-off-by: Janakarajan Natarajan --- arch/x86/kvm/cpuid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.h b/arch/

[Part2 PATCH v8 25/38] KVM: SVM: Add KVM_SEV_INIT command

2017-11-06 Thread Brijesh Singh
The command initializes the SEV platform context and allocates a new ASID for this guest from the SEV ASID pool. The firmware must be initialized before we issue any guest launch commands to create a new memory encryption context. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Pao

[Part2 PATCH v8 18/38] crypto: ccp: Implement SEV_PEK_CSR ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PEK_CSR command can be used to generate a PEK certificate signing request. The command is defined in SEV spec section 5.7. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kernel.org

[Part2 PATCH v8 26/38] KVM: SVM: VMRUN should use associated ASID when SEV is enabled

2017-11-06 Thread Brijesh Singh
SEV hardware uses ASIDs to associate a memory encryption key with a guest VM. During guest creation, a SEV VM uses the SEV_CMD_ACTIVATE command to bind a particular ASID to the guest. Lets make sure that the VMCB is programmed with the bound ASID before a VMRUN. Cc: Thomas Gleixner Cc: Ingo Molna

[Part2 PATCH v8 29/38] KVM: SVM: Add support for KVM_SEV_LAUNCH_MEASURE command

2017-11-06 Thread Brijesh Singh
The command is used to retrieve the measurement of contents encrypted through the KVM_SEV_LAUNCH_UPDATE_DATA command. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@kernel.org Cc:

[Part2 PATCH v8 27/38] KVM: SVM: Add support for KVM_SEV_LAUNCH_START command

2017-11-06 Thread Brijesh Singh
The KVM_SEV_LAUNCH_START command is used to create a memory encryption context within the SEV firmware. In order to do so, the guest owner should provide the guest's policy, its public Diffie-Hellman (PDH) key and session information. The command implements the LAUNCH_START flow defined in SEV spec

[Part2 PATCH v8 17/38] crypto: ccp: Implement SEV_PDH_GEN ioctl command

2017-11-06 Thread Brijesh Singh
The SEV_PDH_GEN command is used to re-generate the Platform Diffie-Hellman (PDH) key. The command is defined in SEV spec section 5.6. Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Borislav Petkov Cc: Herbert Xu Cc: Gary Hook Cc: Tom Lendacky Cc: linux-cry...@vger.kernel.org Cc: k...@vger.kernel.o

[Part2 PATCH v8 28/38] KVM: SVM: Add support for KVM_SEV_LAUNCH_UPDATE_DATA command

2017-11-06 Thread Brijesh Singh
The command is used for encrypting the guest memory region using the VM encryption key (VEK) created during KVM_SEV_LAUNCH_START. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Paolo Bonzini Cc: "Radim Krčmář" Cc: Joerg Roedel Cc: Borislav Petkov Cc: Tom Lendacky Cc: x...@ker

[Part2 PATCH v8 12/38] crypto: ccp: Add Platform Security Processor (PSP) device support

2017-11-06 Thread Brijesh Singh
The Platform Security Processor (PSP) is part of the AMD Secure Processor (AMD-SP) functionality. The PSP is a dedicated processor that provides support for key management commands in Secure Encrypted Virtualization (SEV) mode, along with software-based Trusted Execution Environment (TEE) to enable

[Part2 PATCH v8 08/38] KVM: Introduce KVM_MEMORY_ENCRYPT_{UN,}REG_REGION ioctl

2017-11-06 Thread Brijesh Singh
If hardware supports memory encryption then KVM_MEMORY_ENCRYPT_REG_REGION and KVM_MEMORY_ENCRYPT_UNREG_REGION ioctl's can be used by userspace to register/unregister the guest memory regions which may contain the encrypted data (e.g guest RAM, PCI BAR, SMRAM etc). Cc: Thomas Gleixner Cc: Ingo Mol

[Part2 PATCH v8 02/38] x86/CPU/AMD: Add the Secure Encrypted Virtualization CPU feature

2017-11-06 Thread Brijesh Singh
From: Tom Lendacky Update the CPU features to include identifying and reporting on the Secure Encrypted Virtualization (SEV) feature. SEV is identified by CPUID 0x801f, but requires BIOS support to enable it (set bit 23 of MSR_K8_SYSCFG and set bit 0 of MSR_K7_HWCR). Only show the SEV featu

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