[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] x86/ioemul: Rewrite stub generation
On Mon, Apr 27, 2020 at 05:18:52PM +0100, Andrew Cooper wrote: > On 27/04/2020 16:18, Roger Pau Monné wrote: > > On Mon, Apr 27, 2020 at 01:20:41PM +0100, Andrew Cooper wrote: > >> + /* Helpers - Read outer scope but only modify p. */ > >> +#define APPEND_BUFF(b) ({ memcpy(p, b, sizeof(b)); p += sizeof(b); }) > >> +#define APPEND_CALL(f) \ > >> + ({ \ > >> + long disp = (long)(f) - (stub_va + p - ctxt->io_emul_stub + 5); \ > >> + BUG_ON((int32_t)disp != disp); \ > > I'm not sure I get the point of using signed integers instead of > > unsigned ones, AFAICT you just want to check that the displacement is > > < 4GB so that a relative call can be used? > > Displacements are +/- 2G, not <4G. > > Using unsigned here would be buggy. Right, sorry for the noise: Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> With the minor nits pointed above in the ioemul_handle_quirk. Thanks, Roger.
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |