[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pc: Implement -no-hpet as sugar for -machine hpet=off

From: Paolo Bonzini
Subject: Re: [PATCH] pc: Implement -no-hpet as sugar for -machine hpet=off
Date: Wed, 21 Oct 2020 15:31:30 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1

On 21/10/20 14:39, Eduardo Habkost wrote:
>> Should this be within #ifdef CONFIG_HPET?  [...]
> Oops, I wasn't aware of CONFIG_HPET

That's just a config-devices.h (aka CONFIG_DEVICES) definition.

> , and hadn't noticed that
> pc_basic_device_init() uses qdev_try_new().  I agree that not
> failing if hpet=on is explicitly set and CONFIG_HPET=n is wrong.
> Supporting a "require hpet to be on" use case would be a new
> feature and out of scope of this work, though.  I will just
> rename the property to "allow-hpet".  We can still implement a
> OnOfAuto "hpet" property in the future, if we think it's useful.

You don't need OnOffAuto; you can just change the qdev_try_new() to
qdev_new() if you default it to true only if CONFIG_HPET is defined.  It
should work properly, defaulting to on/off depending on CONFIG_HPET and
failing if hpet=on is explicitly set with CONFIG_HPET=n.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]