RE: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-29 Thread Mathias Thore
Is there a scenario where we are clearing the TX ring but don't want to reset the BQL TX queue? I think it makes sense to keep it in ucc_geth_free_tx since the reason it is needed isn't the timeout per se, but rather the clearing of the TX ring. This way, it will be performed no matter why the

Re: [PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-29 Thread Frederic Barrat
Le 29/01/2019 à 07:15, Vaibhav Jain a écrit : Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being unloaded or unbound from the adapter. This might result in

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-29 Thread Michael Ellerman
Michael Bringmann writes: > On 1/25/19 10:09 AM, Michael Bringmann wrote: >> Adding Nathan Lynch >> >> On 1/24/19 6:04 PM, Tyrel Datwyler wrote: >>> On 12/14/2018 12:50 PM, Michael Bringmann wrote: Define interface to acquire arch-specific drc info to match against hotpluggable devices.

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-29 Thread Michael Ellerman
Tyrel Datwyler writes: > On 12/14/2018 12:50 PM, Michael Bringmann wrote: >> Define interface to acquire arch-specific drc info to match against >> hotpluggable devices. The current implementation exposes several >> pseries-specific dynamic memory properties in generic kernel code. >> This patch

Re: [PATCH] powerpc/pseries: Perform full re-add of CPU for topology update post-migration

2019-01-29 Thread Michael Ellerman
Michael Bringmann writes: > On 10/29/18 1:43 PM, Nathan Fontenot wrote: >> On pseries systems, performing a partition migration can result in >> altering the nodes a CPU is assigned to on the destination system. For >> exampl, pre-migration on the source system CPUs are in node 1 and 3, >> post-m

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Michael Ellerman
Ravi Bangoria writes: > On 1/14/19 9:44 AM, Ravi Bangoria wrote: >> Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load >> event and, perf_mem_events by default includes ldlat=30 which is >> causing failure on powerpc. Refactor code to support perf mem/c2c on >> powerpc. >> >>

Re: [PATCH v2 02/21] powerpc: use memblock functions returning virtual address

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > From: Christophe Leroy > > Since only the virtual address of allocated blocks is used, > lets use functions returning directly virtual address. > > Those functions have the advantage of also zeroing the block. > > [ MR: > - updated error message in alloc_stack() to be mo

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Arnaldo Carvalho de Melo
Em Tue, Jan 29, 2019 at 08:45:44PM +1100, Michael Ellerman escreveu: > Ravi Bangoria writes: > > > On 1/14/19 9:44 AM, Ravi Bangoria wrote: > >> Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load > >> event and, perf_mem_events by default includes ldlat=30 which is > >> causin

Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c > index ae34e3a..2c61ea4 100644 > --- a/arch/arm64/mm/numa.c > +++ b/arch/arm64/mm/numa.c > @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 > start_pfn, u64 end_pfn) > pr_info("Ini

Re: [PATCH v2 06/21] memblock: memblock_phys_alloc_try_nid(): don't panic

2019-01-29 Thread Michael Ellerman
Michael Ellerman writes: > Mike Rapoport writes: > >> diff --git a/arch/arm64/mm/numa.c b/arch/arm64/mm/numa.c >> index ae34e3a..2c61ea4 100644 >> --- a/arch/arm64/mm/numa.c >> +++ b/arch/arm64/mm/numa.c >> @@ -237,6 +237,10 @@ static void __init setup_node_data(int nid, u64 >> start_pfn, u64 e

Re: [PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-29 Thread christophe lombard
On 29/01/2019 07:15, Vaibhav Jain wrote: Within cxl module, iteration over array 'adapter->slices' may be racy at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being unloaded or unbound from the adapter. This might result in a NULL

Re: [PATCH v2 09/21] memblock: drop memblock_alloc_base()

2019-01-29 Thread Michael Ellerman
Mike Rapoport writes: > The memblock_alloc_base() function tries to allocate a memory up to the > limit specified by its max_addr parameter and panics if the allocation > fails. Replace its usage with memblock_phys_alloc_range() and make the > callers check the return value and panic in case of e

Re: [PATCH] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Ravi Bangoria
On 1/29/19 3:23 PM, Arnaldo Carvalho de Melo wrote: > I think its just a tooling side, I haven't processed it because I'm > waiting for Ravi to address Jiri's comment, after that I'm happy to put > it in my perf/urgent branch that I'm brewing to push to Ingo today or > tomorrow. Ah.. Will try to

Re: [PATCH V5 0/5] NestMMU pte upgrade workaround for mprotect

2019-01-29 Thread Aneesh Kumar K.V
Andrew, How do you want to merge this? Michael Ellerman suggests this should go via -mm tree. -aneesh "Aneesh Kumar K.V" writes: > We can upgrade pte access (R -> RW transition) via mprotect. We need > to make sure we follow the recommended pte update sequence as outlined in > commit bd5050

[RESEND PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-29 Thread Vaibhav Jain
Within cxl module, iteration over array 'adapter->afu' may be racy at few points as it might be simultaneously read during an EEH and its contents being set to NULL while driver is being unloaded or unbound from the adapter. This might result in a NULL pointer to 'struct afu' being de-referenced du

Re: [PATCH v3] cxl: Wrap iterations over afu slices inside 'afu_list_lock'

2019-01-29 Thread Vaibhav Jain
Andrew Donnellan writes: > On 29/1/19 5:15 pm, Vaibhav Jain wrote: >> Within cxl module, iteration over array 'adapter->slices' may be racy > > adapter->slices isn't an array, adapter->afu is the array. Thanks for catching this. Have fixed the patch description in the resent patch. > > Does th

Re: [PATCHv5 1/4] dt-bindings: add DT binding for the layerscape PCIe controller with EP mode

2019-01-29 Thread Lorenzo Pieralisi
Rob, Is it OK for you if I pull this series into the pci tree ? Please let me know, thanks. Lorenzo On Mon, Jan 21, 2019 at 05:44:57PM +0800, Xiaowei Bao wrote: > Add the documentation for the Device Tree binding for the layerscape PCIe > controller with EP mode. > > Signed-off-by: Xiaowei Bao

[PATCH v2] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Ravi Bangoria
Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load event and, perf_mem_events by default includes ldlat=30 which is causing failure on powerpc. Refactor code to support perf mem/c2c on powerpc. This patch depends on kernel side changes done my Madhavan: https://lists.ozlabs.org

Re: [PATCH v2] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Jiri Olsa
On Tue, Jan 29, 2019 at 06:54:12PM +0530, Ravi Bangoria wrote: > Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load > event and, perf_mem_events by default includes ldlat=30 which is > causing failure on powerpc. Refactor code to support perf mem/c2c on > powerpc. > > This patc

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-29 Thread Cédric Le Goater
On 1/28/19 5:43 AM, Paul Mackerras wrote: > On Thu, Jan 24, 2019 at 08:25:15AM +1100, Benjamin Herrenschmidt wrote: >> On Wed, 2019-01-23 at 21:30 +1100, Paul Mackerras wrote: Afaik bcs we change the mapping to point to the real HW irq ESB page instead of the "IPI" that was there at VM in

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-29 Thread Cédric Le Goater
On 1/29/19 3:45 AM, Paul Mackerras wrote: > On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: >> On 1/28/19 7:13 AM, Paul Mackerras wrote: >>> Would we end up with too many VMAs if we just used mmap() to >>> change the mappings from the software-generated pages to the >>> hardware-g

Re: [PATCH v2] perf mem/c2c: Fix perf_mem_events to support powerpc

2019-01-29 Thread Arnaldo Carvalho de Melo
Em Tue, Jan 29, 2019 at 02:42:36PM +0100, Jiri Olsa escreveu: > On Tue, Jan 29, 2019 at 06:54:12PM +0530, Ravi Bangoria wrote: > > Powerpc hw does not have inbuilt latency filter (--ldlat) for mem-load > > event and, perf_mem_events by default includes ldlat=30 which is > > causing failure on power

Re: [PATCH 00/19] KVM: PPC: Book3S HV: add XIVE native exploitation mode

2019-01-29 Thread Cédric Le Goater
>>> Another general comment is that you seem to have written all this >>> code assuming we are using HV KVM in a host running bare-metal. >> >> Yes. I didn't look at the other configurations. I thought that we could >> use the kernel_irqchip=off option to begin with. A couple of checks >> are indee

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christian Zigotzky
Hi Christoph, I compiled kernels for the X5000 and X1000 from your new branch 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi Ethernet works! Cheers, Christian On 28 January 2019 at 5:52PM, Christian Zigotzky wrote: Thanks a lot! I will test it tomorrow. — Christian Sen

Re: [PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-29 Thread Aneesh Kumar K.V
On 1/28/19 11:01 PM, Reza Arbab wrote: In htab_convert_pte_flags(), _PAGE_CACHE_CTL is used to check for the _PAGE_SAO flag: else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_SAO) rflags |= (HPTE_R_W | HPTE_R_I | HPTE_R_M); But, it isn't defined to include that flag: #define _PAG

Re: [PATCH] powerpc/pseries: Perform full re-add of CPU for topology update post-migration

2019-01-29 Thread Michael Bringmann
On 1/29/19 3:37 AM, Michael Ellerman wrote: > Michael Bringmann writes: > >> On 10/29/18 1:43 PM, Nathan Fontenot wrote: >>> On pseries systems, performing a partition migration can result in >>> altering the nodes a CPU is assigned to on the destination system. For >>> exampl, pre-migration o

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 04:03:32PM +0100, Christian Zigotzky wrote: > Hi Christoph, > > I compiled kernels for the X5000 and X1000 from your new branch > 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi Ethernet > works! Thanks for testing! I'll prepare a new series that adds t

Re: [RFC 1/6] powerpc:/drc Define interface to acquire arch-specific drc info

2019-01-29 Thread Michael Bringmann
On 1/29/19 3:31 AM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 12/14/2018 12:50 PM, Michael Bringmann wrote: >>> Define interface to acquire arch-specific drc info to match against >>> hotpluggable devices. The current implementation exposes several >>> pseries-specific dynamic memory

[PATCH] powerpc/traps: fix the message printed when stack overflows

2019-01-29 Thread Christophe Leroy
Today's message is useless: [ 42.253267] Kernel stack overflow in process (ptrval), r1=c65500b0 This patch fixes it: [ 66.905235] Kernel stack overflow in process sh[356], r1=c65560b0 Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: Signed-off-by: Christophe Leroy --- a

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 05:14:11PM +0100, Christoph Hellwig wrote: > On Tue, Jan 29, 2019 at 04:03:32PM +0100, Christian Zigotzky wrote: > > Hi Christoph, > > > > I compiled kernels for the X5000 and X1000 from your new branch > > 'powerpc-dma.6-debug.2' today. The kernels boot and the P.A. Semi E

[PATCH v2] powerpc/traps: fix the message printed when stack overflows

2019-01-29 Thread Christophe Leroy
Today's message is useless: [ 42.253267] Kernel stack overflow in process (ptrval), r1=c65500b0 This patch fixes it: [ 66.905235] Kernel stack overflow in process sh[356], r1=c65560b0 Fixes: ad67b74d2469 ("printk: hash addresses printed with %p") Cc: Signed-off-by: Christophe Leroy --- v

Re: [PATCH] powerpc/ptrace: Mitigate potential Spectre v1

2019-01-29 Thread Breno Leitao
Hi Gustavo, On 1/24/19 3:25 PM, Gustavo A. R. Silva wrote: > > > On 1/24/19 8:01 AM, Breno Leitao wrote: >> 'regno' is directly controlled by user space, hence leading to a potential >> exploitation of the Spectre variant 1 vulnerability. >> >> On PTRACE_SETREGS and PTRACE_GETREGS requests, user

[REPOST PATCH v07 0/5] powerpc/migration: Affinity fix for memory

2019-01-29 Thread Michael Bringmann
The migration of LPARs across Power systems affects many attributes including that of the associativity of memory blocks. The patches in this set execute when a system is coming up fresh upon a migration target. They are intended to, * Recognize changes to the associativity of memory recorded in

[REPOST PATCH v07 1/5] powerpc/drmem: Export 'dynamic-memory' loader

2019-01-29 Thread Michael Bringmann
powerpc/drmem: Export many of the functions of DRMEM to parse "ibm,dynamic-memory" and "ibm,dynamic-memory-v2" during hotplug operations and for Post Migration events. Also modify the DRMEM initialization code to allow it to, * Be called after system initialization * Provide a separate user copy

[REPOST PATCH v07 2/5] powerpc/drmem: Add internal_flags feature

2019-01-29 Thread Michael Bringmann
powerpc/drmem: Add internal_flags field to each LMB to allow marking of kernel software-specific operations that need not be exported to other users. For instance, if information about selected LMBs needs to be maintained for subsequent passes through the system, it can be encoded into the LMB arr

Re: [PATCH] powerpc/mm: Add _PAGE_SAO to _PAGE_CACHE_CTL mask

2019-01-29 Thread Reza Arbab
On Tue, Jan 29, 2019 at 08:37:28PM +0530, Aneesh Kumar K.V wrote: Not sure what the fix is about. We set the related hash pte flags via if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_TOLERANT) rflags |= HPTE_R_I; else if ((pteflags & _PAGE_CACHE_CTL) == _PAGE_NON_IDEMP

[REPOST PATCH v07 3/5] migration/memory: Add hotplug READD_MULTIPLE

2019-01-29 Thread Michael Bringmann
migration/memory: This patch adds a new pseries hotplug action for CPU and memory operations, PSERIES_HP_ELOG_ACTION_READD_MULTIPLE. This is a variant of the READD operation which performs the action upon multiple instances of the resource at one time. The operation is to be triggered by device-tr

[REPOST PATCH v07 4/5] migration/memory: Evaluate LMB assoc changes

2019-01-29 Thread Michael Bringmann
migration/memory: This patch adds code that recognizes changes to the associativity of memory blocks described by the device-tree properties in order to drive equivalent 'hotplug' operations to update local and general kernel data structures to reflect those changes. These differences may include:

[REPOST PATCH v07 5/5] migration/memory: Support 'ibm,dynamic-memory-v2'

2019-01-29 Thread Michael Bringmann
migration/memory: This patch adds recognition for changes to the associativity of memory blocks described by 'ibm,dynamic-memory-v2'. If the associativity of an LMB has changed, it should be readded to the system in order to update local and general kernel data structures. This patch builds upon pr

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Thiago Jung Bauermann
Fixing address of powerpc mailing list. Thiago Jung Bauermann writes: > Hello, > > With Christoph's rework of the DMA API that recently landed, the patch > below is the only change needed in virtio to make it work in a POWER > secure guest under the ultravisor. > > The other change we need (ma

Re: [PATCH] powerpc/ptrace: Mitigate potential Spectre v1

2019-01-29 Thread Gustavo A. R. Silva
Hi Breno, On 1/29/19 10:38 AM, Breno Leitao wrote: > Hi Gustavo, > > On 1/24/19 3:25 PM, Gustavo A. R. Silva wrote: >> >> >> On 1/24/19 8:01 AM, Breno Leitao wrote: >>> 'regno' is directly controlled by user space, hence leading to a potential >>> exploitation of the Spectre variant 1 vulnerabili

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-29 Thread Cédric Le Goater
On 1/29/19 5:12 AM, Paul Mackerras wrote: > On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: >> >> Is clearing the PTEs and repopulating the VMA unsafe ? > > Actually, now that I come to think of it, there could be any number of > VMAs (well, up to almost 64k of them), since once

Re: [PATCH V5 0/5] NestMMU pte upgrade workaround for mprotect

2019-01-29 Thread Andrew Morton
On Wed, 16 Jan 2019 14:20:30 +0530 "Aneesh Kumar K.V" wrote: > We can upgrade pte access (R -> RW transition) via mprotect. We need > to make sure we follow the recommended pte update sequence as outlined in > commit bd5050e38aec ("powerpc/mm/radix: Change pte relax sequence to handle > nest MM

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-01-29 Thread Michael S. Tsirkin
On Mon, Jan 21, 2019 at 11:29:05AM +, Jean-Philippe Brucker wrote: > Hi, > > On 18/01/2019 15:51, Michael S. Tsirkin wrote: > > > > On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: > >> Implement the virtio-iommu driver, following specification v0.9 [1]. > >> > >> This i

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > > Fixing address of powerpc mailing list. > > Thiago Jung Bauermann writes: > > > Hello, > > > > With Christoph's rework of the DMA API that recently landed, the patch > > below is the only change needed in virtio to make

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-29 Thread Li Yang
On Tue, Jan 29, 2019 at 2:09 AM Mathias Thore wrote: > > Is there a scenario where we are clearing the TX ring but don't want to reset > the BQL TX queue? Right now the function is also used on interface open/close, driver removal and driver resumption besides the timeout situation. I think the

Re: [PATCH 0/4] powerpc/livepatch: reliable stack unwinder fixes

2019-01-29 Thread Josh Poimboeuf
On Tue, Jan 22, 2019 at 10:57:20AM -0500, Joe Lawrence wrote: > This patchset fixes a false negative report (ie, unreliable) from the > ppc64 reliable stack unwinder, discussed here [1] when it may > inadvertently trip over a stale exception marker left on the stack. > > The first two patches fix

Re: [PATCH v1] PCI/AER: use match_string() helper to simplify the code

2019-01-29 Thread Bjorn Helgaas
On Mon, Jan 28, 2019 at 01:57:28PM +0200, Andy Shevchenko wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded implementation. > > Signed-off-by: Andy Shevchenko Applied to pci/aer for v5.1, thanks! > --- > drivers/pci/pcie/aer.c

Re: [PATCH V7 1/4] mm/cma: Add PF flag to force non cma alloc

2019-01-29 Thread Andrew Morton
On Mon, 14 Jan 2019 15:24:33 +0530 "Aneesh Kumar K.V" wrote: > This patch adds PF_MEMALLOC_NOCMA which make sure any allocation in that > context > is marked non-movable and hence cannot be satisfied by CMA region. > > This is useful with get_user_pages_longterm where we want to take a page pi

Re: [PATCH V7 0/4] mm/kvm/vfio/ppc64: Migrate compound pages out of CMA region

2019-01-29 Thread Andrew Morton
On Mon, 14 Jan 2019 15:24:32 +0530 "Aneesh Kumar K.V" wrote: > ppc64 use CMA area for the allocation of guest page table (hash page table). > We won't > be able to start guest if we fail to allocate hash page table. We have > observed > hash table allocation failure because we failed to migrat

Re: [PATCH] ucc_geth: Reset BQL queue when stopping device

2019-01-29 Thread David Miller
From: Mathias Thore Date: Tue, 29 Jan 2019 08:07:54 + > Is there a scenario where we are clearing the TX ring but don't want to reset > the BQL TX queue? > > I think it makes sense to keep it in ucc_geth_free_tx since the > reason it is needed isn't the timeout per se, but rather the > clea

Re: [PATCH 0/4] powerpc/livepatch: reliable stack unwinder fixes

2019-01-29 Thread Jiri Kosina
On Tue, 22 Jan 2019, Joe Lawrence wrote: > This patchset fixes a false negative report (ie, unreliable) from the > ppc64 reliable stack unwinder, discussed here [1] when it may > inadvertently trip over a stale exception marker left on the stack. > > The first two patches fix this bug. Nicolai's

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Jason Wang
On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: Fixing address of powerpc mailing list. Thiago Jung Bauermann writes: Hello, With Christoph's rework of the DMA API that recently landed, the patch below is the only chang

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: > > On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > > > Fixing address of powerpc mailing list. > > > > > > Thiago Jung Bauermann writes: > > > > > > > Hello,

Re: [PATCH] powerpc/powernv: Remove duplicate header

2019-01-29 Thread Sabyasachi Gupta
On Fri, Jan 18, 2019 at 3:34 PM Souptick Joarder wrote: > > On Thu, Jan 17, 2019 at 9:40 PM Sabyasachi Gupta > wrote: > > > > Remove linux/printk.h which is included more than once. > > > > Signed-off-by: Sabyasachi Gupta > > Acked-by: Souptick Joarder > If no further comment, can we get this p

Re: [PATCH] powerpc/cell: Remove duplicate header

2019-01-29 Thread Sabyasachi Gupta
On Thu, Jan 17, 2019 at 11:13 PM Souptick Joarder wrote: > > On Thu, Jan 17, 2019 at 9:49 PM Sabyasachi Gupta > wrote: > > > > Remove linux/syscalls.h which is included more than once > > > > Signed-off-by: Sabyasachi Gupta > > Acked-by: Souptick Joarder > If no further comment, can we get this

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Jason Wang
On 2019/1/30 上午10:36, Michael S. Tsirkin wrote: On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: Fixing address of powerpc mailing list. Thiago Jung Bauermann wr

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 11:05:42AM +0800, Jason Wang wrote: > > On 2019/1/30 上午10:36, Michael S. Tsirkin wrote: > > On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: > > > On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: > > > > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauerma

Re: use generic DMA mapping code in powerpc V4

2019-01-29 Thread Christian Zigotzky
Hi Christoph, Thanks a lot for the updates. I will test the full branch tomorrow. Cheers, Christian Sent from my iPhone > On 29. Jan 2019, at 17:34, Christoph Hellwig wrote: > >> On Tue, Jan 29, 2019 at 05:14:11PM +0100, Christoph Hellwig wrote: >>> On Tue, Jan 29, 2019 at 04:03:32PM +0100, C

[RFC PATCH v3 0/4] kvmppc: HMM backend driver to manage pages of secure guest

2019-01-29 Thread Bharata B Rao
Hi, A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. On such platforms, this driver will be used to manage the movement of guest pages between the normal memory managed by hypervisor (HV) and secure memory managed by Ultravisor (UV). Private ZONE_DEVICE memory e

[RFC PATCH v3 1/4] kvmppc: HMM backend driver to manage pages of secure guest

2019-01-29 Thread Bharata B Rao
HMM driver for KVM PPC to manage page transitions of secure guest via H_SVM_PAGE_IN and H_SVM_PAGE_OUT hcalls. H_SVM_PAGE_IN: Move the content of a normal page to secure page H_SVM_PAGE_OUT: Move the content of a secure page to normal page Signed-off-by: Bharata B Rao --- arch/powerpc/include/a

[RFC PATCH v3 2/4] kvmppc: Add support for shared pages in HMM driver

2019-01-29 Thread Bharata B Rao
A secure guest will share some of its pages with hypervisor (Eg. virtio bounce buffers etc). Support shared pages in HMM driver. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/hvcall.h | 3 ++ arch/powerpc/kvm/book3s_hv_hmm.c | 58 +-- 2 files changed, 58

[RFC PATCH v3 3/4] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-01-29 Thread Bharata B Rao
H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM During early guest init, these hcalls will be issued by UV. As part of these hcalls, [un]register memslots with UV. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/hvcall.h | 2 ++ arch/powerpc

[RFC PATCH v3 4/4] kvmppc: Handle memory plug/unplug to secure VM

2019-01-29 Thread Bharata B Rao
Register the new memslot with UV during plug and unregister the memslot during unplug. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/ucall-api.h| 7 +++ arch/powerpc/include/uapi/asm/uapi_uvcall.h | 1 + arch/powerpc/kvm/book3s_hv.c| 19 +

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-29 Thread Paul Mackerras
On Tue, Jan 29, 2019 at 06:44:50PM +0100, Cédric Le Goater wrote: > On 1/29/19 5:12 AM, Paul Mackerras wrote: > > On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: > >> > >> Is clearing the PTEs and repopulating the VMA unsafe ? > > > > Actually, now that I come to think of it, th

Re: [PATCH 18/19] KVM: PPC: Book3S HV: add passthrough support

2019-01-29 Thread Paul Mackerras
On Tue, Jan 29, 2019 at 02:47:55PM +0100, Cédric Le Goater wrote: > On 1/29/19 3:45 AM, Paul Mackerras wrote: > > On Mon, Jan 28, 2019 at 07:26:00PM +0100, Cédric Le Goater wrote: > >> On 1/28/19 7:13 AM, Paul Mackerras wrote: > >>> Would we end up with too many VMAs if we just used mmap() to > >>>

Re: [PATCH 00/19] KVM: PPC: Book3S HV: add XIVE native exploitation mode

2019-01-29 Thread Paul Mackerras
On Tue, Jan 29, 2019 at 02:51:05PM +0100, Cédric Le Goater wrote: > >>> Another general comment is that you seem to have written all this > >>> code assuming we are using HV KVM in a host running bare-metal. > >> > >> Yes. I didn't look at the other configurations. I thought that we could > >> use

Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode

2019-01-29 Thread Paul Mackerras
On Mon, Jan 28, 2019 at 06:35:34PM +0100, Cédric Le Goater wrote: > On 1/22/19 6:05 AM, Paul Mackerras wrote: > > On Mon, Jan 07, 2019 at 07:43:17PM +0100, Cédric Le Goater wrote: > >> This is the basic framework for the new KVM device supporting the XIVE > >> native exploitation mode. The user int

Re: [PATCH 05/19] KVM: PPC: Book3S HV: add a new KVM device for the XIVE native exploitation mode

2019-01-29 Thread Cédric Le Goater
On 1/30/19 5:29 AM, Paul Mackerras wrote: > On Mon, Jan 28, 2019 at 06:35:34PM +0100, Cédric Le Goater wrote: >> On 1/22/19 6:05 AM, Paul Mackerras wrote: >>> On Mon, Jan 07, 2019 at 07:43:17PM +0100, Cédric Le Goater wrote: This is the basic framework for the new KVM device supporting the XIV

Does SMP work at all on 40x ?

2019-01-29 Thread Christophe Leroy
In transfer_to_handler() (entry_32.S), we have: #if defined(CONFIG_40x) || defined(CONFIG_BOOKE) ... #ifdef CONFIG_SMP CURRENT_THREAD_INFO(r9, r1) lwz r9,TI_CPU(r9) slwir9,r9,3 add r11,r11,r9 #endif #endif When running this piece of code, MMU translati

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Christoph Hellwig
On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: > This has been discussed ad nauseum. virtio is all about compatibility. > Losing a couple of lines of code isn't worth breaking working setups. > People that want "just use DMA API no tricks" now have the option. > Setting a flag