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] [day] [month] [year] [list]
Date:   Tue, 5 Dec 2017 16:15:23 -0800
From:   Nadav Amit <nadav.amit@...il.com>
To:     Radim Krčmář <rkrcmar@...hat.com>
Cc:     Wanpeng Li <kernellwp@...il.com>,
        LKML <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Wanpeng Li <wanpeng.li@...mail.com>,
        Jim Mattson <jmattson@...gle.com>
Subject: Re: [PATCH v2] KVM: VMX: Cache IA32_DEBUGCTL in memory

Radim Krčmář <rkrcmar@...hat.com> wrote:

> 2017-11-29 01:31-0800, Wanpeng Li:
>> 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: Paolo Bonzini <pbonzini@...hat.com>
>> Cc: Radim Krčmář <rkrcmar@...hat.com>
>> Cc: Jim Mattson <jmattson@...gle.com>
>> Signed-off-by: Wanpeng Li <wanpeng.li@...mail.com>
>> ---
> 
> Queued, thanks.
> 
> And there is another optimization loosely connected to the "[PATCH v3
> 00/16] Move vcpu_load and vcpu_put calls to arch code" series:
> We only need to read the value for the KVM_RUN ioctl.

Can you add some warning that would fire in some “debug” mode if the cached
value is not identical to the real one?

Thanks,
Nadav

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ