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: <9e971115-5634-e64e-72b6-5e41c024c796@redhat.com>
Date:   Thu, 27 May 2021 15:08:13 +0200
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     "Stamatis, Ilias" <ilstam@...zon.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>
Cc:     "jmattson@...gle.com" <jmattson@...gle.com>,
        "Woodhouse, David" <dwmw@...zon.co.uk>,
        "vkuznets@...hat.com" <vkuznets@...hat.com>,
        "joro@...tes.org" <joro@...tes.org>,
        "mtosatti@...hat.com" <mtosatti@...hat.com>,
        "zamsden@...il.com" <zamsden@...il.com>,
        "seanjc@...gle.com" <seanjc@...gle.com>,
        "mlevitsk@...hat.com" <mlevitsk@...hat.com>,
        "wanpengli@...cent.com" <wanpengli@...cent.com>
Subject: Re: [PATCH v4 09/11] KVM: X86: Add vendor callbacks for writing the
 TSC multiplier

On 27/05/21 10:33, Stamatis, Ilias wrote:
>>   #ifdef CONFIG_X86_64
>> @@ -10444,6 +10461,7 @@ void kvm_arch_vcpu_postcreate(struct kvm_vcpu *vcpu)
>>   		return;
>>   	vcpu_load(vcpu);
>>   	kvm_synchronize_tsc(vcpu, 0);
>> +	kvm_vcpu_write_tsc_multiplier(vcpu, kvm_default_tsc_scaling_ratio);
> Hmm, I'm actually thinking now that this might not be correct. For example in
> case we hotplug a new vCPU but the other vCPUs don't use the default ratio.

It is correct, the TSC frequency can be set per CPU (which is useless 
except possibly for debugging OS timekeeping, but still).  So, the 
default kHz after hotplug is the host frequency.

It doesn't really matter because it only affects the fixed delta between 
the hotplugged CPU and the others as soon as userspace sets the 
frequency to the correct value.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ