xcp-1.6-updates/xen-4.1.hg

changeset 23223:00c4b19f2648

xen: do not remap pirqs if !is_hvm_pv_evtchn_domain

If the guest is an HVM guest and it is not using the vector callback
mechanism, refuse to remap pirqs onto event channels.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Tested-by: Paulian Bogdan Marinca <paulian@marinca.net>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset: 24629:6c9a73817770
xen-unstable date: Tue Jan 31 11:39:37 2012 +0000
author Stefano Stabellini <stefano.stabellini@eu.citrix.com>
date Tue Jan 31 11:47:29 2012 +0000 (2012-01-31)
parents 69610d3a7ba7
children cccd6c68e1b9
files xen/arch/x86/physdev.c
line diff
     1.1 --- a/xen/arch/x86/physdev.c	Tue Jan 31 11:45:57 2012 +0000
     1.2 +++ b/xen/arch/x86/physdev.c	Tue Jan 31 11:47:29 2012 +0000
     1.3 @@ -93,6 +93,15 @@ static int physdev_map_pirq(struct physd
     1.4  
     1.5      if ( map->domid == DOMID_SELF && is_hvm_domain(d) )
     1.6      {
     1.7 +        /*
     1.8 +         * Only makes sense for vector-based callback, else HVM-IRQ logic
     1.9 +         * calls back into itself and deadlocks on hvm_domain.irq_lock.
    1.10 +         */
    1.11 +        if ( !is_hvm_pv_evtchn_domain(d) )
    1.12 +        {
    1.13 +            ret = -EINVAL;
    1.14 +            goto free_domain;
    1.15 +        }
    1.16          ret = physdev_hvm_map_pirq(d, map);
    1.17          goto free_domain;
    1.18      }