Re: [PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Christian Borntraeger
On 13.04.21 09:52, Wanpeng Li wrote: Or did I miss anything. I mean the if (!context_tracking_enabled_this_cpu()) part in the function context_guest_enter_irqoff() ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN. :) Ah I missed that. Thanks.

Re: [PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Wanpeng Li
On Tue, 13 Apr 2021 at 15:48, Christian Borntraeger wrote: > > > > On 13.04.21 09:38, Wanpeng Li wrote: > > On Tue, 13 Apr 2021 at 15:35, Christian Borntraeger > > wrote: > >> > >> > >> > >> On 13.04.21 09:16, Wanpeng Li wrote: > >> [...] > >> > >>> @@ -145,6 +155,13 @@ static __always_inline voi

Re: [PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Christian Borntraeger
On 13.04.21 09:38, Wanpeng Li wrote: On Tue, 13 Apr 2021 at 15:35, Christian Borntraeger wrote: On 13.04.21 09:16, Wanpeng Li wrote: [...] @@ -145,6 +155,13 @@ static __always_inline void guest_exit_irqoff(void) } #else THis is the else part +static __always_inline void conte

Re: [PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Wanpeng Li
On Tue, 13 Apr 2021 at 15:35, Christian Borntraeger wrote: > > > > On 13.04.21 09:16, Wanpeng Li wrote: > [...] > > > @@ -145,6 +155,13 @@ static __always_inline void guest_exit_irqoff(void) > > } > > > > #else > > +static __always_inline void context_guest_enter_irqoff(void) > > +{ > > +

Re: [PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Christian Borntraeger
On 13.04.21 09:16, Wanpeng Li wrote: [...] @@ -145,6 +155,13 @@ static __always_inline void guest_exit_irqoff(void) } #else +static __always_inline void context_guest_enter_irqoff(void) +{ + instrumentation_begin(); + rcu_virt_note_context_switch(smp_processor_id()); +

[PATCH v2 1/3] context_tracking: Split guest_enter/exit_irqoff

2021-04-13 Thread Wanpeng Li
From: Wanpeng Li Split context_tracking part from guest_enter/exit_irqoff, it will be called separately in later patches. Suggested-by: Thomas Gleixner Cc: Thomas Gleixner Cc: Sean Christopherson Cc: Michael Tokarev Signed-off-by: Wanpeng Li --- include/linux/context_tracking.h | 42 +