Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp445369pxb; Thu, 9 Sep 2021 04:46:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDj1T4gXWRjgoDDq2p+jui8VbC2SJdW3AzAqXYuUwRD4ofrEPpslvJIo5aErlsC6UW4TN5 X-Received: by 2002:a17:907:75d9:: with SMTP id jl25mr2952407ejc.4.1631187977937; Thu, 09 Sep 2021 04:46:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631187977; cv=none; d=google.com; s=arc-20160816; b=aVUC+6mlQVoS22jJ5euVPeS9H18+5cRkMTs8aUICuJoVQPSTdxu4nofNO4bcIlrdHY c5RZXw1oEDCRi9UMe3BREvd4JuDtgJbJ1ZrgTKqP02Zzna+9YnVDGt5PhorTtq+jWe4P EMLHvkuMh0Fq0MPg9zcUjdEfXiwTT5P3+9ZUyacQaDLa9PY8YgdQryrWLC24rutznXFf amH8gPtUNnIzjhgEQQ7SR2tzSFYs1W0q7jUxNgWhkLkn3dGjHwiNQ0p2cq0Uxj4WofwB omLOSOzNfHbnqBOhz8s2ObR2lO/4mh7ljFzlWRv616ra9HU/9wwSEfh7QpOBa2qyNSgo IiaQ== 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=ocRq7Z4bOSjp/mxU4lzAPTO967GPesDCyHmFrzo7VVE=; b=KBuNBi0UXGYjm1om7RP8qbAFcYUaPYzW5C3SXAQLoieiXLh1tbOEmD6/zCHiVItt8r bDRgq1XQGYjwLVTj/4lUEuML++9gT3yYQCkZuMS4iA2Nuoo8yt7ul4q9QWTsAXPTNX/c DcZBwDmgLn2NOIKPvD3DxG8ldDlIRrWvVDju+wZkYPoqlGj5D5viKFVMJpUCud+rJX7/ bgENwpF/lVW7ZrXLLhoZBg9+WKkwjeIFuZ3oFGvujwA9aVTBtAsYWhdNDnEY8fsMzFIa KQkj71lTFpkndm/RgiqrsLluLEleNpambWH1iVRUH9szzcOW4iVduJlpF2f/k+GlHB15 lAgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=SZ0PK+BU; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dm18si1671380ejc.257.2021.09.09.04.45.53; Thu, 09 Sep 2021 04:46:17 -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=@kernel.org header.s=k20201202 header.b=SZ0PK+BU; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239455AbhIILpl (ORCPT + 99 others); Thu, 9 Sep 2021 07:45:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:46600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236641AbhIILnc (ORCPT ); Thu, 9 Sep 2021 07:43:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9023D6120E; Thu, 9 Sep 2021 11:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187730; bh=G6Y4ovkgtiaNKulr9qZGAnkDCbmrBJ7kEmwUDH2XY3c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SZ0PK+BUoEjpHHZ495YNzjqvWvs90aUjLAbXVIeoG7JfhJehJYvVmrBuGJu5F8sNO eeeINWwym2nYa9Lk8WaexxzQTGGAcmJ3heYlctkWjC4XckfEZcAnknoXcJWV1x3LMR 8/yaTVSFtrm7+5Tv9EUnNUt1qxWrfY7Bc+KxZWhbDHKYhkbPDDxNajjWloEEQ+onFj wQejFODBFumxO2v25tQXKDYwWfpz7vmGrSfQmsLkfVW7I2u9GASHrwWTNn5JZt4a47 R018zjuvnjdt3DFx60TEqMYW+sTEcn8dqa5HbaYgglf9Ib8HKND7faArTFdb38p627 VKG+dlC8AUU/g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Eric Auger , Greg Kroah-Hartman , Sasha Levin Subject: [PATCH AUTOSEL 5.14 050/252] misc/pvpanic-pci: Allow automatic loading Date: Thu, 9 Sep 2021 07:37:44 -0400 Message-Id: <20210909114106.141462-50-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore 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