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

Re: [Xen-devel] [PATCH 1/3] xen: Add instruction length parameter in function hvm_inject_exception



On 24/05/2012 20:06, "Xudong Hao" <xudong.hao@xxxxxxxxx> wrote:

> VMX exception: Pass the instruction length field down to exception emulation,
> by changing hypercall parameter and adding a parameter in fucntion
> hvm_inject_exception(), so that exception emulation can set correct
> instruction length.
> 
> Signed-off-by: Xudong Hao <xudong.hao@xxxxxxxxx>
> Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>

I don't like adding yet another parameter for all callers, especially as we
should also be passing down the event type (sw interrupt, hw exception, ...)
and that would bloat the parameter list further.

I attach a cleanup patch which packs everything into a new struct and
renames hvm_inject_exception to hvm_inject_trap. I then define a couple of
wrappers around that function for existing callers, so that their parameter
lists actually *shrink*.

Let me know what you think. If it looks acceptable I can check it in and we
can build on top of this restructuring. The aim being to keep
hvm/vmx_inject_trap dumb, and push down the knowledge from the callers into
it.

 -- Keir

Attachment: 00-inject-cleanup
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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