Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1925899pxb; Thu, 16 Sep 2021 20:29:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgzFrjeJgjy9Vr9Z2XtX6wpEVkpDnQv1E/ZoZEX7qBkQ/dLSKDvmyjTf0QHVJHzeBdLcxn X-Received: by 2002:a05:6e02:12ca:: with SMTP id i10mr244152ilm.201.1631849398765; Thu, 16 Sep 2021 20:29:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631849398; cv=none; d=google.com; s=arc-20160816; b=nZ4x8tml/Vy1bomCQSIAbEDjX5CsaWIaGed2weNGL3YcEuuKqH5uVfmUr8WEqx8Oad v42t1CPrWunkb5+wA02sB+PSsyZMmVHf3m3B54rXNBabXGay8W1mVYrRBo/gZ5hI4TGu ot5su347lr58Cci/dboOqBCx05g/D4QII4Ye1lU4icurwD0kXafeH4RAh0ikuydgdd97 OhDsKDHUHuZ2gDEpATt1lMpwvPU3Th1onQJgo4xlTJ0IcpX4NO4vUBuk3HTmHiAUS5EC j3/9URwRYNPTjyb8Jb3PbzJoj1xH9yLNKg30nw4BEsXjGeO/UdxEBxDiR89mYgmCVEhn iLLA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=ocRq7Z4bOSjp/mxU4lzAPTO967GPesDCyHmFrzo7VVE=; b=nbcvrUYqONfpacbWhFplh85c2jpnuOgiSfurEvdfXqECZ11Pt+zIUelfqWneh4Bm6j Wk6QOX7X20HWkuDHbZwj8FGcEVFmD1p+s6APmRFvWw3vCawP8vSMBvVKTJLyRLsCzE1f WvbeUPkJJKWf1h545nJXxy0r37s5ueFWM93m5Ok1cZZqWJzQb1pd+ZFhKLzdALVVvYJn jR0y0AnUXlTPglqaxe7WoDqne7XbL3Li7em8oTUoC/qQi8sc84XOtr+AITXXRzNllV35 HCZkqF0WD0FUVkPl9A6M2nwJFHJYp1kNZ15t08pJeBpRL1UjhHTM8PQ9OEOL4YG06vsR XZsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qxxX4g4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si5133089iol.44.2021.09.16.20.29.47; Thu, 16 Sep 2021 20:29:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qxxX4g4P; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344479AbhIPRfr (ORCPT + 99 others); Thu, 16 Sep 2021 13:35:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:47066 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343974AbhIPR0k (ORCPT ); Thu, 16 Sep 2021 13:26:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 87F9861A3C; Thu, 16 Sep 2021 16:45:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631810702; bh=G6Y4ovkgtiaNKulr9qZGAnkDCbmrBJ7kEmwUDH2XY3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qxxX4g4PhUFLyzsvaeeeIXjIPBMKn6gMxb81WCeoJdmaONWDjh0zrOUPTAXLH1b3y P1wogcsRoNpysvS6pKEWFZPaDZj05pvnwZU5vDR11gSC8H8EBU4xiVudR+RMrcaxhC Uy/pnh+PmyIiQL9clX1JZ2I3W8OOzssF9pN5acHw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Auger , Sasha Levin Subject: [PATCH 5.14 204/432] misc/pvpanic-pci: Allow automatic loading Date: Thu, 16 Sep 2021 17:59:13 +0200 Message-Id: <20210916155817.733770834@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210916155810.813340753@linuxfoundation.org> References: <20210916155810.813340753@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Auger [ Upstream commit 28b6a003bcdfa1fc4603b9185b247ecca7af9bef ] The virtual machine monitor (QEMU) exposes the pvpanic-pci device to the guest. On guest side the module exists but currently isn't loaded automatically. So the driver fails to be probed and does not its job of handling guest panic events. Instead of requiring manual modprobe, let's include a device database using the MODULE_DEVICE_TABLE macro and let the module auto-load when the guest gets exposed with such a pvpanic-pci device. Signed-off-by: Eric Auger Link: https://lore.kernel.org/r/20210629072214.901004-1-eric.auger@redhat.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/misc/pvpanic/pvpanic-pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/misc/pvpanic/pvpanic-pci.c b/drivers/misc/pvpanic/pvpanic-pci.c index a43c401017ae..741116b3d995 100644 --- a/drivers/misc/pvpanic/pvpanic-pci.c +++ b/drivers/misc/pvpanic/pvpanic-pci.c @@ -108,4 +108,6 @@ static struct pci_driver pvpanic_pci_driver = { }, }; +MODULE_DEVICE_TABLE(pci, pvpanic_pci_id_tbl); + module_pci_driver(pvpanic_pci_driver); -- 2.30.2