qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Anthony Perard <anthony.perard@citrix.com>,
	Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default
Date: Fri, 22 Sep 2017 09:52:53 +0200	[thread overview]
Message-ID: <f904821b-eeae-5d58-2130-b49483f08021@redhat.com> (raw)
In-Reply-To: <20170922093824.58a83358.cohuck@redhat.com>

On 22.09.2017 09:38, Cornelia Huck wrote:
> On Thu, 21 Sep 2017 15:50:28 -0300
> Eduardo Habkost <ehabkost@redhat.com> wrote:
> 
>> On Tue, Sep 19, 2017 at 10:55:53AM +0200, Thomas Huth wrote:
>>> Historically we've marked all devices as hotpluggable by default. However,
>>> most devices are not hotpluggable, and you also need a HotplugHandler to
>>> support these devices. So if the user tries to "device_add" or "device_del"
>>> such a non-hotpluggable device during runtime, either nothing really usable
>>> happens, or QEMU even crashes/aborts unexpectedly (see for example commit
>>> 84ebd3e8c7d4fe955b - "Mark diag288 watchdog as non-hotpluggable").
>>> So let's change this dangerous default behaviour and mark the devices as
>>> non-hotpluggable by default. Certain parent devices classes which are known
>>> as hotpluggable (e.g. PCI, USB, etc.) are marked with "hotpluggable = true",
>>> so that devices that are derived from these classes continue to work as
>>> expected.  
>>
>> These seem to be missing:
>> * TYPE_CPU (or at least TYPE_X86_CPU and TYPE_S390_CPU)
> 
> I think it would be better to set it for TYPE_CPU (and have
> architectures override if needed).

Hmm, no, I think TYPE_CPU should stay non-notpluggable, and we should
only do this for TYPE_X86_CPU, TYPE_S390_CPU and TYPE_SPAPR_CPU_CORE.
Most CPU types are not hot-pluggable, so that should be the default.
Having seen all those "device_add" crashes in the past weeks, I'm afraid
that we'll run into weird problems again otherwise since people will
keep forgetting to add "hotpluggable = false" for new CPU types that are
not hotpluggable.

 Thomas

  reply	other threads:[~2017-09-22  7:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  8:55 [Qemu-devel] [RFC PATCH] qdev: Mark devices as non-hotpluggable by default Thomas Huth
2017-09-20  7:50 ` Marcel Apfelbaum
2017-09-20 10:07   ` Peter Maydell
2017-09-20 10:57     ` Marcel Apfelbaum
2017-09-20 11:17       ` Thomas Huth
2017-09-20 16:10         ` Thomas Huth
2017-09-20 16:15           ` David Hildenbrand
2017-09-21  8:04           ` Igor Mammedov
2017-09-21 15:27 ` Anthony PERARD
2017-09-21 18:50 ` Eduardo Habkost
2017-09-22  7:38   ` Cornelia Huck
2017-09-22  7:52     ` Thomas Huth [this message]
2017-09-22  7:47   ` Thomas Huth
2017-09-22 19:25     ` Cédric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f904821b-eeae-5d58-2130-b49483f08021@redhat.com \
    --to=thuth@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).