From patchwork Mon Apr 10 08:14:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Xin3" X-Patchwork-Id: 81390 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1757028vqo; Mon, 10 Apr 2023 01:41:52 -0700 (PDT) X-Google-Smtp-Source: AKy350befmQhhrG8YE16yoUZO+DxISZiMjhXVo7CO8z2k0omM/BQkWZHM/Vs98w1xToLa8tdRyHf X-Received: by 2002:a05:6a20:6685:b0:da:2d16:db89 with SMTP id o5-20020a056a20668500b000da2d16db89mr9878383pzh.28.1681116112045; Mon, 10 Apr 2023 01:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681116112; cv=none; d=google.com; s=arc-20160816; b=iaYAqw9TtvvYRBh3ykMuO9Y34XXyzH/uSyFbqapDikzOmeevuiSLDAu94URBq90oI6 PH/jBQd6DAqI2GwLdIZBas8nubOJsX2BCxunbx92pDGhWWy3UBdLGHvC43JvA32wvOtr GvJnj3S8yb7TgZwNlH0okri2LdYdL7c0g9+/WtQMtxvxQgQ+2Ze6RnMO31fgchGZshtn QjVF0moQzeM7fybX/vsb1Q8DOQC0nWgsRyM6/JE4gmqT9GFtqBV7x7H3sFs6AgipFA8F +felNy1zZNb0376H84dW8X4a7Fbgax+KfA1lOIk5zjJVYyKyeEjah6ikKHyOFLSjfQYi AGeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lz0rIzgfQ3UdI4kxn19lGElU0pAx4EZmyexpGqpeLQk=; b=JPqkcXupZMdJZUR1T1tnxz0aW6pceqoUb8xsunGpTUkt3xtaEzBNTAibTj3uldl9c4 8Rm7yXjJBXfNUYMne47irsvySx+dY4NUiiMmCxbB/AirqWPAFZ1gE2v9QALh946r5k5M rQrnBoq+95L0zvvhT53zZb21kQ0bMqAb0Vh+qZHWgftXCsr/oYfrl5lunv+0PmbEGPoH MPKzEPwuZiBL3HT0tge1KYLU9jMq94vBOyyNlDdychBQY4d45xMEa+nNl1vSh3OaN/e6 tK8B21OdXz4RsRd44jBxioJT2+V+FwU4QFIIByFeTxsxy4ogtv2OtWQjB9A7JqcTW7/j rM8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CINHGdc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r20-20020a6560d4000000b0050c0305bcc3si9455111pgv.872.2023.04.10.01.41.39; Mon, 10 Apr 2023 01:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CINHGdc5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229725AbjDJIlI (ORCPT + 99 others); Mon, 10 Apr 2023 04:41:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229600AbjDJIlD (ORCPT ); Mon, 10 Apr 2023 04:41:03 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AD693AB1; Mon, 10 Apr 2023 01:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681116063; x=1712652063; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CJ5cn83oehVUqkHaIiQkGH139f3gJuf37y85qUnwXYY=; b=CINHGdc5pozpD9mjU9lrfw+0Q4CL1gs6hsYyZSzlyLvql2bTYESlR0wG /svBlAF/3xakfcJRwUU/Tud/QImrQxEAHMkGehWJg3JOoslBdHw4D7bo4 msrOVEKc+qWvtkZuj2UZYLjJ6b+ucVUIRU/rp0sSbyExD2v/PqgOUdC/U bV2cbzxZKLKd/I+krss/mQIC0GXqLVCD8oCWNwAn/bebGbeCCMVsUVq6M LZ0dH0A9zvrYDIVXxFLKuE2Mqdm7NFX09Te9dLQa7RLipolrHrGtvhTkz 3WZXkV0JNRwTMOUBRCxSbySDxCkcfVJfg6nTPy+Sx4BkBi/ygesYYwi8M A==; X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="342077871" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="342077871" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2023 01:41:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10675"; a="799436238" X-IronPort-AV: E=Sophos;i="5.98,333,1673942400"; d="scan'208";a="799436238" Received: from unknown (HELO fred..) ([172.25.112.68]) by fmsmga002.fm.intel.com with ESMTP; 10 Apr 2023 01:41:01 -0700 From: Xin Li To: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, andrew.cooper3@citrix.com, seanjc@google.com, pbonzini@redhat.com, ravi.v.shankar@intel.com, jiangshanlai@gmail.com, shan.kang@intel.com Subject: [PATCH v8 01/33] x86/traps: let common_interrupt() handle IRQ_MOVE_CLEANUP_VECTOR Date: Mon, 10 Apr 2023 01:14:06 -0700 Message-Id: <20230410081438.1750-2-xin3.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410081438.1750-1-xin3.li@intel.com> References: <20230410081438.1750-1-xin3.li@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762778008285790143?= X-GMAIL-MSGID: =?utf-8?q?1762778008285790143?= From: "H. Peter Anvin (Intel)" IRQ_MOVE_CLEANUP_VECTOR is the only one of the system IRQ vectors that is *below* FIRST_SYSTEM_VECTOR. It is a slow path, so just push it into common_interrupt() just before the spurious interrupt handling. Signed-off-by: H. Peter Anvin (Intel) Tested-by: Shan Kang Signed-off-by: Xin Li --- arch/x86/kernel/irq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c index 766ffe3ba313..7e125fff45ab 100644 --- a/arch/x86/kernel/irq.c +++ b/arch/x86/kernel/irq.c @@ -248,6 +248,10 @@ DEFINE_IDTENTRY_IRQ(common_interrupt) desc = __this_cpu_read(vector_irq[vector]); if (likely(!IS_ERR_OR_NULL(desc))) { handle_irq(desc, regs); +#ifdef CONFIG_SMP + } else if (vector == IRQ_MOVE_CLEANUP_VECTOR) { + sysvec_irq_move_cleanup(regs); +#endif } else { ack_APIC_irq();