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

Re: [Xen-devel] XEN 4.1.3-rc1 bug, spinlock acquired twice



On 30 January 2012 11:32, Stefano Stabellini
<stefano.stabellini@xxxxxxxxxxxxx> wrote:
> On Sat, 28 Jan 2012, Keir Fraser wrote:
>> On 27/01/2012 23:20, "Paulian Bogdan Marinca" <paulian@xxxxxxxxxxx> wrote:
>>
>> > I have a testing intel machine with 4 physical cpus running 64 bit Xen
>> > 4.1.3-rc1.
>> >
>> > I have a particular linux VM for which at its kernel boot time ( as
>> > domU ) it makes the XEN and Dom0 unresponsive (even the XEN serial
>> > console freezes indefinitely). The domU linux kernel is 3.2.1 and has
[...]
>
> That's right, this scenario should not be possible because whenever
> XENFEAT_hvm_pirqs is available, XENFEAT_hvm_callback_vector should also
> be available.
> In any case I'll submit a patch to Linux to make sure this doesn't
> happen, explicitly checking for xen_have_vector_callback.
> What is your Linux kernel version? Could you please post your kernel
> config as well?

Yes, you are right, this does not happen normally in a booting kernel.
What happens is that I needed to test my own PV drivers in all
possible scenarios,
 so I hacked the domU linux kernel to "believe" that XEN does not have
XENFEAT_hvm_callback_vector, basically I forced a

xen_have_vector_callback = 0;

in enlighten.c in domU kernel. This is probably why it triggered this
unusual situation.

I attach my kernel config (btw is actually a 3.0.6 kernel not 3.2.1)

I will try to apply your patch against XEN.

Thanks,
Paulian

>
>> In any case, cc'ing the author, Stefano. This ought to be easy to fix. We
>> could make the irq_lock a recursive lock for example.
>
> We could also fail to map irqs into event channels if the delivery
> method is not HVMIRQ_callback_vector:
>
>
> diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
> index df92cc7..7d89ed6 100644
> --- a/xen/arch/x86/physdev.c
> +++ b/xen/arch/x86/physdev.c
> @@ -93,6 +93,11 @@ int physdev_map_pirq(domid_t domid, int type, int *index, 
> int *pirq_p,
>
>     if ( domid == DOMID_SELF && is_hvm_domain(d) )
>     {
> +        if ( !is_hvm_pv_evtchn_domain(d) )
> +        {
> +            ret = -EINVAL;
> +            goto free_domain;
> +        }
>         ret = physdev_hvm_map_pirq(d, type, index, pirq_p);
>         goto free_domain;
>     }

Attachment: config
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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