|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2 1/5] xen/livepatch: register livepatch regions when loaded
On Tue, Feb 27, 2024 at 1:08 PM Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
>
> On 27/02/2024 11:25 am, Roger Pau Monne wrote:
> > diff --git a/xen/common/virtual_region.c b/xen/common/virtual_region.c
> > index ddac5c9147e5..e3a4dc8540df 100644
> > --- a/xen/common/virtual_region.c
> > +++ b/xen/common/virtual_region.c
> > <snip>
> >
> > +#ifdef CONFIG_LIVEPATCH
> > void unregister_virtual_region(struct virtual_region *r)
> > {
> > - /* Expected to be called from Live Patch - which has IRQs disabled. */
> > - ASSERT(!local_irq_is_enabled());
> > -
> > remove_virtual_region(r);
> > +
> > + /* Assert that no CPU might be using the removed region. */
> > + rcu_barrier();
> > }
> >
> > -#if defined(CONFIG_LIVEPATCH) && defined(CONFIG_X86)
> > +#ifdef CONFIG_X86
> > void relax_virtual_region_perms(void)
> > {
> > const struct virtual_region *region;
> > @@ -117,6 +106,7 @@ void tighten_virtual_region_perms(void)
> > rcu_read_unlock(&rcu_virtual_region_lock);
> > }
> > #endif
> > +#endif
>
> Can we please have:
>
> #endif /* CONFIG_X86 */
> #endif /* CONFIG_LIVEPATCH */
>
> before this gets any more complicated to follow. Can be fixed on commit.
>
LGTM with this suggested change.
Reviewed-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |