From nobody Sat Feb 7 17:20:27 2026 Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) (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 9B7CB231826 for ; Thu, 16 Oct 2025 19:06:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641610; cv=none; b=pnj9yI8OljOAmUdBlEgACRuPRn5X9VVV8MFHhp66BR0zS3zWZZaXgmrEP19QagDrEbiEk4UTZh7PyDhTWvrO8I5ip9mXiD/Qy50KElUpvs0BBTgcJw3Vu+TWkBIp30+yGm0JYShbnFZGaYqoU/rnYkgtxWs5tNsZmRM7ZGZRM8Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641610; c=relaxed/simple; bh=1NNZtBX4vGx4VJF0uIvn2QpszEkMNfAVIYtn426uZyQ=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=IKLdAIukxQHIMSKC6UZrxMKKKoemPHMXCsqcwdhRfikBZ/4EdJ3e9b7U/4t/gk19tTWjQz8Itdko9MoBvM+gKYR+jRg9o/yqKw/r5jTgO+w0Q+tKbN0UiKRePtzgZXpsywZqLLWkmQBWv8Haja1VMrbwr0zEoD7k6LuXLya8acw= 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=An1dDrui; arc=none smtp.client-ip=209.85.216.73 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="An1dDrui" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-334b0876195so1282383a91.1 for ; Thu, 16 Oct 2025 12:06:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760641608; x=1761246408; 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=2FBI/jTyFqvWpPCAAjt8bixaueCeUGyDdzttb57ymdc=; b=An1dDruiPvAI7UqMWxt8oiTmNQYuVOHBZJmjfc+OsYokpW2yHR5FKlxR7qzVuCX5+g ePOAyWxdbWYC8eTjldHaEILTFypPA7/GODBkfnw3iqCACk/z0vMWAZl2m/AaCKUAkcTA YZouFM+b7PPg9mvpSV2AX9ksOvXv0ARyMzPpyeXS58an47FCqbyKHzDQmhq4IO9Ni3Gr l81ayHXZPwJpIESNHW19hMzuCkXWbiyAKC8pjfmXIVm602x9vH3gKPPp9oeIQZAFIBTa UHxV2jqeH/Np6wSix4QAckqbqH5GgfURzhUJZn37vn8uQaFiVwwkiC7qveyv6RE/hoE3 dzPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760641608; x=1761246408; 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=2FBI/jTyFqvWpPCAAjt8bixaueCeUGyDdzttb57ymdc=; b=Km+dmmd/730ibGONHgaJoRSlR9WKQwjNoGy/MbrYm6vviOyOGhFKUEydZLas4QaCdB epmR3WVpnBTopvKdqwoIDvJWGhUqCdS1Wv2qEfuhDRZeOiJMxXy04M0Qs4xBt10BtczY erwYBwlRzQGziWA136+S4ws8/quudeXi88o3d/6/imUe76vYCIlkXeEbOZeEFDzi84jk niPsoMqvCA6ANfuwNiP024rOGtk/5Fx4PZTC7v/Iy6WV5R9oUEfsfzkh5lcnUbYC98ea qIBRomzeS3xAI60oBqPkCX63CuaM2zyJKjTFEkIXGidTkdtWUaFrTfH7hr8EI30ykL0j 3T6Q== X-Forwarded-Encrypted: i=1; AJvYcCUC32jXcAk/QYIyY2LGyldkxe1A7GtrrDvVVeTTE0uYDAa6eW26B8em4Fobed621baftGqVHMArcbQjWrk=@vger.kernel.org X-Gm-Message-State: AOJu0YwpFj8UCKiMrbOnDzpTgQCUNYIBCU1oqczd1Tgq8FBkw6jwjsAr XGaYU86iWokg4fu+Wl1jSN39lZHNnyczXOtZM9tlaoUsZEAWxFr4pEuFiW8X7/26XLw/fC1fR6E NucCjUg== X-Google-Smtp-Source: AGHT+IFPCh5QHnR3s6IwP9yRM/hM8XSFNywPo88lmC/FPgqIdiJoBh5t3elf7i7+ZJStDHte/+8onCn6Xwc= X-Received: from pjqc13.prod.google.com ([2002:a17:90a:a60d:b0:33b:ba24:b204]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4b4b:b0:330:7a32:3290 with SMTP id 98e67ed59e1d1-33bcf939e7bmr931582a91.37.1760641607748; Thu, 16 Oct 2025 12:06:47 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 16 Oct 2025 12:06:41 -0700 In-Reply-To: <20251016190643.80529-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: <20251016190643.80529-1-seanjc@google.com> X-Mailer: git-send-email 2.51.0.858.gf9c4a03a3a-goog Message-ID: <20251016190643.80529-2-seanjc@google.com> Subject: [PATCH 1/3] KVM: SVM: Initialize per-CPU svm_data at the end of hardware setup From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Hou Wenlong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Setup the per-CPU SVM data structures at the very end of hardware setup so that svm_hardware_unsetup() can be used in svm_hardware_setup() to unwind AVIC setup (for the GALog notifier). Alternatively, the error path could do an explicit, manual unwind, e.g. by adding a helper to free the per-CPU structures. But the per-CPU allocations have no interactions or dependencies, i.e. can comfortably live at the end, and so converting to a manual unwind would introduce churn and code without providing any immediate advantage. Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/svm.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 153c12dbf3eb..efc3a7adebef 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -5386,12 +5386,6 @@ static __init int svm_hardware_setup(void) =20 svm_hv_hardware_setup(); =20 - for_each_possible_cpu(cpu) { - r =3D svm_cpu_init(cpu); - if (r) - goto err; - } - enable_apicv =3D avic_hardware_setup(); if (!enable_apicv) { enable_ipiv =3D false; @@ -5435,6 +5429,13 @@ static __init int svm_hardware_setup(void) svm_set_cpu_caps(); =20 kvm_caps.inapplicable_quirks &=3D ~KVM_X86_QUIRK_CD_NW_CLEARED; + + for_each_possible_cpu(cpu) { + r =3D svm_cpu_init(cpu); + if (r) + goto err; + } + return 0; =20 err: --=20 2.51.0.858.gf9c4a03a3a-goog From nobody Sat Feb 7 17:20:27 2026 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (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 846F423EAA9 for ; Thu, 16 Oct 2025 19:06:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641612; cv=none; b=eXnRadwVWVad0xnqoRJpdYojEg0dMVkYnJyXMPEMNG0Hsdy6BMgS6buWLLIwH/zh4Dz/ExPhdUIoE2Km/Alliy+11oe1Qotgm+7yTjaoBc1TgUhIeEDU1DenYHofviZE7zdCVSr7gMvzNEkFUQV31KzfURy48N7SD4Up2DH3N1U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641612; c=relaxed/simple; bh=JW7z3gtYmIQD/6S+niMhVW/nJMbFcqzAxLFUZZrB7nI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=a6iN2IGLYbAtiy1UuT/iX+dBVau3ZiE5M2JP5epYgiqtCcbp4BQ9+JCZVGWWpiJ2xtz/Qnu1B5j3cx+FWYqu4WjHMXUGNrREoekSaff38UwT6svaA1FaNo9PrKHsNAPr3KsxTqIkW6qV/v2+p9nCfm6QyUd7Ga6eDUnbt3fjBTY= 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=AqmNKDUA; arc=none smtp.client-ip=209.85.216.74 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="AqmNKDUA" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-32ec69d22b2so1088288a91.1 for ; Thu, 16 Oct 2025 12:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760641610; x=1761246410; 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=5P6dDSNCmzKxfhpp1ZNZBmUurWs72xNNugKaW5ETdDE=; b=AqmNKDUAW0Yq01tklGDt1TRrkGpb0Z/9sfIqtTXAE3ex8JpLrWhF5IY2z7wEXSD/1w iiBiavOfPZjp6kkDuxHcxTwQSTMzxxQ/fyTJr7PqCIQdXkp/7ZqNn9vMnyTTyNzL/okF 6g89H6/mWp6mAL+m6YUTVd5HQf8rU561UDTPy3HFm54zaYi7gaPMsuHOkuyIV+sK6KLi jqIVE1iEOTUQI8OcyZzz9drcfmz8u62mMTuG3IgY6qpT9k9fKsZRM6va/3YwswmtwYIg 1TR6tZhe/dCwg/ncWtDb+kzMa3rMdu8sVyyGaLQ8E+qOA3m1yZNfPsTI+z7zcXWxOzyh bjcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760641610; x=1761246410; 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=5P6dDSNCmzKxfhpp1ZNZBmUurWs72xNNugKaW5ETdDE=; b=AHe4UeCzGgdRe61S6LY+NwFUxV+HP7fQwTFm7eVjGjHaZrHdIVC8WPtoTRnChR+fJM O3Grt62ZiWdoAlzagxMv9VP9mKQ7/ykaDjs5PhNXHKMaITYlzwwHtazBRa5HbeU0BTs8 GZ0d1RmOlRgoiEeNBdsjCPGevv1xI+mJjsTdmpRdOzYYNfoQD5Xsdx76pH6KXkpnbNCi aWTct9BcW0OA9oUKKOLjjppDPKRqJROFwAtXPKzqjmZEbFsT0Wi3I9eYUIWKyBOAmg0g HYSghoUudnKaE0z/IAUFHaomTBFlS+zy/r3GajF1KUQ6LbOf/ELHJEiwNgJy1/ZAPBol xZBA== X-Forwarded-Encrypted: i=1; AJvYcCVTOkI1g/d7nzkK/3u5CD/p32PCSa3nQfhyZpg5VplkLbb4qiCb3UKVN1hMzif4jBkg8KJC9s2uSEbPU+E=@vger.kernel.org X-Gm-Message-State: AOJu0YxeK+kCTaYtcsyxpUtLA0YR6Sq1pv4+8pgKE8bVIl0NWQwe/Um5 /NNfDpnWGshAqJJFjTdUrgD621EfHB4XzJujgQ7JRc0NQmhFvG/IFsZKfK7NNc2GkLnit3L9po2 diDfnBQ== X-Google-Smtp-Source: AGHT+IEMLXxrebXUQYBUfsHF/iy3T21DrB/adBG7La2FMSta2+1nwRvulay3zG1CBGfpRlpxfBI2SicAWfc= X-Received: from pjzm20.prod.google.com ([2002:a17:90b:694:b0:33b:9e40:1a48]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90a:ec8b:b0:32b:6145:fa63 with SMTP id 98e67ed59e1d1-33bcf860229mr1201741a91.4.1760641609799; Thu, 16 Oct 2025 12:06:49 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 16 Oct 2025 12:06:42 -0700 In-Reply-To: <20251016190643.80529-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: <20251016190643.80529-1-seanjc@google.com> X-Mailer: git-send-email 2.51.0.858.gf9c4a03a3a-goog Message-ID: <20251016190643.80529-3-seanjc@google.com> Subject: [PATCH 2/3] KVM: SVM: Unregister KVM's GALog notifier on kvm-amd.ko exit From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Hou Wenlong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Unregister the GALog notifier (used to get notified of wake events for blocking vCPUs) on kvm-amd.ko exit so that a KVM or IOMMU driver bug that results in a spurious GALog event "only" results in a spurious IRQ, and doesn't trigger a use-after-free due to executing unloaded module code. Fixes: 5881f73757cc ("svm: Introduce AMD IOMMU avic_ga_log_notifier") Reported-by: Hou Wenlong Closes: https://lore.kernel.org/all/20250918130320.GA119526@k08j02272.eu95s= qa Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/avic.c | 6 ++++++ arch/x86/kvm/svm/svm.c | 2 ++ arch/x86/kvm/svm/svm.h | 1 + 3 files changed, 9 insertions(+) diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c index f286b5706d7c..3ab74f2bd584 100644 --- a/arch/x86/kvm/svm/avic.c +++ b/arch/x86/kvm/svm/avic.c @@ -1243,3 +1243,9 @@ bool __init avic_hardware_setup(void) =20 return true; } + +void avic_hardware_unsetup(void) +{ + if (avic) + amd_iommu_register_ga_log_notifier(NULL); +} diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index efc3a7adebef..76055c0ba177 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -921,6 +921,8 @@ static void svm_hardware_unsetup(void) { int cpu; =20 + avic_hardware_unsetup(); + sev_hardware_unsetup(); =20 for_each_possible_cpu(cpu) diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h index e4b04f435b3d..b0fe40c21728 100644 --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -805,6 +805,7 @@ extern struct kvm_x86_nested_ops svm_nested_ops; ) =20 bool __init avic_hardware_setup(void); +void avic_hardware_unsetup(void); int avic_ga_log_notifier(u32 ga_tag); void avic_vm_destroy(struct kvm *kvm); int avic_vm_init(struct kvm *kvm); --=20 2.51.0.858.gf9c4a03a3a-goog From nobody Sat Feb 7 17:20:27 2026 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.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 7504123816A for ; Thu, 16 Oct 2025 19:06:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641615; cv=none; b=BtZ8gZnPrdXLPZJe1EYY1csC55TZprMrJoeXNgkcy72pY+TO2T51vACQWp11Cc2ed4GSzZlziFDbHKGSySckDQ+ULijFsNYwelV3ibcFLJwe4cNOMpCAm/hzcnKFgtnjNgrroVz2DcjxhnL+SXdlSBU9VCvVptaNabI0A7t4hRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760641615; c=relaxed/simple; bh=YBxESa1CpdXRaPWaeva+4lHFBA8rLlw/72FIwmffHyI=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=btmnyYrzewLT/Yjh0WcV+JUzbsbneLGnorPCPmbqf1+LjXsONeZ0CMzpuoG2in2BuYBZwLwS7N4SUAKfAC8mxBmZhY4qb8i7kmTN2GOEw+azsHybCmZo7cSWSbXnNo6jMurZTAn7zyuHFqftwEWCF+hRXijL+RklL3IcW5z0Iv0= 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=QqTGUXj6; arc=none smtp.client-ip=209.85.214.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="QqTGUXj6" Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-2681623f927so10692825ad.0 for ; Thu, 16 Oct 2025 12:06:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1760641614; x=1761246414; 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=LABRqD9aUZpUjVf9UfWBC/peaZw13rHiQXEQ8T+Co+c=; b=QqTGUXj6Kvo5pGOCVucnTuR7nVHE+jW+cRQeqvEumQcV7kKPBEjpBX9r3exbpjJuoQ se/cu+I0639UX7lOKB4Zh/eMJpGUTtIbbSUiVELLNnI2RcmXiBrMWarrh0ErzDSllVV/ vJTOm4lMMjwZJbDtcoy4kpu9vhH1TuxhrCk/uXt3lZ/HaFbL9DYgePOnkbiZvPJQ2Hs5 P/8TollonBRepGzsqHqSw5uTYxf7d7NizJBodNuASBrBEBNFi8a7M8ORJnSmn0609Bm6 iRTZLwhtL7DFkwxXVGeh/ktnnNMHsaXTQ9k1kewNTPdJPpI1pn/9JoETIkAJynv3L4hh 0BaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760641614; x=1761246414; 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=LABRqD9aUZpUjVf9UfWBC/peaZw13rHiQXEQ8T+Co+c=; b=CDoCf4qPbUiGStb7OiKGzzq2O9ku3TKl3lCoASdTaQc1yhxNwJwjcJGskLmlBJVt5r i8uO4zlUuXePzA7RRVW3Okt13HEfi7F74axPgMRsQRIELhetapisy5Ahn/srEzHZP9mv aJD3x7Y3ybsLoPCvxcVAAKXHMIlngGbYfT61c1surqhDTY3F6w34yC8fvbknbJC/HJz7 7lBbytFkJDR15AwPjlSO0f6iqYtY4qNExqcIJLjGPtXnl5zr4kD4C62T0UJq8JYj8WdW M7aqnWn1w7HFwBytLrxHQ67uSt9PfnHhK9CNDYZCTv7Qy8cyqZKXl1LQ6TXhGVyH7JuQ q70g== X-Forwarded-Encrypted: i=1; AJvYcCXFrO4Jr6tKGS2vJAVRwDFdRsHtVBiJR6xbdsPzlbMjGPrRy0S+j7XhJcwoA/jZ2UqkrL0y8HdGyLJg1oM=@vger.kernel.org X-Gm-Message-State: AOJu0YxU+bR42L4aN27Y6W85ydP2K2By7DFzlLK5Lq6QSXwOlX0uNX3T AHtM/aHjm0WCm5ZXguiXTMz9C6uMFf3D187JraeYYHr2KxmJaCAWXQFToPo7nt92dHEWf8OXg7E vshLRvg== X-Google-Smtp-Source: AGHT+IHNkssHfRpTSPJv5vfJ0hG/avsJSbtPbn9niGhmFXN0nZWxcs3w1T94tFkiYA6sCa29Eo7CxIho5sU= X-Received: from pjbge12.prod.google.com ([2002:a17:90b:e0c:b0:332:a4e1:42ec]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:902:e5c8:b0:27d:6777:2833 with SMTP id d9443c01a7336-290cb18415emr11317135ad.47.1760641613662; Thu, 16 Oct 2025 12:06:53 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 16 Oct 2025 12:06:43 -0700 In-Reply-To: <20251016190643.80529-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: <20251016190643.80529-1-seanjc@google.com> X-Mailer: git-send-email 2.51.0.858.gf9c4a03a3a-goog Message-ID: <20251016190643.80529-4-seanjc@google.com> Subject: [PATCH 3/3] KVM: SVM: Make avic_ga_log_notifier() local to avic.c From: Sean Christopherson To: Sean Christopherson , Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Hou Wenlong Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make amd_iommu_register_ga_log_notifier() a local symbol now that it's defined and used purely within avic.c. No functional change intended. Fixes: 4bdec12aa8d6 ("KVM: SVM: Detect X2APIC virtualization (x2AVIC) suppo= rt") Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/avic.c | 2 +- arch/x86/kvm/svm/svm.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c index 3ab74f2bd584..89864fee6e83 100644 --- a/arch/x86/kvm/svm/avic.c +++ b/arch/x86/kvm/svm/avic.c @@ -216,7 +216,7 @@ static void avic_deactivate_vmcb(struct vcpu_svm *svm) * This function is called from IOMMU driver to notify * SVM to schedule in a particular vCPU of a particular VM. */ -int avic_ga_log_notifier(u32 ga_tag) +static int avic_ga_log_notifier(u32 ga_tag) { unsigned long flags; struct kvm_svm *kvm_svm; diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h index b0fe40c21728..8c36ee0d67ef 100644 --- a/arch/x86/kvm/svm/svm.h +++ b/arch/x86/kvm/svm/svm.h @@ -806,7 +806,6 @@ extern struct kvm_x86_nested_ops svm_nested_ops; =20 bool __init avic_hardware_setup(void); void avic_hardware_unsetup(void); -int avic_ga_log_notifier(u32 ga_tag); void avic_vm_destroy(struct kvm *kvm); int avic_vm_init(struct kvm *kvm); void avic_init_vmcb(struct vcpu_svm *svm, struct vmcb *vmcb); --=20 2.51.0.858.gf9c4a03a3a-goog