[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 01/47] x86emul: introduce IMPOSSIBLE()
>>> On 19.11.18 at 19:11, <andrew.cooper3@xxxxxxxxxx> wrote: > On 19/11/2018 10:13, Jan Beulich wrote: >> @@ -8828,12 +8837,7 @@ x86_emulate( >> dst.type = OP_NONE; >> break; >> default: >> - if ( (d & DstMask) != DstMem ) >> - { >> - ASSERT_UNREACHABLE(); >> - rc = X86EMUL_UNHANDLEABLE; >> - goto done; >> - } >> + IMPOSSIBLE((d & DstMask) != DstMem); > > IMPOSSIBLE() doesn't really convey the correct meaning here IMO, because > the purpose of the construct is to try and do something safe in the case > that the impossible does happen. > > Instead, I'd suggest EXPECT() or REQUIRE() with an inverted condition, > because that better encapsulates the meaning that we expect this always > to be true, but that it might not be. Okay, EXPECT() it'll be then. > With a suitable name, Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Thanks. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |