Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp55728lqm; Tue, 30 Apr 2024 12:34:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMI9HPe/I1OO8hNN+CzOupZ48yZKKp9kex9c+UmRo/Ju5ConhVuNUR6WSCHxBaScJ6EiFBITlFqZveEnhdV5Qf1Zq0epHvo7xh1SCirw== X-Google-Smtp-Source: AGHT+IEYYbGheIU2qK+r/qG3bImFVKrD/560CCSB7hwo2P8aeMbZn5N0e3OAeLGexU5D3wL1f4sn X-Received: by 2002:a05:6a00:3c94:b0:6ea:bb00:dbb6 with SMTP id lm20-20020a056a003c9400b006eabb00dbb6mr751136pfb.8.1714505659693; Tue, 30 Apr 2024 12:34:19 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714505659; cv=pass; d=google.com; s=arc-20160816; b=XPyryWG6IWV4sL9mL+iCFbejLw+D09CacSEykXOlVRYp18Wic9AWEH1vgHguIFc4/J O8KABagnTqR7gWFAfQsF6m3xBNIdISRhkTP1d6rfY7eCTjRYvUPYtA0J+Oz/c3NeBBBO JcfsHMxQfSsTUnqTzlBlhKCf8LwUwYfArl4TunyCTm/EhYq2VB7px1y4JH+aVh+tnq50 cLAlWRAjdu5sWQCKXwnJygUhbC1Bq3Cd2NU5fga+bJda39SKHpjs8KZSNpcPXmmTURIQ ZaMYxtpq4Ebcv81Z0TifJa7bAg4tn3juRllghCZgCVMS6APam1+I4aUGir4uv9D0Br2L 7sMg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :reply-to:dkim-signature; bh=zlyEud5d/bhoGiNpMEEmnNOfWYjdDQf4ZBXlBrFZHdU=; fh=QAjw8IZMFi+8MD7L14DDeMEdZO3tyIQcpAC3b61oaZE=; b=k02AyIhsOsBcm5hBLjqZnK5SLEsB6/Zg9LXYcOymDQ14XXvppK+qSS/HpQqikDe6/Y nKvfK2pDhW5RUZPkSaMhgJGL9ZcrtbsCv5JYE5C/HuGfzeZMJP+/yUqo9a7TcVu6MwR9 nqGy6hq6Th4hFkPyBoAyg+uIkpXK70LgOdqZqTLi4W9xqUoUi+yvZ7/nxlYqh6o5S5iu JobdmhUohHh/81TWZvsaTVVUvRGIRWQBKJYzOnVFKWJ/YsdU0MEYzD2HTkwbmc8pOi1B DY1j6Lhjkk3g7cjaKdeaXPb3/br8ewKJ0xCDTj9DEyL8Vj2EjCyxRVu+/+VijEg9qsyM 3Kxg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MsPRclbO; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w10-20020a056a0014ca00b006eac82adfd4si22853841pfu.152.2024.04.30.12.34.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 12:34:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MsPRclbO; arc=pass (i=1 spf=pass spfdomain=flex--seanjc.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-164646-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164646-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CC8F2285860 for ; Tue, 30 Apr 2024 19:33:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 59D291BED9F; Tue, 30 Apr 2024 19:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MsPRclbO" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.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 A6DCD1BED6D for ; Tue, 30 Apr 2024 19:32:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714505532; cv=none; b=WBHNUsqpvvtdxUBU1318O4giHZI1O/DPIpSw/PMfNlQj4WhDpYZ5MQGYjrDDz0LgpuKs6UCxsgSuIelmW3eZRZccuq4X6P4CYfUfbKprFPOZ9sr+dANILx/HGfRf6wWav6i9HC/jwyI5YGFg3dlLNRn+lZrfnaOtVGzMdOEd4Uo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714505532; c=relaxed/simple; bh=9MhcqD3oLMqfUjo9TWK3GGfH4maBAFWA/FNunEEvlt0=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=pcr+vXhdmpr967tf+1WmXz3iVuxwbkx2vcTJ2JTvDHu+Oj3zlBRLsfFXLCNMl5uJxsqVSxhM2BEVq9OHpDWv3ZWI0crYhDRlsTCrVa/xF+a73/n9qcf+kJ4o2w6t5CqTVWn8SdJXyYT6pbFDuw5j3Mfa8QzIwS+qTr8hh2LG4s0= 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=MsPRclbO; arc=none smtp.client-ip=209.85.128.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 Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-61bd64c9eadso44534057b3.3 for ; Tue, 30 Apr 2024 12:32:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1714505529; x=1715110329; 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=zlyEud5d/bhoGiNpMEEmnNOfWYjdDQf4ZBXlBrFZHdU=; b=MsPRclbOMMYK0Lbgrn14Uwt9UJd03dzLxDN6GDcbHIJY79k6Qajw4KY1t5Gj12ioKY tK1/P25DwUWrA6eu3S2p2kaGq/JMKd02vpeGM8IxxxuKFX3FO6Br+07LSdbtU1oPlkLP UJkAnpCe/uzmphUvQTC4LDdgC8Y3I3PLYfC9i/27sh/dpJXRHo9VuqRVNH9rMtib9OhV VXCsku3QBHMsUQ2hiaqoZd85fIZIPR5hMwRvZf7uYhcgrMuzNWiHuf2tdsIS6UoZQfxA LWq0xE0hf5oYe/9DQ7gcHh3m0P039KpPwqrgfNJBzJ6uFzJac3wOxB3hlc0LVEXwm+ee kLZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714505529; x=1715110329; 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=zlyEud5d/bhoGiNpMEEmnNOfWYjdDQf4ZBXlBrFZHdU=; b=dJF4+9MKjbH7OfwrYMgzJdnlw8hqUW1XJivFCwSmp4Ypi6kTByNE8XsMniPpJWMV1/ BOl602IHGOIP2DYiOI5cIAPC49jU28+3uVdZ8k6vaJUuP6CYrih3aCc83s2NjPeqt+rn /rlv6/OekKis8BsTlw+xosu8GFiTaIwYHS4rbx19ZEYM3RqRmC8eWjrEoZr8oXAPnpZF kr7I3qHVGj52xTl1jz8FvEp0OkiQUmXb9uvxlbnOT2N0ORcPSX+C6KpYxrxK+6G78B53 iCAEjtUFW3nla2pI3WZeXJsFi3oNNyJ5sfvTUN/YgJdFrsi+/SgIVhbFB4cjBLzi81Lu PU9g== X-Forwarded-Encrypted: i=1; AJvYcCVdolmDuvf16YKgxE7ht72kXnj4rTXm2SQUjknJmMviP5283CVeBOmD0dV8eqCuOSYC/lNJhkpJm7xDM7XRWAImEmxrfEzRZD2YxHb8 X-Gm-Message-State: AOJu0YzWmIBTReVCUXFNlFIzQ2+KKfiaNLQaJdiBaJA+D+UKgmh2uYkh iwgkB41JF8SdBQTDuLEIaTpy6X0GHmuxl/vgT/i5vgCFQn1OTeTgG4YksSv1osb5OStgY6QL5+m SKg== X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a0d:d2c5:0:b0:61d:3304:c25e with SMTP id u188-20020a0dd2c5000000b0061d3304c25emr134509ywd.7.1714505528716; Tue, 30 Apr 2024 12:32:08 -0700 (PDT) Reply-To: Sean Christopherson Date: Tue, 30 Apr 2024 12:31:57 -0700 In-Reply-To: <20240430193157.419425-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: <20240430193157.419425-1-seanjc@google.com> X-Mailer: git-send-email 2.45.0.rc0.197.gbae5840b3b-goog Message-ID: <20240430193157.419425-5-seanjc@google.com> Subject: [PATCH 4/4] KVM: Delete the now unused kvm_arch_sched_in() From: Sean Christopherson To: Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Sean Christopherson , Paolo Bonzini Cc: linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Delete kvm_arch_sched_in() now that all implementations are nops. Signed-off-by: Sean Christopherson --- arch/arm64/include/asm/kvm_host.h | 1 - arch/loongarch/include/asm/kvm_host.h | 1 - arch/mips/include/asm/kvm_host.h | 1 - arch/powerpc/include/asm/kvm_host.h | 1 - arch/riscv/include/asm/kvm_host.h | 1 - arch/s390/include/asm/kvm_host.h | 1 - arch/x86/kvm/pmu.c | 6 +++--- arch/x86/kvm/x86.c | 5 ----- include/linux/kvm_host.h | 2 -- virt/kvm/kvm_main.c | 1 - 10 files changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/arm64/include/asm/kvm_host.h b/arch/arm64/include/asm/kvm_host.h index 9e8a496fb284..a12d3bb0b590 100644 --- a/arch/arm64/include/asm/kvm_host.h +++ b/arch/arm64/include/asm/kvm_host.h @@ -1180,7 +1180,6 @@ static inline bool kvm_system_needs_idmapped_vectors(void) } static inline void kvm_arch_sync_events(struct kvm *kvm) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} void kvm_arm_init_debug(void); void kvm_arm_vcpu_init_debug(struct kvm_vcpu *vcpu); diff --git a/arch/loongarch/include/asm/kvm_host.h b/arch/loongarch/include/asm/kvm_host.h index 69305441f40d..64ca60a3ce24 100644 --- a/arch/loongarch/include/asm/kvm_host.h +++ b/arch/loongarch/include/asm/kvm_host.h @@ -228,7 +228,6 @@ static inline bool kvm_is_ifetch_fault(struct kvm_vcpu_arch *arch) static inline void kvm_arch_hardware_unsetup(void) {} static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_block_finish(struct kvm_vcpu *vcpu) {} diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 179f320cc231..6743a57c1ab4 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -890,7 +890,6 @@ static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *slot) {} static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {} diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 8abac532146e..c4fb6a27fb92 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -897,7 +897,6 @@ struct kvm_vcpu_arch { static inline void kvm_arch_sync_events(struct kvm *kvm) {} static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {} static inline void kvm_arch_flush_shadow_all(struct kvm *kvm) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} static inline void kvm_arch_vcpu_blocking(struct kvm_vcpu *vcpu) {} static inline void kvm_arch_vcpu_unblocking(struct kvm_vcpu *vcpu) {} diff --git a/arch/riscv/include/asm/kvm_host.h b/arch/riscv/include/asm/kvm_host.h index 484d04a92fa6..6cd7a576ef14 100644 --- a/arch/riscv/include/asm/kvm_host.h +++ b/arch/riscv/include/asm/kvm_host.h @@ -272,7 +272,6 @@ struct kvm_vcpu_arch { }; static inline void kvm_arch_sync_events(struct kvm *kvm) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} #define KVM_RISCV_GSTAGE_TLB_MIN_ORDER 12 diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h index 95990461888f..e9fcaf4607a6 100644 --- a/arch/s390/include/asm/kvm_host.h +++ b/arch/s390/include/asm/kvm_host.h @@ -1045,7 +1045,6 @@ extern int kvm_s390_gisc_register(struct kvm *kvm, u32 gisc); extern int kvm_s390_gisc_unregister(struct kvm *kvm, u32 gisc); static inline void kvm_arch_sync_events(struct kvm *kvm) {} -static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} static inline void kvm_arch_free_memslot(struct kvm *kvm, struct kvm_memory_slot *slot) {} static inline void kvm_arch_memslots_updated(struct kvm *kvm, u64 gen) {} diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index c397b28e3d1b..75346a588e13 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -521,9 +521,9 @@ void kvm_pmu_handle_event(struct kvm_vcpu *vcpu) } /* - * Unused perf_events are only released if the corresponding MSRs - * weren't accessed during the last vCPU time slice. kvm_arch_sched_in - * triggers KVM_REQ_PMU if cleanup is needed. + * Release unused perf_events if the corresponding guest MSRs weren't + * accessed during the last vCPU time slice (need_cleanup is set when + * the vCPU is scheduled back in). */ if (unlikely(pmu->need_cleanup)) kvm_pmu_cleanup(vcpu); diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 9b0a21f2e56e..17d6ce0d4fa6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -12577,11 +12577,6 @@ bool kvm_vcpu_is_bsp(struct kvm_vcpu *vcpu) return (vcpu->arch.apic_base & MSR_IA32_APICBASE_BSP) != 0; } -void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) -{ - -} - void kvm_arch_free_vm(struct kvm *kvm) { #if IS_ENABLED(CONFIG_HYPERV) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 2f5e35eb7eab..85b6dd7927fe 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -1496,8 +1496,6 @@ int kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg); int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu); -void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu); - void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu, bool sched_in); void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu); int kvm_arch_vcpu_precreate(struct kvm *kvm, unsigned int id); diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 4a4b29a9bace..b154b22a3b84 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -6278,7 +6278,6 @@ static void kvm_sched_in(struct preempt_notifier *pn, int cpu) WRITE_ONCE(vcpu->ready, false); __this_cpu_write(kvm_running_vcpu, vcpu); - kvm_arch_sched_in(vcpu, cpu); kvm_arch_vcpu_load(vcpu, cpu, true); } -- 2.45.0.rc0.197.gbae5840b3b-goog