From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56012) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVQVF-0007h4-Th for qemu-devel@nongnu.org; Fri, 28 Aug 2015 16:44:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZVQVC-000737-IV for qemu-devel@nongnu.org; Fri, 28 Aug 2015 16:44:01 -0400 Received: from e39.co.us.ibm.com ([32.97.110.160]:57564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZVQVC-00072w-BN for qemu-devel@nongnu.org; Fri, 28 Aug 2015 16:43:58 -0400 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Aug 2015 14:43:56 -0600 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <20150827052857.GC11136@in.ibm.com> References: <1440561851-17553-1-git-send-email-bharata@linux.vnet.ibm.com> <20150826141709.24880.70822@loki> <20150827052857.GC11136@in.ibm.com> Message-ID: <20150828204346.23519.54102@loki> Date: Fri, 28 Aug 2015 15:43:46 -0500 Subject: Re: [Qemu-devel] [FIX PATCH] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: bharata@linux.vnet.ibm.comBharata B Rao Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au Quoting Bharata B Rao (2015-08-27 00:28:57) > On Wed, Aug 26, 2015 at 09:17:09AM -0500, Michael Roth wrote: > > Quoting Bharata B Rao (2015-08-25 23:04:11) > > > If drmgr is used in the guest to hotplug a device before a device_add > > > has been issued via the QEMU monitor, QEMU segfaults in configure_con= nector > > > call. This occurs due to accessing of NULL FDT which otherwise would = have > > > been created and associated with the DRC during device_add command. > > > = > > > Check for NULL FDT and return failure from configure_connector call. > > > = > > > Signed-off-by: Bharata B Rao > > > Cc: Michael Roth > > = > > Reviewed-by: Michael Roth > > = > > > --- > > > Not fully sure if RTAS_OUT_HW_ERROR is the right error code here. Sho= uld > > > we be using RTAS_OUT_NOT_SUPPORTED instead ? > = > Based on my reading of PAPR+ 2.7, it appears that we should return -9003 > error code here. > = > I am planning to add > = > #define SPAPR_DR_CC_RESPONSE_NOT_CONFIGURABLE -9003 > = > and use it when fdt is NULL in ibm,configure-connector call. Is that fine= ? Yes, that error seems in line with this situation, and proposed constant seems fine to me (assuming you add to the existing sPAPRDRCCResponse enum) > = > Regards, > Bharata. >=20