qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [FIX PATCH] spapr_rtas: Prevent QEMU crash during hotpl


From: Michael Roth
Subject: Re: [Qemu-devel] [FIX PATCH] spapr_rtas: Prevent QEMU crash during hotplug without a prior device_add
Date: Fri, 28 Aug 2015 15:43:46 -0500
User-agent: alot/0.3.6

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_connector
> > > 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 <address@hidden>
> > > Cc: Michael Roth <address@hidden>
> > 
> > Reviewed-by: Michael Roth <address@hidden>
> > 
> > > ---
> > > Not fully sure if RTAS_OUT_HW_ERROR is the right error code here. Should
> > > 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.
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]