>>> On 15.05.17 at 14:50, <andrew.coop...@citrix.com> 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.coop...@citrix.com>
> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Julien Grall <julien.gr...@arm.com>
> 
> 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 <jbeul...@suse.com>

Jan


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

Reply via email to