WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Bug when disabling/enabling a PT device with MSI enable

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Subject: Re: [Xen-devel] Bug when disabling/enabling a PT device with MSI enabled
From: Tom Rotenberg <tom.rotenberg@xxxxxxxxx>
Date: Wed, 25 Nov 2009 16:50:32 +0200
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Kamala Narasimhan <Kamala.Narasimhan@xxxxxxxxxx>
Delivery-date: Wed, 25 Nov 2009 06:50:54 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=sI8hQ2we5Q2oP1UTokTa3herFBNeko2jGqbFsQuGZ5E=; b=OdBu9iFY1cSud1+KCRjgqas6rSsaE1YRAVpZW2Xa4cUUwYMoJlkHj7wKaQagogAh0v xQrS2JROvX0S3OC6YgQloJtw73Rtu0L/2J2UmtM3xX79Z5VncDjjUfk4CAbK6lvbch8z aFCNnlOuxHhAYq+d9oQCBvHnr9mffo2nPpx4A=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bPU7suiKR6lr9QP4J6hiHLL/4EVTvLTLKf5ymXeJPuqCdSAty2OEJVUQQrhiY/UpfW KOcu+E3Vmy0HYFJmwn5L67TSezGCey7d6mhTqWTdI5rXpgq9F8q4Vr2lWofiBjgbqBny GaiDIQjL3jEYe6jLSwKEgNDSYqdYS6cpBR78Y=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E2263E4A5B2284449EEBD0AAB751098418E574278C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <8686c3cd0911241042n1b6f84a9u3623518baa021cc2@xxxxxxxxxxxxxx> <5997D0BE578D47409D1EBD41DFD341F489F5F54E84@xxxxxxxxxxxxxxxxxxxxxxxxx> <8686c3cd0911250027g696b8222qc5d3b1f4a39265ef@xxxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098418E57406D9@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098418E57406DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <8686c3cd0911250129t5292d204r268840cdb01d4257@xxxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098418E57406DB@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <8686c3cd0911250154l741d4db0o47f2669381c0e28b@xxxxxxxxxxxxxx> <E2263E4A5B2284449EEBD0AAB751098418E574278C@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
It happens also when msi_translte = 0 , and i think that it's not
related to the MSI at all... i also checked other devices which use
MSI (like the audio device), and they worked fine.
You can take a look at the new mail i sent, which incorporates more
details about this problem.

On Wed, Nov 25, 2009 at 4:47 PM, Jiang, Yunhong <yunhong.jiang@xxxxxxxxx> wrote:
> Tom Rotenberg wrote:
>> Well, you are correct... however, the situation is that the bgefore
>> the disable the intx bit was turned off, and only after disable and
>> then re-enable it was turned on, and that's the strange part of it...
>
> You mean even if the msi_translate == 0? That's strange. If this happens only 
> under msi_translate, it is reasonable and maybe something wrong. So can you 
> give me a confirmation?
>
> --jyh
>
>>
>> On Wed, Nov 25, 2009 at 11:38 AM, Jiang, Yunhong
>> <yunhong.jiang@xxxxxxxxx> wrote:
>>> If the msi_translate=0, why IntX bit is turned on is wrong?
>> I assume guest should use intX in such situation.
>>>
>>> --jyh
>>> ________________________________________
>>> From: Tom Rotenberg [tom.rotenberg@xxxxxxxxx]
>>> Sent: Wednesday, November 25, 2009 2:29 AM
>>> To: Jiang, Yunhong
>>> Cc: Kamala Narasimhan; xen-devel@xxxxxxxxxxxxxxxxxxx
>>> Subject: Re: [Xen-devel] Bug when disabling/enabling a PT device
>>> with MSI       enabled
>>>
>>> Well, to try and see if the problem is msi related or not, i
>>> registered the device with the option of 'msi_translate=0' to force
>>> the use of intx instead of MSI, and i still got the problem... so i
>>> guess it's not related to the MSI.
>>>
>>> It looks like the IntX bit (bit 3 of status word) is runed on somehow
>>> outside qemu, and that's the problem... could that be?
>>>
>>> On Wed, Nov 25, 2009 at 11:17 AM, Jiang, Yunhong
>>> <yunhong.jiang@xxxxxxxxx> wrote:
>>>> Sorry send out the mail too quickly.
>>>> I realized it is MSI translation when I finished first
>> section but forgot remove it, so please ignore  first section.
>>>> You only need care about MSI translation, the code is in
>> hw/pass-through.c.  You can check qemu's changelog at a8d1bd66.
>>>>
>>>> --jyh
>>>> ________________________________________
>>>> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>> [xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Jiang,
>> Yunhong [yunhong.jiang@xxxxxxxxx]
>>>> Sent: Wednesday, November 25, 2009 2:10 AM
>>>> To: Tom Rotenberg; Kamala Narasimhan
>>>> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>>>> Subject: RE: [Xen-devel] Bug when disabling/enabling a PT device
>>>> with MSI       enabled
>>>>
>>>> This should be about qemu's MSI support. The code is in
>> qemu/hw/pt-msi.c for all MSI emulation.
>>>> Windows XP does not support MSI if I remember correctly. SO
>> this issue should be about MSI translation, i.e. guest is
>> using IOAPIC while host is using MSI. Xen hypervisor will
>> translate the MSI to guest's IOAPIC.
>>>>
>>>> --jyh
>>>> ________________________________________
>>>> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>> [xen-devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Tom
>> Rotenberg [tom.rotenberg@xxxxxxxxx]
>>>> Sent: Wednesday, November 25, 2009 1:27 AM
>>>> To: Kamala Narasimhan
>>>> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
>>>> Subject: Re: [Xen-devel] Bug when disabling/enabling a PT device
>>>> with MSI       enabled
>>>>
>>>> Well, just tested it with the 2.6.18 latest kernel, and the bug
>>>> still exists. Also, i think that iit's more related to how qemu
>>>> handles the "disable/enable" of domU for PT devices with MSI... but
>>>> i don't know where to start from? it looks like when re-enabling a
>>>> PT device with MSI, we need qemu to re-initialize the device
>>>> according to it's original MSI state (and not to what it was
>>>> resetted before).
>>>>
>>>> Does anyone has any clue about it?
>>>>
>>>> On Wed, Nov 25, 2009 at 4:25 AM, Kamala Narasimhan
>>>> <Kamala.Narasimhan@xxxxxxxxxx> wrote:
>>>>>
>>>>> Couple of questions -
>>>>>
>>>>> 1) What kind of device are you referring to below? Display by any
>>>>> chance? 2) Which tree is your dom0 kernel based on?
>>>>>
>>>>> There is a chance you are missing some msi patches in your
>> dom0 kernel.  You might want to do a quick search for msi
>> patches in
>> http://xenbits.xen.org/staging/linux-2.6.18-xen.hg?rev=msi and
>> see if you are missing anything obvious.  I recently
>> encountered a similar issue in a slightly different situation,
>> a subset of the problem was caused because of missing msi patches.
>>>>>
>>>>> Kamala
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx [mailto:xen-devel-
>>>>>> bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of Tom Rotenberg
>>>>>> Sent: Tuesday, November 24, 2009 1:43 PM
>>>>>> To: xen-devel@xxxxxxxxxxxxxxxxxxx
>>>>>> Subject: [Xen-devel] Bug when disabling/enabling a PT device with
>>>>>> MSI enabled
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> I am using the xen-3,4, and i am doing pass-through for a device
>>>>>> with MSI enabled (the device of-course supports MSI) to a domU
>>>>>> with Windows XP. When i disable and then re-enable the device
>>>>>> using Windows device manager, everything looks like it's working
>>>>>> fine, but the device seems to malfunction. After digging a little
>>>>>> bit, i saw that the problem is, because the bit of the
>>>>>> interrupt-status (bit 3) in the status register (offset 0x6 in
>>>>>> the PCI config space) was turned on somehow -  this proibably
>>>>>> caused the MSI to malfunction (because the IntX assertion was
>>>>>> enabled - thus disabling the MSI) - and this lead to the problem
>>>>>> i experienced.
>>>>>>
>>>>>> Any ideas on how to solve this issue?
>>>>>>
>>>>>> Tom
>>>>>>
>>>>>> _______________________________________________
>>>>>> Xen-devel mailing list
>>>>>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>>>>>> http://lists.xensource.com/xen-devel
>>>>>
>>>>
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>>>> http://lists.xensource.com/xen-devel
>>>>
>>>> _______________________________________________
>>>> Xen-devel mailing list
>>>> Xen-devel@xxxxxxxxxxxxxxxxxxx
>>>> http://lists.xensource.com/xen-devel

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