lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b03a351c-764c-5132-7efa-a63328d3e8e4@redhat.com>
Date:   Wed, 29 Nov 2017 10:13:32 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Wanpeng Li <kernellwp@...il.com>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        kvm <kvm@...r.kernel.org>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH] KVM: VMX: Cache IA32_DEBUGCTL in memory

On 29/11/2017 09:51, Wanpeng Li wrote:
> 2017-11-29 16:48 GMT+08:00 Paolo Bonzini <pbonzini@...hat.com>:
>> On 29/11/2017 07:07, Wanpeng Li wrote:
>>> From: Wanpeng Li <wanpeng.li@...mail.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.
>>>
>>> Suggested-by: Jim Mattson <jmattson@...gle.com>
>>> Cc: Jim Mattson <jmattson@...gle.com>
>>> Cc: Paolo Bonzini <pbonzini@...hat.com>
>>> Cc: Radim Krčmář <rkrcmar@...hat.com>
>>> Signed-off-by: Wanpeng Li <wanpeng.li@...mail.com>
>>
>> The update_debugctlmsr should stay in vmx_vcpu_run so that tracing
>> features work correctly.  However, the get_debugctlmsr indeed can be
> 
> The tracing can't run except vCPU is schedule out, so why
> update_debugctlmsr should stay in vmx_vcpu_run?

For example your patch is disabling BTS (branch trace store) after the
first vmexit, isn't it?

Thanks,

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ