All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Imbrenda <imbrenda@linux.ibm.com>
To: Nico Boehr <nrb@linux.ibm.com>
Cc: Janosch Frank <frankja@linux.ibm.com>,
	akrowiak@linux.ibm.com, jjherne@linux.ibm.com,
	pasic@linux.ibm.com, linux-s390@vger.kernel.org,
	kvm@vger.kernel.org, borntraeger@linux.ibm.com
Subject: Re: [PATCH v1] s390/vfio-ap: GISA: sort out physical vs virtual pointers usage
Date: Thu, 17 Nov 2022 11:01:43 +0100	[thread overview]
Message-ID: <20221117110143.6892e7e8@p-imbrenda> (raw)
In-Reply-To: <166867501356.12564.3855578681315731621@t14-nrb.local>

On Thu, 17 Nov 2022 09:50:14 +0100
Nico Boehr <nrb@linux.ibm.com> wrote:

> Quoting Janosch Frank (2022-11-15 09:56:52)
> > On 11/8/22 16:26, Nico Boehr wrote:  
> > > Fix virtual vs physical address confusion (which currently are the same)
> > > for the GISA when enabling the IRQ.
> > > 
> > > Signed-off-by: Nico Boehr <nrb@linux.ibm.com>
> > > ---
> > >   drivers/s390/crypto/vfio_ap_ops.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
> > > index 0b4cc8c597ae..20859cabbced 100644
> > > --- a/drivers/s390/crypto/vfio_ap_ops.c
> > > +++ b/drivers/s390/crypto/vfio_ap_ops.c
> > > @@ -429,7 +429,7 @@ static struct ap_queue_status vfio_ap_irq_enable(struct vfio_ap_queue *q,
> > >   
> > >       aqic_gisa.isc = nisc;
> > >       aqic_gisa.ir = 1;
> > > -     aqic_gisa.gisa = (uint64_t)gisa >> 4;
> > > +     aqic_gisa.gisa = (uint64_t)virt_to_phys(gisa) >> 4;  
> > 
> > I'd suggest doing s/uint64_t/u64/ or s/uint64_t/unsigned long/ but I'm 
> > wondering if (u32)(u64) would be more appropriate anyway.  
> 
> The gisa origin is a unsigned int, hence you are right, uint64_t is odd. But since virt_to_phys() returns unsigned long, the cast to uint64_t is now useless.
> 
> My suggestion is to remove the cast alltogether.

I agree to remove it

  reply	other threads:[~2022-11-17 10:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-08 15:26 [PATCH v1] s390/vfio-ap: GISA: sort out physical vs virtual pointers usage Nico Boehr
2022-11-15  8:56 ` Janosch Frank
2022-11-17  8:50   ` Nico Boehr
2022-11-17 10:01     ` Claudio Imbrenda [this message]
2022-11-17 17:55       ` Halil Pasic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221117110143.6892e7e8@p-imbrenda \
    --to=imbrenda@linux.ibm.com \
    --cc=akrowiak@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=jjherne@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=pasic@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.