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

Re: [Xen-devel] [PATCH for-4.9 2/2] x86/pv: Replace do_guest_trap() with pv_inject_hw_exception()



>>> On 15.05.17 at 14:50, <andrew.cooper3@xxxxxxxxxx> wrote:
> do_guest_trap() is now functionally equivelent to pv_inject_hw_exception(),
> but with a less useful API as it requires the error code parameter to be
> passed implicitly via cpu_user_regs.
> 
> Extend pv_inject_event() with a further assertion which checks that hardware
> exception vectors are below 32, which is an x86 architectural expectation.

Interesting. As said for patch 1, I think this would better go there,
especially if ...

> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Julien Grall <julien.grall@xxxxxxx>
> 
> While not strictly a bugfix for 4.9, it would be nice to have it included (in
> light of the previous patch) to avoid the function duplication.

... that patch makes 4.9 but this one doesn't (and I think allowing
this one in would be bending the rules at least slightly).

> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -640,6 +640,8 @@ void pv_inject_event(const struct x86_event *event)
>      ASSERT(event->type == X86_EVENTTYPE_HW_EXCEPTION ||
>             event->type == X86_EVENTTYPE_SW_INTERRUPT);
>      ASSERT(vector == event->vector); /* Confirm no truncation. */
> +    if ( event->type == X86_EVENTTYPE_HW_EXCEPTION )
> +        ASSERT(vector < 32);

With this hunk possibly removed (if a functionally similar addition
to patch 1 is being done)
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


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

 


Rackspace

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