From: Reinette Chatre <reinette.chatre@intel.com>
To: Sean Christopherson <seanjc@google.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:52:51 -0700 [thread overview]
Message-ID: <d0744767-e393-44cc-8786-5419afeaf2b5@intel.com> (raw)
In-Reply-To: <Zkt2gNFxC0MHyIRb@google.com>
Hi Sean,
On 5/20/2024 9:12 AM, Sean Christopherson wrote:
> 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.
Thank you very much. At this time this is the only change planned for this series.
I do not know the status of all completed and planned merges during the merge
window, but I did a quick check and this series applies cleanly on top of today's tip
of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git. The kernel parts
passed a bisect test cleanly, while the selftest encountered just the warning related
to _GNU_SOURCE.
Reinette
prev parent reply other threads:[~2024-05-20 16:53 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
2024-05-20 16:52 ` Reinette Chatre [this message]
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=d0744767-e393-44cc-8786-5419afeaf2b5@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).