From mboxrd@z Thu Jan 1 00:00:00 1970 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 9FF1F3DC4CF for ; Mon, 1 Jun 2026 15:22:52 +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=1780327379; cv=none; b=crkmREt0V+efUXTeOEav+h0gID/wl+ljFnRIVScMHwwcP2Ilqcf0aWJtA3mU5ylglF891WmFg8zp3FTU061sOdlfIil8pcBz/XwmdnSULDisMs6nvAprUxcSDE0Ah1M3f/LcKPi4LV+kF7KX0yFDpaLJUJDlIZ5/BsGl/3ghR7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780327379; c=relaxed/simple; bh=YtWMdOkhy/s8BOEAivXDRtJtPRxT79Nib+XcE0iuDgc=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=CnprmY+6mp1LMYWMa2SC/SWHBBBGobpo3RWK05StvZrtC18jfK3Mw/BuyUtzXFQ5ClXlI67dlTEuY5JmeLGME6wS0VPNcmXti2AWDYMl+KvfSMQgJSpxuPuEiHx/owAGkhCfa3HB/WautPra+oGU4oktoyYHaxP+P5m556Lersc= 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=RJqm9+0i; 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="RJqm9+0i" Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-36bb6c41341so4426490a91.3 for ; Mon, 01 Jun 2026 08:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780327372; x=1780932172; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=3FrX6PZclTofes+C27r+o7tPSrpL+NY33x+S+H7JEVg=; b=RJqm9+0icp+72LMhuh7XrfzBEjqbqoOV5r6nahdjim3Ep8sTtFpl8eyrog7tnddtVo jm794+wRSdVyuRaFX4b+8flBM5fS+uFJVthgZeDGqTKLZ+tqmsxwtxDuG/CRvwYsMi3Y krXh9O8d7j9jNFT2ZsabcOI/Y4SFARjVTvtbBFDtYEJlfEFyRYVamX6ifGuuE8PsrLNB wMoSj6oMfx1NqSUuufCv7hpB0dOhdwpY8kuTN6ipzi38VRxIRRfo+BSNO1iD/BNaaTV/ +ayjIjAEDsDGq1P0hS8LD33ubGd29SrmTn5SIGeeXRXQ4+BGLFmIo06vI6/c4Tq2N+cm J0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780327372; x=1780932172; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3FrX6PZclTofes+C27r+o7tPSrpL+NY33x+S+H7JEVg=; b=qOYTj6b4ScJfSUQH8P1+DH7JeSjLUjgsRi71f6WLXAfvgal8XAkuhxylbZfIH2raXA 8gGeVvCq6sYQxq4J30fB3A16C7TA+gpJor3+Q8qeH+xO93GgarmCdWzZ17MrcBrZvJak hMoYN/wNfKaM1O4i8s6Q1s4jjKcvf6ulnnGhy7Lei/tDCPpLsJ0CZDLLmU2AiXY5Rl8w KYYSdxvUEwtG7hxlTm7PkCDg5iyxyb4DLeAGI8SS2FdJ24tpLItfv81W9RHYbaNWT3LJ PRum23lLrz6WpHKg+NrGQUNH/sPLkxL8eFXGP2igQFq00rwnvFvzIbrtjQkS/XRAIEaI gMpA== X-Forwarded-Encrypted: i=1; AFNElJ+j8OL7B0kMXsYJ0OX/WTfrRMpIF3FqzmxZlz9tIkRU3k8rQoV8xZzyHL80jCCjpaGfhWom5kjQ28CX0V4=@vger.kernel.org X-Gm-Message-State: AOJu0YyiENhOgloUnwdfQnWlWbE6S4SnASIn0u7AVlwpWM1R+EtmKlFf VapQT9Sz/NGri/CFvUWfjRsP3a0iw12vj0l4c8VHsmXa5SDzjWLFkpbaE9+ByzdJocKBkyh8ntt +NWTbjQ== X-Received: from pjff14.prod.google.com ([2002:a17:90b:562e:b0:365:eb99:afdb]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:57e7:b0:36d:70c8:3a3 with SMTP id 98e67ed59e1d1-36d70c80687mr10451955a91.15.1780327371493; Mon, 01 Jun 2026 08:22:51 -0700 (PDT) Date: Mon, 1 Jun 2026 08:22:50 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260529222223.870923-1-seanjc@google.com> <20260529222223.870923-37-seanjc@google.com> Message-ID: Subject: Re: [PATCH v3 36/40] KVM: x86: Move IRQ-related helper declarations from kvm_host.h => irq.h From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , Vitaly Kuznetsov , David Woodhouse , Paul Durrant , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Binbin Wu , David Woodhouse , Kai Huang Content-Type: text/plain; charset="us-ascii" On Sat, May 30, 2026, Yosry Ahmed wrote: > On Fri, May 29, 2026 at 03:22:19PM -0700, Sean Christopherson wrote: > > Move the function declaration for APIs to get/query pending IRQs from > > kvm_host.h to irq.h, as the APIs are only used by KVM x86 code. > > > > No functional change intended. > > > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/include/asm/kvm_host.h | 5 ----- > > arch/x86/kvm/irq.h | 6 ++++++ > > arch/x86/kvm/svm/nested.c | 1 + > > arch/x86/kvm/vmx/nested.c | 1 + > > 4 files changed, 8 insertions(+), 5 deletions(-) > > > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > > index 866d33abaee0..38de6c0dc743 100644 > > --- a/arch/x86/include/asm/kvm_host.h > > +++ b/arch/x86/include/asm/kvm_host.h > > @@ -2360,12 +2360,7 @@ enum { > > # define kvm_memslots_for_spte_role(kvm, role) __kvm_memslots(kvm, 0) > > #endif > > > > -int kvm_cpu_has_injectable_intr(struct kvm_vcpu *v); > > -int kvm_cpu_has_interrupt(struct kvm_vcpu *vcpu); > > -int kvm_cpu_has_extint(struct kvm_vcpu *v); > > int kvm_arch_interrupt_allowed(struct kvm_vcpu *vcpu); > > kvm_arch_interrupt_allowed() is only used in x86.c. Probably it wasn't > used outside of x86 code after a1b37100d9e29c1f8dc3e2f5490a205c80180e01. Oof, and it has x86-specific semantics (KVM x86 very much relies on 0/1/-EBUSY return values). > It should probably be renamed and moved, maybe separately. Yeah, I'll slot in a patch to bury it in x86.c as kvm_is_interrupt_allowed().