[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] hw/i386/pc: Warn about unsatisfied vmport deps
|
From: |
Kamil Szczęk |
|
Subject: |
Re: [PATCH] hw/i386/pc: Warn about unsatisfied vmport deps |
|
Date: |
Sat, 17 Aug 2024 12:29:37 +0000 |
On Saturday, August 17th, 2024 at 14:19, Michael S. Tsirkin <mst@redhat.com>
wrote:
>
> On Sat, Aug 17, 2024 at 08:49:05AM +0000, Kamil Szczęk wrote:
>
> > On Friday, August 16th, 2024 at 15:14, Bernhard Beschow shentey@gmail.com
> > wrote:
> >
> > > Am 14. August 2024 11:10:16 UTC schrieb "Kamil Szczęk" kamil@szczek.dev:
> > >
> > > > 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=auto to take i8042
> > > > controller availability into account.
> > > >
> > > > Signed-off-by: Kamil Szczęk kamil@szczek.dev
> > > > ---
> > > > 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 create_fdctrl,
> > > > }
> > > >
> > > > if (!create_i8042) {
> > > > + if (!no_vmport) {
> > > > + warn_report("vmport requires the i8042 controller to be enabled");
> > > > + }
> > > > +
> > > > return;
> > > > }
> > > >
> > > > 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)
> > > >
> > > > assert(pcms->vmport != ON_OFF_AUTO__MAX);
> > > > if (pcms->vmport == ON_OFF_AUTO_AUTO) {
> > > > - pcms->vmport = xen_enabled() ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
> > > > + pcms->vmport = (xen_enabled() || !pcms->i8042_enabled)
> > > > + ? ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
> > > > }
> > >
> > > I think it makes sense to consolidate this handling into
> > > pc_basic_devices_init() before doing this change. Maybe just in front of
> > > the call to pc_superio_init()? The additional handling of xen_enabled()
> > > shouldn't hurt there for q35: Even though q35 doesn't (yet) support Xen
> > > there are already code paths where this check is done.
> >
> > Makes sense technically, but since I'm new to the mailing list workflow I
> > could use some help with logistics. I've already posted a v2 of this patch
> > which was reviewed and accepted, should I wait for it to be pulled in and
> > post a follow-up patch or post another revision of this patch?
>
>
>
> I rebase with now issues - that's why it's a tag, easy to drop.
> So feel free to post v3.
Good to know, will do.