From: Sean Christopherson <seanjc@google.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: isaku.yamahata@intel.com, pbonzini@redhat.com,
erdemaktas@google.com, vkuznets@redhat.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,
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 09:12:48 -0700 [thread overview]
Message-ID: <Zkt2gNFxC0MHyIRb@google.com> (raw)
In-Reply-To: <c2baeb4b-5cad-4cb9-a48e-0540f448cb15@intel.com>
On Mon, May 20, 2024, Reinette Chatre wrote:
> 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.
Don't worry about sending another version just for this, I can clean this up when
applying.
next prev parent reply other threads:[~2024-05-20 16:12 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
2024-05-20 16:12 ` Sean Christopherson [this message]
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=Zkt2gNFxC0MHyIRb@google.com \
--to=seanjc@google.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=reinette.chatre@intel.com \
--cc=rick.p.edgecombe@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.