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

Re: [Xen-devel] [PATCH v4 02/12] x86/HVM: patch indirect calls through hvm_funcs to direct ones



>>> On 03.10.18 at 20:55, <andrew.cooper3@xxxxxxxxxx> 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 <jbeulich@xxxxxxxx>
>> Reviewed-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> 
> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.