>>> On 03.10.18 at 20:55, <andrew.coop...@citrix.com> wrote:
> On 02/10/18 11:12, Jan Beulich wrote:
>> This is intentionally not touching hooks used rarely (or not at all)
>> during the lifetime of a VM, like {domain,vcpu}_initialise or cpu_up,
>> as well as nested, VM event, and altp2m ones (they can all be done
>> later, if so desired). Virtual Interrupt delivery ones will be dealt
>> with in a subsequent patch.
>>
>> Signed-off-by: Jan Beulich <jbeul...@suse.com>
>> Reviewed-by: Wei Liu <wei.l...@citrix.com>
> 
> Acked-by: Andrew Cooper <andrew.coop...@citrix.com>

Thanks.

> It is a shame that we don't have a variation such as cond_alt_vcall()
> which nops out the entire call when the function pointer is NULL, but I
> can't think of any sane way of trying to make that happen.

I think this could be made work, e.g. by further utilizing special values
of the displacement of the CALL insn (out of the non-sensible ones we
currently use only -5; arguably using -4 ... -1 would be liable to
conflict with not entirely dumb disassemblers, which may imply an
instruction boundary at the target of any CALL/JMP without special
casing such bogus values).

If we thought this was a worthwhile avenue to explore, non-void
calls could be patched this way too, as long as the replacement
"return" value is a compile time constant (i.e. we'd have a compile
time "MOV $<value>, %eax" to patch in). We'd merely have to
sort out where to place this alternative replacement code.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to