KVM Archive mirror
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: <isaku.yamahata@intel.com>, <pbonzini@redhat.com>,
	<erdemaktas@google.com>, <vkuznets@redhat.com>,
	<seanjc@google.com>, <vannapurve@google.com>,
	<jmattson@google.com>, <mlevitsk@redhat.com>,
	<xiaoyao.li@intel.com>, <chao.gao@intel.com>,
	<rick.p.edgecombe@intel.com>, <yuan.yao@intel.com>
Cc: <kvm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V6 4/4] KVM: selftests: Add test for configure of x86 APIC bus frequency
Date: Mon, 20 May 2024 08:47:29 -0700	[thread overview]
Message-ID: <c2baeb4b-5cad-4cb9-a48e-0540f448cb15@intel.com> (raw)
In-Reply-To: <a2f7013646a8a1e314744568b9baa439682cbf8a.1715017765.git.reinette.chatre@intel.com>



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/

  reply	other threads:[~2024-05-20 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 18:35 [PATCH V6 0/4] KVM: x86: Make bus clock frequency for vAPIC timer configurable Reinette Chatre
2024-05-06 18:35 ` [PATCH V6 1/4] KVM: x86: hyper-v: Calculate APIC bus frequency for Hyper-V Reinette Chatre
2024-05-06 18:35 ` [PATCH V6 2/4] KVM: x86: Make nsec per APIC bus cycle a VM variable Reinette Chatre
2024-05-06 18:35 ` [PATCH V6 3/4] KVM: x86: Add a capability to configure bus frequency for APIC timer Reinette Chatre
2024-05-06 18:35 ` [PATCH V6 4/4] KVM: selftests: Add test for configure of x86 APIC bus frequency Reinette Chatre
2024-05-20 15:47   ` Reinette Chatre [this message]
2024-05-20 16:12     ` Sean Christopherson
2024-05-20 16:52       ` Reinette Chatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c2baeb4b-5cad-4cb9-a48e-0540f448cb15@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=chao.gao@intel.com \
    --cc=erdemaktas@google.com \
    --cc=isaku.yamahata@intel.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=rick.p.edgecombe@intel.com \
    --cc=seanjc@google.com \
    --cc=vannapurve@google.com \
    --cc=vkuznets@redhat.com \
    --cc=xiaoyao.li@intel.com \
    --cc=yuan.yao@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).