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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87wnd2uolh.fsf@redhat.com>
Date:   Mon, 27 Jun 2022 17:12:58 +0200
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
        Anirudh Rayabharam <anrayabh@...ux.microsoft.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Maxim Levitsky <mlevitsk@...hat.com>,
        linux-hyperv@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v1 02/10] KVM: VMX: Add missing CPU based VM
 execution controls to vmcs_config

Sean Christopherson <seanjc@...gle.com> writes:

> Maybe say "dynamically enabled" or so instead of "missing"?
>

...

> On Wed, Jun 22, 2022, Vitaly Kuznetsov wrote:
>> Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
>> ---
>>  arch/x86/kvm/vmx/vmx.c | 15 ++++++++++++++-
>>  1 file changed, 14 insertions(+), 1 deletion(-)
>> 
>> diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
>> index 24da9e93bdab..01294a2fc1c1 100644
>> --- a/arch/x86/kvm/vmx/vmx.c
>> +++ b/arch/x86/kvm/vmx/vmx.c
>> @@ -2483,8 +2483,14 @@ static __init int setup_vmcs_config(struct vmcs_config *vmcs_conf,
>>  	      CPU_BASED_INVLPG_EXITING |
>>  	      CPU_BASED_RDPMC_EXITING;
>>  
>> -	opt = CPU_BASED_TPR_SHADOW |
>> +	opt = CPU_BASED_INTR_WINDOW_EXITING |
>> +	      CPU_BASED_RDTSC_EXITING |
>> +	      CPU_BASED_TPR_SHADOW |
>> +	      CPU_BASED_NMI_WINDOW_EXITING |
>> +	      CPU_BASED_USE_IO_BITMAPS |
>> +	      CPU_BASED_MONITOR_TRAP_FLAG |
>>  	      CPU_BASED_USE_MSR_BITMAPS |
>> +	      CPU_BASED_PAUSE_EXITING |
>>  	      CPU_BASED_ACTIVATE_SECONDARY_CONTROLS |
>>  	      CPU_BASED_ACTIVATE_TERTIARY_CONTROLS;

CPU_BASED_INTR_WINDOW_EXITING and CPU_BASED_NMI_WINDOW_EXITING are
actually "dynamically enabled" but CPU_BASED_RDTSC_EXITING/
CPU_BASED_USE_IO_BITMAPS/ CPU_BASED_MONITOR_TRAP_FLAG /
CPU_BASED_PAUSE_EXITING are not (and I found the first two immediately
after implementing 'macro shananigans' you suggested, of course :-), KVM
just doesn't use them for L1. So this is going to get splitted in two
patches.

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ