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: <c2baeb4b-5cad-4cb9-a48e-0540f448cb15@intel.com>
Date: Mon, 20 May 2024 08:47:29 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: <isaku.yamahata@...el.com>, <pbonzini@...hat.com>,
	<erdemaktas@...gle.com>, <vkuznets@...hat.com>, <seanjc@...gle.com>,
	<vannapurve@...gle.com>, <jmattson@...gle.com>, <mlevitsk@...hat.com>,
	<xiaoyao.li@...el.com>, <chao.gao@...el.com>, <rick.p.edgecombe@...el.com>,
	<yuan.yao@...el.com>
CC: <kvm@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V6 4/4] KVM: selftests: Add test for configure of x86 APIC
 bus frequency



On 5/6/2024 11:35 AM, Reinette Chatre wrote:

..

> diff --git a/tools/testing/selftests/kvm/x86_64/apic_bus_clock_test.c b/tools/testing/selftests/kvm/x86_64/apic_bus_clock_test.c
> new file mode 100644
> index 000000000000..56eb686144c6
> --- /dev/null
> +++ b/tools/testing/selftests/kvm/x86_64/apic_bus_clock_test.c
> @@ -0,0 +1,166 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Test configure of APIC bus frequency.
> + *
> + * Copyright (c) 2024 Intel Corporation
> + *
> + * To verify if the APIC bus frequency can be configured this, test starts
> + * by setting the TSC frequency in KVM, and then:
> + * For every APIC timer frequency supported:
> + * * In the guest:
> + * * * Start the APIC timer by programming the APIC TMICT (initial count
> + *       register) to the largest value possible to guarantee that it will
> + *       not expire during the test,
> + * * * Wait for a known duration based on previously set TSC frequency,
> + * * * Stop the timer and read the APIC TMCCT (current count) register to
> + *       determine the count at that time (TMCCT is loaded from TMICT when
> + *       TMICT is programmed and then starts counting down).
> + * * In the host:
> + * * * Determine if the APIC counts close to configured APIC bus frequency
> + *     while taking into account how the APIC timer frequency was modified
> + *     using the APIC TDCR (divide configuration register).
> + */
> +#define _GNU_SOURCE /* for program_invocation_short_name */

As reported in [1] this #define is no longer needed after commit 730cfa45b5f4
("KVM: selftests: Define _GNU_SOURCE for all selftests code"). This will be
fixed in next version of this series.

Reinette

[1] https://lore.kernel.org/oe-kbuild/202405181535.WFKy4EwQ-lkp@intel.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ