From nobody Fri Dec 19 13:47:42 2025 Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9BA5281AB4 for ; Mon, 26 Aug 2024 19:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698885; cv=none; b=WmVMQDi//dbwiJ29n2WPAaYrNdamWvXSHxPlZrI7BNgn/1DmI6YTT7JVFYem4Wl62t2hkfb7uiR2cWz7/iV6AlOQNsSUJnufXXJr6fHNJI9Fqn4b2uKEPAoxijzEUEQ0FiHS8SXGTJDHt4wQKNJk9ArKLfAs0qutk+2nFyfHceA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698885; c=relaxed/simple; bh=rUKRX0YrvlYLQoOXlu/Qahpj1FKWsbwUW8LUExX+Kww=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=uPfZWp0a/br1ukLJ5jh4RZ90UgqqeWReylf+0pawuQr6VVOX4Wq5W7b3wkn9rzv5/b8KVUkDpI9KxTTZK4GLjCJPlrQVnGXk3Tw+I0mel/lzkjTK9K21xbplDaEOP8l28al+Zuf2h2QtATemlKXlzOmGRMyXxAac3OUgNNW3Sto= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RaOHkhZm; arc=none smtp.client-ip=209.85.215.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RaOHkhZm" Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-7cd96715e6aso4920775a12.2 for ; Mon, 26 Aug 2024 12:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724698883; x=1725303683; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=yjp0h9Be3Qh/6DtTSbpe8fCyQ5dWM0lm7oBskSFP/xI=; b=RaOHkhZm4qehTyq8DvOdd4g4zPs3zacg3Cwq7YwrkJoVyJib+SJNOGUkB9kgSrHiKU GgHLT3ARDXRLmAed4PqoKQVCU49ujU82yxv65vxrZheXMGsVj8fmRhFr718oLysDttmP C4WdkPNczkdaM1nTTn+pLazmeQnILFttCVnJb8ziogyGkg56hwNXD4fj5NW20GQKQvTs BKMyWJp+TeEdGVcFRzxFmXShJuq5b5Lhq3F/CuwkM4jpK/d4tAKp7E/PqayMlvdF99cC tJ7b7E9apaSEX3MRTcWMgcJTgvnv36TLlB+mr3pkz1F89NUiKyGpUxkAbv0BVvQcjTFk HR8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724698883; x=1725303683; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yjp0h9Be3Qh/6DtTSbpe8fCyQ5dWM0lm7oBskSFP/xI=; b=kUNhx/6nFitB7WneR0tgNrE/sBA2Mv8hHNxKEjaGdy+jzvfJhWQXnBD1T4EZBeybin vf3OGfJCnS5PJtJopNNohnax3iKhAs+5XwX0OyZ4Oe6BK3y/BHv6V59Ih8J2rjFvWeT0 8r4t1pzGhckqX+MzrI5heLNtj7b5GCTNdcnWLRDFmLiltmobR8FyTQqt032kXzaJYT0N 5/Rx4+cmDkt9Bf6m8Ra2VsCj/5STqElA5ZRDfR1ucxdPFEg6SMpkmV60BcfJklsvxroB uXuSiNIyqYiaTyKJ8nE/qtzafm0oTkzNaG3VmAtcMhbiMVbNiZKZZS8TQytei3IStEzQ IPfQ== X-Forwarded-Encrypted: i=1; AJvYcCXi02kmYDayR6fq7OtmAVZHB35ltE1PSBdHU+vR2S3oykQ6tHOy4sQfIEbg/0roXrzKvO9vCwlBuSBsN6c=@vger.kernel.org X-Gm-Message-State: AOJu0YwBZi1zp9iSstYC7sjb2bBazX9wJXo3Bj3rSts17VGZKleKCmtZ O2gB/lZ/x7LLtzsXSisexnqOc6yXituxXadugqxfDKmIr1ijzP78UIYPQQ0qSL4tJEHWK3kmOC7 8fg== X-Google-Smtp-Source: AGHT+IFa56At1izibNvH4iO7KCmhZm61HQM4QvjjFU3VIZcTwutstZt4/7NGPtn7uF2ThtSDZjrmu+ZznUQ= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a63:7259:0:b0:75d:16f9:c075 with SMTP id 41be03b00d2f7-7cf54e9cee3mr19690a12.9.1724698882241; Mon, 26 Aug 2024 12:01:22 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 26 Aug 2024 12:01:14 -0700 In-Reply-To: <20240826190116.145945-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240826190116.145945-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog Message-ID: <20240826190116.145945-2-seanjc@google.com> Subject: [PATCH 1/3] KVM: selftests: Provide empty 'all' and 'clean' targets for unsupported ARCHs From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Provide empty targets for KVM selftests if the target architecture is unsupported to make it obvious which architectures are supported, and so that various side effects don't fail and/or do weird things, e.g. as is, "mkdir -p $(sort $(dir $(TEST_GEN_PROGS)))" fails due to a missing operand, and conversely, "$(shell mkdir -p $(sort $(OUTPUT)/$(ARCH_DIR) ..." will create an empty, useless directory for the unsupported architecture. Move the guts of the Makefile to Makefile.kvm so that it's easier to see that the if-statement effectively guards all of KVM selftests. Reported-by: Muhammad Usama Anjum Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/Makefile | 323 +---------------------- tools/testing/selftests/kvm/Makefile.kvm | 319 ++++++++++++++++++++++ 2 files changed, 325 insertions(+), 317 deletions(-) create mode 100644 tools/testing/selftests/kvm/Makefile.kvm diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests= /kvm/Makefile index 48d32c5aa3eb..787b63b52db7 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -1,12 +1,9 @@ # SPDX-License-Identifier: GPL-2.0-only -include ../../../build/Build.include - -all: - top_srcdir =3D ../../../.. include $(top_srcdir)/scripts/subarch.include ARCH ?=3D $(SUBARCH) =20 +ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64)) ifeq ($(ARCH),x86) ARCH_DIR :=3D x86_64 else ifeq ($(ARCH),arm64) @@ -17,317 +14,9 @@ else ARCH_DIR :=3D $(ARCH) endif =20 -LIBKVM +=3D lib/assert.c -LIBKVM +=3D lib/elf.c -LIBKVM +=3D lib/guest_modes.c -LIBKVM +=3D lib/io.c -LIBKVM +=3D lib/kvm_util.c -LIBKVM +=3D lib/memstress.c -LIBKVM +=3D lib/guest_sprintf.c -LIBKVM +=3D lib/rbtree.c -LIBKVM +=3D lib/sparsebit.c -LIBKVM +=3D lib/test_util.c -LIBKVM +=3D lib/ucall_common.c -LIBKVM +=3D lib/userfaultfd_util.c - -LIBKVM_STRING +=3D lib/string_override.c - -LIBKVM_x86_64 +=3D lib/x86_64/apic.c -LIBKVM_x86_64 +=3D lib/x86_64/handlers.S -LIBKVM_x86_64 +=3D lib/x86_64/hyperv.c -LIBKVM_x86_64 +=3D lib/x86_64/memstress.c -LIBKVM_x86_64 +=3D lib/x86_64/pmu.c -LIBKVM_x86_64 +=3D lib/x86_64/processor.c -LIBKVM_x86_64 +=3D lib/x86_64/sev.c -LIBKVM_x86_64 +=3D lib/x86_64/svm.c -LIBKVM_x86_64 +=3D lib/x86_64/ucall.c -LIBKVM_x86_64 +=3D lib/x86_64/vmx.c - -LIBKVM_aarch64 +=3D lib/aarch64/gic.c -LIBKVM_aarch64 +=3D lib/aarch64/gic_v3.c -LIBKVM_aarch64 +=3D lib/aarch64/gic_v3_its.c -LIBKVM_aarch64 +=3D lib/aarch64/handlers.S -LIBKVM_aarch64 +=3D lib/aarch64/processor.c -LIBKVM_aarch64 +=3D lib/aarch64/spinlock.c -LIBKVM_aarch64 +=3D lib/aarch64/ucall.c -LIBKVM_aarch64 +=3D lib/aarch64/vgic.c - -LIBKVM_s390x +=3D lib/s390x/diag318_test_handler.c -LIBKVM_s390x +=3D lib/s390x/processor.c -LIBKVM_s390x +=3D lib/s390x/ucall.c - -LIBKVM_riscv +=3D lib/riscv/handlers.S -LIBKVM_riscv +=3D lib/riscv/processor.c -LIBKVM_riscv +=3D lib/riscv/ucall.c - -# Non-compiled test targets -TEST_PROGS_x86_64 +=3D x86_64/nx_huge_pages_test.sh - -# Compiled test targets -TEST_GEN_PROGS_x86_64 =3D x86_64/cpuid_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/cr4_cpuid_sync_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/dirty_log_page_splitting_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/get_msr_index_features -TEST_GEN_PROGS_x86_64 +=3D x86_64/exit_on_emulation_failure_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/fix_hypercall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hwcr_msr_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_clock -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_cpuid -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_evmcs -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_extended_hypercalls -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_features -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_ipi -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_svm_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_tlb_flush -TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_clock_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_pv_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/monitor_mwait_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/nested_exceptions_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/platform_info_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_counters_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_event_filter_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_conversions_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_kvm_exits_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/set_boot_cpu_id -TEST_GEN_PROGS_x86_64 +=3D x86_64/set_sregs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/smaller_maxphyaddr_emulation_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/smm_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_preemption_timer_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_vmcall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_int_ctl_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_shutdown_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_soft_inject_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_scaling_sync -TEST_GEN_PROGS_x86_64 +=3D x86_64/sync_regs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/ucna_injection_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_io_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_msr_exit_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_apic_access_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_close_while_nested_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_dirty_log_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_exception_with_invalid_guest_state -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_msrs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_invalid_nested_guest_state -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_set_nested_state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_tsc_adjust_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_nested_tsc_scaling_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/apic_bus_clock_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_ipi_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xcr0_cpuid_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xss_msr_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/debug_regs -TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_msrs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_pmu_caps_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_shinfo_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_vmcall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_init2_tests -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_migrate_tests -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_smoke_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/amx_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/max_vcpuid_cap_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/triple_fault_event_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/recalc_apic_map_test -TEST_GEN_PROGS_x86_64 +=3D access_tracking_perf_test -TEST_GEN_PROGS_x86_64 +=3D demand_paging_test -TEST_GEN_PROGS_x86_64 +=3D dirty_log_test -TEST_GEN_PROGS_x86_64 +=3D dirty_log_perf_test -TEST_GEN_PROGS_x86_64 +=3D guest_memfd_test -TEST_GEN_PROGS_x86_64 +=3D guest_print_test -TEST_GEN_PROGS_x86_64 +=3D hardware_disable_test -TEST_GEN_PROGS_x86_64 +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_x86_64 +=3D kvm_page_table_test -TEST_GEN_PROGS_x86_64 +=3D max_guest_memory_test -TEST_GEN_PROGS_x86_64 +=3D memslot_modification_stress_test -TEST_GEN_PROGS_x86_64 +=3D memslot_perf_test -TEST_GEN_PROGS_x86_64 +=3D rseq_test -TEST_GEN_PROGS_x86_64 +=3D set_memory_region_test -TEST_GEN_PROGS_x86_64 +=3D steal_time -TEST_GEN_PROGS_x86_64 +=3D kvm_binary_stats_test -TEST_GEN_PROGS_x86_64 +=3D system_counter_offset_test -TEST_GEN_PROGS_x86_64 +=3D pre_fault_memory_test - -# Compiled outputs used by test targets -TEST_GEN_PROGS_EXTENDED_x86_64 +=3D x86_64/nx_huge_pages_test - -TEST_GEN_PROGS_aarch64 +=3D aarch64/aarch32_id_regs -TEST_GEN_PROGS_aarch64 +=3D aarch64/debug-exceptions -TEST_GEN_PROGS_aarch64 +=3D aarch64/hypercalls -TEST_GEN_PROGS_aarch64 +=3D aarch64/page_fault_test -TEST_GEN_PROGS_aarch64 +=3D aarch64/psci_test -TEST_GEN_PROGS_aarch64 +=3D aarch64/set_id_regs -TEST_GEN_PROGS_aarch64 +=3D aarch64/smccc_filter -TEST_GEN_PROGS_aarch64 +=3D aarch64/vcpu_width_config -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_init -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_irq -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_lpi_stress -TEST_GEN_PROGS_aarch64 +=3D aarch64/vpmu_counter_access -TEST_GEN_PROGS_aarch64 +=3D access_tracking_perf_test -TEST_GEN_PROGS_aarch64 +=3D arch_timer -TEST_GEN_PROGS_aarch64 +=3D demand_paging_test -TEST_GEN_PROGS_aarch64 +=3D dirty_log_test -TEST_GEN_PROGS_aarch64 +=3D dirty_log_perf_test -TEST_GEN_PROGS_aarch64 +=3D guest_print_test -TEST_GEN_PROGS_aarch64 +=3D get-reg-list -TEST_GEN_PROGS_aarch64 +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_aarch64 +=3D kvm_page_table_test -TEST_GEN_PROGS_aarch64 +=3D memslot_modification_stress_test -TEST_GEN_PROGS_aarch64 +=3D memslot_perf_test -TEST_GEN_PROGS_aarch64 +=3D rseq_test -TEST_GEN_PROGS_aarch64 +=3D set_memory_region_test -TEST_GEN_PROGS_aarch64 +=3D steal_time -TEST_GEN_PROGS_aarch64 +=3D kvm_binary_stats_test - -TEST_GEN_PROGS_s390x =3D s390x/memop -TEST_GEN_PROGS_s390x +=3D s390x/resets -TEST_GEN_PROGS_s390x +=3D s390x/sync_regs_test -TEST_GEN_PROGS_s390x +=3D s390x/tprot -TEST_GEN_PROGS_s390x +=3D s390x/cmma_test -TEST_GEN_PROGS_s390x +=3D s390x/debug_test -TEST_GEN_PROGS_s390x +=3D s390x/shared_zeropage_test -TEST_GEN_PROGS_s390x +=3D demand_paging_test -TEST_GEN_PROGS_s390x +=3D dirty_log_test -TEST_GEN_PROGS_s390x +=3D guest_print_test -TEST_GEN_PROGS_s390x +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_s390x +=3D kvm_page_table_test -TEST_GEN_PROGS_s390x +=3D rseq_test -TEST_GEN_PROGS_s390x +=3D set_memory_region_test -TEST_GEN_PROGS_s390x +=3D kvm_binary_stats_test - -TEST_GEN_PROGS_riscv +=3D riscv/sbi_pmu_test -TEST_GEN_PROGS_riscv +=3D riscv/ebreak_test -TEST_GEN_PROGS_riscv +=3D arch_timer -TEST_GEN_PROGS_riscv +=3D demand_paging_test -TEST_GEN_PROGS_riscv +=3D dirty_log_test -TEST_GEN_PROGS_riscv +=3D get-reg-list -TEST_GEN_PROGS_riscv +=3D guest_print_test -TEST_GEN_PROGS_riscv +=3D kvm_binary_stats_test -TEST_GEN_PROGS_riscv +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_riscv +=3D kvm_page_table_test -TEST_GEN_PROGS_riscv +=3D set_memory_region_test -TEST_GEN_PROGS_riscv +=3D steal_time - -SPLIT_TESTS +=3D arch_timer -SPLIT_TESTS +=3D get-reg-list - -TEST_PROGS +=3D $(TEST_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) -LIBKVM +=3D $(LIBKVM_$(ARCH_DIR)) - -OVERRIDE_TARGETS =3D 1 - -# lib.mak defines $(OUTPUT), prepends $(OUTPUT)/ to $(TEST_GEN_PROGS), and= most -# importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make C= C=3D`, -# which causes the environment variable to override the makefile). -include ../lib.mk - -INSTALL_HDR_PATH =3D $(top_srcdir)/usr -LINUX_HDR_PATH =3D $(INSTALL_HDR_PATH)/include/ -LINUX_TOOL_INCLUDE =3D $(top_srcdir)/tools/include -ifeq ($(ARCH),x86_64) -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/x86/include +include Makefile.kvm else -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH)/include -endif -CFLAGS +=3D -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=3Dgnu99 \ - -Wno-gnu-variable-sized-type-not-at-end -MD -MP -DCONFIG_64BIT \ - -fno-builtin-memcmp -fno-builtin-memcpy \ - -fno-builtin-memset -fno-builtin-strnlen \ - -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ - -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ - -I$( cscope.files - cscope -b +# Empty targets for unsupported architectures +all: +clean: +endif \ No newline at end of file diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selft= ests/kvm/Makefile.kvm new file mode 100644 index 000000000000..802d05eee674 --- /dev/null +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -0,0 +1,319 @@ +# SPDX-License-Identifier: GPL-2.0-only +include ../../../build/Build.include + +all: + +LIBKVM +=3D lib/assert.c +LIBKVM +=3D lib/elf.c +LIBKVM +=3D lib/guest_modes.c +LIBKVM +=3D lib/io.c +LIBKVM +=3D lib/kvm_util.c +LIBKVM +=3D lib/memstress.c +LIBKVM +=3D lib/guest_sprintf.c +LIBKVM +=3D lib/rbtree.c +LIBKVM +=3D lib/sparsebit.c +LIBKVM +=3D lib/test_util.c +LIBKVM +=3D lib/ucall_common.c +LIBKVM +=3D lib/userfaultfd_util.c + +LIBKVM_STRING +=3D lib/string_override.c + +LIBKVM_x86_64 +=3D lib/x86_64/apic.c +LIBKVM_x86_64 +=3D lib/x86_64/handlers.S +LIBKVM_x86_64 +=3D lib/x86_64/hyperv.c +LIBKVM_x86_64 +=3D lib/x86_64/memstress.c +LIBKVM_x86_64 +=3D lib/x86_64/pmu.c +LIBKVM_x86_64 +=3D lib/x86_64/processor.c +LIBKVM_x86_64 +=3D lib/x86_64/sev.c +LIBKVM_x86_64 +=3D lib/x86_64/svm.c +LIBKVM_x86_64 +=3D lib/x86_64/ucall.c +LIBKVM_x86_64 +=3D lib/x86_64/vmx.c + +LIBKVM_aarch64 +=3D lib/aarch64/gic.c +LIBKVM_aarch64 +=3D lib/aarch64/gic_v3.c +LIBKVM_aarch64 +=3D lib/aarch64/gic_v3_its.c +LIBKVM_aarch64 +=3D lib/aarch64/handlers.S +LIBKVM_aarch64 +=3D lib/aarch64/processor.c +LIBKVM_aarch64 +=3D lib/aarch64/spinlock.c +LIBKVM_aarch64 +=3D lib/aarch64/ucall.c +LIBKVM_aarch64 +=3D lib/aarch64/vgic.c + +LIBKVM_s390x +=3D lib/s390x/diag318_test_handler.c +LIBKVM_s390x +=3D lib/s390x/processor.c +LIBKVM_s390x +=3D lib/s390x/ucall.c + +LIBKVM_riscv +=3D lib/riscv/handlers.S +LIBKVM_riscv +=3D lib/riscv/processor.c +LIBKVM_riscv +=3D lib/riscv/ucall.c + +# Non-compiled test targets +TEST_PROGS_x86_64 +=3D x86_64/nx_huge_pages_test.sh + +# Compiled test targets +TEST_GEN_PROGS_x86_64 =3D x86_64/cpuid_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/cr4_cpuid_sync_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/dirty_log_page_splitting_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/get_msr_index_features +TEST_GEN_PROGS_x86_64 +=3D x86_64/exit_on_emulation_failure_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/fix_hypercall_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/hwcr_msr_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_clock +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_cpuid +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_evmcs +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_extended_hypercalls +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_features +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_ipi +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_svm_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_tlb_flush +TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_clock_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_pv_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/monitor_mwait_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/nested_exceptions_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/platform_info_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_counters_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_event_filter_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_conversions_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_kvm_exits_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/set_boot_cpu_id +TEST_GEN_PROGS_x86_64 +=3D x86_64/set_sregs_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/smaller_maxphyaddr_emulation_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/smm_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/state_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_preemption_timer_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_vmcall_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_int_ctl_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_shutdown_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_soft_inject_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_scaling_sync +TEST_GEN_PROGS_x86_64 +=3D x86_64/sync_regs_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/ucna_injection_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_io_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_msr_exit_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_apic_access_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_close_while_nested_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_dirty_log_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_exception_with_invalid_guest_state +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_msrs_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_invalid_nested_guest_state +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_set_nested_state_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_tsc_adjust_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_nested_tsc_scaling_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/apic_bus_clock_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_ipi_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_state_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xcr0_cpuid_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xss_msr_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/debug_regs +TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_msrs_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_pmu_caps_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_shinfo_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_vmcall_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_init2_tests +TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_migrate_tests +TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_smoke_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/amx_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/max_vcpuid_cap_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/triple_fault_event_test +TEST_GEN_PROGS_x86_64 +=3D x86_64/recalc_apic_map_test +TEST_GEN_PROGS_x86_64 +=3D access_tracking_perf_test +TEST_GEN_PROGS_x86_64 +=3D demand_paging_test +TEST_GEN_PROGS_x86_64 +=3D dirty_log_test +TEST_GEN_PROGS_x86_64 +=3D dirty_log_perf_test +TEST_GEN_PROGS_x86_64 +=3D guest_memfd_test +TEST_GEN_PROGS_x86_64 +=3D guest_print_test +TEST_GEN_PROGS_x86_64 +=3D hardware_disable_test +TEST_GEN_PROGS_x86_64 +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_x86_64 +=3D kvm_page_table_test +TEST_GEN_PROGS_x86_64 +=3D max_guest_memory_test +TEST_GEN_PROGS_x86_64 +=3D memslot_modification_stress_test +TEST_GEN_PROGS_x86_64 +=3D memslot_perf_test +TEST_GEN_PROGS_x86_64 +=3D rseq_test +TEST_GEN_PROGS_x86_64 +=3D set_memory_region_test +TEST_GEN_PROGS_x86_64 +=3D steal_time +TEST_GEN_PROGS_x86_64 +=3D kvm_binary_stats_test +TEST_GEN_PROGS_x86_64 +=3D system_counter_offset_test +TEST_GEN_PROGS_x86_64 +=3D pre_fault_memory_test + +# Compiled outputs used by test targets +TEST_GEN_PROGS_EXTENDED_x86_64 +=3D x86_64/nx_huge_pages_test + +TEST_GEN_PROGS_aarch64 +=3D aarch64/aarch32_id_regs +TEST_GEN_PROGS_aarch64 +=3D aarch64/debug-exceptions +TEST_GEN_PROGS_aarch64 +=3D aarch64/hypercalls +TEST_GEN_PROGS_aarch64 +=3D aarch64/page_fault_test +TEST_GEN_PROGS_aarch64 +=3D aarch64/psci_test +TEST_GEN_PROGS_aarch64 +=3D aarch64/set_id_regs +TEST_GEN_PROGS_aarch64 +=3D aarch64/smccc_filter +TEST_GEN_PROGS_aarch64 +=3D aarch64/vcpu_width_config +TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_init +TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_irq +TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_lpi_stress +TEST_GEN_PROGS_aarch64 +=3D aarch64/vpmu_counter_access +TEST_GEN_PROGS_aarch64 +=3D access_tracking_perf_test +TEST_GEN_PROGS_aarch64 +=3D arch_timer +TEST_GEN_PROGS_aarch64 +=3D demand_paging_test +TEST_GEN_PROGS_aarch64 +=3D dirty_log_test +TEST_GEN_PROGS_aarch64 +=3D dirty_log_perf_test +TEST_GEN_PROGS_aarch64 +=3D guest_print_test +TEST_GEN_PROGS_aarch64 +=3D get-reg-list +TEST_GEN_PROGS_aarch64 +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_aarch64 +=3D kvm_page_table_test +TEST_GEN_PROGS_aarch64 +=3D memslot_modification_stress_test +TEST_GEN_PROGS_aarch64 +=3D memslot_perf_test +TEST_GEN_PROGS_aarch64 +=3D rseq_test +TEST_GEN_PROGS_aarch64 +=3D set_memory_region_test +TEST_GEN_PROGS_aarch64 +=3D steal_time +TEST_GEN_PROGS_aarch64 +=3D kvm_binary_stats_test + +TEST_GEN_PROGS_s390x =3D s390x/memop +TEST_GEN_PROGS_s390x +=3D s390x/resets +TEST_GEN_PROGS_s390x +=3D s390x/sync_regs_test +TEST_GEN_PROGS_s390x +=3D s390x/tprot +TEST_GEN_PROGS_s390x +=3D s390x/cmma_test +TEST_GEN_PROGS_s390x +=3D s390x/debug_test +TEST_GEN_PROGS_s390x +=3D s390x/shared_zeropage_test +TEST_GEN_PROGS_s390x +=3D demand_paging_test +TEST_GEN_PROGS_s390x +=3D dirty_log_test +TEST_GEN_PROGS_s390x +=3D guest_print_test +TEST_GEN_PROGS_s390x +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_s390x +=3D kvm_page_table_test +TEST_GEN_PROGS_s390x +=3D rseq_test +TEST_GEN_PROGS_s390x +=3D set_memory_region_test +TEST_GEN_PROGS_s390x +=3D kvm_binary_stats_test + +TEST_GEN_PROGS_riscv +=3D riscv/sbi_pmu_test +TEST_GEN_PROGS_riscv +=3D riscv/ebreak_test +TEST_GEN_PROGS_riscv +=3D arch_timer +TEST_GEN_PROGS_riscv +=3D demand_paging_test +TEST_GEN_PROGS_riscv +=3D dirty_log_test +TEST_GEN_PROGS_riscv +=3D get-reg-list +TEST_GEN_PROGS_riscv +=3D guest_print_test +TEST_GEN_PROGS_riscv +=3D kvm_binary_stats_test +TEST_GEN_PROGS_riscv +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_riscv +=3D kvm_page_table_test +TEST_GEN_PROGS_riscv +=3D set_memory_region_test +TEST_GEN_PROGS_riscv +=3D steal_time + +SPLIT_TESTS +=3D arch_timer +SPLIT_TESTS +=3D get-reg-list + +TEST_PROGS +=3D $(TEST_PROGS_$(ARCH_DIR)) +TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH_DIR)) +TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) +LIBKVM +=3D $(LIBKVM_$(ARCH_DIR)) + +OVERRIDE_TARGETS =3D 1 + +# lib.mak defines $(OUTPUT), prepends $(OUTPUT)/ to $(TEST_GEN_PROGS), and= most +# importantly defines, i.e. overwrites, $(CC) (unless `make -e` or `make C= C=3D`, +# which causes the environment variable to override the makefile). +include ../lib.mk + +INSTALL_HDR_PATH =3D $(top_srcdir)/usr +LINUX_HDR_PATH =3D $(INSTALL_HDR_PATH)/include/ +LINUX_TOOL_INCLUDE =3D $(top_srcdir)/tools/include +ifeq ($(ARCH),x86_64) +LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/x86/include +else +LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH)/include +endif +CFLAGS +=3D -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=3Dgnu99 \ + -Wno-gnu-variable-sized-type-not-at-end -MD -MP -DCONFIG_64BIT \ + -fno-builtin-memcmp -fno-builtin-memcpy \ + -fno-builtin-memset -fno-builtin-strnlen \ + -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ + -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ + -I$( cscope.files + cscope -b --=20 2.46.0.295.g3b9ea8a38a-goog From nobody Fri Dec 19 13:47:42 2025 Received: from mail-pf1-f201.google.com (mail-pf1-f201.google.com [209.85.210.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3F9284039 for ; Mon, 26 Aug 2024 19:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698890; cv=none; b=ZrFrAQEShzovF0pfaTV4tKSlT6i9721ADMqIm1FGAkF1kd0S7uk6dD3FbidB84Mg0IZXIZi250h264V7SeM/44tu8Hm92pw4Q8wqoLjnKBSPCL/Gnf7Kekb59ulNv48/YRNKbMp1njP82RBgk0IqOaqaF/WU3Z6WEZRab23hdkI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698890; c=relaxed/simple; bh=5pzh1jnlwwA9Em+Y6wTDnBjl7V6dNef5GUMf7zI1GLE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=Gsd0/p7t445yIR6lGk6F6AKXR2D81E4JwuoivwRA2ry+LBszmCvPwBZ9VyqkLMlEjvyptz1E01Ic8XFOmz+8838rEm5TYLLDHBxpvfsjxzETfTaHATNL42vZhZi2XOKnIu8mpXpiItP8njZVaT8kKRHI97cKtmAmPZBsI3PDnfs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=aJkSWxuE; arc=none smtp.client-ip=209.85.210.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="aJkSWxuE" Received: by mail-pf1-f201.google.com with SMTP id d2e1a72fcca58-7126cd1427bso3439607b3a.2 for ; Mon, 26 Aug 2024 12:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724698885; x=1725303685; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=TXnelMr6rrH0phtkUrPGIGDs7CuVBOiscpcXdmibBkw=; b=aJkSWxuE4PaX3gTJsfYFswSpVcL1MQ8dt2nqkMLKqgTfqyl5VyUgZX9cHkhJJhkHHU iIkuDcn8bj21zWkntGYNiptGsWrv4/jrecSFcHWH64BDc4icI9Uyv0phJVj+Annlw/ds uJ8Up/bELZqaCNmvpec4pfYWm70nP/stad0TXWmt4nfHITBfMgoCMJt2+ft81kK19F2E RYNkNSoXF3Xz3EgdUaaFxv1kYVBun3Ny2MAO0TZauXrs87DSshVzwKhytcCmTp1jZGrR tUzTkkB9F4CLPIx13dtIwYjcTmPgC+ofa64kXso3mk9WyPoHHS8y3POXOoCU7frKWUsz uEvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724698885; x=1725303685; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TXnelMr6rrH0phtkUrPGIGDs7CuVBOiscpcXdmibBkw=; b=lccDwZhfyJdTLIwFDtLT9JGJdX2F5F/25+4xdAZFyFNUlHxSk6r/vRqEJ8lgn3oZN5 IgEhrp6l8WUCfDKut0GmnU7qiuUmYWeCKN9QvZWdoMwAnGWfO/3zK7/CdoQ+JB/rhN5j dbTcgv9CuWr9pTmUvtDj0X1rcyVha9FnOJlK7/3LSp9DvcSSZVW9pxOLU1AwVMnGb/Sr DscY0vXlUNDgmx78kstTsThLrFy4bZcBXDNi4t+3BkUW3uf2szCWvngiRjy2zcMboVuo BfkPkvk57N109xViQJxKwxbBvf9kLXOpgERyHV3GBlKRMjG2KWjsNNOWigdd8zVniwAK 0Ykw== X-Forwarded-Encrypted: i=1; AJvYcCUsohZ6RSDW/xnZo+hSS0qeHXVcoPgSvvBnNlp0vwePe+vLc5ZFEJb0ypP2Y5pLiIAE3B4/jzPlJeBTfek=@vger.kernel.org X-Gm-Message-State: AOJu0YzP+CPXzsG5+mjh0qWWQrrRIaBuvwV2iIlCLMxltPbFDCdfEWMo E+s7vu7z6iNwpfmhbBMSUFGyZwl5nhMOkyaa25RcDAo65Qohj58aITEiGRNiqXLBoG4Ry7YdC/k lEg== X-Google-Smtp-Source: AGHT+IGb4I7jigmHAiACVzpst0DDpqYAkTDQU+DJyfQKe7DYzYqIro7TguzJgGBRfwkSFKfPUZjAx+0PG0Y= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a05:6a00:9192:b0:714:200c:39a2 with SMTP id d2e1a72fcca58-71445b4f5d9mr33897b3a.6.1724698884334; Mon, 26 Aug 2024 12:01:24 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 26 Aug 2024 12:01:15 -0700 In-Reply-To: <20240826190116.145945-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240826190116.145945-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog Message-ID: <20240826190116.145945-3-seanjc@google.com> Subject: [PATCH 2/3] KVM: selftests: Use canonical $(ARCH) paths for KVM selftests directories From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the kernel's canonical $(ARCH) paths instead of the raw target triple for KVM selftests directories. KVM selftests are quite nearly the only place in the entire kernel that using the target triple for directories, tools/testing/selftests/drivers/s390x being the lone holdout. Using the kernel's preferred nomenclature eliminates the minor, but annoying, friction of having to translate to KVM's selftests directories, e.g. for pattern matching, opening files, running selftests, etc. Signed-off-by: Sean Christopherson --- MAINTAINERS | 12 +- tools/testing/selftests/kvm/Makefile | 10 +- tools/testing/selftests/kvm/Makefile.kvm | 302 +++++++++--------- .../kvm/{aarch64 =3D> arm64}/aarch32_id_regs.c | 0 .../kvm/{aarch64 =3D> arm64}/arch_timer.c | 0 .../kvm/{aarch64 =3D> arm64}/debug-exceptions.c | 0 .../kvm/{aarch64 =3D> arm64}/get-reg-list.c | 0 .../kvm/{aarch64 =3D> arm64}/hypercalls.c | 0 .../kvm/{aarch64 =3D> arm64}/page_fault_test.c | 0 .../kvm/{aarch64 =3D> arm64}/psci_test.c | 0 .../kvm/{aarch64 =3D> arm64}/set_id_regs.c | 0 .../kvm/{aarch64 =3D> arm64}/smccc_filter.c | 0 .../{aarch64 =3D> arm64}/vcpu_width_config.c | 0 .../kvm/{aarch64 =3D> arm64}/vgic_init.c | 0 .../kvm/{aarch64 =3D> arm64}/vgic_irq.c | 0 .../kvm/{aarch64 =3D> arm64}/vgic_lpi_stress.c | 0 .../{aarch64 =3D> arm64}/vpmu_counter_access.c | 0 .../selftests/kvm/dirty_log_perf_test.c | 2 +- .../include/{aarch64 =3D> arm64}/arch_timer.h | 0 .../kvm/include/{aarch64 =3D> arm64}/delay.h | 0 .../kvm/include/{aarch64 =3D> arm64}/gic.h | 0 .../kvm/include/{aarch64 =3D> arm64}/gic_v3.h | 0 .../include/{aarch64 =3D> arm64}/gic_v3_its.h | 0 .../{aarch64 =3D> arm64}/kvm_util_arch.h | 0 .../include/{aarch64 =3D> arm64}/processor.h | 0 .../kvm/include/{aarch64 =3D> arm64}/spinlock.h | 0 .../kvm/include/{aarch64 =3D> arm64}/ucall.h | 0 .../kvm/include/{aarch64 =3D> arm64}/vgic.h | 0 .../{s390x =3D> s390}/diag318_test_handler.h | 0 .../include/{s390x =3D> s390}/kvm_util_arch.h | 0 .../kvm/include/{s390x =3D> s390}/processor.h | 0 .../kvm/include/{s390x =3D> s390}/ucall.h | 0 .../kvm/include/{x86_64 =3D> x86}/apic.h | 0 .../kvm/include/{x86_64 =3D> x86}/evmcs.h | 0 .../kvm/include/{x86_64 =3D> x86}/hyperv.h | 0 .../include/{x86_64 =3D> x86}/kvm_util_arch.h | 0 .../kvm/include/{x86_64 =3D> x86}/mce.h | 0 .../kvm/include/{x86_64 =3D> x86}/pmu.h | 0 .../kvm/include/{x86_64 =3D> x86}/processor.h | 0 .../kvm/include/{x86_64 =3D> x86}/sev.h | 0 .../kvm/include/{x86_64 =3D> x86}/svm.h | 0 .../kvm/include/{x86_64 =3D> x86}/svm_util.h | 0 .../kvm/include/{x86_64 =3D> x86}/ucall.h | 0 .../kvm/include/{x86_64 =3D> x86}/vmx.h | 0 .../kvm/lib/{aarch64 =3D> arm64}/gic.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/gic_private.h | 0 .../kvm/lib/{aarch64 =3D> arm64}/gic_v3.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/gic_v3_its.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/handlers.S | 0 .../kvm/lib/{aarch64 =3D> arm64}/processor.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/spinlock.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/ucall.c | 0 .../kvm/lib/{aarch64 =3D> arm64}/vgic.c | 0 .../{s390x =3D> s390}/diag318_test_handler.c | 0 .../kvm/lib/{s390x =3D> s390}/processor.c | 0 .../selftests/kvm/lib/{s390x =3D> s390}/ucall.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/apic.c | 0 .../kvm/lib/{x86_64 =3D> x86}/handlers.S | 0 .../kvm/lib/{x86_64 =3D> x86}/hyperv.c | 0 .../kvm/lib/{x86_64 =3D> x86}/memstress.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/pmu.c | 0 .../kvm/lib/{x86_64 =3D> x86}/processor.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/sev.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/svm.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/ucall.c | 0 .../selftests/kvm/lib/{x86_64 =3D> x86}/vmx.c | 0 .../selftests/kvm/{s390x =3D> s390}/cmma_test.c | 0 .../kvm/{s390x =3D> s390}/debug_test.c | 0 .../selftests/kvm/{s390x =3D> s390}/memop.c | 0 .../selftests/kvm/{s390x =3D> s390}/resets.c | 0 .../{s390x =3D> s390}/shared_zeropage_test.c | 0 .../kvm/{s390x =3D> s390}/sync_regs_test.c | 0 .../selftests/kvm/{s390x =3D> s390}/tprot.c | 0 .../selftests/kvm/{x86_64 =3D> x86}/amx_test.c | 0 .../kvm/{x86_64 =3D> x86}/apic_bus_clock_test.c | 0 .../kvm/{x86_64 =3D> x86}/cpuid_test.c | 0 .../kvm/{x86_64 =3D> x86}/cr4_cpuid_sync_test.c | 0 .../kvm/{x86_64 =3D> x86}/debug_regs.c | 0 .../dirty_log_page_splitting_test.c | 0 .../exit_on_emulation_failure_test.c | 0 .../kvm/{x86_64 =3D> x86}/fix_hypercall_test.c | 0 .../kvm/{x86_64 =3D> x86}/flds_emulation.h | 0 .../{x86_64 =3D> x86}/get_msr_index_features.c | 0 .../kvm/{x86_64 =3D> x86}/hwcr_msr_test.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_clock.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_cpuid.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_evmcs.c | 0 .../hyperv_extended_hypercalls.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_features.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_ipi.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_svm_test.c | 0 .../kvm/{x86_64 =3D> x86}/hyperv_tlb_flush.c | 0 .../kvm/{x86_64 =3D> x86}/kvm_clock_test.c | 0 .../kvm/{x86_64 =3D> x86}/kvm_pv_test.c | 0 .../kvm/{x86_64 =3D> x86}/max_vcpuid_cap_test.c | 0 .../kvm/{x86_64 =3D> x86}/monitor_mwait_test.c | 0 .../{x86_64 =3D> x86}/nested_exceptions_test.c | 0 .../kvm/{x86_64 =3D> x86}/nx_huge_pages_test.c | 0 .../kvm/{x86_64 =3D> x86}/nx_huge_pages_test.sh | 0 .../kvm/{x86_64 =3D> x86}/platform_info_test.c | 0 .../kvm/{x86_64 =3D> x86}/pmu_counters_test.c | 0 .../{x86_64 =3D> x86}/pmu_event_filter_test.c | 0 .../private_mem_conversions_test.c | 0 .../private_mem_kvm_exits_test.c | 0 .../{x86_64 =3D> x86}/recalc_apic_map_test.c | 0 .../kvm/{x86_64 =3D> x86}/set_boot_cpu_id.c | 0 .../kvm/{x86_64 =3D> x86}/set_sregs_test.c | 0 .../kvm/{x86_64 =3D> x86}/sev_init2_tests.c | 0 .../kvm/{x86_64 =3D> x86}/sev_migrate_tests.c | 0 .../kvm/{x86_64 =3D> x86}/sev_smoke_test.c | 0 .../smaller_maxphyaddr_emulation_test.c | 0 .../selftests/kvm/{x86_64 =3D> x86}/smm_test.c | 0 .../kvm/{x86_64 =3D> x86}/state_test.c | 0 .../kvm/{x86_64 =3D> x86}/svm_int_ctl_test.c | 0 .../svm_nested_shutdown_test.c | 0 .../svm_nested_soft_inject_test.c | 0 .../kvm/{x86_64 =3D> x86}/svm_vmcall_test.c | 0 .../kvm/{x86_64 =3D> x86}/sync_regs_test.c | 0 .../{x86_64 =3D> x86}/triple_fault_event_test.c | 0 .../kvm/{x86_64 =3D> x86}/tsc_msrs_test.c | 0 .../kvm/{x86_64 =3D> x86}/tsc_scaling_sync.c | 0 .../kvm/{x86_64 =3D> x86}/ucna_injection_test.c | 0 .../kvm/{x86_64 =3D> x86}/userspace_io_test.c | 0 .../{x86_64 =3D> x86}/userspace_msr_exit_test.c | 0 .../{x86_64 =3D> x86}/vmx_apic_access_test.c | 0 .../vmx_close_while_nested_test.c | 0 .../kvm/{x86_64 =3D> x86}/vmx_dirty_log_test.c | 0 .../vmx_exception_with_invalid_guest_state.c | 0 .../vmx_invalid_nested_guest_state.c | 0 .../kvm/{x86_64 =3D> x86}/vmx_msrs_test.c | 0 .../vmx_nested_tsc_scaling_test.c | 0 .../kvm/{x86_64 =3D> x86}/vmx_pmu_caps_test.c | 0 .../vmx_preemption_timer_test.c | 0 .../vmx_set_nested_state_test.c | 0 .../kvm/{x86_64 =3D> x86}/vmx_tsc_adjust_test.c | 0 .../kvm/{x86_64 =3D> x86}/xapic_ipi_test.c | 0 .../kvm/{x86_64 =3D> x86}/xapic_state_test.c | 0 .../kvm/{x86_64 =3D> x86}/xcr0_cpuid_test.c | 0 .../kvm/{x86_64 =3D> x86}/xen_shinfo_test.c | 0 .../kvm/{x86_64 =3D> x86}/xen_vmcall_test.c | 0 .../kvm/{x86_64 =3D> x86}/xss_msr_test.c | 0 141 files changed, 159 insertions(+), 167 deletions(-) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/aarch32_id_regs.c = (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/arch_timer.c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/debug-exceptions.c= (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/get-reg-list.c (10= 0%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/hypercalls.c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/page_fault_test.c = (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/psci_test.c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/set_id_regs.c (100= %) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/smccc_filter.c (10= 0%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/vcpu_width_config.= c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/vgic_init.c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/vgic_irq.c (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/vgic_lpi_stress.c = (100%) rename tools/testing/selftests/kvm/{aarch64 =3D> arm64}/vpmu_counter_acces= s.c (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/arch_timer= .h (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/delay.h (1= 00%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/gic.h (100= %) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/gic_v3.h (= 100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/gic_v3_its= .h (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/kvm_util_a= rch.h (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/processor.= h (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/spinlock.h= (100%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/ucall.h (1= 00%) rename tools/testing/selftests/kvm/include/{aarch64 =3D> arm64}/vgic.h (10= 0%) rename tools/testing/selftests/kvm/include/{s390x =3D> s390}/diag318_test_= handler.h (100%) rename tools/testing/selftests/kvm/include/{s390x =3D> s390}/kvm_util_arch= .h (100%) rename tools/testing/selftests/kvm/include/{s390x =3D> s390}/processor.h (= 100%) rename tools/testing/selftests/kvm/include/{s390x =3D> s390}/ucall.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/apic.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/evmcs.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/hyperv.h (100= %) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/kvm_util_arch= .h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/mce.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/pmu.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/processor.h (= 100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/sev.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/svm.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/svm_util.h (1= 00%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/ucall.h (100%) rename tools/testing/selftests/kvm/include/{x86_64 =3D> x86}/vmx.h (100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/gic.c (100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/gic_private.h = (100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/gic_v3.c (100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/gic_v3_its.c (= 100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/handlers.S (10= 0%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/processor.c (1= 00%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/spinlock.c (10= 0%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/ucall.c (100%) rename tools/testing/selftests/kvm/lib/{aarch64 =3D> arm64}/vgic.c (100%) rename tools/testing/selftests/kvm/lib/{s390x =3D> s390}/diag318_test_hand= ler.c (100%) rename tools/testing/selftests/kvm/lib/{s390x =3D> s390}/processor.c (100%) rename tools/testing/selftests/kvm/lib/{s390x =3D> s390}/ucall.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/apic.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/handlers.S (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/hyperv.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/memstress.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/pmu.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/processor.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/sev.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/svm.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/ucall.c (100%) rename tools/testing/selftests/kvm/lib/{x86_64 =3D> x86}/vmx.c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/cmma_test.c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/debug_test.c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/memop.c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/resets.c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/shared_zeropage_test.= c (100%) rename tools/testing/selftests/kvm/{s390x =3D> s390}/sync_regs_test.c (100= %) rename tools/testing/selftests/kvm/{s390x =3D> s390}/tprot.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/amx_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/apic_bus_clock_test.c= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/cpuid_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/cr4_cpuid_sync_test.c= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/debug_regs.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/dirty_log_page_splitt= ing_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/exit_on_emulation_fai= lure_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/fix_hypercall_test.c = (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/flds_emulation.h (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/get_msr_index_feature= s.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hwcr_msr_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_clock.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_cpuid.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_evmcs.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_extended_hyper= calls.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_features.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_ipi.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_svm_test.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/hyperv_tlb_flush.c (1= 00%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/kvm_clock_test.c (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/kvm_pv_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/max_vcpuid_cap_test.c= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/monitor_mwait_test.c = (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/nested_exceptions_tes= t.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/nx_huge_pages_test.c = (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/nx_huge_pages_test.sh= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/platform_info_test.c = (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/pmu_counters_test.c (= 100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/pmu_event_filter_test= .c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/private_mem_conversio= ns_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/private_mem_kvm_exits= _test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/recalc_apic_map_test.= c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/set_boot_cpu_id.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/set_sregs_test.c (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/sev_init2_tests.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/sev_migrate_tests.c (= 100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/sev_smoke_test.c (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/smaller_maxphyaddr_em= ulation_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/smm_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/state_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/svm_int_ctl_test.c (1= 00%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/svm_nested_shutdown_t= est.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/svm_nested_soft_injec= t_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/svm_vmcall_test.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/sync_regs_test.c (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/triple_fault_event_te= st.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/tsc_msrs_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/tsc_scaling_sync.c (1= 00%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/ucna_injection_test.c= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/userspace_io_test.c (= 100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/userspace_msr_exit_te= st.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_apic_access_test.= c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_close_while_neste= d_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_dirty_log_test.c = (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_exception_with_in= valid_guest_state.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_invalid_nested_gu= est_state.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_msrs_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_nested_tsc_scalin= g_test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_pmu_caps_test.c (= 100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_preemption_timer_= test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_set_nested_state_= test.c (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/vmx_tsc_adjust_test.c= (100%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xapic_ipi_test.c (100= %) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xapic_state_test.c (1= 00%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xcr0_cpuid_test.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xen_shinfo_test.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xen_vmcall_test.c (10= 0%) rename tools/testing/selftests/kvm/{x86_64 =3D> x86}/xss_msr_test.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index f328373463b0..74d5ae68509b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12281,8 +12281,8 @@ F: arch/arm64/include/asm/kvm* F: arch/arm64/include/uapi/asm/kvm* F: arch/arm64/kvm/ F: include/kvm/arm_* -F: tools/testing/selftests/kvm/*/aarch64/ -F: tools/testing/selftests/kvm/aarch64/ +F: tools/testing/selftests/kvm/*/arm64/ +F: tools/testing/selftests/kvm/arm64/ =20 KERNEL VIRTUAL MACHINE FOR LOONGARCH (KVM/LoongArch) M: Tianrui Zhao @@ -12352,8 +12352,8 @@ F: arch/s390/kvm/ F: arch/s390/mm/gmap.c F: drivers/s390/char/uvdevice.c F: tools/testing/selftests/drivers/s390x/uvdevice/ -F: tools/testing/selftests/kvm/*/s390x/ -F: tools/testing/selftests/kvm/s390x/ +F: tools/testing/selftests/kvm/*/s390/ +F: tools/testing/selftests/kvm/s390/ =20 KERNEL VIRTUAL MACHINE FOR X86 (KVM/x86) M: Sean Christopherson @@ -12370,8 +12370,8 @@ F: arch/x86/include/uapi/asm/svm.h F: arch/x86/include/uapi/asm/vmx.h F: arch/x86/kvm/ F: arch/x86/kvm/*/ -F: tools/testing/selftests/kvm/*/x86_64/ -F: tools/testing/selftests/kvm/x86_64/ +F: tools/testing/selftests/kvm/*/x86/ +F: tools/testing/selftests/kvm/x86/ =20 KERNFS M: Greg Kroah-Hartman diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests= /kvm/Makefile index 787b63b52db7..a9c1d85905d8 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -4,16 +4,12 @@ include $(top_srcdir)/scripts/subarch.include ARCH ?=3D $(SUBARCH) =20 ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64)) -ifeq ($(ARCH),x86) - ARCH_DIR :=3D x86_64 -else ifeq ($(ARCH),arm64) - ARCH_DIR :=3D aarch64 -else ifeq ($(ARCH),s390) - ARCH_DIR :=3D s390x +# Top-level selftests allows ARCH=3Dx86_64 :-( +ifeq ($(ARCH),x86_64) + ARCH_DIR :=3D x86 else ARCH_DIR :=3D $(ARCH) endif - include Makefile.kvm else # Empty targets for unsupported architectures diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selft= ests/kvm/Makefile.kvm index 802d05eee674..27f4e100c6ac 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -18,168 +18,168 @@ LIBKVM +=3D lib/userfaultfd_util.c =20 LIBKVM_STRING +=3D lib/string_override.c =20 -LIBKVM_x86_64 +=3D lib/x86_64/apic.c -LIBKVM_x86_64 +=3D lib/x86_64/handlers.S -LIBKVM_x86_64 +=3D lib/x86_64/hyperv.c -LIBKVM_x86_64 +=3D lib/x86_64/memstress.c -LIBKVM_x86_64 +=3D lib/x86_64/pmu.c -LIBKVM_x86_64 +=3D lib/x86_64/processor.c -LIBKVM_x86_64 +=3D lib/x86_64/sev.c -LIBKVM_x86_64 +=3D lib/x86_64/svm.c -LIBKVM_x86_64 +=3D lib/x86_64/ucall.c -LIBKVM_x86_64 +=3D lib/x86_64/vmx.c +LIBKVM_x86 +=3D lib/x86/apic.c +LIBKVM_x86 +=3D lib/x86/handlers.S +LIBKVM_x86 +=3D lib/x86/hyperv.c +LIBKVM_x86 +=3D lib/x86/memstress.c +LIBKVM_x86 +=3D lib/x86/pmu.c +LIBKVM_x86 +=3D lib/x86/processor.c +LIBKVM_x86 +=3D lib/x86/sev.c +LIBKVM_x86 +=3D lib/x86/svm.c +LIBKVM_x86 +=3D lib/x86/ucall.c +LIBKVM_x86 +=3D lib/x86/vmx.c =20 -LIBKVM_aarch64 +=3D lib/aarch64/gic.c -LIBKVM_aarch64 +=3D lib/aarch64/gic_v3.c -LIBKVM_aarch64 +=3D lib/aarch64/gic_v3_its.c -LIBKVM_aarch64 +=3D lib/aarch64/handlers.S -LIBKVM_aarch64 +=3D lib/aarch64/processor.c -LIBKVM_aarch64 +=3D lib/aarch64/spinlock.c -LIBKVM_aarch64 +=3D lib/aarch64/ucall.c -LIBKVM_aarch64 +=3D lib/aarch64/vgic.c +LIBKVM_arm64 +=3D lib/arm64/gic.c +LIBKVM_arm64 +=3D lib/arm64/gic_v3.c +LIBKVM_arm64 +=3D lib/arm64/gic_v3_its.c +LIBKVM_arm64 +=3D lib/arm64/handlers.S +LIBKVM_arm64 +=3D lib/arm64/processor.c +LIBKVM_arm64 +=3D lib/arm64/spinlock.c +LIBKVM_arm64 +=3D lib/arm64/ucall.c +LIBKVM_arm64 +=3D lib/arm64/vgic.c =20 -LIBKVM_s390x +=3D lib/s390x/diag318_test_handler.c -LIBKVM_s390x +=3D lib/s390x/processor.c -LIBKVM_s390x +=3D lib/s390x/ucall.c +LIBKVM_s390 +=3D lib/s390/diag318_test_handler.c +LIBKVM_s390 +=3D lib/s390/processor.c +LIBKVM_s390 +=3D lib/s390/ucall.c =20 LIBKVM_riscv +=3D lib/riscv/handlers.S LIBKVM_riscv +=3D lib/riscv/processor.c LIBKVM_riscv +=3D lib/riscv/ucall.c =20 # Non-compiled test targets -TEST_PROGS_x86_64 +=3D x86_64/nx_huge_pages_test.sh +TEST_PROGS_x86 +=3D x86/nx_huge_pages_test.sh =20 # Compiled test targets -TEST_GEN_PROGS_x86_64 =3D x86_64/cpuid_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/cr4_cpuid_sync_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/dirty_log_page_splitting_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/get_msr_index_features -TEST_GEN_PROGS_x86_64 +=3D x86_64/exit_on_emulation_failure_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/fix_hypercall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hwcr_msr_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_clock -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_cpuid -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_evmcs -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_extended_hypercalls -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_features -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_ipi -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_svm_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/hyperv_tlb_flush -TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_clock_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/kvm_pv_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/monitor_mwait_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/nested_exceptions_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/platform_info_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_counters_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/pmu_event_filter_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_conversions_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/private_mem_kvm_exits_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/set_boot_cpu_id -TEST_GEN_PROGS_x86_64 +=3D x86_64/set_sregs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/smaller_maxphyaddr_emulation_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/smm_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_preemption_timer_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_vmcall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_int_ctl_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_shutdown_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/svm_nested_soft_inject_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_scaling_sync -TEST_GEN_PROGS_x86_64 +=3D x86_64/sync_regs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/ucna_injection_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_io_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/userspace_msr_exit_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_apic_access_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_close_while_nested_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_dirty_log_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_exception_with_invalid_guest_state -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_msrs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_invalid_nested_guest_state -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_set_nested_state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_tsc_adjust_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_nested_tsc_scaling_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/apic_bus_clock_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_ipi_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xapic_state_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xcr0_cpuid_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xss_msr_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/debug_regs -TEST_GEN_PROGS_x86_64 +=3D x86_64/tsc_msrs_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/vmx_pmu_caps_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_shinfo_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/xen_vmcall_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_init2_tests -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_migrate_tests -TEST_GEN_PROGS_x86_64 +=3D x86_64/sev_smoke_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/amx_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/max_vcpuid_cap_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/triple_fault_event_test -TEST_GEN_PROGS_x86_64 +=3D x86_64/recalc_apic_map_test -TEST_GEN_PROGS_x86_64 +=3D access_tracking_perf_test -TEST_GEN_PROGS_x86_64 +=3D demand_paging_test -TEST_GEN_PROGS_x86_64 +=3D dirty_log_test -TEST_GEN_PROGS_x86_64 +=3D dirty_log_perf_test -TEST_GEN_PROGS_x86_64 +=3D guest_memfd_test -TEST_GEN_PROGS_x86_64 +=3D guest_print_test -TEST_GEN_PROGS_x86_64 +=3D hardware_disable_test -TEST_GEN_PROGS_x86_64 +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_x86_64 +=3D kvm_page_table_test -TEST_GEN_PROGS_x86_64 +=3D max_guest_memory_test -TEST_GEN_PROGS_x86_64 +=3D memslot_modification_stress_test -TEST_GEN_PROGS_x86_64 +=3D memslot_perf_test -TEST_GEN_PROGS_x86_64 +=3D rseq_test -TEST_GEN_PROGS_x86_64 +=3D set_memory_region_test -TEST_GEN_PROGS_x86_64 +=3D steal_time -TEST_GEN_PROGS_x86_64 +=3D kvm_binary_stats_test -TEST_GEN_PROGS_x86_64 +=3D system_counter_offset_test -TEST_GEN_PROGS_x86_64 +=3D pre_fault_memory_test +TEST_GEN_PROGS_x86 =3D x86/cpuid_test +TEST_GEN_PROGS_x86 +=3D x86/cr4_cpuid_sync_test +TEST_GEN_PROGS_x86 +=3D x86/dirty_log_page_splitting_test +TEST_GEN_PROGS_x86 +=3D x86/get_msr_index_features +TEST_GEN_PROGS_x86 +=3D x86/exit_on_emulation_failure_test +TEST_GEN_PROGS_x86 +=3D x86/fix_hypercall_test +TEST_GEN_PROGS_x86 +=3D x86/hwcr_msr_test +TEST_GEN_PROGS_x86 +=3D x86/hyperv_clock +TEST_GEN_PROGS_x86 +=3D x86/hyperv_cpuid +TEST_GEN_PROGS_x86 +=3D x86/hyperv_evmcs +TEST_GEN_PROGS_x86 +=3D x86/hyperv_extended_hypercalls +TEST_GEN_PROGS_x86 +=3D x86/hyperv_features +TEST_GEN_PROGS_x86 +=3D x86/hyperv_ipi +TEST_GEN_PROGS_x86 +=3D x86/hyperv_svm_test +TEST_GEN_PROGS_x86 +=3D x86/hyperv_tlb_flush +TEST_GEN_PROGS_x86 +=3D x86/kvm_clock_test +TEST_GEN_PROGS_x86 +=3D x86/kvm_pv_test +TEST_GEN_PROGS_x86 +=3D x86/monitor_mwait_test +TEST_GEN_PROGS_x86 +=3D x86/nested_exceptions_test +TEST_GEN_PROGS_x86 +=3D x86/platform_info_test +TEST_GEN_PROGS_x86 +=3D x86/pmu_counters_test +TEST_GEN_PROGS_x86 +=3D x86/pmu_event_filter_test +TEST_GEN_PROGS_x86 +=3D x86/private_mem_conversions_test +TEST_GEN_PROGS_x86 +=3D x86/private_mem_kvm_exits_test +TEST_GEN_PROGS_x86 +=3D x86/set_boot_cpu_id +TEST_GEN_PROGS_x86 +=3D x86/set_sregs_test +TEST_GEN_PROGS_x86 +=3D x86/smaller_maxphyaddr_emulation_test +TEST_GEN_PROGS_x86 +=3D x86/smm_test +TEST_GEN_PROGS_x86 +=3D x86/state_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_preemption_timer_test +TEST_GEN_PROGS_x86 +=3D x86/svm_vmcall_test +TEST_GEN_PROGS_x86 +=3D x86/svm_int_ctl_test +TEST_GEN_PROGS_x86 +=3D x86/svm_nested_shutdown_test +TEST_GEN_PROGS_x86 +=3D x86/svm_nested_soft_inject_test +TEST_GEN_PROGS_x86 +=3D x86/tsc_scaling_sync +TEST_GEN_PROGS_x86 +=3D x86/sync_regs_test +TEST_GEN_PROGS_x86 +=3D x86/ucna_injection_test +TEST_GEN_PROGS_x86 +=3D x86/userspace_io_test +TEST_GEN_PROGS_x86 +=3D x86/userspace_msr_exit_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_apic_access_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_close_while_nested_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_dirty_log_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_exception_with_invalid_guest_state +TEST_GEN_PROGS_x86 +=3D x86/vmx_msrs_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_invalid_nested_guest_state +TEST_GEN_PROGS_x86 +=3D x86/vmx_set_nested_state_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_tsc_adjust_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_nested_tsc_scaling_test +TEST_GEN_PROGS_x86 +=3D x86/apic_bus_clock_test +TEST_GEN_PROGS_x86 +=3D x86/xapic_ipi_test +TEST_GEN_PROGS_x86 +=3D x86/xapic_state_test +TEST_GEN_PROGS_x86 +=3D x86/xcr0_cpuid_test +TEST_GEN_PROGS_x86 +=3D x86/xss_msr_test +TEST_GEN_PROGS_x86 +=3D x86/debug_regs +TEST_GEN_PROGS_x86 +=3D x86/tsc_msrs_test +TEST_GEN_PROGS_x86 +=3D x86/vmx_pmu_caps_test +TEST_GEN_PROGS_x86 +=3D x86/xen_shinfo_test +TEST_GEN_PROGS_x86 +=3D x86/xen_vmcall_test +TEST_GEN_PROGS_x86 +=3D x86/sev_init2_tests +TEST_GEN_PROGS_x86 +=3D x86/sev_migrate_tests +TEST_GEN_PROGS_x86 +=3D x86/sev_smoke_test +TEST_GEN_PROGS_x86 +=3D x86/amx_test +TEST_GEN_PROGS_x86 +=3D x86/max_vcpuid_cap_test +TEST_GEN_PROGS_x86 +=3D x86/triple_fault_event_test +TEST_GEN_PROGS_x86 +=3D x86/recalc_apic_map_test +TEST_GEN_PROGS_x86 +=3D access_tracking_perf_test +TEST_GEN_PROGS_x86 +=3D demand_paging_test +TEST_GEN_PROGS_x86 +=3D dirty_log_test +TEST_GEN_PROGS_x86 +=3D dirty_log_perf_test +TEST_GEN_PROGS_x86 +=3D guest_memfd_test +TEST_GEN_PROGS_x86 +=3D guest_print_test +TEST_GEN_PROGS_x86 +=3D hardware_disable_test +TEST_GEN_PROGS_x86 +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_x86 +=3D kvm_page_table_test +TEST_GEN_PROGS_x86 +=3D max_guest_memory_test +TEST_GEN_PROGS_x86 +=3D memslot_modification_stress_test +TEST_GEN_PROGS_x86 +=3D memslot_perf_test +TEST_GEN_PROGS_x86 +=3D rseq_test +TEST_GEN_PROGS_x86 +=3D set_memory_region_test +TEST_GEN_PROGS_x86 +=3D steal_time +TEST_GEN_PROGS_x86 +=3D kvm_binary_stats_test +TEST_GEN_PROGS_x86 +=3D system_counter_offset_test +TEST_GEN_PROGS_x86 +=3D pre_fault_memory_test =20 # Compiled outputs used by test targets -TEST_GEN_PROGS_EXTENDED_x86_64 +=3D x86_64/nx_huge_pages_test +TEST_GEN_PROGS_EXTENDED_x86 +=3D x86/nx_huge_pages_test =20 -TEST_GEN_PROGS_aarch64 +=3D aarch64/aarch32_id_regs -TEST_GEN_PROGS_aarch64 +=3D aarch64/debug-exceptions -TEST_GEN_PROGS_aarch64 +=3D aarch64/hypercalls -TEST_GEN_PROGS_aarch64 +=3D aarch64/page_fault_test -TEST_GEN_PROGS_aarch64 +=3D aarch64/psci_test -TEST_GEN_PROGS_aarch64 +=3D aarch64/set_id_regs -TEST_GEN_PROGS_aarch64 +=3D aarch64/smccc_filter -TEST_GEN_PROGS_aarch64 +=3D aarch64/vcpu_width_config -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_init -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_irq -TEST_GEN_PROGS_aarch64 +=3D aarch64/vgic_lpi_stress -TEST_GEN_PROGS_aarch64 +=3D aarch64/vpmu_counter_access -TEST_GEN_PROGS_aarch64 +=3D access_tracking_perf_test -TEST_GEN_PROGS_aarch64 +=3D arch_timer -TEST_GEN_PROGS_aarch64 +=3D demand_paging_test -TEST_GEN_PROGS_aarch64 +=3D dirty_log_test -TEST_GEN_PROGS_aarch64 +=3D dirty_log_perf_test -TEST_GEN_PROGS_aarch64 +=3D guest_print_test -TEST_GEN_PROGS_aarch64 +=3D get-reg-list -TEST_GEN_PROGS_aarch64 +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_aarch64 +=3D kvm_page_table_test -TEST_GEN_PROGS_aarch64 +=3D memslot_modification_stress_test -TEST_GEN_PROGS_aarch64 +=3D memslot_perf_test -TEST_GEN_PROGS_aarch64 +=3D rseq_test -TEST_GEN_PROGS_aarch64 +=3D set_memory_region_test -TEST_GEN_PROGS_aarch64 +=3D steal_time -TEST_GEN_PROGS_aarch64 +=3D kvm_binary_stats_test +TEST_GEN_PROGS_arm64 +=3D arm64/aarch32_id_regs +TEST_GEN_PROGS_arm64 +=3D arm64/debug-exceptions +TEST_GEN_PROGS_arm64 +=3D arm64/hypercalls +TEST_GEN_PROGS_arm64 +=3D arm64/page_fault_test +TEST_GEN_PROGS_arm64 +=3D arm64/psci_test +TEST_GEN_PROGS_arm64 +=3D arm64/set_id_regs +TEST_GEN_PROGS_arm64 +=3D arm64/smccc_filter +TEST_GEN_PROGS_arm64 +=3D arm64/vcpu_width_config +TEST_GEN_PROGS_arm64 +=3D arm64/vgic_init +TEST_GEN_PROGS_arm64 +=3D arm64/vgic_irq +TEST_GEN_PROGS_arm64 +=3D arm64/vgic_lpi_stress +TEST_GEN_PROGS_arm64 +=3D arm64/vpmu_counter_access +TEST_GEN_PROGS_arm64 +=3D access_tracking_perf_test +TEST_GEN_PROGS_arm64 +=3D arch_timer +TEST_GEN_PROGS_arm64 +=3D demand_paging_test +TEST_GEN_PROGS_arm64 +=3D dirty_log_test +TEST_GEN_PROGS_arm64 +=3D dirty_log_perf_test +TEST_GEN_PROGS_arm64 +=3D guest_print_test +TEST_GEN_PROGS_arm64 +=3D get-reg-list +TEST_GEN_PROGS_arm64 +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_arm64 +=3D kvm_page_table_test +TEST_GEN_PROGS_arm64 +=3D memslot_modification_stress_test +TEST_GEN_PROGS_arm64 +=3D memslot_perf_test +TEST_GEN_PROGS_arm64 +=3D rseq_test +TEST_GEN_PROGS_arm64 +=3D set_memory_region_test +TEST_GEN_PROGS_arm64 +=3D steal_time +TEST_GEN_PROGS_arm64 +=3D kvm_binary_stats_test =20 -TEST_GEN_PROGS_s390x =3D s390x/memop -TEST_GEN_PROGS_s390x +=3D s390x/resets -TEST_GEN_PROGS_s390x +=3D s390x/sync_regs_test -TEST_GEN_PROGS_s390x +=3D s390x/tprot -TEST_GEN_PROGS_s390x +=3D s390x/cmma_test -TEST_GEN_PROGS_s390x +=3D s390x/debug_test -TEST_GEN_PROGS_s390x +=3D s390x/shared_zeropage_test -TEST_GEN_PROGS_s390x +=3D demand_paging_test -TEST_GEN_PROGS_s390x +=3D dirty_log_test -TEST_GEN_PROGS_s390x +=3D guest_print_test -TEST_GEN_PROGS_s390x +=3D kvm_create_max_vcpus -TEST_GEN_PROGS_s390x +=3D kvm_page_table_test -TEST_GEN_PROGS_s390x +=3D rseq_test -TEST_GEN_PROGS_s390x +=3D set_memory_region_test -TEST_GEN_PROGS_s390x +=3D kvm_binary_stats_test +TEST_GEN_PROGS_s390 =3D s390/memop +TEST_GEN_PROGS_s390 +=3D s390/resets +TEST_GEN_PROGS_s390 +=3D s390/sync_regs_test +TEST_GEN_PROGS_s390 +=3D s390/tprot +TEST_GEN_PROGS_s390 +=3D s390/cmma_test +TEST_GEN_PROGS_s390 +=3D s390/debug_test +TEST_GEN_PROGS_s390 +=3D s390/shared_zeropage_test +TEST_GEN_PROGS_s390 +=3D demand_paging_test +TEST_GEN_PROGS_s390 +=3D dirty_log_test +TEST_GEN_PROGS_s390 +=3D guest_print_test +TEST_GEN_PROGS_s390 +=3D kvm_create_max_vcpus +TEST_GEN_PROGS_s390 +=3D kvm_page_table_test +TEST_GEN_PROGS_s390 +=3D rseq_test +TEST_GEN_PROGS_s390 +=3D set_memory_region_test +TEST_GEN_PROGS_s390 +=3D kvm_binary_stats_test =20 TEST_GEN_PROGS_riscv +=3D riscv/sbi_pmu_test TEST_GEN_PROGS_riscv +=3D riscv/ebreak_test @@ -212,11 +212,7 @@ include ../lib.mk INSTALL_HDR_PATH =3D $(top_srcdir)/usr LINUX_HDR_PATH =3D $(INSTALL_HDR_PATH)/include/ LINUX_TOOL_INCLUDE =3D $(top_srcdir)/tools/include -ifeq ($(ARCH),x86_64) -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/x86/include -else -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH)/include -endif +LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH_DIR)/include CFLAGS +=3D -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=3Dgnu99 \ -Wno-gnu-variable-sized-type-not-at-end -MD -MP -DCONFIG_64BIT \ -fno-builtin-memcmp -fno-builtin-memcpy \ diff --git a/tools/testing/selftests/kvm/aarch64/aarch32_id_regs.c b/tools/= testing/selftests/kvm/arm64/aarch32_id_regs.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/aarch32_id_regs.c rename to tools/testing/selftests/kvm/arm64/aarch32_id_regs.c diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testi= ng/selftests/kvm/arm64/arch_timer.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/arch_timer.c rename to tools/testing/selftests/kvm/arm64/arch_timer.c diff --git a/tools/testing/selftests/kvm/aarch64/debug-exceptions.c b/tools= /testing/selftests/kvm/arm64/debug-exceptions.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/debug-exceptions.c rename to tools/testing/selftests/kvm/arm64/debug-exceptions.c diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/tes= ting/selftests/kvm/arm64/get-reg-list.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/get-reg-list.c rename to tools/testing/selftests/kvm/arm64/get-reg-list.c diff --git a/tools/testing/selftests/kvm/aarch64/hypercalls.c b/tools/testi= ng/selftests/kvm/arm64/hypercalls.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/hypercalls.c rename to tools/testing/selftests/kvm/arm64/hypercalls.c diff --git a/tools/testing/selftests/kvm/aarch64/page_fault_test.c b/tools/= testing/selftests/kvm/arm64/page_fault_test.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/page_fault_test.c rename to tools/testing/selftests/kvm/arm64/page_fault_test.c diff --git a/tools/testing/selftests/kvm/aarch64/psci_test.c b/tools/testin= g/selftests/kvm/arm64/psci_test.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/psci_test.c rename to tools/testing/selftests/kvm/arm64/psci_test.c diff --git a/tools/testing/selftests/kvm/aarch64/set_id_regs.c b/tools/test= ing/selftests/kvm/arm64/set_id_regs.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/set_id_regs.c rename to tools/testing/selftests/kvm/arm64/set_id_regs.c diff --git a/tools/testing/selftests/kvm/aarch64/smccc_filter.c b/tools/tes= ting/selftests/kvm/arm64/smccc_filter.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/smccc_filter.c rename to tools/testing/selftests/kvm/arm64/smccc_filter.c diff --git a/tools/testing/selftests/kvm/aarch64/vcpu_width_config.c b/tool= s/testing/selftests/kvm/arm64/vcpu_width_config.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/vcpu_width_config.c rename to tools/testing/selftests/kvm/arm64/vcpu_width_config.c diff --git a/tools/testing/selftests/kvm/aarch64/vgic_init.c b/tools/testin= g/selftests/kvm/arm64/vgic_init.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/vgic_init.c rename to tools/testing/selftests/kvm/arm64/vgic_init.c diff --git a/tools/testing/selftests/kvm/aarch64/vgic_irq.c b/tools/testing= /selftests/kvm/arm64/vgic_irq.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/vgic_irq.c rename to tools/testing/selftests/kvm/arm64/vgic_irq.c diff --git a/tools/testing/selftests/kvm/aarch64/vgic_lpi_stress.c b/tools/= testing/selftests/kvm/arm64/vgic_lpi_stress.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/vgic_lpi_stress.c rename to tools/testing/selftests/kvm/arm64/vgic_lpi_stress.c diff --git a/tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c b/to= ols/testing/selftests/kvm/arm64/vpmu_counter_access.c similarity index 100% rename from tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c rename to tools/testing/selftests/kvm/arm64/vpmu_counter_access.c diff --git a/tools/testing/selftests/kvm/dirty_log_perf_test.c b/tools/test= ing/selftests/kvm/dirty_log_perf_test.c index 9f24303acb8c..e79817bd0e29 100644 --- a/tools/testing/selftests/kvm/dirty_log_perf_test.c +++ b/tools/testing/selftests/kvm/dirty_log_perf_test.c @@ -21,7 +21,7 @@ #include "ucall_common.h" =20 #ifdef __aarch64__ -#include "aarch64/vgic.h" +#include "arm64/vgic.h" =20 static int gic_fd; =20 diff --git a/tools/testing/selftests/kvm/include/aarch64/arch_timer.h b/too= ls/testing/selftests/kvm/include/arm64/arch_timer.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/arch_timer.h rename to tools/testing/selftests/kvm/include/arm64/arch_timer.h diff --git a/tools/testing/selftests/kvm/include/aarch64/delay.h b/tools/te= sting/selftests/kvm/include/arm64/delay.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/delay.h rename to tools/testing/selftests/kvm/include/arm64/delay.h diff --git a/tools/testing/selftests/kvm/include/aarch64/gic.h b/tools/test= ing/selftests/kvm/include/arm64/gic.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/gic.h rename to tools/testing/selftests/kvm/include/arm64/gic.h diff --git a/tools/testing/selftests/kvm/include/aarch64/gic_v3.h b/tools/t= esting/selftests/kvm/include/arm64/gic_v3.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/gic_v3.h rename to tools/testing/selftests/kvm/include/arm64/gic_v3.h diff --git a/tools/testing/selftests/kvm/include/aarch64/gic_v3_its.h b/too= ls/testing/selftests/kvm/include/arm64/gic_v3_its.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/gic_v3_its.h rename to tools/testing/selftests/kvm/include/arm64/gic_v3_its.h diff --git a/tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h b/= tools/testing/selftests/kvm/include/arm64/kvm_util_arch.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/kvm_util_arch.h rename to tools/testing/selftests/kvm/include/arm64/kvm_util_arch.h diff --git a/tools/testing/selftests/kvm/include/aarch64/processor.h b/tool= s/testing/selftests/kvm/include/arm64/processor.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/processor.h rename to tools/testing/selftests/kvm/include/arm64/processor.h diff --git a/tools/testing/selftests/kvm/include/aarch64/spinlock.h b/tools= /testing/selftests/kvm/include/arm64/spinlock.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/spinlock.h rename to tools/testing/selftests/kvm/include/arm64/spinlock.h diff --git a/tools/testing/selftests/kvm/include/aarch64/ucall.h b/tools/te= sting/selftests/kvm/include/arm64/ucall.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/ucall.h rename to tools/testing/selftests/kvm/include/arm64/ucall.h diff --git a/tools/testing/selftests/kvm/include/aarch64/vgic.h b/tools/tes= ting/selftests/kvm/include/arm64/vgic.h similarity index 100% rename from tools/testing/selftests/kvm/include/aarch64/vgic.h rename to tools/testing/selftests/kvm/include/arm64/vgic.h diff --git a/tools/testing/selftests/kvm/include/s390x/diag318_test_handler= .h b/tools/testing/selftests/kvm/include/s390/diag318_test_handler.h similarity index 100% rename from tools/testing/selftests/kvm/include/s390x/diag318_test_handler.h rename to tools/testing/selftests/kvm/include/s390/diag318_test_handler.h diff --git a/tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h b/to= ols/testing/selftests/kvm/include/s390/kvm_util_arch.h similarity index 100% rename from tools/testing/selftests/kvm/include/s390x/kvm_util_arch.h rename to tools/testing/selftests/kvm/include/s390/kvm_util_arch.h diff --git a/tools/testing/selftests/kvm/include/s390x/processor.h b/tools/= testing/selftests/kvm/include/s390/processor.h similarity index 100% rename from tools/testing/selftests/kvm/include/s390x/processor.h rename to tools/testing/selftests/kvm/include/s390/processor.h diff --git a/tools/testing/selftests/kvm/include/s390x/ucall.h b/tools/test= ing/selftests/kvm/include/s390/ucall.h similarity index 100% rename from tools/testing/selftests/kvm/include/s390x/ucall.h rename to tools/testing/selftests/kvm/include/s390/ucall.h diff --git a/tools/testing/selftests/kvm/include/x86_64/apic.h b/tools/test= ing/selftests/kvm/include/x86/apic.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/apic.h rename to tools/testing/selftests/kvm/include/x86/apic.h diff --git a/tools/testing/selftests/kvm/include/x86_64/evmcs.h b/tools/tes= ting/selftests/kvm/include/x86/evmcs.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/evmcs.h rename to tools/testing/selftests/kvm/include/x86/evmcs.h diff --git a/tools/testing/selftests/kvm/include/x86_64/hyperv.h b/tools/te= sting/selftests/kvm/include/x86/hyperv.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/hyperv.h rename to tools/testing/selftests/kvm/include/x86/hyperv.h diff --git a/tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h b/t= ools/testing/selftests/kvm/include/x86/kvm_util_arch.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/kvm_util_arch.h rename to tools/testing/selftests/kvm/include/x86/kvm_util_arch.h diff --git a/tools/testing/selftests/kvm/include/x86_64/mce.h b/tools/testi= ng/selftests/kvm/include/x86/mce.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/mce.h rename to tools/testing/selftests/kvm/include/x86/mce.h diff --git a/tools/testing/selftests/kvm/include/x86_64/pmu.h b/tools/testi= ng/selftests/kvm/include/x86/pmu.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/pmu.h rename to tools/testing/selftests/kvm/include/x86/pmu.h diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools= /testing/selftests/kvm/include/x86/processor.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/processor.h rename to tools/testing/selftests/kvm/include/x86/processor.h diff --git a/tools/testing/selftests/kvm/include/x86_64/sev.h b/tools/testi= ng/selftests/kvm/include/x86/sev.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/sev.h rename to tools/testing/selftests/kvm/include/x86/sev.h diff --git a/tools/testing/selftests/kvm/include/x86_64/svm.h b/tools/testi= ng/selftests/kvm/include/x86/svm.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/svm.h rename to tools/testing/selftests/kvm/include/x86/svm.h diff --git a/tools/testing/selftests/kvm/include/x86_64/svm_util.h b/tools/= testing/selftests/kvm/include/x86/svm_util.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/svm_util.h rename to tools/testing/selftests/kvm/include/x86/svm_util.h diff --git a/tools/testing/selftests/kvm/include/x86_64/ucall.h b/tools/tes= ting/selftests/kvm/include/x86/ucall.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/ucall.h rename to tools/testing/selftests/kvm/include/x86/ucall.h diff --git a/tools/testing/selftests/kvm/include/x86_64/vmx.h b/tools/testi= ng/selftests/kvm/include/x86/vmx.h similarity index 100% rename from tools/testing/selftests/kvm/include/x86_64/vmx.h rename to tools/testing/selftests/kvm/include/x86/vmx.h diff --git a/tools/testing/selftests/kvm/lib/aarch64/gic.c b/tools/testing/= selftests/kvm/lib/arm64/gic.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/gic.c rename to tools/testing/selftests/kvm/lib/arm64/gic.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/gic_private.h b/tools/= testing/selftests/kvm/lib/arm64/gic_private.h similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/gic_private.h rename to tools/testing/selftests/kvm/lib/arm64/gic_private.h diff --git a/tools/testing/selftests/kvm/lib/aarch64/gic_v3.c b/tools/testi= ng/selftests/kvm/lib/arm64/gic_v3.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/gic_v3.c rename to tools/testing/selftests/kvm/lib/arm64/gic_v3.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/gic_v3_its.c b/tools/t= esting/selftests/kvm/lib/arm64/gic_v3_its.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/gic_v3_its.c rename to tools/testing/selftests/kvm/lib/arm64/gic_v3_its.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/handlers.S b/tools/tes= ting/selftests/kvm/lib/arm64/handlers.S similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/handlers.S rename to tools/testing/selftests/kvm/lib/arm64/handlers.S diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/te= sting/selftests/kvm/lib/arm64/processor.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/processor.c rename to tools/testing/selftests/kvm/lib/arm64/processor.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/spinlock.c b/tools/tes= ting/selftests/kvm/lib/arm64/spinlock.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/spinlock.c rename to tools/testing/selftests/kvm/lib/arm64/spinlock.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/ucall.c b/tools/testin= g/selftests/kvm/lib/arm64/ucall.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/ucall.c rename to tools/testing/selftests/kvm/lib/arm64/ucall.c diff --git a/tools/testing/selftests/kvm/lib/aarch64/vgic.c b/tools/testing= /selftests/kvm/lib/arm64/vgic.c similarity index 100% rename from tools/testing/selftests/kvm/lib/aarch64/vgic.c rename to tools/testing/selftests/kvm/lib/arm64/vgic.c diff --git a/tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c b= /tools/testing/selftests/kvm/lib/s390/diag318_test_handler.c similarity index 100% rename from tools/testing/selftests/kvm/lib/s390x/diag318_test_handler.c rename to tools/testing/selftests/kvm/lib/s390/diag318_test_handler.c diff --git a/tools/testing/selftests/kvm/lib/s390x/processor.c b/tools/test= ing/selftests/kvm/lib/s390/processor.c similarity index 100% rename from tools/testing/selftests/kvm/lib/s390x/processor.c rename to tools/testing/selftests/kvm/lib/s390/processor.c diff --git a/tools/testing/selftests/kvm/lib/s390x/ucall.c b/tools/testing/= selftests/kvm/lib/s390/ucall.c similarity index 100% rename from tools/testing/selftests/kvm/lib/s390x/ucall.c rename to tools/testing/selftests/kvm/lib/s390/ucall.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/apic.c b/tools/testing/= selftests/kvm/lib/x86/apic.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/apic.c rename to tools/testing/selftests/kvm/lib/x86/apic.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/handlers.S b/tools/test= ing/selftests/kvm/lib/x86/handlers.S similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/handlers.S rename to tools/testing/selftests/kvm/lib/x86/handlers.S diff --git a/tools/testing/selftests/kvm/lib/x86_64/hyperv.c b/tools/testin= g/selftests/kvm/lib/x86/hyperv.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/hyperv.c rename to tools/testing/selftests/kvm/lib/x86/hyperv.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/memstress.c b/tools/tes= ting/selftests/kvm/lib/x86/memstress.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/memstress.c rename to tools/testing/selftests/kvm/lib/x86/memstress.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/pmu.c b/tools/testing/s= elftests/kvm/lib/x86/pmu.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/pmu.c rename to tools/testing/selftests/kvm/lib/x86/pmu.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/processor.c b/tools/tes= ting/selftests/kvm/lib/x86/processor.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/processor.c rename to tools/testing/selftests/kvm/lib/x86/processor.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/sev.c b/tools/testing/s= elftests/kvm/lib/x86/sev.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/sev.c rename to tools/testing/selftests/kvm/lib/x86/sev.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/svm.c b/tools/testing/s= elftests/kvm/lib/x86/svm.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/svm.c rename to tools/testing/selftests/kvm/lib/x86/svm.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/ucall.c b/tools/testing= /selftests/kvm/lib/x86/ucall.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/ucall.c rename to tools/testing/selftests/kvm/lib/x86/ucall.c diff --git a/tools/testing/selftests/kvm/lib/x86_64/vmx.c b/tools/testing/s= elftests/kvm/lib/x86/vmx.c similarity index 100% rename from tools/testing/selftests/kvm/lib/x86_64/vmx.c rename to tools/testing/selftests/kvm/lib/x86/vmx.c diff --git a/tools/testing/selftests/kvm/s390x/cmma_test.c b/tools/testing/= selftests/kvm/s390/cmma_test.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/cmma_test.c rename to tools/testing/selftests/kvm/s390/cmma_test.c diff --git a/tools/testing/selftests/kvm/s390x/debug_test.c b/tools/testing= /selftests/kvm/s390/debug_test.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/debug_test.c rename to tools/testing/selftests/kvm/s390/debug_test.c diff --git a/tools/testing/selftests/kvm/s390x/memop.c b/tools/testing/self= tests/kvm/s390/memop.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/memop.c rename to tools/testing/selftests/kvm/s390/memop.c diff --git a/tools/testing/selftests/kvm/s390x/resets.c b/tools/testing/sel= ftests/kvm/s390/resets.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/resets.c rename to tools/testing/selftests/kvm/s390/resets.c diff --git a/tools/testing/selftests/kvm/s390x/shared_zeropage_test.c b/too= ls/testing/selftests/kvm/s390/shared_zeropage_test.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/shared_zeropage_test.c rename to tools/testing/selftests/kvm/s390/shared_zeropage_test.c diff --git a/tools/testing/selftests/kvm/s390x/sync_regs_test.c b/tools/tes= ting/selftests/kvm/s390/sync_regs_test.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/sync_regs_test.c rename to tools/testing/selftests/kvm/s390/sync_regs_test.c diff --git a/tools/testing/selftests/kvm/s390x/tprot.c b/tools/testing/self= tests/kvm/s390/tprot.c similarity index 100% rename from tools/testing/selftests/kvm/s390x/tprot.c rename to tools/testing/selftests/kvm/s390/tprot.c diff --git a/tools/testing/selftests/kvm/x86_64/amx_test.c b/tools/testing/= selftests/kvm/x86/amx_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/amx_test.c rename to tools/testing/selftests/kvm/x86/amx_test.c diff --git a/tools/testing/selftests/kvm/x86_64/apic_bus_clock_test.c b/too= ls/testing/selftests/kvm/x86/apic_bus_clock_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/apic_bus_clock_test.c rename to tools/testing/selftests/kvm/x86/apic_bus_clock_test.c diff --git a/tools/testing/selftests/kvm/x86_64/cpuid_test.c b/tools/testin= g/selftests/kvm/x86/cpuid_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/cpuid_test.c rename to tools/testing/selftests/kvm/x86/cpuid_test.c diff --git a/tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c b/too= ls/testing/selftests/kvm/x86/cr4_cpuid_sync_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/cr4_cpuid_sync_test.c rename to tools/testing/selftests/kvm/x86/cr4_cpuid_sync_test.c diff --git a/tools/testing/selftests/kvm/x86_64/debug_regs.c b/tools/testin= g/selftests/kvm/x86/debug_regs.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/debug_regs.c rename to tools/testing/selftests/kvm/x86/debug_regs.c diff --git a/tools/testing/selftests/kvm/x86_64/dirty_log_page_splitting_te= st.c b/tools/testing/selftests/kvm/x86/dirty_log_page_splitting_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/dirty_log_page_splitting_tes= t.c rename to tools/testing/selftests/kvm/x86/dirty_log_page_splitting_test.c diff --git a/tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_t= est.c b/tools/testing/selftests/kvm/x86/exit_on_emulation_failure_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/exit_on_emulation_failure_te= st.c rename to tools/testing/selftests/kvm/x86/exit_on_emulation_failure_test.c diff --git a/tools/testing/selftests/kvm/x86_64/fix_hypercall_test.c b/tool= s/testing/selftests/kvm/x86/fix_hypercall_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/fix_hypercall_test.c rename to tools/testing/selftests/kvm/x86/fix_hypercall_test.c diff --git a/tools/testing/selftests/kvm/x86_64/flds_emulation.h b/tools/te= sting/selftests/kvm/x86/flds_emulation.h similarity index 100% rename from tools/testing/selftests/kvm/x86_64/flds_emulation.h rename to tools/testing/selftests/kvm/x86/flds_emulation.h diff --git a/tools/testing/selftests/kvm/x86_64/get_msr_index_features.c b/= tools/testing/selftests/kvm/x86/get_msr_index_features.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/get_msr_index_features.c rename to tools/testing/selftests/kvm/x86/get_msr_index_features.c diff --git a/tools/testing/selftests/kvm/x86_64/hwcr_msr_test.c b/tools/tes= ting/selftests/kvm/x86/hwcr_msr_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hwcr_msr_test.c rename to tools/testing/selftests/kvm/x86/hwcr_msr_test.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_clock.c b/tools/test= ing/selftests/kvm/x86/hyperv_clock.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_clock.c rename to tools/testing/selftests/kvm/x86/hyperv_clock.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c b/tools/test= ing/selftests/kvm/x86/hyperv_cpuid.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_cpuid.c rename to tools/testing/selftests/kvm/x86/hyperv_cpuid.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_evmcs.c b/tools/test= ing/selftests/kvm/x86/hyperv_evmcs.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_evmcs.c rename to tools/testing/selftests/kvm/x86/hyperv_evmcs.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_extended_hypercalls.= c b/tools/testing/selftests/kvm/x86/hyperv_extended_hypercalls.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_extended_hypercalls.c rename to tools/testing/selftests/kvm/x86/hyperv_extended_hypercalls.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/t= esting/selftests/kvm/x86/hyperv_features.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_features.c rename to tools/testing/selftests/kvm/x86/hyperv_features.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_ipi.c b/tools/testin= g/selftests/kvm/x86/hyperv_ipi.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_ipi.c rename to tools/testing/selftests/kvm/x86/hyperv_ipi.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c b/tools/t= esting/selftests/kvm/x86/hyperv_svm_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_svm_test.c rename to tools/testing/selftests/kvm/x86/hyperv_svm_test.c diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_tlb_flush.c b/tools/= testing/selftests/kvm/x86/hyperv_tlb_flush.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/hyperv_tlb_flush.c rename to tools/testing/selftests/kvm/x86/hyperv_tlb_flush.c diff --git a/tools/testing/selftests/kvm/x86_64/kvm_clock_test.c b/tools/te= sting/selftests/kvm/x86/kvm_clock_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/kvm_clock_test.c rename to tools/testing/selftests/kvm/x86/kvm_clock_test.c diff --git a/tools/testing/selftests/kvm/x86_64/kvm_pv_test.c b/tools/testi= ng/selftests/kvm/x86/kvm_pv_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/kvm_pv_test.c rename to tools/testing/selftests/kvm/x86/kvm_pv_test.c diff --git a/tools/testing/selftests/kvm/x86_64/max_vcpuid_cap_test.c b/too= ls/testing/selftests/kvm/x86/max_vcpuid_cap_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/max_vcpuid_cap_test.c rename to tools/testing/selftests/kvm/x86/max_vcpuid_cap_test.c diff --git a/tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c b/tool= s/testing/selftests/kvm/x86/monitor_mwait_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/monitor_mwait_test.c rename to tools/testing/selftests/kvm/x86/monitor_mwait_test.c diff --git a/tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c b/= tools/testing/selftests/kvm/x86/nested_exceptions_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/nested_exceptions_test.c rename to tools/testing/selftests/kvm/x86/nested_exceptions_test.c diff --git a/tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c b/tool= s/testing/selftests/kvm/x86/nx_huge_pages_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.c rename to tools/testing/selftests/kvm/x86/nx_huge_pages_test.c diff --git a/tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh b/too= ls/testing/selftests/kvm/x86/nx_huge_pages_test.sh similarity index 100% rename from tools/testing/selftests/kvm/x86_64/nx_huge_pages_test.sh rename to tools/testing/selftests/kvm/x86/nx_huge_pages_test.sh diff --git a/tools/testing/selftests/kvm/x86_64/platform_info_test.c b/tool= s/testing/selftests/kvm/x86/platform_info_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/platform_info_test.c rename to tools/testing/selftests/kvm/x86/platform_info_test.c diff --git a/tools/testing/selftests/kvm/x86_64/pmu_counters_test.c b/tools= /testing/selftests/kvm/x86/pmu_counters_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/pmu_counters_test.c rename to tools/testing/selftests/kvm/x86/pmu_counters_test.c diff --git a/tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c b/t= ools/testing/selftests/kvm/x86/pmu_event_filter_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/pmu_event_filter_test.c rename to tools/testing/selftests/kvm/x86/pmu_event_filter_test.c diff --git a/tools/testing/selftests/kvm/x86_64/private_mem_conversions_tes= t.c b/tools/testing/selftests/kvm/x86/private_mem_conversions_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/private_mem_conversions_test= .c rename to tools/testing/selftests/kvm/x86/private_mem_conversions_test.c diff --git a/tools/testing/selftests/kvm/x86_64/private_mem_kvm_exits_test.= c b/tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/private_mem_kvm_exits_test.c rename to tools/testing/selftests/kvm/x86/private_mem_kvm_exits_test.c diff --git a/tools/testing/selftests/kvm/x86_64/recalc_apic_map_test.c b/to= ols/testing/selftests/kvm/x86/recalc_apic_map_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/recalc_apic_map_test.c rename to tools/testing/selftests/kvm/x86/recalc_apic_map_test.c diff --git a/tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c b/tools/t= esting/selftests/kvm/x86/set_boot_cpu_id.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/set_boot_cpu_id.c rename to tools/testing/selftests/kvm/x86/set_boot_cpu_id.c diff --git a/tools/testing/selftests/kvm/x86_64/set_sregs_test.c b/tools/te= sting/selftests/kvm/x86/set_sregs_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/set_sregs_test.c rename to tools/testing/selftests/kvm/x86/set_sregs_test.c diff --git a/tools/testing/selftests/kvm/x86_64/sev_init2_tests.c b/tools/t= esting/selftests/kvm/x86/sev_init2_tests.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/sev_init2_tests.c rename to tools/testing/selftests/kvm/x86/sev_init2_tests.c diff --git a/tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c b/tools= /testing/selftests/kvm/x86/sev_migrate_tests.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/sev_migrate_tests.c rename to tools/testing/selftests/kvm/x86/sev_migrate_tests.c diff --git a/tools/testing/selftests/kvm/x86_64/sev_smoke_test.c b/tools/te= sting/selftests/kvm/x86/sev_smoke_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/sev_smoke_test.c rename to tools/testing/selftests/kvm/x86/sev_smoke_test.c diff --git a/tools/testing/selftests/kvm/x86_64/smaller_maxphyaddr_emulatio= n_test.c b/tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_tes= t.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/smaller_maxphyaddr_emulation= _test.c rename to tools/testing/selftests/kvm/x86/smaller_maxphyaddr_emulation_test= .c diff --git a/tools/testing/selftests/kvm/x86_64/smm_test.c b/tools/testing/= selftests/kvm/x86/smm_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/smm_test.c rename to tools/testing/selftests/kvm/x86/smm_test.c diff --git a/tools/testing/selftests/kvm/x86_64/state_test.c b/tools/testin= g/selftests/kvm/x86/state_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/state_test.c rename to tools/testing/selftests/kvm/x86/state_test.c diff --git a/tools/testing/selftests/kvm/x86_64/svm_int_ctl_test.c b/tools/= testing/selftests/kvm/x86/svm_int_ctl_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/svm_int_ctl_test.c rename to tools/testing/selftests/kvm/x86/svm_int_ctl_test.c diff --git a/tools/testing/selftests/kvm/x86_64/svm_nested_shutdown_test.c = b/tools/testing/selftests/kvm/x86/svm_nested_shutdown_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/svm_nested_shutdown_test.c rename to tools/testing/selftests/kvm/x86/svm_nested_shutdown_test.c diff --git a/tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test= .c b/tools/testing/selftests/kvm/x86/svm_nested_soft_inject_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/svm_nested_soft_inject_test.c rename to tools/testing/selftests/kvm/x86/svm_nested_soft_inject_test.c diff --git a/tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c b/tools/t= esting/selftests/kvm/x86/svm_vmcall_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/svm_vmcall_test.c rename to tools/testing/selftests/kvm/x86/svm_vmcall_test.c diff --git a/tools/testing/selftests/kvm/x86_64/sync_regs_test.c b/tools/te= sting/selftests/kvm/x86/sync_regs_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/sync_regs_test.c rename to tools/testing/selftests/kvm/x86/sync_regs_test.c diff --git a/tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c b= /tools/testing/selftests/kvm/x86/triple_fault_event_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/triple_fault_event_test.c rename to tools/testing/selftests/kvm/x86/triple_fault_event_test.c diff --git a/tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c b/tools/tes= ting/selftests/kvm/x86/tsc_msrs_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c rename to tools/testing/selftests/kvm/x86/tsc_msrs_test.c diff --git a/tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c b/tools/= testing/selftests/kvm/x86/tsc_scaling_sync.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/tsc_scaling_sync.c rename to tools/testing/selftests/kvm/x86/tsc_scaling_sync.c diff --git a/tools/testing/selftests/kvm/x86_64/ucna_injection_test.c b/too= ls/testing/selftests/kvm/x86/ucna_injection_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/ucna_injection_test.c rename to tools/testing/selftests/kvm/x86/ucna_injection_test.c diff --git a/tools/testing/selftests/kvm/x86_64/userspace_io_test.c b/tools= /testing/selftests/kvm/x86/userspace_io_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/userspace_io_test.c rename to tools/testing/selftests/kvm/x86/userspace_io_test.c diff --git a/tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c b= /tools/testing/selftests/kvm/x86/userspace_msr_exit_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c rename to tools/testing/selftests/kvm/x86/userspace_msr_exit_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c b/to= ols/testing/selftests/kvm/x86/vmx_apic_access_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_apic_access_test.c rename to tools/testing/selftests/kvm/x86/vmx_apic_access_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test= .c b/tools/testing/selftests/kvm/x86/vmx_close_while_nested_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c rename to tools/testing/selftests/kvm/x86/vmx_close_while_nested_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c b/tool= s/testing/selftests/kvm/x86/vmx_dirty_log_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_dirty_log_test.c rename to tools/testing/selftests/kvm/x86/vmx_dirty_log_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_exception_with_invalid_= guest_state.c b/tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_= guest_state.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_exception_with_invalid_g= uest_state.c rename to tools/testing/selftests/kvm/x86/vmx_exception_with_invalid_guest_= state.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_invalid_nested_guest_st= ate.c b/tools/testing/selftests/kvm/x86/vmx_invalid_nested_guest_state.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_invalid_nested_guest_sta= te.c rename to tools/testing/selftests/kvm/x86/vmx_invalid_nested_guest_state.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_msrs_test.c b/tools/tes= ting/selftests/kvm/x86/vmx_msrs_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_msrs_test.c rename to tools/testing/selftests/kvm/x86/vmx_msrs_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test= .c b/tools/testing/selftests/kvm/x86/vmx_nested_tsc_scaling_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_nested_tsc_scaling_test.c rename to tools/testing/selftests/kvm/x86/vmx_nested_tsc_scaling_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c b/tools= /testing/selftests/kvm/x86/vmx_pmu_caps_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_pmu_caps_test.c rename to tools/testing/selftests/kvm/x86/vmx_pmu_caps_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c= b/tools/testing/selftests/kvm/x86/vmx_preemption_timer_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_preemption_timer_test.c rename to tools/testing/selftests/kvm/x86/vmx_preemption_timer_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c= b/tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_set_nested_state_test.c rename to tools/testing/selftests/kvm/x86/vmx_set_nested_state_test.c diff --git a/tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c b/too= ls/testing/selftests/kvm/x86/vmx_tsc_adjust_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/vmx_tsc_adjust_test.c rename to tools/testing/selftests/kvm/x86/vmx_tsc_adjust_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xapic_ipi_test.c b/tools/te= sting/selftests/kvm/x86/xapic_ipi_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xapic_ipi_test.c rename to tools/testing/selftests/kvm/x86/xapic_ipi_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xapic_state_test.c b/tools/= testing/selftests/kvm/x86/xapic_state_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xapic_state_test.c rename to tools/testing/selftests/kvm/x86/xapic_state_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xcr0_cpuid_test.c b/tools/t= esting/selftests/kvm/x86/xcr0_cpuid_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xcr0_cpuid_test.c rename to tools/testing/selftests/kvm/x86/xcr0_cpuid_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c b/tools/t= esting/selftests/kvm/x86/xen_shinfo_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c rename to tools/testing/selftests/kvm/x86/xen_shinfo_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c b/tools/t= esting/selftests/kvm/x86/xen_vmcall_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xen_vmcall_test.c rename to tools/testing/selftests/kvm/x86/xen_vmcall_test.c diff --git a/tools/testing/selftests/kvm/x86_64/xss_msr_test.c b/tools/test= ing/selftests/kvm/x86/xss_msr_test.c similarity index 100% rename from tools/testing/selftests/kvm/x86_64/xss_msr_test.c rename to tools/testing/selftests/kvm/x86/xss_msr_test.c --=20 2.46.0.295.g3b9ea8a38a-goog From nobody Fri Dec 19 13:47:42 2025 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21331198E81 for ; Mon, 26 Aug 2024 19:01:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698889; cv=none; b=q5R6XfTjW2rDLYWQaGGufB2GGUeJJD3kjW99A6dJo0KP+J1pUDgwaoo8HnBLmsnLq/FNiLEIz2t/EtkqyQw9jLtpCgmXOBX9k25xkVzFbvaFnkivuwiGshKqfYS+IEHm5GxdUWTEFpjZ0A6cV2EZdlkQRk+0UQwIzxk+5QFkKNA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724698889; c=relaxed/simple; bh=Lk53fKPoiIBMswuBHQk1iCnTGbDOOstP2qQpL1OIsUI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=ULOXG8mE3HpenzeoqJf7veEggrGvSLqzxq1qvcOhMWvNTnm3WkQQBAVxu+Lnk3l2z6kFZPLX4IoVd6VrPncjnj3N+XlgEdizF9HmAzKUps9pA9+Zxepr5DoDrQbIc56l0pdWWmzUMeqn3CDoNv7a0DGAa8hHTi13FFOTo4jjzJY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=NPhetXZS; arc=none smtp.client-ip=209.85.219.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NPhetXZS" Received: by mail-yb1-f201.google.com with SMTP id 3f1490d57ef6-e164ceba5ffso7783029276.3 for ; Mon, 26 Aug 2024 12:01:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1724698887; x=1725303687; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=wlfMvk8YP/kQvzhrtnMiI9Fgfb/TBne1V0LIqcoAt2M=; b=NPhetXZSynFxAM425vnGM2I3fircKnodtaPlREK1cFYXm8VkYZ6xIgqi/wai2M3LuC /iVK34TFwAn1DKHry+LPTWj6/EeepiqAmiBzfuG5mQo8U2uMeimA6xyiFawCMSGKh+Cp WB3aynb59QgIM7fN8cb4WbbWo9fb/DExtEykCSNJFxk5OhS7Yx/ZE8ZGtRxGmJp2jbHa fROgvXdL1QLrg21n0kKXB8AAYaTQrrp+BxMn/6elHH7z3I2OC0PC24qxkv5c4yygQ3eG 95qBBq/yh80M2UCuQ75R1e5Q9Ga9mPz5U+cfyyppvrhsYqo3JVZuTSwPz3rQ0KD5vcd/ XX7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724698887; x=1725303687; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wlfMvk8YP/kQvzhrtnMiI9Fgfb/TBne1V0LIqcoAt2M=; b=mLd7d7Kh24uUs9j8wijoYHjuWtcs5WbVxQZe1fPXzQ/HgDhOlpMAYDd8X71Ql23snc USp3K74k7J8jIS1XMyi9CY2B5sLOFLBq1Hr8sZa7U90Wur83H8VVXvmxQcbzzlaVAOAQ EwigqvEUwxoTAULm/0eDWJ8qPlLFYz4NDYbFzFFc6ZQJY04+sl85kss4ZL5cg4+8lMJW GKhgjONK9JpMq67tl88dVXwpUtOUOoBKnnSWFRjbXtwJtSIBviktq12qjdUY0Q5nkz83 arSRKALF2NOOfDSU2L2hkV2AE28ofRt82VhpomGVY9HKvQpqDFUR1dw9TufnJYTxkAcc EqBA== X-Forwarded-Encrypted: i=1; AJvYcCVK29/Ur4BrmQBNvUD9x/ZeqWXoCPqzXyskdV1zC/mLYqmx8jgP7FLWkwMf8OLNPNMTDY3zGyZ00Xkc4lY=@vger.kernel.org X-Gm-Message-State: AOJu0YwSb3x+mgut08O+WwjtemRRiPCNMQMP1mLhHsatOJqlo+lJG2zq 42kbquTEqzYe89JdoId9kAGq3Hr8YZVBp8VjZTSaWG6X2QSmJcSxAreogqsdYlYU8ZwvmWn1n24 vrQ== X-Google-Smtp-Source: AGHT+IEBA6sQPWzAdi8CzCDBzNF24Q7LCGUPm+EBp+JckJEMXbI5RjdBt7EA/qQscaFI/JvHbD6L23p5ztg= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a25:fc0d:0:b0:e0b:f69b:da30 with SMTP id 3f1490d57ef6-e1a2a9430d2mr615276.9.1724698887108; Mon, 26 Aug 2024 12:01:27 -0700 (PDT) Reply-To: Sean Christopherson Date: Mon, 26 Aug 2024 12:01:16 -0700 In-Reply-To: <20240826190116.145945-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20240826190116.145945-1-seanjc@google.com> X-Mailer: git-send-email 2.46.0.295.g3b9ea8a38a-goog Message-ID: <20240826190116.145945-4-seanjc@google.com> Subject: [PATCH 3/3] KVM: selftests: Override ARCH for x86_64 instead of using ARCH_DIR From: Sean Christopherson To: Paolo Bonzini , Marc Zyngier , Oliver Upton , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson , Paul Walmsley , Palmer Dabbelt , Albert Ou Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Muhammad Usama Anjum Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Now that KVM selftests uses the kernel's canonical arch paths, directly override ARCH to 'x86' when targeting x86_64 instead of defining ARCH_DIR to redirect to appropriate paths. ARCH_DIR was originally added to deal with KVM selftests using the target triple ARCH for directories, e.g. s390x and aarch64; keeping it around just to deal with the one-off alias from x86_64=3D>x86 is unnecessary and confusing. Note, even when selftests are built from the top-level Makefile, ARCH is scoped to KVM's makefiles, i.e. overriding ARCH won't trip up some other selftests that (somehow) expects x86_64 and can't work with x86. Signed-off-by: Sean Christopherson --- tools/testing/selftests/kvm/Makefile | 4 +--- tools/testing/selftests/kvm/Makefile.kvm | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests= /kvm/Makefile index a9c1d85905d8..30b1a88aea2e 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile @@ -6,9 +6,7 @@ ARCH ?=3D $(SUBARCH) ifeq ($(ARCH),$(filter $(ARCH),arm64 s390 riscv x86 x86_64)) # Top-level selftests allows ARCH=3Dx86_64 :-( ifeq ($(ARCH),x86_64) - ARCH_DIR :=3D x86 -else - ARCH_DIR :=3D $(ARCH) + ARCH :=3D x86 endif include Makefile.kvm else diff --git a/tools/testing/selftests/kvm/Makefile.kvm b/tools/testing/selft= ests/kvm/Makefile.kvm index 27f4e100c6ac..c8bfd0815a57 100644 --- a/tools/testing/selftests/kvm/Makefile.kvm +++ b/tools/testing/selftests/kvm/Makefile.kvm @@ -197,10 +197,10 @@ TEST_GEN_PROGS_riscv +=3D steal_time SPLIT_TESTS +=3D arch_timer SPLIT_TESTS +=3D get-reg-list =20 -TEST_PROGS +=3D $(TEST_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH_DIR)) -TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH_DIR)) -LIBKVM +=3D $(LIBKVM_$(ARCH_DIR)) +TEST_PROGS +=3D $(TEST_PROGS_$(ARCH)) +TEST_GEN_PROGS +=3D $(TEST_GEN_PROGS_$(ARCH)) +TEST_GEN_PROGS_EXTENDED +=3D $(TEST_GEN_PROGS_EXTENDED_$(ARCH)) +LIBKVM +=3D $(LIBKVM_$(ARCH)) =20 OVERRIDE_TARGETS =3D 1 =20 @@ -212,14 +212,14 @@ include ../lib.mk INSTALL_HDR_PATH =3D $(top_srcdir)/usr LINUX_HDR_PATH =3D $(INSTALL_HDR_PATH)/include/ LINUX_TOOL_INCLUDE =3D $(top_srcdir)/tools/include -LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH_DIR)/include +LINUX_TOOL_ARCH_INCLUDE =3D $(top_srcdir)/tools/arch/$(ARCH)/include CFLAGS +=3D -Wall -Wstrict-prototypes -Wuninitialized -O2 -g -std=3Dgnu99 \ -Wno-gnu-variable-sized-type-not-at-end -MD -MP -DCONFIG_64BIT \ -fno-builtin-memcmp -fno-builtin-memcpy \ -fno-builtin-memset -fno-builtin-strnlen \ -fno-stack-protector -fno-PIE -I$(LINUX_TOOL_INCLUDE) \ -I$(LINUX_TOOL_ARCH_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude \ - -I$(