lkml.org 
[lkml]   [2017]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory
Date
Wanpeng Li <kernellwp@gmail.com> writes:

> From: Wanpeng Li <wanpeng.li@hotmail.com>
>
> MSR_IA32_DEBUGCTLMSR is zeroed on VMEXIT, so it is saved/restored
> each time during world switch. Jim from Google pointed out that
> when running schbench in L2, vmx_vcpu_run will occupy 4% cpu time,
> and the 25% of vmx_vcpu_run cpu time is occupied by get_debugctlmsr().
> This patch caches the host IA32_DEBUGCTL MSR and saves/restores
> the host IA32_DEBUGCTL msr when guest/host switches to avoid to
> save/restore each time during world switch.

FWIW i've seen this too on L2 profiles.

But I haven't looked too closely, but I suspect you'll clobber global
kernel debugger state this way.

You would at least need some interface for KDB etc. to invalidate
your cache.

-Andi

\
 
 \ /
  Last update: 2017-11-29 19:22    [W:0.108 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site