Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp99339lqa; Fri, 26 Apr 2024 16:06:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUijAowTt2VZF7rwkJDVA2auTZJhBPLFoVlKlcfinFc3/bGr0jwzX//OBMnLSIS7JRIMsVfOXVWZLNRzxLh9YFmkl+6qeS1/7fyObUcQg== X-Google-Smtp-Source: AGHT+IFxJJnSwN1RD52Snud7ZlWqRO2r196U1rtXjYWiD5rJ+/zqbU1v3we2B/c9sJLr/TSTooM7 X-Received: by 2002:a05:600c:34d1:b0:41a:aa6:b68c with SMTP id d17-20020a05600c34d100b0041a0aa6b68cmr2914939wmq.6.1714172795586; Fri, 26 Apr 2024 16:06:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714172795; cv=pass; d=google.com; s=arc-20160816; b=UGNz/kOG6wm3IiwRGMUsUgM1n5ox0rBWQo5QiDz4Z+5C5I1N72yesk1iDoJ/0GXQDh g6BJYX+m4Y/XXMCsaSE5lbUI9wO2g1xFEY8TCKRGvYH1+IFCKsjHh+jfuc3+NYvYjHM9 uP9zJ2GtSlSHYsFsq4sLPnnVhM3p39Tw6KjGIdlFyC4mEpYnWKlOms0nTcqfCOO1NazR vIxX6GNq/l/g16fCl2IeRS2cqD2/jaUmtQT34pOrnZ+LFhTxNEllJMCLdB4SvvIbgw+f KIaaUprSlegs93g66qSw17zAFbRJcXKcYDsLcot/fObKHRyHKgofYB8txH5lvzuNKURm udPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=iorjUslPWHkcnAnOk5uC47O6GQW+o/Gqi9tVu9zm11Q=; fh=mU9kXoZulgCy1JMUGL6C4peBkoV8lHWEKyJ4WfagBSY=; b=xTPEGD6x+geJX0obL8V8BN1NLaM5AzWcvg2RDBzxDni1uqEdpt/WV5hwXAtKH6XFg2 DhopvYUO84l3IWqtuwUUlWB5uKXFPr3OMWGiYfWLZ5+AvZgIT54BLswy1a0ZpYEscfXr R42ht05cJOHw/M0rA6s0/LALz2z0UqwG473FpkPq4Iw3BFYnJtReZXympgrhiUZl0OcX DpAckcky3c/OG7fFxyuy1oorLianycXr2sQiqH6eDqUGryzSa1UtcfSfE5iYmKR47TgS FcgiArsCpyTr1zfXnXrHj9duO8dReqb7uJm7EqzWFrm4y7qJ2uOSm7CpKMdqIsXioqYj G2zQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QATyuGCd; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id y7-20020a056402440700b00572050d85desi7712851eda.616.2024.04.26.16.06.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 16:06:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QATyuGCd; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-160763-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160763-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 50F401F22540 for ; Fri, 26 Apr 2024 23:06:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3D203BBC1; Fri, 26 Apr 2024 23:06:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QATyuGCd" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 398A13A1C4; Fri, 26 Apr 2024 23:06:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714172785; cv=none; b=TzkD84UEFDoXeH/wMiAudjzGf/yLa199slKFtbisZYScG4x3f59H0S+WtCs3A8gqgHVka5DyEeHZeFtBDXfu5dRq8NM7W0323Qr2lfiempNZZxjUOX0yG0AtQH7ADbrKK/evCFvh/taowsWQDJLxdUlZCipDI/9peIlfqUG++Wc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714172785; c=relaxed/simple; bh=cKKbL4cjFxBEMaMkwZoYnLJ7hvLWzVbZoU0lhnkwidc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s3nTDId/FSBprnTBMSibQ4kB9pX1Wi05QKa5bVfzs0lO0kFZtAzbGpjsYvLtSL3Q3LhNRHmeYxtB/Y2urz7sU2vh/QUDq8n4iZt0rYyU0QpJDxNeG/3rzFMFNtNiRyf5968zLDXBAG3cgA4p+dq+TKw8eBF0xXjCRRXfTEhJQ+k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QATyuGCd; arc=none smtp.client-ip=192.198.163.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714172783; x=1745708783; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=cKKbL4cjFxBEMaMkwZoYnLJ7hvLWzVbZoU0lhnkwidc=; b=QATyuGCdLK3kqreQ99tR4R2hHLMzADOH458ScRDcOG5SrIoccUn4EoxN h3IDfdGO1MxlTVdXWxvyYpxHZ5CYQR/8uX1fQu5HG18YvNPHekj7NX3Xj e/Qp+xB8eNJ/y6cu8hT0NjUzA88QwC86s9qnIzAUgNyTWl7Zx7fjbkORV UMNasKPDr8wfZK814fc7vbtFys07GR40e5CKQBVidCbRYA98p5+NjKIaR /4t11FEdC6tWEfTBazfA4sYnGQ9Oh8Elh/yy5x/icrFdIRvuf6RjZT1Rd FInQIVMh+cZamxopU0MBcmG8wvubGd/RLD90JgA/7po0GIJqhrsVoCObN A==; X-CSE-ConnectionGUID: yx0SJGWiR2m7XyPSOM8uog== X-CSE-MsgGUID: 2zAh+vxaSP65Ix9UQcIELQ== X-IronPort-AV: E=McAfee;i="6600,9927,11056"; a="12860890" X-IronPort-AV: E=Sophos;i="6.07,234,1708416000"; d="scan'208";a="12860890" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 16:06:22 -0700 X-CSE-ConnectionGUID: uCBuxsRLQTSyNLKx3Rn2Nw== X-CSE-MsgGUID: NhqNp2HSRGaicrVXUBYEDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,234,1708416000"; d="scan'208";a="63036776" Received: from soc-cp83kr3.jf.intel.com (HELO [10.24.10.50]) ([10.24.10.50]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2024 16:06:23 -0700 Message-ID: Date: Fri, 26 Apr 2024 16:06:22 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V5 4/4] KVM: selftests: Add test for configure of x86 APIC bus frequency To: Reinette Chatre , 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 Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org References: Content-Language: en-US From: "Chen, Zide" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 4/25/2024 3:07 PM, 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..5100b28228af > --- /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 Nit: some typos here? > +int main(int argc, char *argv[]) > +{ > + struct kvm_vcpu *vcpu; > + struct kvm_vm *vm; > + > + TEST_REQUIRE(kvm_has_cap(KVM_CAP_X86_APIC_BUS_CYCLES_NS)); > + > + vm = __vm_create(VM_SHAPE_DEFAULT, 1, 0); Use vm_create() instead?