2020-01-16 06:03:28

by Alex Shi

[permalink] [raw]
Subject: [PATCH] KVM: remove unused guest_enter

After commit 61bd0f66ff92 ("KVM: PPC: Book3S HV: Fix guest time accounting
with VIRT_CPU_ACCOUNTING_GEN"), no one use this function anymore, So better
to remove it.

Signed-off-by: Alex Shi <[email protected]>
Cc: Paolo Bonzini <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: [email protected]
---
include/linux/context_tracking.h | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
index 64ec82851aa3..8150f5ac176c 100644
--- a/include/linux/context_tracking.h
+++ b/include/linux/context_tracking.h
@@ -154,15 +154,6 @@ static inline void guest_exit_irqoff(void)
}
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_GEN */

-static inline void guest_enter(void)
-{
- unsigned long flags;
-
- local_irq_save(flags);
- guest_enter_irqoff();
- local_irq_restore(flags);
-}
-
static inline void guest_exit(void)
{
unsigned long flags;
--
1.8.3.1


2020-01-19 09:13:37

by Paolo Bonzini

[permalink] [raw]
Subject: Re: [PATCH] KVM: remove unused guest_enter

On 16/01/20 04:32, Alex Shi wrote:
> After commit 61bd0f66ff92 ("KVM: PPC: Book3S HV: Fix guest time accounting
> with VIRT_CPU_ACCOUNTING_GEN"), no one use this function anymore, So better
> to remove it.
>
> Signed-off-by: Alex Shi <[email protected]>
> Cc: Paolo Bonzini <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Frederic Weisbecker <[email protected]>
> Cc: [email protected]
> ---
> include/linux/context_tracking.h | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/include/linux/context_tracking.h b/include/linux/context_tracking.h
> index 64ec82851aa3..8150f5ac176c 100644
> --- a/include/linux/context_tracking.h
> +++ b/include/linux/context_tracking.h
> @@ -154,15 +154,6 @@ static inline void guest_exit_irqoff(void)
> }
> #endif /* CONFIG_VIRT_CPU_ACCOUNTING_GEN */
>
> -static inline void guest_enter(void)
> -{
> - unsigned long flags;
> -
> - local_irq_save(flags);
> - guest_enter_irqoff();
> - local_irq_restore(flags);
> -}
> -
> static inline void guest_exit(void)
> {
> unsigned long flags;
>

Queued, thanks.

Paolo