lkml.org 
[lkml]   [2022]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 12/30] s390/pci: get SHM information from list pci
From
Date
On Fri, 2022-01-14 at 15:31 -0500, Matthew Rosato wrote:
> KVM will need information on the special handle mask used to indicate
> emulated devices. In order to obtain this, a new type of list pci call
> must be made to gather the information. Extend clp_list_pci_req to
> also fetch the model-dependent-data field that holds this mask.
>
> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com>
> ---
> arch/s390/include/asm/pci.h | 1 +
> arch/s390/include/asm/pci_clp.h | 2 +-
> arch/s390/pci/pci_clp.c | 28 +++++++++++++++++++++++++---
> 3 files changed, 27 insertions(+), 4 deletions(-)
>
---8<---
>
> +int zpci_get_mdd(u32 *mdd)
> +{
> + struct clp_req_rsp_list_pci *rrb;
> + u64 resume_token = 0;
> + int nentries, rc;
> +
> + if (!mdd)
> + return -EINVAL;
> +
> + rrb = clp_alloc_block(GFP_KERNEL);
> + if (!rrb)
> + return -ENOMEM;
> +
> + rc = clp_list_pci_req(rrb, &resume_token, &nentries, mdd);
> +
> + clp_free_block(rrb);
> + return rc;
> +}
> +EXPORT_SYMBOL_GPL(zpci_get_mdd);
> +
> static int clp_base_slpc(struct clp_req *req, struct clp_req_rsp_slpc *lpcb)
> {
> unsigned long limit = PAGE_SIZE - sizeof(lpcb->request);

Looks good.

Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>


\
 
 \ /
  Last update: 2022-01-27 11:30    [W:0.674 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site