[PATCH] powerpc: mm: Limit rma_size to 1TB when running without HV mode

2019-07-09 Thread Suraj Jitindar Singh
The virtual real mode addressing (VRMA) mechanism is used when a partition is using HPT (Hash Page Table) translation and performs real mode accesses (MSR[IR|DR] = 0) in non-hypervisor mode. In this mode effective address bits 0:23 are treated as zero (i.e. the access is aliased to 0) and the

[PATCH v3 3/3] Powerpc64/Watchpoint: Rewrite ptrace-hwbreak.c selftest

2019-07-09 Thread Ravi Bangoria
ptrace-hwbreak.c selftest is logically broken. On powerpc, when watchpoint is created with ptrace, signals are generated before executing the instruction and user has to manually singlestep the instruction with watchpoint disabled, which selftest never does and thus it keeps on getting the signal

[PATCH v3 2/3] Powerpc64/Watchpoint: Don't ignore extraneous exceptions

2019-07-09 Thread Ravi Bangoria
On Powerpc64, watchpoint match range is double-word granular. On a watchpoint hit, DAR is set to the first byte of overlap between actual access and watched range. And thus it's quite possible that DAR does not point inside user specified range. Ex, say user creates a watchpoint with address range

[PATCH v3 0/3] Powerpc64/Watchpoint: Few important fixes

2019-07-09 Thread Ravi Bangoria
v2: https://lists.ozlabs.org/pipermail/linuxppc-dev/2019-July/192967.html v2->v3: - Rebase to powerpc/next - PATCH 2/3 is new Ravi Bangoria (3): Powerpc64/Watchpoint: Fix length calculation for unaligned target Powerpc64/Watchpoint: Don't ignore extraneous exceptions

[PATCH v3 1/3] Powerpc64/Watchpoint: Fix length calculation for unaligned target

2019-07-09 Thread Ravi Bangoria
Watchpoint match range is always doubleword(8 bytes) aligned on powerpc. If the given range is crossing doubleword boundary, we need to increase the length such that next doubleword also get covered. Ex, address len = 6 bytes |=.

Re: [PATCH v4 0/6] Fixes related namespace alignment/page size/big endian

2019-07-09 Thread Aneesh Kumar K.V
Hi Dan, Can you merge this to your tree? -aneesh "Aneesh Kumar K.V" writes: > This series handle configs where hugepage support is not enabled by default. > Also, we update some of the information messages to make sure we use > PAGE_SIZE instead > of SZ_4K. We now store page size and struct

[PATCH] sound: ppc: snd_ps3: Remove Unneeded variable: "ret"

2019-07-09 Thread Hariprasad Kelam
This patch fixes below issue reported by coccicheck sound/ppc/snd_ps3.c:631:5-8: Unneeded variable: "ret". Return "0" on line 668 We cannot change return type of snd_ps3_pcm_trigger as it is registered with snd_pcm_ops->trigger Signed-off-by: Hariprasad Kelam --- sound/ppc/snd_ps3.c | 3 +-- 1

Re: [PATCH 3/5] x86: Kconfig: Remove CONFIG_NODES_SPAN_OTHER_NODES

2019-07-09 Thread Hoan Tran OS
Hi Thomas, Thanks for you comments On 6/25/19 3:45 PM, Thomas Gleixner wrote: > Hoan, > > On Tue, 25 Jun 2019, Hoan Tran OS wrote: > > Please use 'x86/Kconfig: ' as prefix. > >> This patch removes CONFIG_NODES_SPAN_OTHER_NODES as it's >> enabled by default with NUMA. > > Please do not use

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Max Gurtovoy
On 7/9/2019 5:40 PM, Christoph Hellwig wrote: On Tue, Jul 09, 2019 at 05:37:18PM +0300, Max Gurtovoy wrote: On 7/9/2019 5:32 PM, Christoph Hellwig wrote: On Tue, Jul 09, 2019 at 05:31:37PM +0300, Max Gurtovoy wrote: Are we ok with working on a solution during kernel-5.3 cycle ? You can

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Max Gurtovoy
On 7/9/2019 5:32 PM, Christoph Hellwig wrote: On Tue, Jul 09, 2019 at 05:31:37PM +0300, Max Gurtovoy wrote: Are we ok with working on a solution during kernel-5.3 cycle ? You can start working on it any time, no need to ask for permission. I just want to make sure we don't remove it from

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Max Gurtovoy
On 7/9/2019 4:59 PM, Christoph Hellwig wrote: On Tue, Jul 09, 2019 at 01:49:04PM +, Max Gurtovoy wrote: Hi Greg/Christoph, Can we leave it meanwhile till we'll find a general solution (for the upcoming kernel) ? I guess we can somehow generalize the P2P initialization process for PPC and

RE: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Max Gurtovoy
Hi Greg/Christoph, Can we leave it meanwhile till we'll find a general solution (for the upcoming kernel) ? I guess we can somehow generalize the P2P initialization process for PPC and leave it empty for now for other archs. Or maybe we can find some other solution (sysfs/configfs/module param),

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread 'gre...@linuxfoundation.org'
On Tue, Jul 09, 2019 at 06:06:54PM +0300, Max Gurtovoy wrote: > > On 7/9/2019 5:40 PM, Christoph Hellwig wrote: > > On Tue, Jul 09, 2019 at 05:37:18PM +0300, Max Gurtovoy wrote: > > > On 7/9/2019 5:32 PM, Christoph Hellwig wrote: > > > > On Tue, Jul 09, 2019 at 05:31:37PM +0300, Max Gurtovoy

Re: [RFC PATCH v5 5/7] kvmppc: Radix changes for secure guest

2019-07-09 Thread janani
On 2019-07-09 05:25, Bharata B Rao wrote: - After the guest becomes secure, when we handle a page fault of a page belonging to SVM in HV, send that page to UV via UV_PAGE_IN. - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. - Ensure all those routines that walk the

[PATCH v2 3/7] kexec_elf: remove parsing of section headers

2019-07-09 Thread Sven Schnelle
We're not using them, so we can drop the parsing. Signed-off-by: Sven Schnelle --- include/linux/kexec.h | 1 - kernel/kexec_elf.c| 137 -- 2 files changed, 138 deletions(-) diff --git a/include/linux/kexec.h b/include/linux/kexec.h index

[PATCH v2 6/7] kexec_elf: remove Elf_Rel macro

2019-07-09 Thread Sven Schnelle
It wasn't used anywhere, so lets drop it. Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 4 1 file changed, 4 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 99e6d63b5dfc..b7e47ddd7cad 100644 --- a/kernel/kexec_elf.c +++ b/kernel/kexec_elf.c @@ -8,10 +8,6 @@

[PATCH v2 2/7] kexec_elf: change order of elf_*_to_cpu() functions

2019-07-09 Thread Sven Schnelle
Change the order to have a 64/32/16 order, no functional change. Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 6e9f52171ede..76e7df64d715 100644 ---

[PATCH v2 1/7] kexec: add KEXEC_ELF

2019-07-09 Thread Sven Schnelle
Right now powerpc provides an implementation to read elf files with the kexec_file() syscall. Make that available as a public kexec interface so it can be re-used on other architectures. Signed-off-by: Sven Schnelle --- arch/Kconfig | 3 + arch/powerpc/Kconfig

[PATCH v2 4/7] kexec_elf: remove PURGATORY_STACK_SIZE

2019-07-09 Thread Sven Schnelle
It's not used anywhere so just drop it. Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index effe9dc0b055..70d31b8feeae 100644 --- a/kernel/kexec_elf.c +++ b/kernel/kexec_elf.c @@ -8,8 +8,6 @@

[PATCH v2 5/7] kexec_elf: remove elf_addr_to_cpu macro

2019-07-09 Thread Sven Schnelle
It had only one definition, so just use the function directly. Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index 70d31b8feeae..99e6d63b5dfc 100644 ---

[PATCH v2 0/7] kexec: add generic support for elf kernel images

2019-07-09 Thread Sven Schnelle
Hi List, i've split up the patch a bit more. The first one move the generic elf stuff out of arch/powerpc to linux/kexec_elf.c, and prefixes the exposed functions with kexec_. That other patches remove stuff that is not used as proposed in the review. Changes to v1: - split up patch into

[PATCH v2 7/7] kexec_elf: remove unused variable in kexec_elf_load()

2019-07-09 Thread Sven Schnelle
base was never unsigned, so we can remove it. Signed-off-by: Sven Schnelle --- kernel/kexec_elf.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/kexec_elf.c b/kernel/kexec_elf.c index b7e47ddd7cad..a56ec5481e71 100644 --- a/kernel/kexec_elf.c +++

Re: [PATCH v5 4/7] kvmppc: Handle memory plug/unplug to secure VM

2019-07-09 Thread janani
On 2019-07-09 05:25, Bharata B Rao wrote: Register the new memslot with UV during plug and unregister the memslot during unplug. Signed-off-by: Bharata B Rao Acked-by: Paul Mackerras Reviewed-by: Janani Janakiraman --- arch/powerpc/include/asm/ultravisor-api.h | 1 +

Re: [PATCH v5 3/7] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-07-09 Thread janani
On 2019-07-09 05:25, Bharata B Rao wrote: H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM As part of H_SVM_INIT_START, register all existing memslots with the UV. H_SVM_INIT_DONE call by UV informs HV that transition of the guest to secure mode is complete.

Re: [PATCH v5 2/7] kvmppc: Shared pages support for secure guests

2019-07-09 Thread janani
On 2019-07-09 05:25, Bharata B Rao wrote: A secure guest will share some of its pages with hypervisor (Eg. virtio bounce buffers etc). Support shared pages in HMM driver. Once a secure page is converted to shared page, HMM driver will stop tracking that page. Signed-off-by: Bharata B Rao

Re: [PATCH v5 1/7] kvmppc: HMM backend driver to manage pages of secure guest

2019-07-09 Thread janani
On 2019-07-09 05:25, Bharata B Rao wrote: 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 Private

Re: [PATCH 4/4] powerpc/64: reuse PPC32 static inline flush_dcache_range()

2019-07-09 Thread Segher Boessenkool
On Tue, Jul 09, 2019 at 08:21:54AM +0530, Aneesh Kumar K.V wrote: > On 7/9/19 7:50 AM, Oliver O'Halloran wrote: > >I don't think it's that, there's some magic in flush_icache_range() to > >handle dropping prefetched instructions on 970. > > > >>So overall wondering why we need that extra barriers

Re: [PATCH v2] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-09 Thread Jarkko Sakkinen
On Mon, Jul 08, 2019 at 03:43:04PM -0700, Christoph Hellwig wrote: > On Mon, Jul 08, 2019 at 06:24:04PM -0400, Mimi Zohar wrote: > > > static int tpm_get_pcr_allocation(struct tpm_chip *chip) > > > { > > > int rc; > > > > > > rc = (chip->flags & TPM_CHIP_FLAG_TPM2) ? > > >

Re: [PATCH v2] tpm: tpm_ibm_vtpm: Fix unallocated banks

2019-07-09 Thread Jarkko Sakkinen
On Mon, Jul 08, 2019 at 06:24:04PM -0400, Mimi Zohar wrote: > > static int tpm_get_pcr_allocation(struct tpm_chip *chip) > > { > > int rc; > > > > rc = (chip->flags & TPM_CHIP_FLAG_TPM2) ? > > tpm2_get_pcr_allocation(chip) : > >

Re: [linux-next][P9]Build error at drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h:69 error: field mirror has incomplete type

2019-07-09 Thread Nathan Chancellor
*** [drivers/gpu/drm] Error 2 > make[2]: *** [drivers/gpu] Error 2 > > Kernel version: 5.2.0-next-20190708 > Machine: Power 9 > Kernel config attached > > -- > Regard's > > Abdul Haleem > IBM Linux Technology Centre > This

Re: [PATCH 0/2] fix use-after-free in mpc831x_usb_cfg() and do some cleanups

2019-07-09 Thread Markus Elfring
> According to Markus's suggestion, split it into two small patches: > https://lkml.org/lkml/2019/7/8/520 Thanks that you picked adjustment possibilities up from my feedback. https://lore.kernel.org/lkml/99840e11-e0e6-b3f4-e35b-56ef4ec39...@web.de/ Now I wonder why you omitted message

Re: [PATCH v2 03/35] powerpc: Use kmemdup rather than duplicating its implementation

2019-07-09 Thread Nathan Lynch
Fuqian Huang writes: > kmemdup is introduced to duplicate a region of memory in a neat way. > Rather than kmalloc/kzalloc + memcpy, which the programmer needs to > write the size twice (sometimes lead to mistakes), kmemdup improves > readability, leads to smaller code and also reduce the chances

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2019 at 06:06:54PM +0300, Max Gurtovoy wrote: > Also this code was merged before the p2p API for p2pmem. Yes, without a single user or intention to submit a user, and without covering the most useful use case (PCIe switches). While at the same time the people involved completely

Re: ["RFC PATCH" 1/2] powerpc/mm: Fix node look up with numa=off boot

2019-07-09 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> "Aneesh Kumar K.V" writes: Just checking: do people still need numa=off? Seems like it's a maintenance burden :-) >>> >>> That is used in kdump kernel. >> >> I see, thanks. > > That doesn't mean it's a good idea :) > > Does it

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2019 at 05:37:18PM +0300, Max Gurtovoy wrote: > > On 7/9/2019 5:32 PM, Christoph Hellwig wrote: >> On Tue, Jul 09, 2019 at 05:31:37PM +0300, Max Gurtovoy wrote: >>> Are we ok with working on a solution during kernel-5.3 cycle ? >> You can start working on it any time, no need to

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2019 at 05:31:37PM +0300, Max Gurtovoy wrote: > Are we ok with working on a solution during kernel-5.3 cycle ? You can start working on it any time, no need to ask for permission.

Re: [PATCH 1/3] powerpc/powernv: remove the unused pnv_pci_set_p2p function

2019-07-09 Thread Christoph Hellwig
On Tue, Jul 09, 2019 at 01:49:04PM +, Max Gurtovoy wrote: > Hi Greg/Christoph, > Can we leave it meanwhile till we'll find a general solution (for the > upcoming kernel) ? > I guess we can somehow generalize the P2P initialization process for PPC and > leave it empty for now for other archs.

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-09 Thread Segher Boessenkool
On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : > >On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > >>On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > >>>Cache instructions (dcbz, dcbi, dcbf and

[v5 5/6] powerpc/mce: Handle UE event for memcpy_mcsafe

2019-07-09 Thread Santosh Sivaraj
If we take a UE on one of the instructions with a fixup entry, set nip to continue execution at the fixup entry. Stop processing the event further or print it. Based-on-patch-by: Reza Arbab Cc: Reza Arbab Cc: Mahesh Salgaonkar Signed-off-by: Santosh Sivaraj --- arch/powerpc/include/asm/mce.h

[v5 6/6] powerpc: add machine check safe copy_to_user

2019-07-09 Thread Santosh Sivaraj
Use memcpy_mcsafe() implementation to define copy_to_user_mcsafe() Signed-off-by: Santosh Sivaraj --- arch/powerpc/Kconfig | 1 + arch/powerpc/include/asm/uaccess.h | 14 ++ 2 files changed, 15 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig

[v5 4/6] extable: Add function to search only kernel exception table

2019-07-09 Thread Santosh Sivaraj
In real mode, the search_exception tables cannot be called because it also searches the module exception tables if entry is not found in the kernel exception tables. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Nicholas Piggin Signed-off-by: Santosh Sivaraj --- include/linux/extable.h | 2 ++

[v5 3/6] powerpc/memcpy: Add memcpy_mcsafe for pmem

2019-07-09 Thread Santosh Sivaraj
From: Balbir Singh The pmem infrastructure uses memcpy_mcsafe in the pmem layer so as to convert machine check exceptions into a return value on failure in case a machine check exception is encountered during the memcpy. The return value is the number of bytes remaining to be copied. This patch

[v5 2/6] powerpc/mce: Fix MCE handling for huge pages

2019-07-09 Thread Santosh Sivaraj
From: Balbir Singh The current code would fail on huge pages addresses, since the shift would be incorrect. Use the correct page shift value returned by __find_linux_pte() to get the correct pfn. The code is more generic and can handle both regular and compound pages. Fixes: ba41e1e1ccb9

[v5 1/6] powerpc/mce: Make machine_check_ue_event() static

2019-07-09 Thread Santosh Sivaraj
From: Reza Arbab The function doesn't get used outside this file, so make it static. Signed-off-by: Reza Arbab Signed-off-by: Santosh Sivaraj Reviewed-by: Nicholas Piggin --- arch/powerpc/kernel/mce.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[v5 0/6] powerpc: implement machine check safe memcpy

2019-07-09 Thread Santosh Sivaraj
During a memcpy from a pmem device, if a machine check exception is generated we end up in a panic. In case of fsdax read, this should only result in a -EIO. Avoid MCE by implementing memcpy_mcsafe. Before this patch series: ``` bash-4.4# mount -o dax /dev/pmem0 /mnt/pmem/ [ 7621.714094]

[PATCH 2/2] powerpc/83xx: cleanup error paths in mpc831x_usb_cfg()

2019-07-09 Thread Wen Yang
Rename the jump labels according to the cleanup they perform, and move reference handling to simplify cleanup. Signed-off-by: Wen Yang Cc: Scott Wood Cc: Kumar Gala Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Markus Elfring Cc: linuxppc-dev@lists.ozlabs.org Cc:

[PATCH 1/2] powerpc/83xx: fix use-after-free in mpc831x_usb_cfg()

2019-07-09 Thread Wen Yang
The immr_node variable is still being used after the of_node_put() call, which may result in use-after-free. Fix this issue by calling of_node_put() after the last usage. Fixes: fd066e850351 ("powerpc/mpc8308: fix USB DR controller initialization") Signed-off-by: Wen Yang Cc: Scott Wood Cc:

[PATCH v5 7/7] KVM: PPC: Ultravisor: Add PPC_UV config option

2019-07-09 Thread Bharata B Rao
From: Anshuman Khandual CONFIG_PPC_UV adds support for ultravisor. Signed-off-by: Anshuman Khandual Signed-off-by: Bharata B Rao Signed-off-by: Ram Pai [ Update config help and commit message ] Signed-off-by: Claudio Carvalho --- arch/powerpc/Kconfig | 20 1 file

[RFC PATCH v5 6/7] kvmppc: Support reset of secure guest

2019-07-09 Thread Bharata B Rao
Add support for reset of secure guest via a new ioctl KVM_PPC_SVM_OFF. This ioctl will be issued by QEMU during reset and includes the the following steps: - Ask UV to terminate the guest via UV_SVM_TERMINATE ucall - Unpin the VPA pages so that they can be migrated back to secure side when

[RFC PATCH v5 5/7] kvmppc: Radix changes for secure guest

2019-07-09 Thread Bharata B Rao
- After the guest becomes secure, when we handle a page fault of a page belonging to SVM in HV, send that page to UV via UV_PAGE_IN. - Whenever a page is unmapped on the HV side, inform UV via UV_PAGE_INVAL. - Ensure all those routines that walk the secondary page tables of the guest don't do

[PATCH v5 4/7] kvmppc: Handle memory plug/unplug to secure VM

2019-07-09 Thread Bharata B Rao
Register the new memslot with UV during plug and unregister the memslot during unplug. Signed-off-by: Bharata B Rao Acked-by: Paul Mackerras --- arch/powerpc/include/asm/ultravisor-api.h | 1 + arch/powerpc/include/asm/ultravisor.h | 7 +++ arch/powerpc/kvm/book3s_hv.c |

[PATCH v5 3/7] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-07-09 Thread Bharata B Rao
H_SVM_INIT_START: Initiate securing a VM H_SVM_INIT_DONE: Conclude securing a VM As part of H_SVM_INIT_START, register all existing memslots with the UV. H_SVM_INIT_DONE call by UV informs HV that transition of the guest to secure mode is complete. These two states (transition to secure mode

[PATCH v5 2/7] kvmppc: Shared pages support for secure guests

2019-07-09 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. Once a secure page is converted to shared page, HMM driver will stop tracking that page. Signed-off-by: Bharata B Rao --- arch/powerpc/include/asm/hvcall.h | 3 ++

[PATCH v5 1/7] kvmppc: HMM backend driver to manage pages of secure guest

2019-07-09 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 Private ZONE_DEVICE memory equal to the amount of secure

[PATCH v5 0/7] kvmppc: HMM driver to manage pages of secure guest

2019-07-09 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

Re: [RFC PATCH v4 6/6] kvmppc: Support reset of secure guest

2019-07-09 Thread Bharata B Rao
On Mon, Jun 17, 2019 at 02:06:32PM +1000, Paul Mackerras wrote: > On Tue, May 28, 2019 at 12:19:33PM +0530, Bharata B Rao wrote: > > Add support for reset of secure guest via a new ioctl KVM_PPC_SVM_OFF. > > This ioctl will be issued by QEMU during reset and in this ioctl, > > we ask UV to

Re: [PATCH v4 3/6] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-07-09 Thread Bharata B Rao
On Tue, Jun 18, 2019 at 08:05:26PM -0300, Thiago Jung Bauermann wrote: > > Hello Bharata, > > Bharata B Rao writes: > > > diff --git a/arch/powerpc/include/asm/kvm_book3s_hmm.h > > b/arch/powerpc/include/asm/kvm_book3s_hmm.h > > index 21f3de5f2acb..3e13dab7f690 100644 > > ---

Re: [PATCH v4 3/6] kvmppc: H_SVM_INIT_START and H_SVM_INIT_DONE hcalls

2019-07-09 Thread Bharata B Rao
On Mon, Jun 17, 2019 at 03:37:56PM +1000, Paul Mackerras wrote: > On Tue, May 28, 2019 at 12:19:30PM +0530, Bharata B Rao wrote: > > H_SVM_INIT_START: Initiate securing a VM > > H_SVM_INIT_DONE: Conclude securing a VM > > > > As part of H_SVM_INIT_START register all existing memslots with the UV.

Re: [PATCH v4 1/6] kvmppc: HMM backend driver to manage pages of secure guest

2019-07-09 Thread Bharata B Rao
On Mon, Jun 17, 2019 at 03:31:06PM +1000, Paul Mackerras wrote: > On Tue, May 28, 2019 at 12:19:28PM +0530, Bharata B Rao wrote: > > 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

Re: [PATCH v5] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-09 Thread Viresh Kumar
On 09-07-19, 16:04, Wen Yang wrote: > The cpu variable is still being used in the of_get_property() call > after the of_node_put() call, which may result in use-after-free. > > Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak") > Signed-off-by: Wen Yang > Cc: "Rafael J.

Re: [PATCH v5] powerpc/64s: support nospectre_v2 cmdline option

2019-07-09 Thread Andrew Donnellan
On 5/6/19 5:42 pm, Andrew Donnellan wrote: On 24/5/19 12:46 pm, Christopher M. Riedl wrote: Add support for disabling the kernel implemented spectre v2 mitigation (count cache flush on context switch) via the nospectre_v2 and mitigations=off cmdline options. Suggested-by: Michael Ellerman

[PATCH v5] cpufreq/pasemi: fix an use-after-free in pas_cpufreq_cpu_init()

2019-07-09 Thread Wen Yang
The cpu variable is still being used in the of_get_property() call after the of_node_put() call, which may result in use-after-free. Fixes: a9acc26b75f ("cpufreq/pasemi: fix possible object reference leak") Signed-off-by: Wen Yang Cc: "Rafael J. Wysocki" Cc: Viresh Kumar Cc: Michael Ellerman

Re: [PATCH v2] powerpc: slightly improve cache helpers

2019-07-09 Thread Nathan Chancellor
On Tue, Jul 09, 2019 at 07:04:43AM +0200, Christophe Leroy wrote: > > > Le 08/07/2019 à 21:14, Nathan Chancellor a écrit : > > On Mon, Jul 08, 2019 at 11:19:30AM +1000, Michael Ellerman wrote: > > > On Fri, 2019-05-10 at 09:24:48 UTC, Christophe Leroy wrote: > > > > Cache instructions (dcbz,