Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1237660rdb; Fri, 16 Feb 2024 09:11:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUdia7SM8RqcqS01tLv6PCmbd5ndaJEzBf3/NzqG0tM9rAYN2/dPB81mbkytJkKn7U2LLCJWnQ8Qutyxy1CmO6Nv3T24ohNvxRIK8YEXg== X-Google-Smtp-Source: AGHT+IEibEQhtZxlCF1szmOz0l/4AChL29sJHaOJV7CPd5ARxtJaxIeOT3L/oy76aJ38h1OdQcHA X-Received: by 2002:a05:6214:3002:b0:68c:499f:f803 with SMTP id ke2-20020a056214300200b0068c499ff803mr5173047qvb.30.1708103474083; Fri, 16 Feb 2024 09:11:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708103474; cv=pass; d=google.com; s=arc-20160816; b=Sv85+NGtwjKKBoW1qPyG1d+z9MfehKuTCLYffVkCJVpmeqi0QXH6JD1GTIOE9A/Oy0 a1Spd3wWYKCCcgd+W975mIFTjacl98Pqx8iS9erpaqGdYNMHAZqlWNUF6GsTALv8yeOV elzU6Cb6HwfKvELuAxaZORwFzEkntLS1y1SehG9pP6ez9NjSnoa1Ptepog4l6uwW8DVX Gg4mAOV0NZL5KQFHYkNnswD9+r85evWHL0HIQBuNrQBncg61BSmpxB8d1u0vmKYr2K98 MrEBD17bIwh70rplJ0rhhRus8D2OJq81EI0fllcBQFqtK3NlllDZXqrJXuuCD0jMwHhX ys1Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=6Ii0Q1pQtZuRQ3mM3g3FAo2+zpYotLJDehy5Xa9J8kg=; fh=RXl73CWCYIm5aDIRwkpfnnURSCU9og7XETYThrQEo9o=; b=ixXDaWDdxjSXS4SdW31cQoo4blpu/dtcetpny5Mnp3mVSeTg6FjdT/tTSCjpFrpTGM lHcUruR9Uf8kdgWhBTq+fEQ3V0iNcUeiBFb7LL8Jl76uwQIkHr/I4LfXTbTAlNGdujQA lWecoDZinxdDvITkqA2XtjfeWRjzd/cc6LrMQqK0F5gKatVrk0cPppECYrSQgxWCgA77 JFELwp3G2wAVF2R44o7In/5w96BFH21m7hLTg6yLGlBPxC+uJsTm3ufiv+Sxt7M1dvWo 0okmDpIs+PczbBO67i+pvcSqxHzu1/vuoHenH7QDFo6cr1Wf+4cv3WIP/FID3aZrDmcC 0PqQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AFUqjV/i"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-69036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t13-20020a0562140c6d00b0068cc2604333si177179qvj.314.2024.02.16.09.11.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 09:11:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-69036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="AFUqjV/i"; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-69036-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-69036-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3770E1C2315D for ; Fri, 16 Feb 2024 17:11:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B75FB132463; Fri, 16 Feb 2024 17:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="AFUqjV/i" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15793130E3D for ; Fri, 16 Feb 2024 17:10:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708103441; cv=none; b=u/QfCE8QO6Ot7+R8WEJqFhVNloR9ZcWpdUNYIYJSq2Dpe5wiEiGNrBxMD4m6l+gQoGc/vkWUdcH3Rc+PJiIWpMa/FDQ++/EhKVBrw2ula7TgsqUvogXO1HnzxOpTEYyKTNlBupUyoWMeQ5OiQCygGLp+YHAbYdXXuHDxZhvg68c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708103441; c=relaxed/simple; bh=Qb/cffHRD7eH7TywIvhozOLCYtKKMQjojU9VPyw+v+k=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=ljrLddJTPXozTkuBFriZI24l8pDwb5Wj8eyPvz2yv2WJzLyEpl2GuS0NTQgSD0WhxSQhb5M9PdvlxLAXz9ayy9CcXz6zrddhn+bj93uD8uM/XsuplW0YyBt/d2M++ccuJML7CsnKX0nvgDI9yzFrp8VfoHDqCOudu6TED60JieI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=AFUqjV/i; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708103434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=6Ii0Q1pQtZuRQ3mM3g3FAo2+zpYotLJDehy5Xa9J8kg=; b=AFUqjV/iByXVl/3vVnB1yniEwntV5wHS4lUlF8pSBaJwmspOFpa0dJxDXCUc6Ybet8JXgg mBnL67KGgWDif6RqbaG/OS6SMJ5zZOAHQm8akz965ORtt+cEdR41F6XJagxAHJBq1XjH6f GjzpdpWJZmBUFFJpgkj/jvwQOXm6sZc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-54-_L2kYD-PN7y0ildATIRTBg-1; Fri, 16 Feb 2024 12:10:31 -0500 X-MC-Unique: _L2kYD-PN7y0ildATIRTBg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 11722185A781; Fri, 16 Feb 2024 17:10:31 +0000 (UTC) Received: from virtlab701.virt.lab.eng.bos.redhat.com (virtlab701.virt.lab.eng.bos.redhat.com [10.19.152.228]) by smtp.corp.redhat.com (Postfix) with ESMTP id E71912166AE5; Fri, 16 Feb 2024 17:10:30 +0000 (UTC) From: Paolo Bonzini To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: [GIT PULL] KVM fixes and cleanups for 6.8-rc5 Date: Fri, 16 Feb 2024 12:10:30 -0500 Message-Id: <20240216171030.12745-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.6 Linus, The following changes since commit 841c35169323cd833294798e58b9bf63fa4fa1de: Linux 6.8-rc4 (2024-02-11 12:18:13 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus for you to fetch changes up to 9895ceeb5cd61092f147f8d611e2df575879dd6f: Merge tag 'kvmarm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD (2024-02-16 12:02:38 -0500) This pull request is mostly a mix of cleanups and fixes in the KVM selftests, but there are also some small arch/ changes. Paolo ---------------------------------------------------------------- ARM: * Avoid dropping the page refcount twice when freeing an unlinked page-table subtree. * Don't source the VFIO Kconfig twice * Fix protected-mode locking order between kvm and vcpus RISC-V: * Fix steal-time related sparse warnings x86: * Cleanup gtod_is_based_on_tsc() to return "bool" instead of an "int" * Make a KVM_REQ_NMI request while handling KVM_SET_VCPU_EVENTS if and only if the incoming events->nmi.pending is non-zero. If the target vCPU is in the UNITIALIZED state, the spurious request will result in KVM exiting to userspace, which in turn causes QEMU to constantly acquire and release QEMU's global mutex, to the point where the BSP is unable to make forward progress. * Fix a type (u8 versus u64) goof that results in pmu->fixed_ctr_ctrl being incorrectly truncated, and ultimately causes KVM to think a fixed counter has already been disabled (KVM thinks the old value is '0'). * Fix a stack leak in KVM_GET_MSRS where a failed MSR read from userspace that is ultimately ignored due to ignore_msrs=true doesn't zero the output as intended. Selftests cleanups and fixes: * Remove redundant newlines from error messages. * Delete an unused variable in the AMX test (which causes build failures when compiling with -Werror). * Fail instead of skipping tests if open(), e.g. of /dev/kvm, fails with an error code other than ENOENT (a Hyper-V selftest bug resulted in an EMFILE, and the test eventually got skipped). * Fix TSC related bugs in several Hyper-V selftests. * Fix a bug in the dirty ring logging test where a sem_post() could be left pending across multiple runs, resulting in incorrect synchronization between the main thread and the vCPU worker thread. * Relax the dirty log split test's assertions on 4KiB mappings to fix false positives due to the number of mappings for memslot 0 (used for code and data that is NOT being dirty logged) changing, e.g. due to NUMA balancing. ---------------------------------------------------------------- Andrew Jones (8): KVM: selftests: Remove redundant newlines KVM: selftests: aarch64: Remove redundant newlines KVM: selftests: riscv: Remove redundant newlines KVM: selftests: s390x: Remove redundant newlines KVM: selftests: x86_64: Remove redundant newlines RISC-V: paravirt: steal_time should be static RISC-V: paravirt: Use correct restricted types RISC-V: KVM: Use correct restricted types Masahiro Yamada (1): KVM: arm64: Do not source virt/lib/Kconfig twice Mathias Krause (1): KVM: x86: Fix KVM_GET_MSRS stack info leak Mingwei Zhang (1): KVM: x86/pmu: Fix type length error when reading pmu->fixed_ctr_ctrl Paolo Bonzini (5): Merge tag 'kvm-x86-fixes-6.8-rcN' of https://github.com/kvm-x86/linux into HEAD Merge tag 'kvm-x86-selftests-6.8-rcN' of https://github.com/kvm-x86/linux into HEAD Merge tag 'kvm-riscv-fixes-6.8-1' of https://github.com/kvm-riscv/linux into HEAD Merge tag 'kvmarm-fixes-6.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Merge tag 'kvmarm-fixes-6.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD Prasad Pandit (1): KVM: x86: make KVM_REQ_NMI request iff NMI pending for vcpu Sean Christopherson (4): KVM: selftests: Reword the NX hugepage test's skip message to be more helpful KVM: selftests: Delete superfluous, unused "stage" variable in AMX test KVM: selftests: Fix a semaphore imbalance in the dirty ring logging test KVM: selftests: Don't assert on exact number of 4KiB in dirty log split test Sebastian Ene (1): KVM: arm64: Fix circular locking dependency Vitaly Kuznetsov (7): KVM: selftests: Avoid infinite loop in hyperv_features when invtsc is missing KVM: selftests: Fail tests when open() fails with !ENOENT KVM: selftests: Generalize check_clocksource() from kvm_clock_test KVM: selftests: Use generic sys_clocksource_is_tsc() in vmx_nested_tsc_scaling_test KVM: selftests: Run clocksource dependent tests with hyperv_clocksource_tsc_page too KVM: selftests: Make hyperv_clock require TSC based system clocksource KVM: x86: Make gtod_is_based_on_tsc() return 'bool' Will Deacon (1): KVM: arm64: Fix double-free following kvm_pgtable_stage2_free_unlinked() arch/arm64/kvm/Kconfig | 1 - arch/arm64/kvm/hyp/pgtable.c | 2 - arch/arm64/kvm/pkvm.c | 27 +++++++---- arch/riscv/kernel/paravirt.c | 6 +-- arch/riscv/kvm/vcpu_sbi_sta.c | 20 ++++---- arch/x86/kvm/vmx/pmu_intel.c | 2 +- arch/x86/kvm/x86.c | 20 ++++---- tools/testing/selftests/kvm/aarch64/arch_timer.c | 12 ++--- tools/testing/selftests/kvm/aarch64/hypercalls.c | 16 +++---- .../selftests/kvm/aarch64/page_fault_test.c | 6 +-- tools/testing/selftests/kvm/aarch64/smccc_filter.c | 2 +- .../selftests/kvm/aarch64/vpmu_counter_access.c | 12 ++--- tools/testing/selftests/kvm/demand_paging_test.c | 4 +- tools/testing/selftests/kvm/dirty_log_perf_test.c | 4 +- tools/testing/selftests/kvm/dirty_log_test.c | 54 ++++++++++++---------- tools/testing/selftests/kvm/get-reg-list.c | 2 +- tools/testing/selftests/kvm/guest_print_test.c | 8 ++-- .../testing/selftests/kvm/hardware_disable_test.c | 6 +-- tools/testing/selftests/kvm/include/test_util.h | 2 + .../selftests/kvm/include/x86_64/processor.h | 2 + tools/testing/selftests/kvm/kvm_create_max_vcpus.c | 2 +- tools/testing/selftests/kvm/kvm_page_table_test.c | 4 +- .../testing/selftests/kvm/lib/aarch64/processor.c | 2 +- tools/testing/selftests/kvm/lib/aarch64/vgic.c | 4 +- tools/testing/selftests/kvm/lib/elf.c | 2 +- tools/testing/selftests/kvm/lib/kvm_util.c | 19 ++++---- tools/testing/selftests/kvm/lib/memstress.c | 2 +- tools/testing/selftests/kvm/lib/riscv/processor.c | 2 +- tools/testing/selftests/kvm/lib/s390x/processor.c | 2 +- tools/testing/selftests/kvm/lib/test_util.c | 25 ++++++++++ tools/testing/selftests/kvm/lib/userfaultfd_util.c | 2 +- tools/testing/selftests/kvm/lib/x86_64/processor.c | 21 +++++++-- tools/testing/selftests/kvm/lib/x86_64/vmx.c | 6 +-- .../kvm/memslot_modification_stress_test.c | 2 +- tools/testing/selftests/kvm/memslot_perf_test.c | 6 +-- tools/testing/selftests/kvm/riscv/get-reg-list.c | 2 +- tools/testing/selftests/kvm/rseq_test.c | 4 +- tools/testing/selftests/kvm/s390x/resets.c | 4 +- tools/testing/selftests/kvm/s390x/sync_regs_test.c | 20 ++++---- .../testing/selftests/kvm/set_memory_region_test.c | 6 +-- .../selftests/kvm/system_counter_offset_test.c | 2 +- tools/testing/selftests/kvm/x86_64/amx_test.c | 6 +-- tools/testing/selftests/kvm/x86_64/cpuid_test.c | 4 +- .../kvm/x86_64/dirty_log_page_splitting_test.c | 21 +++++---- .../testing/selftests/kvm/x86_64/flds_emulation.h | 2 +- tools/testing/selftests/kvm/x86_64/hyperv_clock.c | 5 +- .../testing/selftests/kvm/x86_64/hyperv_features.c | 9 ++-- tools/testing/selftests/kvm/x86_64/hyperv_ipi.c | 2 +- .../selftests/kvm/x86_64/hyperv_tlb_flush.c | 2 +- .../testing/selftests/kvm/x86_64/kvm_clock_test.c | 42 ++--------------- .../selftests/kvm/x86_64/nx_huge_pages_test.c | 6 +-- .../selftests/kvm/x86_64/platform_info_test.c | 2 +- .../selftests/kvm/x86_64/pmu_event_filter_test.c | 2 +- .../selftests/kvm/x86_64/sev_migrate_tests.c | 28 +++++------ .../kvm/x86_64/smaller_maxphyaddr_emulation_test.c | 4 +- .../testing/selftests/kvm/x86_64/sync_regs_test.c | 10 ++-- .../selftests/kvm/x86_64/ucna_injection_test.c | 8 ++-- .../selftests/kvm/x86_64/userspace_io_test.c | 2 +- .../selftests/kvm/x86_64/vmx_apic_access_test.c | 2 +- .../selftests/kvm/x86_64/vmx_dirty_log_test.c | 16 +++---- .../vmx_exception_with_invalid_guest_state.c | 2 +- .../kvm/x86_64/vmx_nested_tsc_scaling_test.c | 19 +------- .../testing/selftests/kvm/x86_64/xapic_ipi_test.c | 8 ++-- .../testing/selftests/kvm/x86_64/xcr0_cpuid_test.c | 2 +- tools/testing/selftests/kvm/x86_64/xss_msr_test.c | 2 +- 65 files changed, 277 insertions(+), 276 deletions(-)