Message ID | 20240223102229.627664-1-pbonzini@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-78116-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp492978dyb; Fri, 23 Feb 2024 02:22:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUs7avIthpcKWI/L1N+kRNgEuXlT1EAN/PUn7lERmjyqNCb+jVS33HfAP6SQRUQSWJWXBqHvQsSN85e2HXyYR3RNyuqUg== X-Google-Smtp-Source: AGHT+IEpqWYHZ53v900zuWgAeI2SMnbI04GR+Gm/XtDP/tYMdUlHwSw4jtucxVk6hLi4S6JXzsti X-Received: by 2002:a05:6a21:350d:b0:19e:a448:71cf with SMTP id zc13-20020a056a21350d00b0019ea44871cfmr1642519pzb.24.1708683779457; Fri, 23 Feb 2024 02:22:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708683779; cv=pass; d=google.com; s=arc-20160816; b=cIkuo8aP9IPAa0xoLJoOF0ouK2Dbr++yfdq8dPTCaQpSpr4Tsk74ASeKCfyi38Y73B 9rpVnRD+mvxpbfNnN+zsg77rKwiCyDXctWumMOi1iIx2hxD20R13Ujw1Y5PyBYXoCocK AQWX2/ilalpOlJhY0vOa6ZtbjKtmNwEe33E5DXeTyBoTiAGzuf1rn3pnaFdaDg1rG1HA cJccsMndmGr9BgGOijULrcqZ89xTes23GTIFu54X4ixML2rDYZ/eQ+IhB6gGHnVJ5Tml j6ZE6ebj0A1aEoxXtJix90rChD8k/hnW/zB22w6fZWH9W3IQwUG3xsqGOFO3IUsfWVDM lZdw== 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=YLriUIlQJsX00hHBYbo+OHC/S+IX7onkvIWqKOkdsoc=; fh=aQMuq+lSjL5AqsNbwK9XJhgMHjd4EZVbsJv0WWLxzyA=; b=F+y/uqRn3uNO8IXDQ7+cfL55wiouwOyb1WMyE1DeN31LuFhUDKBZGgEJyVhKnv5WZ0 DK1JySFwN68rnqDnRqk4zy+oydETEjE3xWYXFi2sjbNTMoV6qf05LeHVyR04eU1mG0Av 745XXN40P6UwDwwpcpAUOVDloaHcRPs95nwppGYMT9WGur2i9OOxRrqbTc55knv9cbKU ox8Gb+XO54G6M8PolJOSJH5+1tFeAcZI1fUgG3mDDA7AO415Wv+mhT/SsPj8uaIFn6R/ NEH88K91Kx746QEE/izlYP4qtlt+1Oa8UclQPNevGma18DBkZpzCP4zsNpQI9zU0leoq x1Kg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=PYIpRfCs; 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-78116-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78116-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w7-20020a170902e88700b001dc2d9a3328si5386591plg.398.2024.02.23.02.22.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:22:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78116-ouuuleilei=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=@redhat.com header.s=mimecast20190719 header.b=PYIpRfCs; 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-78116-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78116-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 47FC7286347 for <ouuuleilei@gmail.com>; Fri, 23 Feb 2024 10:22:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A38A5D48F; Fri, 23 Feb 2024 10:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PYIpRfCs" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 1F06C5CDC8 for <linux-kernel@vger.kernel.org>; Fri, 23 Feb 2024 10:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708683762; cv=none; b=SNssVAY6VeqwK9wjsfy19KkUNp2WryxWhT3CnRVw9/172zxOAbUnQUdN0rX25Pw1KznGQu0YE+ETGLj1MgWDagVXBZfh9GxrQ28GWo0AbEuoQ8AS7R8/fChSQNwfq2i61e/tsAqW03Tvt6UZbdYoTsKrykwkq7V5wBspsuI0exI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708683762; c=relaxed/simple; bh=2sdOaj3qeTjo5QFG7kEZXfTFYVoe+AW5wZkGGLb5zJE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=Q20c/nd3FlkNznboMED6bMgloMQdM0kn3A26DZpWUT8UkI2CIK8QHsVEnt06bjplxRXE2uJjxDcH4L2bEmR6fjeHuYLI7u0VKCWfx/3mE81uaCrTPCSqavVYW6oG5Utj7i52JlNkBInE9iGjvHvjeMGnYH5REDTORgXtmPJgPQ0= 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=PYIpRfCs; arc=none smtp.client-ip=170.10.129.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=1708683757; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YLriUIlQJsX00hHBYbo+OHC/S+IX7onkvIWqKOkdsoc=; b=PYIpRfCsz0WE5Z9PAvvXadZ/WSgG+94S+6zFsMrkdso09gecmoVC0O04rt5v0Cnz4UL7nF JNVsoFQBvPMq3q/YqJP7FCFp48EUb8GmHjAHenoDYO5yov72p2FqLu9xVi/O5aZlyKnUSm LSJ9kc/U2eSRMZj9us5jP826w48jU7E= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-gpWk31CfP_WLbHx7YPc6SA-1; Fri, 23 Feb 2024 05:22:33 -0500 X-MC-Unique: gpWk31CfP_WLbHx7YPc6SA-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (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 0CF2F29AA39C; Fri, 23 Feb 2024 10:22:30 +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 9E41B492BC6; Fri, 23 Feb 2024 10:22:29 +0000 (UTC) From: Paolo Bonzini <pbonzini@redhat.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: x86@kernel.org, Stephen Rothwell <sfr@canb.auug.org.au>, Xin Li <xin@zytor.com>, Thomas Gleixner <tglx@linutronix.de> Subject: [PATCH] x86: irq: unconditionally define KVM interrupt vectors Date: Fri, 23 Feb 2024 05:22:29 -0500 Message-Id: <20240223102229.627664-1-pbonzini@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.9 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791684802342742442 X-GMAIL-MSGID: 1791684802342742442 |
Series |
x86: irq: unconditionally define KVM interrupt vectors
|
|
Commit Message
Paolo Bonzini
Feb. 23, 2024, 10:22 a.m. UTC
Unlike arch/x86/kernel/idt.c, FRED support chose to remove the #ifdefs
from the .c files and concentrate them in the headers, where unused
handlers are #define'd to NULL.
However, the constants for KVM's 3 posted interrupt vectors are still
defined conditionally in irq_vectors.h. In the tree that FRED support was
developed on, this is innocuous because CONFIG_HAVE_KVM was effectively
always set. With the cleanups that recently went into the KVM tree to
remove CONFIG_HAVE_KVM, the conditional became IS_ENABLED(CONFIG_KVM).
This causes a linux-next compilation failure in FRED code, when
CONFIG_KVM=n.
In preparation for the merging of FRED in Linux 6.9, define the interrupt
vector numbers unconditionally.
Cc: x86@kernel.org
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Suggested-by: Xin Li (Intel) <xin@zytor.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
arch/x86/include/asm/irq_vectors.h | 2 --
1 file changed, 2 deletions(-)
Comments
On 2/23/2024 2:22 AM, Paolo Bonzini wrote: > Unlike arch/x86/kernel/idt.c, FRED support chose to remove the #ifdefs > from the .c files and concentrate them in the headers, where unused > handlers are #define'd to NULL. > > However, the constants for KVM's 3 posted interrupt vectors are still > defined conditionally in irq_vectors.h. In the tree that FRED support was > developed on, this is innocuous because CONFIG_HAVE_KVM was effectively > always set. With the cleanups that recently went into the KVM tree to > remove CONFIG_HAVE_KVM, the conditional became IS_ENABLED(CONFIG_KVM). > This causes a linux-next compilation failure in FRED code, when > CONFIG_KVM=n. > > In preparation for the merging of FRED in Linux 6.9, define the interrupt > vector numbers unconditionally. > > Cc: x86@kernel.org > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Suggested-by: Xin Li (Intel) <xin@zytor.com> > Suggested-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> > --- > arch/x86/include/asm/irq_vectors.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h > index 3f73ac3ed3a0..d18bfb238f66 100644 > --- a/arch/x86/include/asm/irq_vectors.h > +++ b/arch/x86/include/asm/irq_vectors.h > @@ -84,11 +84,9 @@ > #define HYPERVISOR_CALLBACK_VECTOR 0xf3 > > /* Vector for KVM to deliver posted interrupt IPI */ > -#if IS_ENABLED(CONFIG_KVM) > #define POSTED_INTR_VECTOR 0xf2 > #define POSTED_INTR_WAKEUP_VECTOR 0xf1 > #define POSTED_INTR_NESTED_VECTOR 0xf0 > -#endif > > #define MANAGED_IRQ_SHUTDOWN_VECTOR 0xef > Thank you very much! Xin
On Fri, Feb 23 2024 at 05:22, Paolo Bonzini wrote: > Unlike arch/x86/kernel/idt.c, FRED support chose to remove the #ifdefs > from the .c files and concentrate them in the headers, where unused > handlers are #define'd to NULL. > > However, the constants for KVM's 3 posted interrupt vectors are still > defined conditionally in irq_vectors.h. In the tree that FRED support was > developed on, this is innocuous because CONFIG_HAVE_KVM was effectively > always set. With the cleanups that recently went into the KVM tree to > remove CONFIG_HAVE_KVM, the conditional became IS_ENABLED(CONFIG_KVM). > This causes a linux-next compilation failure in FRED code, when > CONFIG_KVM=n. > > In preparation for the merging of FRED in Linux 6.9, define the interrupt > vector numbers unconditionally. > > Cc: x86@kernel.org > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Suggested-by: Xin Li (Intel) <xin@zytor.com> > Suggested-by: Thomas Gleixner <tglx@linutronix.de> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
diff --git a/arch/x86/include/asm/irq_vectors.h b/arch/x86/include/asm/irq_vectors.h index 3f73ac3ed3a0..d18bfb238f66 100644 --- a/arch/x86/include/asm/irq_vectors.h +++ b/arch/x86/include/asm/irq_vectors.h @@ -84,11 +84,9 @@ #define HYPERVISOR_CALLBACK_VECTOR 0xf3 /* Vector for KVM to deliver posted interrupt IPI */ -#if IS_ENABLED(CONFIG_KVM) #define POSTED_INTR_VECTOR 0xf2 #define POSTED_INTR_WAKEUP_VECTOR 0xf1 #define POSTED_INTR_NESTED_VECTOR 0xf0 -#endif #define MANAGED_IRQ_SHUTDOWN_VECTOR 0xef