From nobody Sun Nov 24 08:39:38 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=szczek.dev ARC-Seal: i=1; a=rsa-sha256; t=1723639860; cv=none; d=zohomail.com; s=zohoarc; b=dNepVHjJC+I0A8GozlWGtmX4v+4C8/PXWnFAnDvabRkcAjSa5hrd5TClqLOKBppDmgmhwekyHIRsvL5lJcsGf/i5+SVAp+O2AfEsqqQ2FPrbqNw2JkifA4qlktWvmuteBaWaSnEYz+Qq5GhzlV8tSitU2hLjGoOrOKKY2DbQyIg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723639860; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=9fYMUYs5VhM8NvGzYuEL1YV7KREso0N9pmZ2XGncD9A=; b=Tyq62+x/mDCgKnveBpJfwDqgkhuolvuD6QAAvVTTJczH3u/Ct6dohrqWldK9pyEJqqbW4fzzxyFKJPRaqjl5nwu7CuRvOYaJkXkZG84SObpWgjWg08Abp+w00Jw3l/AjfuDkbNkfGAR10vpaQCkE5mzKBgR4hxKczum/Lz6X12c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1723639860488811.7472893488898; Wed, 14 Aug 2024 05:51:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1seDS4-0000p0-3g; Wed, 14 Aug 2024 08:50:08 -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 1seBtj-0007m7-B8; Wed, 14 Aug 2024 07:10:35 -0400 Received: from mail-4317.proton.ch ([185.70.43.17]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1seBtg-0003pj-C6; Wed, 14 Aug 2024 07:10:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szczek.dev; s=protonmail3; t=1723633822; x=1723893022; bh=9fYMUYs5VhM8NvGzYuEL1YV7KREso0N9pmZ2XGncD9A=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=dwkYq5lF2lrTidoNPqi3QLEhodXaov4UlQkJx8mVxDkU7Mp1FkyNkW6fR0QEwE1uy Ya0ik43rlDtkRg+ZPLmaU3rWVDUsro7a98Rf7f8Tkw5B27Z+Z2XUC77i4kMxWFle7e WHXDeC5kWFstkZE2UDYVJbRx9Gxn64/UPjJxKUf8Vy/Bi7iofn3yMovWoVf8Zmlvd6 ab+C01gd7peeipW0V0zl9gBk3rSSaGUbPITQmzEWFrflz3VpSVi33cwRsTS8YuIFXH hv1C7T/aN9yywP6YH+2u/DKLUdVLqaooSat7UQiE2qdhvbPP67dra5u9WLHw/cbuob ccWjWNaDN2xhQ== Date: Wed, 14 Aug 2024 11:10:16 +0000 To: "qemu-devel@nongnu.org" From: =?utf-8?Q?Kamil_Szcz=C4=99k?= Cc: "qemu-trivial@nongnu.org" Subject: [PATCH] hw/i386/pc: Warn about unsatisfied vmport deps Message-ID: Feedback-ID: 37679334:user:proton X-Pm-Message-ID: d53fa00ec7c0b54278ffa66bc4aaad817f9ee9c2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.70.43.17; envelope-from=kamil@szczek.dev; helo=mail-4317.proton.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 14 Aug 2024 08:50:04 -0400 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @szczek.dev) X-ZM-MESSAGEID: 1723639862641116600 Content-Type: text/plain; charset="utf-8" Since commit 4ccd5fe22feb95137d325f422016a6473541fe9f ('pc: add option to disable PS/2 mouse/keyboard'), the vmport will not be created unless the i8042 PS/2 controller is enabled. To not confuse users, let's add a warning if vmport was explicitly requested, but the i8042 controller is disabled. This also changes the behavior of vmport=3Dauto to take i8042 controller availability into account. Signed-off-by: Kamil Szcz=C4=99k --- hw/i386/pc.c | 4 ++++ hw/i386/pc_piix.c | 3 ++- hw/i386/pc_q35.c | 2 +- qemu-options.hx | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index c74931d577..5bd8dd0350 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1100,6 +1100,10 @@ static void pc_superio_init(ISABus *isa_bus, bool cr= eate_fdctrl, } =20 if (!create_i8042) { + if (!no_vmport) { + warn_report("vmport requires the i8042 controller to be enable= d"); + } + return; } =20 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d9e69243b4..cf2e2e3e30 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -312,7 +312,8 @@ static void pc_init1(MachineState *machine, const char = *pci_type) =20 assert(pcms->vmport !=3D ON_OFF_AUTO__MAX); if (pcms->vmport =3D=3D ON_OFF_AUTO_AUTO) { - pcms->vmport =3D xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; + pcms->vmport =3D (xen_enabled() || !pcms->i8042_enabled) + ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON; } =20 /* init basic PC hardware */ diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9d108b194e..6c112d804d 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -278,7 +278,7 @@ static void pc_q35_init(MachineState *machine) =20 assert(pcms->vmport !=3D ON_OFF_AUTO__MAX); if (pcms->vmport =3D=3D ON_OFF_AUTO_AUTO) { - pcms->vmport =3D ON_OFF_AUTO_ON; + pcms->vmport =3D pcms->i8042_enabled ? ON_OFF_AUTO_ON : ON_OFF_AUT= O_OFF; } =20 /* init basic PC hardware */ diff --git a/qemu-options.hx b/qemu-options.hx index cee0da2014..0bc780a669 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -68,8 +68,8 @@ SRST =20 ``vmport=3Don|off|auto`` Enables emulation of VMWare IO port, for vmmouse etc. auto says - to select the value based on accel. For accel=3Dxen the default is - off otherwise the default is on. + to select the value based on accel and i8042. For accel=3Dxen + and/or i8042=3Doff the default is off otherwise the default is on. =20 ``dump-guest-core=3Don|off`` Include guest memory in a core dump. The default is on. --=20 2.45.0