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]
Date: Fri, 29 Dec 2023 12:41:18 +0800
From: Xiaoyao Li <xiaoyao.li@...el.com>
To: Isaku Yamahata <isaku.yamahata@...el.com>, kvm@...r.kernel.org,
 linux-kernel@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
 erdemaktas@...gle.com, Sean Christopherson <seanjc@...gle.com>,
 Vishal Annapurve <vannapurve@...gle.com>, Jim Mattson <jmattson@...gle.com>,
 Maxim Levitsky <mlevitsk@...hat.com>
Cc: isaku.yamahata@...il.com
Subject: Re: [PATCH v3 3/4] KVM: X86: Add a capability to configure bus
 frequency for APIC timer

On 12/19/2023 4:34 PM, Isaku Yamahata wrote:
> +7.34 KVM_CAP_X86_BUS_FREQUENCY_CONTROL
> +--------------------------------------
> +
> +:Architectures: x86
> +:Target: VM
> +:Parameters: args[0] is the value of apic bus clock frequency
> +:Returns: 0 on success, -EINVAL if args[0] contains invalid value for the
> +          frequency, or -ENXIO if virtual local APIC isn't enabled by
> +          KVM_CREATE_IRQCHIP, or -EBUSY if any vcpu is created.
> +
> +This capability sets the APIC bus clock frequency (or core crystal clock
> +frequency) for kvm to emulate APIC in the kernel.  

Isaku,

you are mixing the `bus clock` and `core crystal clock` frequency. They 
are different.

- When CPUID 0x15 doesn't exist, or CPUID 0x15 doesn't enumerate core 
crystal clock frequency, the APIC timer frequency is the processor's bus 
clock.

- When CPUID 0x15 does enumerate the core crystal clock frequency, the 
APIC timer frequency is the core crystal clock frequency.

This patch only enables the user-configurable bus clock frequency, or 
specifically APIC timer frequency. It doesn't enable the configuration 
of core crystal clock frequency. Userspace can configure core crystal 
clock frequency by passing a valid CPUID 0x15 leaf into KVM_SET_CPUID2, 
not by this KVM_CAP.

> The default value is 1000000
> +(1GHz).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ