Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2007376ybm; Thu, 23 May 2019 09:53:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwR+1qkydcbrvSiXtxzKS/UN4Xd6FMFmZbANOiVEclCQL6Sj3yMQsllkTuEA8dDJOtsW2Sg X-Received: by 2002:a62:38d3:: with SMTP id f202mr60188556pfa.41.1558630416863; Thu, 23 May 2019 09:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558630416; cv=none; d=google.com; s=arc-20160816; b=LYdhP2fD4DgJETqByKRtbp5w7oWTZdqPdD4wXuXdDORuVoXmeJb1geRlZapNoSSbeL 18UW9cgpbXF6Qs3jTaFQCVJCKrlOMR2USNYKEWAmVS2JWVOjOKIL2+KVJHgv0aNGEpX0 AKhdIth6YFSPyvl99WcwU2e91Fs+raD/9y3jYIQE8Gk6o6wYB6xlmJRhOHEVNhUYghR6 lwZZOufAYchijf9DF71RNSQSX2PGZ3qI3tYc97wZ+agKUnOH1GCHgPUQDkFf65YMltNh Eq8i5P/0X9iYJII5pZlCm9KXSPJYpdYNyyEbTrVcxRtoXFsVy391L3xXZOy8nWlDybyw Em5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=qIpg2WwO36UteEohV/Y9MVFJLyQsDy9iSi8wtr+jA6o=; b=aCl1YXjMoWwnB+IWE2wPX3q3IF5E96rRLMgJtXZMkE+hFHLKLBJXkmDq1fyH5Vsali cpdAAE+hwJ3iFIF4LWrLNq2XLPYkChfDh6kaPLI21kfnDX/Ye6yd8H1gtQ7KKmmt2Wlr AWFLE0pAx3BinxV3T2UhhRBLJ8gqjfvKltiYF5QHfIekD1RS58Qe5eXXbpEAkvczNFX8 3C9jFnSoqGi5uX9KTMN8k0U8q5OK+FQ1rXk6qY7YQaoHlHNTv/UffGYEjWFvzR/30rrF BXqSgCbuMGdWQAMOiRRAug0POVuAMIZSDm1IjG+7+75ULDwZhstE3Q20GnW76UEyHeED VAbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b7si6874pge.264.2019.05.23.09.53.21; Thu, 23 May 2019 09:53:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731636AbfEWQns (ORCPT + 99 others); Thu, 23 May 2019 12:43:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60896 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731607AbfEWQnq (ORCPT ); Thu, 23 May 2019 12:43:46 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6691A8831C; Thu, 23 May 2019 16:43:46 +0000 (UTC) Received: from thuth.com (ovpn-116-94.ams2.redhat.com [10.36.116.94]) by smtp.corp.redhat.com (Postfix) with ESMTP id 079A46090E; Thu, 23 May 2019 16:43:43 +0000 (UTC) From: Thomas Huth To: Christian Borntraeger , Janosch Frank , kvm@vger.kernel.org Cc: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= , Shuah Khan , David Hildenbrand , Cornelia Huck , Andrew Jones , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-s390@vger.kernel.org Subject: [PATCH 9/9] KVM: selftests: Move kvm_create_max_vcpus test to generic code Date: Thu, 23 May 2019 18:43:09 +0200 Message-Id: <20190523164309.13345-10-thuth@redhat.com> In-Reply-To: <20190523164309.13345-1-thuth@redhat.com> References: <20190523164309.13345-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 23 May 2019 16:43:46 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There is nothing x86-specific in the test apart from the VM_MODE_P52V48_4K which we can now replace with VM_MODE_DEFAULT. Thus let's move the file to the main folder and enable it for aarch64 and s390x, too. Signed-off-by: Thomas Huth --- tools/testing/selftests/kvm/Makefile | 4 +++- .../testing/selftests/kvm/{x86_64 => }/kvm_create_max_vcpus.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) rename tools/testing/selftests/kvm/{x86_64 => }/kvm_create_max_vcpus.c (93%) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index d8beb990c8f4..aef5bd1166cf 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -21,15 +21,17 @@ TEST_GEN_PROGS_x86_64 += x86_64/evmcs_test TEST_GEN_PROGS_x86_64 += x86_64/hyperv_cpuid TEST_GEN_PROGS_x86_64 += x86_64/vmx_close_while_nested_test TEST_GEN_PROGS_x86_64 += x86_64/smm_test -TEST_GEN_PROGS_x86_64 += x86_64/kvm_create_max_vcpus TEST_GEN_PROGS_x86_64 += x86_64/vmx_set_nested_state_test +TEST_GEN_PROGS_x86_64 += kvm_create_max_vcpus TEST_GEN_PROGS_x86_64 += dirty_log_test TEST_GEN_PROGS_x86_64 += clear_dirty_log_test TEST_GEN_PROGS_aarch64 += dirty_log_test TEST_GEN_PROGS_aarch64 += clear_dirty_log_test +TEST_GEN_PROGS_aarch64 += kvm_create_max_vcpus TEST_GEN_PROGS_s390x += s390x/sync_regs_test +TEST_GEN_PROGS_s390x += kvm_create_max_vcpus TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(UNAME_M)) LIBKVM += $(LIBKVM_$(UNAME_M)) diff --git a/tools/testing/selftests/kvm/x86_64/kvm_create_max_vcpus.c b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c similarity index 93% rename from tools/testing/selftests/kvm/x86_64/kvm_create_max_vcpus.c rename to tools/testing/selftests/kvm/kvm_create_max_vcpus.c index 50e92996f918..db78ce07c416 100644 --- a/tools/testing/selftests/kvm/x86_64/kvm_create_max_vcpus.c +++ b/tools/testing/selftests/kvm/kvm_create_max_vcpus.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-only /* * kvm_create_max_vcpus * @@ -28,7 +29,7 @@ void test_vcpu_creation(int first_vcpu_id, int num_vcpus) printf("Testing creating %d vCPUs, with IDs %d...%d.\n", num_vcpus, first_vcpu_id, first_vcpu_id + num_vcpus - 1); - vm = vm_create(VM_MODE_P52V48_4K, DEFAULT_GUEST_PHY_PAGES, O_RDWR); + vm = vm_create(VM_MODE_DEFAULT, DEFAULT_GUEST_PHY_PAGES, O_RDWR); for (i = 0; i < num_vcpus; i++) { int vcpu_id = first_vcpu_id + i; -- 2.21.0