qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcelo Tosatti <mtosatti@redhat.com>
To: "Daniel P. Berrange" <berrange@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
	Avi Kivity <avi@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [patch 2/2] qemu: PCI device, disk and host network hot-add / hot-remove
Date: Mon, 9 Feb 2009 20:41:25 -0200	[thread overview]
Message-ID: <20090209224125.GA11520@amt.cnet> (raw)
In-Reply-To: <20090209084139.GA20629@redhat.com>

On Mon, Feb 09, 2009 at 08:41:39AM +0000, Daniel P. Berrange wrote:
> On Sun, Feb 08, 2009 at 03:28:45PM -0200, Marcelo Tosatti wrote:
> > On Sun, Feb 08, 2009 at 12:08:34PM +0200, Avi Kivity wrote:
> > > Marcelo Tosatti wrote:
> > >> Add monitor command to hot-add PCI devices (nic and storage).
> > >>     Syntax is:
> > >>     pci_add pci_addr=[[<domain>:]<bus>:]<slot> nic|storage params
> > >>     It returns the domain, bus and slot for the newly added device on 
> > >> success
> > >
> > > Instead of returning something, how about
> > >
> > >  pci_add pci_addr=...,name=blah
> > >
> > > and then
> > >
> > >  pci_del blah
> > >
> > > 'info pci' could also output the name so that it could be associated  
> > > with the bus address.
> > 
> > Sure that can be done. Like an alias. So you identify <domain,bus,slot>
> > with a name. I can see it simplifies direct management of hotplug on the
> > monitor.
> 
> Also bear in mind that we need the ability to hot unplug devices which
> were specified on the command line argv. For these we currently have
> neither the pci <domain,bus,slot>, nor are given any 'name'. 

Any reason you can't discover <domain,bus,slot> from "info pci" ?
(domain/bus are always zero at the moment).

> Markus has previously suggested allowing <domain,bus,slot> to be
> specified on the cli which would let us manually assign & use that
> info for unplug.

> A device type specific unique naming would be useful too though. In
> changeset r6220,  Mark McLoughlin provided the ability to give every
> single NIC a unique name. I'd like to be able to use that name for
> unplug. 

The NIC identifiers are not specific to PCI. So if you specify a
non-PCI nic with the cli, you should not expect "pci_del name" to work.
Now I see where you're getting at with the private discussion around
"dev_add/dev_add".

Ok, simply adding a PCI specific identifier can be messy (since it will
clash with net identifier, for example).

So what is needed is, perhaps, a unique identifier
across all devices in the system? (hum, QEMUDevice from
http://bellard.org/qemu/patches/qemu-config2.diff).

> For disks, meanwhile we generally know the logic bus,unit,index info as
> provided to -drive / pci_add disk, which can be used to unplug.
> 
> So, I'd suggest that pci_del allow either a <domain,bus,slot>

It does.

> or some form of unique name, or device type specific unique
> identifier. Ideally so we can still just as easily use unplug for
> devices added on the cli, as for those added via the monitor.

info pci should work.

Thanks.

  reply	other threads:[~2009-02-09 22:41 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-06 17:44 [Qemu-devel] [patch 0/2] pci hotplug v2 Marcelo Tosatti
2009-02-06 17:44 ` [Qemu-devel] [patch 1/2] pci device registration helpers Marcelo Tosatti
2009-02-06 17:44 ` [Qemu-devel] [patch 2/2] qemu: PCI device, disk and host network hot-add / hot-remove Marcelo Tosatti
2009-02-08 10:08   ` Avi Kivity
2009-02-08 17:28     ` Marcelo Tosatti
2009-02-09  8:24       ` Markus Armbruster
2009-02-09  8:41       ` Daniel P. Berrange
2009-02-09 22:41         ` Marcelo Tosatti [this message]
2009-02-10 12:20           ` Daniel P. Berrange
2009-02-10 12:32             ` Paul Brook
2009-02-06 18:35 ` [Qemu-devel] [patch 0/2] pci hotplug v2 Marcelo Tosatti
  -- strict thread matches above, loose matches on Subject: below --
2009-02-06 18:48 [Qemu-devel] [patch 0/2] pci hotplug v2 (for real) Marcelo Tosatti
2009-02-06 18:48 ` [Qemu-devel] [patch 2/2] qemu: PCI device, disk and host network hot-add / hot-remove Marcelo Tosatti

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=20090209224125.GA11520@amt.cnet \
    --to=mtosatti@redhat.com \
    --cc=armbru@redhat.com \
    --cc=avi@redhat.com \
    --cc=berrange@redhat.com \
    --cc=qemu-devel@nongnu.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).