lkml.org 
[lkml]   [2022]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch v3 13/14] PCI: hv: Add hypercalls to read/write MMIO space
On Thu, Nov 17, 2022 at 04:14:44PM +0000, Michael Kelley (LINUX) wrote:
> From: Wei Liu <wei.liu@kernel.org> Sent: Thursday, November 17, 2022 7:17 AM
> >
> > On Wed, Nov 16, 2022 at 10:41:36AM -0800, Michael Kelley wrote:
> > [...]
> > >
> > > +static void hv_pci_read_mmio(struct device *dev, phys_addr_t gpa, int size, u32
> > *val)
> > > +{
> > > + struct hv_mmio_read_input *in;
> > > + struct hv_mmio_read_output *out;
> > > + u64 ret;
> > > +
> > > + /*
> > > + * Must be called with interrupts disabled so it is safe
> > > + * to use the per-cpu input argument page. Use it for
> > > + * both input and output.
> > > + */
> >
> > Perhaps adding something along this line?
> >
> > WARN_ON(!irqs_disabled());
> >
> > I can fold this in if you agree.
>
> These two new functions are only called within this module from code
> that already has interrupts disabled (as added in Patch 14 of the series),
> so I didn't do the extra check. But I'm OK with adding it. These functions
> make a hypercall, so the additional check doesn't have enough perf
> impact to matter.

Okay, not adding them is fine too.

Thanks,
Wei.

\
 
 \ /
  Last update: 2022-11-17 18:02    [W:0.114 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site