Skip to content

Commit 866a6da

Browse files
Wanpeng LiKAGA-KOKO
authored andcommitted
context_tracking: Move guest exit context tracking to separate helpers
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]
1 parent a217a65 commit 866a6da

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
@@ -131,10 +131,15 @@ static __always_inline void guest_enter_irqoff(void)
131131
}
132132
}
133133

134-
static __always_inline void guest_exit_irqoff(void)
134+
static __always_inline void context_tracking_guest_exit(void)
135135
{
136136
if (context_tracking_enabled())
137137
__context_tracking_exit(CONTEXT_GUEST);
138+
}
139+
140+
static __always_inline void guest_exit_irqoff(void)
141+
{
142+
context_tracking_guest_exit();
138143

139144
instrumentation_begin();
140145
if (vtime_accounting_enabled_this_cpu())
@@ -159,6 +164,8 @@ static __always_inline void guest_enter_irqoff(void)
159164
instrumentation_end();
160165
}
161166

167+
static __always_inline void context_tracking_guest_exit(void) { }
168+
162169
static __always_inline void guest_exit_irqoff(void)
163170
{
164171
instrumentation_begin();

0 commit comments

Comments
 (0)