Skip to content

Commit 5ae5e3f

Browse files
Wanpeng Ligregkh
authored andcommitted
context_tracking: Move guest exit context tracking to separate helpers
commit 866a6da upstream. Provide separate context tracking helpers for guest exit, the standalone helpers will be called separately by KVM x86 in later patches to fix tick-based accounting. Suggested-by: Thomas Gleixner <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Co-developed-by: Sean Christopherson <[email protected]> Signed-off-by: Sean Christopherson <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 27acfd1 commit 5ae5e3f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/linux/context_tracking.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,15 @@ static __always_inline void guest_enter_irqoff(void)
129129
}
130130
}
131131

132-
static __always_inline void guest_exit_irqoff(void)
132+
static __always_inline void context_tracking_guest_exit(void)
133133
{
134134
if (context_tracking_enabled())
135135
__context_tracking_exit(CONTEXT_GUEST);
136+
}
137+
138+
static __always_inline void guest_exit_irqoff(void)
139+
{
140+
context_tracking_guest_exit();
136141

137142
instrumentation_begin();
138143
if (vtime_accounting_enabled_this_cpu())
@@ -157,6 +162,8 @@ static __always_inline void guest_enter_irqoff(void)
157162
instrumentation_end();
158163
}
159164

165+
static __always_inline void context_tracking_guest_exit(void) { }
166+
160167
static __always_inline void guest_exit_irqoff(void)
161168
{
162169
instrumentation_begin();

0 commit comments

Comments
 (0)