From patchwork Thu Oct 19 22:52:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 1852208 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=Tlo8SOJR; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SBNML5kqFz20cX for ; Fri, 20 Oct 2023 09:54:38 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtbtJ-00088k-0B; Thu, 19 Oct 2023 18:53:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtbtH-00087F-9h; Thu, 19 Oct 2023 18:53:19 -0400 Received: from ams.source.kernel.org ([145.40.68.75]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qtbtF-0002e2-ON; Thu, 19 Oct 2023 18:53:19 -0400 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 1680BB82DA7; Thu, 19 Oct 2023 22:53:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E053C433C8; Thu, 19 Oct 2023 22:53:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697755988; bh=+cGRsxoDX1k/ZPmo4qvdvzE7cOh1iCnqTIS6yKrOfbU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Tlo8SOJR0ofQAFVdTBDvbjNRCrKZxNlEWhQrtufW11ZHa9DXnsjNYeYzJ8eeHFnoh l1Y0aO9vukzwF+0jrO1rCkpPpfPFNgaDOPJocf6vf0WrLDM6SraZuwEs7/NQ5S6vdC 13jurPhsKGhJjLSmvFKrHWcbaInmDJQnO4qdlWytfpjHYdkXW5yIsGft2m7VkJUEXw /1vJ1XUcLJw1rPwwy7PPxoF4unFL0iT+im+uezqRZL7xgeFkQkkHWugU2aeB3Deln8 KiasUcixN8mtiinj9dGPXAKrRC7R0W5Mfxvwibse4ZZ8kPWnEArcEX6+t+hwExSNdZ uyhTDDVHjGJFQ== From: deller@kernel.org To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Helge Deller , Richard Henderson , qemu-stable@nongnu.org Subject: [PULL 04/11] lasips2: LASI PS/2 devices are not user-createable Date: Fri, 20 Oct 2023 00:52:50 +0200 Message-ID: <20231019225257.383071-5-deller@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019225257.383071-1-deller@kernel.org> References: <20231019225257.383071-1-deller@kernel.org> MIME-Version: 1.0 Received-SPF: pass client-ip=145.40.68.75; envelope-from=deller@kernel.org; helo=ams.source.kernel.org X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Helge Deller Those PS/2 ports are created with the LASI controller when a 32-bit PA-RISC machine is created. Mark them not user-createable to avoid showing them in the qemu device list. Signed-off-by: Helge Deller Cc: qemu-stable@nongnu.org --- hw/input/lasips2.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/input/lasips2.c b/hw/input/lasips2.c index ea7c07a2ba..6075121b72 100644 --- a/hw/input/lasips2.c +++ b/hw/input/lasips2.c @@ -351,6 +351,11 @@ static void lasips2_port_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + /* + * The PS/2 mouse port is integreal part of LASI and can not be + * created by users without LASI. + */ + dc->user_creatable = false; dc->realize = lasips2_port_realize; } @@ -397,6 +402,11 @@ static void lasips2_kbd_port_class_init(ObjectClass *klass, void *data) DeviceClass *dc = DEVICE_CLASS(klass); LASIPS2PortDeviceClass *lpdc = LASIPS2_PORT_CLASS(klass); + /* + * The PS/2 keyboard port is integreal part of LASI and can not be + * created by users without LASI. + */ + dc->user_creatable = false; device_class_set_parent_realize(dc, lasips2_kbd_port_realize, &lpdc->parent_realize); }