Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 09:07:45, Minchan Kim wrote: [...] > #!/bin/sh > ./smap_test & > pid=$! > > for i in $(seq 25) > do > awk '/^Rss/{rss+=$2} /^Pss/{pss+=$2} END {}' \ > /proc/$pid/smaps > done > kill $pid > > root@bbox:/home/barrios/test/smap# time ./s.sh > pid:21973 > > real

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Michal Hocko
On Fri 19-08-16 10:57:48, Sonny Rao wrote: > On Fri, Aug 19, 2016 at 12:59 AM, Michal Hocko wrote: > > On Thu 18-08-16 23:43:39, Sonny Rao wrote: > >> On Thu, Aug 18, 2016 at 11:01 AM, Michal Hocko wrote: > >> > On Thu 18-08-16 10:47:57, Sonny Rao wrote: > >> >> On Thu, Aug 18, 2016 at 12:44 AM,

Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

2016-08-22 Thread 'Greg KH'
On Mon, Aug 22, 2016 at 02:48:18AM +, Sell, Timothy C wrote: > > -Original Message- > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Sunday, August 21, 2016 2:05 PM > > To: Kershner, David A > > Cc: cor...@lwn.net; t...@linutronix.de; mi...@redhat.com; > > h...@zytor.com

RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Markus Heiser
Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab : > Right now, for a struct, kernel-doc produces the following output: > > .. c:type:: struct v4l2_prio_state > > stores the priority states > > **Definition** > > :: > > struct v4l2_prio_state { >

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Markus, Em Mon, 22 Aug 2016 10:56:01 +0200 Markus Heiser escreveu: > Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab > : > > > Right now, for a struct, kernel-doc produces the following output: > > > > .. c:type:: struct v4l2_prio_state > > > >stores the priority states > >

[ANNOUNCE] Linux Kernel Media Subsystem documentation now available in PDF format

2016-08-22 Thread Mauro Carvalho Chehab
Hi all, As you know, the media documentation is daily-built from the Linux Kernel sources, in HTML format, from its ReST files. Starting today, it will also be building the PDF book with all the Kernel Media documentation on it. Despite having 1031 pages, the PDF file has only 3.3 MB. I prefer m

RE: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

2016-08-22 Thread Sell, Timothy C
> -Original Message- > From: 'Greg KH' [mailto:gre...@linuxfoundation.org] > Sent: Monday, August 22, 2016 4:16 AM > To: Sell, Timothy C > Cc: cor...@lwn.net; t...@linutronix.de; mi...@redhat.com; > h...@zytor.com; Arfvidson, Erik ; > hof...@osadl.org; dzic...@redhat.com; jes.soren...@redh

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Jani Nikula
On Mon, 22 Aug 2016, Mauro Carvalho Chehab wrote: > Markus, > > Em Mon, 22 Aug 2016 10:56:01 +0200 > Markus Heiser escreveu: > >> Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab >> : >> >> > Right now, for a struct, kernel-doc produces the following output: >> > >> >.. c:type:: struct

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Markus Heiser
Am 22.08.2016 um 13:16 schrieb Jani Nikula : > On Mon, 22 Aug 2016, Mauro Carvalho Chehab wrote: >> Markus, >> >> Em Mon, 22 Aug 2016 10:56:01 +0200 >> Markus Heiser escreveu: >> >>> Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab >>> : >>> Right now, for a struct, kernel-doc prod

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Markus Heiser
Am 22.08.2016 um 12:06 schrieb Mauro Carvalho Chehab : > Markus, > > Em Mon, 22 Aug 2016 10:56:01 +0200 > Markus Heiser escreveu: > >> Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab >> : >> >>> Right now, for a struct, kernel-doc produces the following output: >>> >>> .. c:type::

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Jani Nikula
On Mon, 22 Aug 2016, Markus Heiser wrote: > Am 22.08.2016 um 13:16 schrieb Jani Nikula : > >> On Mon, 22 Aug 2016, Mauro Carvalho Chehab wrote: >>> Markus, >>> >>> Em Mon, 22 Aug 2016 10:56:01 +0200 >>> Markus Heiser escreveu: >>> Am 21.08.2016 um 14:11 schrieb Mauro Carvalho Chehab

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Em Mon, 22 Aug 2016 14:52:42 +0300 Jani Nikula escreveu: > On Mon, 22 Aug 2016, Markus Heiser wrote: > > Am 22.08.2016 um 13:16 schrieb Jani Nikula : > > > >> On Mon, 22 Aug 2016, Mauro Carvalho Chehab > >> wrote: > >>> Markus, > >>> > >>> Em Mon, 22 Aug 2016 10:56:01 +0200 > >>> Markus H

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Markus Heiser
Am 22.08.2016 um 13:52 schrieb Jani Nikula : > On Mon, 22 Aug 2016, Markus Heiser wrote: >> Am 22.08.2016 um 13:16 schrieb Jani Nikula : >> >>> On Mon, 22 Aug 2016, Mauro Carvalho Chehab wrote: Markus, Em Mon, 22 Aug 2016 10:56:01 +0200 Markus Heiser escreveu: >

Re: RFC? [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Markus Heiser
Am 22.08.2016 um 14:15 schrieb Mauro Carvalho Chehab : > Em Mon, 22 Aug 2016 14:52:42 +0300 > Jani Nikula escreveu: > >> On Mon, 22 Aug 2016, Markus Heiser wrote: >>> Am 22.08.2016 um 13:16 schrieb Jani Nikula : >>> On Mon, 22 Aug 2016, Mauro Carvalho Chehab wrote: > Markus,

[PATCHv11 0/3] rdmacg: IB/core: rdma controller support

2016-08-22 Thread Parav Pandit
rdmacg: IB/core: rdma controller support Patch is generated and tested against below Doug's linux-rdma git tree. URL: git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma.git Branch: master Patchset is also compiled and tested against below Tejun's cgroup tree using cgroup v2 mode. URL: g

[PATCHv11 3/3] rdmacg: Added documentation for rdmacg

2016-08-22 Thread Parav Pandit
Added documentation for v1 and v2 version describing high level design and usage examples on using rdma controller. Signed-off-by: Parav Pandit --- Documentation/cgroup-v1/rdma.txt | 117 +++ Documentation/cgroup-v2.txt | 44 +++ 2 files chan

[PATCHv11 1/3] rdmacg: Added rdma cgroup controller

2016-08-22 Thread Parav Pandit
Added rdma cgroup controller that does accounting, limit enforcement on rdma/IB verbs and hw resources. Added rdma cgroup header file which defines its APIs to perform charing/uncharing functionality. It also defined APIs for RDMA/IB stack for device registration. Devices which are registered will

[PATCHv11 2/3] IB/core: added support to use rdma cgroup controller

2016-08-22 Thread Parav Pandit
Added support APIs for IB core to register/unregister every IB/RDMA device with rdma cgroup for tracking verbs and hw resources. IB core registers with rdma cgroup controller. Added support APIs for uverbs layer to make use of rdma controller. Added uverbs layer to perform resource charge/uncharge

[PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Michael S. Tsirkin
commit commit ea04036032edda6f771c1381d03832d2ed0f6c31 ("CodingStyle: add some more error handling guidelines") suggests never naming goto labels after the goto location - that is the error that is handled. But it's actually pretty common and IMHO it's a reasonable style provided each error gets i

Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

2016-08-22 Thread 'Greg KH'
On Mon, Aug 22, 2016 at 10:46:10AM +, Sell, Timothy C wrote: > > -Original Message- > > From: 'Greg KH' [mailto:gre...@linuxfoundation.org] > > Sent: Monday, August 22, 2016 4:16 AM > > To: Sell, Timothy C > > Cc: cor...@lwn.net; t...@linutronix.de; mi...@redhat.com; > > h...@zytor.com

[PATCH] docs-rst: add package adjustbox

2016-08-22 Thread Mauro Carvalho Chehab
We need adjustbox to allow adjusting the size of tables that are bigger than the line width. There are quite a few of them at the media books. Signed-off-by: Mauro Carvalho Chehab --- PS.: This changeset were fold into one of the media patches on a previous patch series. However, in order to avo

Re: [PATCH 3/3] drivers: Add visorbus to the drivers/virt directory

2016-08-22 Thread 'Greg KH'
On Mon, Aug 22, 2016 at 10:02:43AM -0400, 'Greg KH' wrote: > On Mon, Aug 22, 2016 at 10:46:10AM +, Sell, Timothy C wrote: > > > -Original Message- > > > From: 'Greg KH' [mailto:gre...@linuxfoundation.org] > > > Sent: Monday, August 22, 2016 4:16 AM > > > To: Sell, Timothy C > > > Cc: c

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Minchan Kim
On Mon, Aug 22, 2016 at 09:40:52AM +0200, Michal Hocko wrote: > On Mon 22-08-16 09:07:45, Minchan Kim wrote: > [...] > > #!/bin/sh > > ./smap_test & > > pid=$! > > > > for i in $(seq 25) > > do > > awk '/^Rss/{rss+=$2} /^Pss/{pss+=$2} END {}' \ > > /proc/$pid/smaps > > done > > ki

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Jonathan Corbet
On Mon, 22 Aug 2016 16:57:46 +0300 "Michael S. Tsirkin" wrote: > commit commit ea04036032edda6f771c1381d03832d2ed0f6c31 ("CodingStyle: > add some more error handling guidelines") suggests never naming goto > labels after the goto location - that is the error that is handled. > > But it's actuall

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Dan Carpenter
On Mon, Aug 22, 2016 at 04:57:46PM +0300, Michael S. Tsirkin wrote: > commit commit ea04036032edda6f771c1381d03832d2ed0f6c31 ("CodingStyle: > add some more error handling guidelines") suggests never naming goto > labels after the goto location - that is the error that is handled. > > But it's actu

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Robert Foss
On 2016-08-22 10:12 AM, Minchan Kim wrote: On Mon, Aug 22, 2016 at 09:40:52AM +0200, Michal Hocko wrote: On Mon 22-08-16 09:07:45, Minchan Kim wrote: [...] #!/bin/sh ./smap_test & pid=$! for i in $(seq 25) do awk '/^Rss/{rss+=$2} /^Pss/{pss+=$2} END {}' \ /proc/$pid/smaps do

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Michael S. Tsirkin
On Mon, Aug 22, 2016 at 08:16:17AM -0600, Jonathan Corbet wrote: > On Mon, 22 Aug 2016 16:57:46 +0300 > "Michael S. Tsirkin" wrote: > > > commit commit ea04036032edda6f771c1381d03832d2ed0f6c31 ("CodingStyle: > > add some more error handling guidelines") suggests never naming goto > > labels after

Pending patches for docs-next

2016-08-22 Thread Mauro Carvalho Chehab
Hi Jon, Please pick the docs-next patches from: git://linuxtv.org/mchehab/experimental.git docs-rst (or from the patches sent to you) For: - Markus patches adding the c-domain override Sphinx extension; - added support to build just LaTeX format. That's useful at least for me, as it al

[PATCH v2 2/2] Documentation/sphinx: link dma-buf rsts

2016-08-22 Thread Sumit Semwal
Include dma-buf sphinx documentation into top level index. Signed-off-by: Sumit Semwal --- Documentation/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/index.rst b/Documentation/index.rst index e0fc72963e87..8d05070122c2 100644 --- a/Documentation/index.rst +++ b/D

[PATCH v2 1/2] Documentation: move dma-buf documentation to rst

2016-08-22 Thread Sumit Semwal
Branch out dma-buf related documentation into its own rst file to allow adding it to the sphinx documentation generated. While at it, move dma-buf-sharing.txt into rst as the dma-buf guide too; adjust MAINTAINERS accordingly. v2: - Removed authorship as suggested by Jani, - Address review comment

[PATCH v2 0/2] doc: dma-buf: sphinx conversion

2016-08-22 Thread Sumit Semwal
Convert dma-buf documentation over to sphinx. While at that, convert dma-buf-sharing.txt as well, and make it the dma-buf API guide. There is no content change yet; only format conversion and creation of some hyperlinks. v2: Address review comments from Jonathan Corbet and Markus Heiser. Sumit

Re: [PATCH v2 2/2] Documentation/sphinx: link dma-buf rsts

2016-08-22 Thread Mauro Carvalho Chehab
Em Mon, 22 Aug 2016 20:41:45 +0530 Sumit Semwal escreveu: > Include dma-buf sphinx documentation into top level index. > > Signed-off-by: Sumit Semwal > --- > Documentation/index.rst | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/index.rst b/Documentation/index.rst >

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 23:12:41, Minchan Kim wrote: > On Mon, Aug 22, 2016 at 09:40:52AM +0200, Michal Hocko wrote: > > On Mon 22-08-16 09:07:45, Minchan Kim wrote: > > [...] > > > #!/bin/sh > > > ./smap_test & > > > pid=$! > > > > > > for i in $(seq 25) > > > do > > > awk '/^Rss/{rss+=$2} /^Pss/

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 18:45:54, Michal Hocko wrote: [...] > I have no idea why those numbers are so different on my laptop > yet. It surely looks suspicious. I will try to debug this further > tomorrow. Hmm, so I've tried to use my version of awk on other machine and vice versa and it didn't make any di

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Michal Hocko
On Mon 22-08-16 19:29:36, Michal Hocko wrote: > On Mon 22-08-16 18:45:54, Michal Hocko wrote: > [...] > > I have no idea why those numbers are so different on my laptop > > yet. It surely looks suspicious. I will try to debug this further > > tomorrow. > > Hmm, so I've tried to use my version of a

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Dan Carpenter
vhost_dev_set_owner() is an example of why come-from labels are bad style. devel/drivers/vhost/vhost.c 473 /* Caller should have device mutex */ 474 long vhost_dev_set_owner(struct vhost_dev *dev) 475 { 476 struct task_struct *worker; 477 int err; 478 4

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Michael S. Tsirkin
On Mon, Aug 22, 2016 at 09:31:40PM +0300, Dan Carpenter wrote: > > vhost_dev_set_owner() is an example of why come-from labels are > bad style. > > devel/drivers/vhost/vhost.c >473 /* Caller should have device mutex */ >474 long vhost_dev_set_owner(struct vhost_dev *dev) >475 { >

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Dan Carpenter
On Mon, Aug 22, 2016 at 05:53:02PM +0300, Michael S. Tsirkin wrote: > The point is really naming label for the part of init that failed > (and so needs to be skipped), rather than the part that will run. Naming labels after what "needs to be skipped" doesn't work. How does that meaning make sense

Re: [PATCH] CodingStyle: add some more error handling guidelines

2016-08-22 Thread Michael S. Tsirkin
On Mon, Aug 22, 2016 at 09:50:06PM +0300, Dan Carpenter wrote: > On Mon, Aug 22, 2016 at 05:53:02PM +0300, Michael S. Tsirkin wrote: > > The point is really naming label for the part of init that failed > > (and so needs to be skipped), rather than the part that will run. > > Naming labels after w

[PATCH 0/3] RFC: The beginning of a proper driver-api book

2016-08-22 Thread Jonathan Corbet
This short series convers device-drivers.tmpl into the RST format, splits it up, and sets up the result under Documentation/driver-api/. For added fun, I've taken one top-level file (hsi.txt) and folded it into the document as a way of showing the direction I'm thinking I would like things to go.

[PATCH 2/3] docs: split up the driver book

2016-08-22 Thread Jonathan Corbet
We don't need to keep it as a single large file anymore; split it up so that it is easier to manage and the individual sections can be read directly as plain files. Cc: Jani Nikula Cc: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet --- Documentation/driver-api/basics.rst| 120

[PATCH 1/3] Docs: sphinxify device-drivers.tmpl

2016-08-22 Thread Jonathan Corbet
Perform a basic sphinx conversion of the device-drivers docbook and move it to its own directory. Cc: Jani Nikula Cc: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet --- Documentation/DocBook/Makefile| 2 +- Documentation/DocBook/device-drivers.tmpl | 521 ---

[PATCH 3/3] docs: Pull HSI documentation together

2016-08-22 Thread Jonathan Corbet
The HSI subsystem documentation was split across hsi.txt and the device-drivers docbook. Now that the latter has been converted to Sphinx, pull in the HSI document so that it's all in one place. Cc: Sebastian Reichel Signed-off-by: Jonathan Corbet --- Documentation/driver-api/serial-interfaces

Re: [PATCH] docs-rst: add support for LaTeX output

2016-08-22 Thread Jonathan Corbet
On Thu, 18 Aug 2016 11:53:39 -0300 Mauro Carvalho Chehab wrote: > Sphinx supports LaTeX output. Sometimes, it is interesting to > call it directly, instead of also generating a PDF. As it comes > for free, add a target for it. > Applied to the docs tree, thanks. jon -- To unsubscribe from this

Re: [RFC PATCH 0/5] doc-rst: improvements Sphinx's C-domain

2016-08-22 Thread Jonathan Corbet
On Mon, 15 Aug 2016 16:08:23 +0200 Markus Heiser wrote: > this is my approach to eliminate some distortions we have with the c/cpp > Sphinx > domains. The C domain is simple: it assumes that all functions, enums, etc > are global, e. g. there should be just one function called "ioctl", or "open"

Re: [PATCH] docs-rst: conf.py: adjust the size of .. note:: tag

2016-08-22 Thread Jonathan Corbet
On Fri, 19 Aug 2016 09:49:38 -0300 Mauro Carvalho Chehab wrote: > While the current implementation works well when using as a > paragraph, it doesn't work properly if inside a table. As we > have quite a few such cases, fix the logic to take the column > size into account. Applied to the docs tr

Re: [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Jonathan Corbet
On Sun, 21 Aug 2016 09:11:57 -0300 Mauro Carvalho Chehab wrote: > So, change kernel-doc, for it to produce the output on a different way: > > **Members** > > ``prios[4]`` > - **type**: ``atomic_t`` > > array with elements to store the array priorities > > With such

Re: [PATCH 0/2] Two additional patches for Documentation/conf.py

2016-08-22 Thread Jonathan Corbet
On Sun, 21 Aug 2016 15:26:14 -0300 Mauro Carvalho Chehab wrote: > The first patch in this series use the type of notice box to color the box, > providing a functionality that it is also used on the HTML theme we use. > > The second patch is a fix for a non-fatal error when building LaTeX on > in

[RFC PATCH v2 16/20] x86: Check for memory encryption on the APs

2016-08-22 Thread Tom Lendacky
Add support to check if memory encryption is active in the kernel and that it has been enabled on the AP. If memory encryption is active in the kernel but has not been enabled on the AP then do not allow the AP to continue start up. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/msr-index.

Re: [PACTH v2 0/3] Implement /proc//totmaps

2016-08-22 Thread Sonny Rao
On Mon, Aug 22, 2016 at 12:54 AM, Michal Hocko wrote: > On Fri 19-08-16 10:57:48, Sonny Rao wrote: >> On Fri, Aug 19, 2016 at 12:59 AM, Michal Hocko wrote: >> > On Thu 18-08-16 23:43:39, Sonny Rao wrote: >> >> On Thu, Aug 18, 2016 at 11:01 AM, Michal Hocko wrote: >> >> > On Thu 18-08-16 10:47:57

[RFC PATCH v2 04/20] x86: Secure Memory Encryption (SME) support

2016-08-22 Thread Tom Lendacky
Provide support for Secure Memory Encryption (SME). This initial support defines the memory encryption mask as a variable for quick access and an accessor for retrieving the number of physical addressing bits lost if SME is enabled. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encryp

[RFC PATCH v2 05/20] x86: Add the Secure Memory Encryption cpu feature

2016-08-22 Thread Tom Lendacky
Update the cpu features to include identifying and reporting on the Secure Memory Encryption feature. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/cpufeature.h|7 +-- arch/x86/include/asm/cpufeatures.h |5 - arch/x86/include/asm/disabled-features.h |3 ++

[RFC PATCH v2 11/20] mm: Access BOOT related data in the clear

2016-08-22 Thread Tom Lendacky
BOOT data (such as EFI related data) is not encyrpted when the system is booted and needs to be accessed as non-encrypted. Add support to the early_memremap API to identify the type of data being accessed so that the proper encryption attribute can be applied. Currently, two types of data are def

[RFC PATCH v2 09/20] x86: Add support for early encryption/decryption of memory

2016-08-22 Thread Tom Lendacky
This adds support to be able to either encrypt or decrypt data during the early stages of booting the kernel. This does not change the memory encryption attribute - it is used for ensuring that data present in either an encrypted or un-encrypted memory area is in the proper state (for example the i

[RFC PATCH v2 10/20] x86: Insure that memory areas are encrypted when possible

2016-08-22 Thread Tom Lendacky
Encrypt memory areas in place when possible (e.g. zero page, etc.) so that special handling isn't needed afterwards. Signed-off-by: Tom Lendacky --- arch/x86/kernel/head64.c | 93 -- arch/x86/kernel/setup.c |8 2 files changed, 96 insertion

[RFC PATCH v2 14/20] x86: DMA support for memory encryption

2016-08-22 Thread Tom Lendacky
Since DMA addresses will effectively look like 48-bit addresses when the memory encryption mask is set, SWIOTLB is needed if the DMA mask of the device performing the DMA does not support 48-bits. SWIOTLB will be initialized to create un-encrypted bounce buffers for use by these devices. Signed-of

[RFC PATCH v2 15/20] iommu/amd: AMD IOMMU support for memory encryption

2016-08-22 Thread Tom Lendacky
Add support to the AMD IOMMU driver to set the memory encryption mask if memory encryption is enabled. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encrypt.h |2 ++ arch/x86/mm/mem_encrypt.c |5 + drivers/iommu/amd_iommu.c | 10 ++ 3 files chan

[RFC PATCH v2 07/20] x86: Provide general kernel support for memory encryption

2016-08-22 Thread Tom Lendacky
Adding general kernel support for memory encryption includes: - Modify and create some page table macros to include the Secure Memory Encryption (SME) memory encryption mask - Update kernel boot support to call an SME routine that checks for and sets the SME capability (the SME routine will gro

[RFC PATCH v2 20/20] x86: Add support to make use of Secure Memory Encryption

2016-08-22 Thread Tom Lendacky
This patch adds the support to check if SME has been enabled and if the mem_encrypt=on command line option is set. If both of these conditions are true, then the encryption mask is set and the kernel is encrypted "in place." Signed-off-by: Tom Lendacky --- Documentation/kernel-parameters.txt |

[RFC PATCH v2 06/20] x86: Handle reduction in physical address size with SME

2016-08-22 Thread Tom Lendacky
When System Memory Encryption (SME) is enabled, the physical address space is reduced. Adjust the x86_phys_bits value to reflect this reduction. Signed-off-by: Tom Lendacky --- arch/x86/kernel/cpu/common.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kernel/cpu/common.c b/ar

[RFC PATCH v2 01/20] x86: Documentation for AMD Secure Memory Encryption (SME)

2016-08-22 Thread Tom Lendacky
This patch adds a Documenation entry to decribe the AMD Secure Memory Encryption (SME) feature. Signed-off-by: Tom Lendacky --- Documentation/x86/amd-memory-encryption.txt | 35 +++ 1 file changed, 35 insertions(+) create mode 100644 Documentation/x86/amd-memory-encryp

[RFC PATCH v2 00/20] x86: Secure Memory Encryption (AMD)

2016-08-22 Thread Tom Lendacky
This RFC patch series provides support for AMD's new Secure Memory Encryption (SME) feature. SME can be used to mark individual pages of memory as encrypted through the page tables. A page of memory that is marked encrypted will be automatically decrypted when read from DRAM and will be automatica

[RFC PATCH v2 08/20] x86: Extend the early_memmap support with additional attrs

2016-08-22 Thread Tom Lendacky
Add to the early_memmap support to be able to specify encrypted and un-encrypted mappings with and without write-protection. The use of write-protection is necessary when encrypting data "in place". The write-protect attribute is considered cacheable for loads, but not stores. This implies that the

[RFC PATCH v2 02/20] x86: Set the write-protect cache mode for full PAT support

2016-08-22 Thread Tom Lendacky
For processors that support PAT, set the write-protect cache mode (_PAGE_CACHE_MODE_WP) entry to the actual write-protect value (x05). Signed-off-by: Tom Lendacky --- arch/x86/mm/pat.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.

[RFC PATCH v2 03/20] x86: Secure Memory Encryption (SME) build enablement

2016-08-22 Thread Tom Lendacky
Provide the Kconfig support to build the SME support in the kernel. Signed-off-by: Tom Lendacky --- arch/x86/Kconfig |9 + 1 file changed, 9 insertions(+) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c580d8c..131f329 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@

[RFC PATCH v2 12/20] x86: Add support for changing memory encryption attribute

2016-08-22 Thread Tom Lendacky
This patch adds support to be change the memory encryption attribute for one or more memory pages. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/cacheflush.h |3 + arch/x86/include/asm/mem_encrypt.h | 13 ++ arch/x86/mm/mem_encrypt.c | 43 + arch/

[RFC PATCH v2 19/20] x86: Access the setup data through debugfs un-encrypted

2016-08-22 Thread Tom Lendacky
Since the setup data is in memory in the clear, it must be accessed as un-encrypted. Always use ioremap (similar to sysfs setup data support) to map the data. Signed-off-by: Tom Lendacky --- arch/x86/kernel/kdebugfs.c | 30 +++--- 1 file changed, 11 insertions(+), 19 d

[RFC PATCH v2 13/20] x86: Decrypt trampoline area if memory encryption is active

2016-08-22 Thread Tom Lendacky
When Secure Memory Encryption is enabled, the trampoline area must not be encrypted. A cpu running in real mode will not be able to decrypt memory that has been encrypted because it will not be able to use addresses with the memory encryption mask. Signed-off-by: Tom Lendacky --- arch/x86/realmo

[RFC PATCH v2 17/20] x86: Do not specify encrypted memory for VGA mapping

2016-08-22 Thread Tom Lendacky
Since the VGA memory needs to be accessed unencrypted be sure that the memory encryption mask is not set for the VGA range being mapped. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/vga.h | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/x86/include/asm/vga.h b/ar

[RFC PATCH v2 18/20] x86/kvm: Enable Secure Memory Encryption of nested page tables

2016-08-22 Thread Tom Lendacky
Update the KVM support to include the memory encryption mask when creating and using nested page tables. Signed-off-by: Tom Lendacky --- arch/x86/include/asm/kvm_host.h |3 ++- arch/x86/kvm/mmu.c |8 ++-- arch/x86/kvm/vmx.c |3 ++- arch/x86/kvm/x86.c

Re: [PATCH 3/3] docs: Pull HSI documentation together

2016-08-22 Thread Sebastian Reichel
Hi Jonathan, On Mon, Aug 22, 2016 at 02:57:43PM -0600, Jonathan Corbet wrote: > The HSI subsystem documentation was split across hsi.txt and the > device-drivers docbook. Now that the latter has been converted to Sphinx, > pull in the HSI document so that it's all in one place. Thanks for doing

Re: [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Em Mon, 22 Aug 2016 15:34:21 -0600 Jonathan Corbet escreveu: > On Sun, 21 Aug 2016 09:11:57 -0300 > Mauro Carvalho Chehab wrote: > > > So, change kernel-doc, for it to produce the output on a different way: > > > > **Members** > > > > ``prios[4]`` > > - **type**: ``atomic_t`` >

[PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Right now, for a struct, kernel-doc produces the following output: .. c:type:: struct v4l2_prio_state stores the priority states **Definition** :: struct v4l2_prio_state { atomic_t prios[4]; }; **Members** ``a

[PATCH v2] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Right now, for a struct, kernel-doc produces the following output: .. c:type:: struct v4l2_prio_state stores the priority states **Definition** :: struct v4l2_prio_state { atomic_t prios[4]; }; **Members** ``a

Re: [PATCH] docs-rst: kernel-doc: better output struct members

2016-08-22 Thread Mauro Carvalho Chehab
Em Mon, 22 Aug 2016 21:41:51 -0300 Mauro Carvalho Chehab escreveu: > Right now, for a struct, kernel-doc produces the following output: Please discard this one... the description is wrong. Just sent a v2. Thanks, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in

Re: [PATCH v2 2/2] Documentation/sphinx: link dma-buf rsts

2016-08-22 Thread Daniel Vetter
On Mon, Aug 22, 2016 at 12:49:30PM -0300, Mauro Carvalho Chehab wrote: > Em Mon, 22 Aug 2016 20:41:45 +0530 > Sumit Semwal escreveu: > > > Include dma-buf sphinx documentation into top level index. > > > > Signed-off-by: Sumit Semwal > > --- > > Documentation/index.rst | 2 ++ > > 1 file chang