From: Gianni Tedesco Subject: Re: [PATCH, RFC]: qemu: hang-free/error-tolerant PCI hot-plug protocol Date: Fri, 30 Jul 2010 19:07:58 +0100 Message-ID: <1280513278.18490.55.camel@qabil.uk.xensource.com> References: <1280426058.1723.2266.camel@qabil.uk.xensource.com> <19538.54845.682500.241310@mariner.uk.xensource.com> <1280508474.18490.53.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1280508474.18490.53.camel@qabil.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Xen Devel , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2010-07-30 at 17:47 +0100, Gianni Tedesco wrote: > +static int pci_ins_check(libxl_ctx *ctx, uint32_t domid, const char *state, void *priv) > +{ > + char *orig_state = priv; > + > + if ( !strcmp(state, "pci-insert-failed") ) > + return -1; > + if ( !strcmp(state, "pci-inserted") ) > + return 0; > + if ( !strcmp(state, orig_state) ) > + return 1; > + > + return -1; This should probably return 1 to keep looking for one or the other states in-case another operation is ongoing due to another tool-stack instance actually.