On Thu, Jan 18, 2018 at 02:30:27PM -0600, Eric Blake wrote: > On 01/18/2018 02:11 AM, Alexey Kardashevskiy wrote: > > >>>> I think you just assert() for this. The only way these could get a > >>>> different value is if there's a bug elsewhere. > >>> > >>> > >>> Why not return H_HARDWARE or other error? > >> > >> Because what's the guest supposed to do with it. > > > > "oops" > > > >> This is an internal > >> qemu problem, so it should be dealt with via an internal qemu > >> mechanism. > > > > Do we have assert() enabled in production? If not, then assert == noop, > > error_report is just a noise. > > See commit 262a69f4. Yes, assert() is enabled in production, for > security reasons (aka it's easier to do that than to audit that > migration is still safe even with no-op asserts).
TBH, assert()s usually aren't disabled in production. That's the theory behind them, but in practice AFAICT, the debugging utility almost always outweighs the performance cost which is usually pretty small. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature