Re: [PATCH v3 1/2] KVM: PPC: Book3S HV: Add support for H_RPT_INVALIDATE

2021-01-06 Thread Bharata B Rao
On Wed, Jan 06, 2021 at 05:27:27PM -0300, Fabiano Rosas wrote: > Bharata B Rao writes: > > + > > +long kvmhv_h_rpti_nested(struct kvm_vcpu *vcpu, unsigned long lpid, > > +unsigned long type, unsigned long pg_sizes, > > +unsigned long start, unsigned long

[PATCH] powerpc/pseries/dlpar: handle ibm, configure-connector delay status

2021-01-06 Thread Nathan Lynch
dlpar_configure_connector() has two problems in its handling of ibm,configure-connector's return status: 1. When the status is -2 (busy, call again), we call ibm,configure-connector again immediately without checking whether to schedule, which can result in monopolizing the CPU. 2. Extended

[PATCH] ibmvfc: fix missing cast of ibmvfc_event pointer to u64 handle

2021-01-06 Thread Tyrel Datwyler
Commit 2aa0102c6688 ("scsi: ibmvfc: Use correlation token to tag commands") sets the vfcFrame correlation token to the pointer handle of the associated ibmvfc_event. However, that commit failed to cast the pointer to an appropriate type which in this case is a u64. As such sparse warnings are

[PATCH v2 5/5] ibmvfc: relax locking around ibmvfc_queuecommand

2021-01-06 Thread Tyrel Datwyler
The drivers queuecommand routine is still wrapped to hold the host lock for the duration of the call. This will become problematic when moving to multiple queues due to the lock contention preventing asynchronous submissions to mulitple queues. There is no real legatimate reason to hold the host

[PATCH v2 4/5] ibmvfc: complete commands outside the host/queue lock

2021-01-06 Thread Tyrel Datwyler
Drain the command queue and place all commands on a completion list. Perform command completion on that list outside the host/queue locks. Further, move purged command compeletions outside the host_lock as well. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian King ---

[PATCH v2 0/5] ibmvfc: MQ preparatory locking work

2021-01-06 Thread Tyrel Datwyler
The ibmvfc driver in its current form relies heavily on the host_lock. This patchset introduces a genric queue with its own queue lock and sent/free event list locks. This generic queue allows the driver to decouple the primary queue and future subordinate queues from the host lock reducing lock

[PATCH v2 3/5] ibmvfc: define per-queue state/list locks

2021-01-06 Thread Tyrel Datwyler
Define per-queue locks for protecting queue state and event pool sent/free lists. The evt list lock is initially redundant but it allows the driver to be modified in the follow-up patches to relax the queue locking around submissions and completions. Signed-off-by: Tyrel Datwyler Reviewed-by:

[PATCH v2 2/5] ibmvfc: make command event pool queue specific

2021-01-06 Thread Tyrel Datwyler
There is currently a single command event pool per host. In anticipation of providing multiple queues add a per-queue event pool definition and reimplement the existing CRQ to use its queue defined event pool for command submission and completion. Signed-off-by: Tyrel Datwyler Reviewed-by: Brian

[PATCH v2 1/5] ibmvfc: define generic queue structure for CRQs

2021-01-06 Thread Tyrel Datwyler
The primary and async CRQs are nearly identical outside of the format and length of each message entry in the dma mapped page that represents the queue data. These queues can be represented with a generic queue structure that uses a union to differentiate between message format of the mapped page.

Re: [PATCH -next] pci/controller/dwc: convert comma to semicolon

2021-01-06 Thread Bjorn Helgaas
On Wed, Dec 16, 2020 at 09:19:44PM +0800, Zheng Yongjun wrote: > Replace a comma between expression statements by a semicolon. Looks like a good fix, but read this about the changelog title: https://lore.kernel.org/r/20171026223701.ga25...@bhelgaas-glaptop.roam.corp.google.com > Signed-off-by:

Re: [RFC PATCH v3 5/6] dt-bindings: of: Add restricted DMA pool

2021-01-06 Thread Konrad Rzeszutek Wilk
On Wed, Jan 06, 2021 at 11:41:23AM +0800, Claire Chang wrote: > Introduce the new compatible string, restricted-dma-pool, for restricted > DMA. One can specify the address and length of the restricted DMA memory > region by restricted-dma-pool in the device tree. > > Signed-off-by: Claire Chang

Re: [RFC PATCH v3 2/6] swiotlb: Add restricted DMA pool

2021-01-06 Thread Konrad Rzeszutek Wilk
Hello! In this file: > diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c > index e4368159f88a..7fb2ac087d23 100644 > --- a/kernel/dma/swiotlb.c > +++ b/kernel/dma/swiotlb.c .. > +static const struct reserved_mem_ops rmem_swiotlb_ops = { > + .device_init= rmem_swiotlb_device_init,

Re: [RFC PATCH v3 0/6] Restricted DMA

2021-01-06 Thread Florian Fainelli
Hi, First of all let me say that I am glad that someone is working on a upstream solution for this issue, would appreciate if you could CC and Jim Quinlan on subsequent submissions. On 1/5/21 7:41 PM, Claire Chang wrote: > This series implements mitigations for lack of DMA access control on >

Re: [PATCH v2 4/5] ibmvfc: complete commands outside the host/queue lock

2021-01-06 Thread Tyrel Datwyler
On 1/5/21 8:42 PM, Martin K. Petersen wrote: > > Tyrel, > >> Drain the command queue and place all commands on a completion list. >> Perform command completion on that list outside the host/queue locks. >> Further, move purged command compeletions outside the host_lock as well. > > Please