All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: David Gibson <dgibson@redhat.com>
Cc: Julia Suvorova <jusual@redhat.com>,
	qemu devel list <qemu-devel@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready
Date: Wed, 28 Oct 2020 16:39:45 +0100	[thread overview]
Message-ID: <20201028163945.64eacc81@redhat.com> (raw)
In-Reply-To: <20201028143135.51c0a918@yekko.fritz.box>

On Wed, 28 Oct 2020 14:31:35 +1100
David Gibson <dgibson@redhat.com> wrote:

> On Tue, 27 Oct 2020 13:54:26 +0100
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> > On Tue, 27 Oct 2020 07:26:44 -0400
> > "Michael S. Tsirkin" <mst@redhat.com> wrote:
> > 
> >  [...]  
> >  [...]  
> >  [...]  
> > [...]
> >  [...]    
> > > > 
> > > > It certainly shouldn't wait an unbounded time.  But a wait with timeout
> > > > seems worth investigating to me.      
> > racy, timeout is bound to break once it's in overcommited env.  
> 
> Hm.  That's no less true at the management layer than it is at the qemu
> layer.
true, but it's user policy which is defined by user not by QEMU.

> 
> > > If it's helpful, I'd add a query to check state
> > > so management can figure out why doesn't guest see device yet.    
> > that means mgmt would have to poll it and forward it to user
> > somehow.  
> 
> If that even makes sense.  In the case of Kata, it's supposed to be
> autonomously creating the VM, so there's nothing meaningful it can
> forward to the user other than "failed to create the container because
> of some hotplug problem that means nothing to you".
> 
> >  [...]  
> > I have more questions wrt the suggestion/workflow:
> > * at what place would you suggest buffering it?
> > * what would be the request in this case, i.e. create PCI device anyways
> > and try to signal hotplug event later?
> > * what would baremethal do in such case?
> > * what to do in case guest is never ready, what user should do in such case?
> > * can be such device be removed?
> > 
> > not sure that all of this is worth of the effort and added complexity.
> > 
> > alternatively:
> > maybe ports can send QMP events about it's state changes, which end user would
> > be able to see + error like in this patch.
> > 
> > On top of it, mgmt could build a better UIx, like retry/notify logic if
> > that's what user really wishes for and configures (it would be up to user to
> > define behaviour).  
> 
> That kind of makes sense if the user is explicitly requesting hotplugs,
> but that's not necessarily the case.
user doesn't have to be a human, it could be some mgmt layer that would
automate retry logic, depending on what actually user needs for particular task
(i.e. fail immediately, retry N time then fail, retry with time out - then fail,
don't care - succeed, ...). The point is for QEMU to provide means for mgmt to
implement whatever policy user would need.

PS:
but then, I know close to nothing about PCI, so all of above might be nonsense.



  reply	other threads:[~2020-10-28 15:41 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22 11:40 [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready Marcel Apfelbaum
2020-10-22 12:06 ` Michael S. Tsirkin
2020-10-22 12:56   ` David Gibson
2020-10-22 13:15     ` Michael S. Tsirkin
2020-10-23  3:30       ` David Gibson
2020-10-22 13:55     ` Marcel Apfelbaum
2020-10-22 14:01       ` Michael S. Tsirkin
2020-10-22 14:10         ` Marcel Apfelbaum
2020-10-22 14:32           ` Michael S. Tsirkin
2020-10-22 14:50             ` Marcel Apfelbaum
2020-10-22 15:01               ` Michael S. Tsirkin
2020-10-23  3:49                 ` David Gibson
2020-10-23  6:47                   ` Marcel Apfelbaum
2020-10-23 15:54                     ` Michael S. Tsirkin
2020-10-23 17:27                       ` Igor Mammedov
2020-10-26  6:38                         ` David Gibson
2020-10-26  9:17                         ` Peter Krempa
2020-10-26  6:35                     ` David Gibson
2020-10-23  6:26                 ` Marcel Apfelbaum
2020-10-26  6:45                   ` David Gibson
2020-10-27 11:26                     ` Michael S. Tsirkin
2020-10-27 12:54                       ` Igor Mammedov
2020-10-27 13:02                         ` Michael S. Tsirkin
2020-10-28  3:34                           ` David Gibson
2020-10-28  3:31                         ` David Gibson
2020-10-28 15:39                           ` Igor Mammedov [this message]
2020-10-28 17:49                             ` Michael S. Tsirkin
2020-10-27 11:30                   ` Michael S. Tsirkin
2020-10-23  3:31       ` David Gibson
2020-11-11 12:35 ` Michael S. Tsirkin
2020-11-15 16:48   ` Marcel Apfelbaum
2020-11-11 16:09 ` Roman Kagan
2020-11-15 16:43   ` Marcel Apfelbaum

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=20201028163945.64eacc81@redhat.com \
    --to=imammedo@redhat.com \
    --cc=dgibson@redhat.com \
    --cc=jusual@redhat.com \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.