From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: xen crash related to pci passthrough Date: Fri, 28 May 2010 10:52:59 +0100 Message-ID: References: <4BFF8CB5.9030002@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4BFF8CB5.9030002@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alex Zeffertt , Jeremy Fitzhardinge Cc: Xen-devel , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 28/05/2010 10:28, "Alex Zeffertt" wrote: > This is only tangentially related, but... > > In xen/arch/x86/irq.c:__pirq_guest_unbind() this code looks wrong to me: > > memmove(&action->guest[i], &action->guest[i+1], IRQ_MAX_GUESTS-i-1); > > Should it be: > > memmove(&action->guest[i], &action->guest[i+1], > sizeof(action->guest[0])*(IRQ_MAX_GUESTS-i-1)); Yes, that must be one of the oldest bugs ever! Thanks, Keir > > ? > > Regards, > > Alex > > > On 27/05/10 22:02, Jeremy Fitzhardinge wrote: >> On 05/27/2010 01:02 PM, Keir Fraser wrote: >>> On 27/05/2010 20:51, "Jeremy Fitzhardinge" wrote: >>> >>> >>>> 3. attach device to PV domU >>>> dom0# xl pci-attach f13pv64 0000:03:00.0 >>>> 4. unbind from pciback >>>> dom0# echo 0000:03:00.0> /sys/bus/pci/drivers/pciback/unbind >>>> 5. rmmod driver in domU >>>> domU# rmmod e1000e >>>> 6. Crash! >>>> >>>> The device in question is an Intel 82574L ethernet controller, using >>>> msi-x interrupts. >>>> >>> What happens if you pci-detach before unbinding from pciback? Not that Xen >>> should crash of course, but a crash resulting from a mistake in detach >>> ordring in dom0 would be less worrying than some alternatives. >>> >> >> Doing things in a more sensible order (rmmod in domU, detach, unbind) >> seems to work OK. I was deliberately seeing what would happen if I >> tried pulling the device out from under a domain. >> >> J >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >