From: Christoph Egger Subject: Re: [PATCH] vtdt: add a missing change (RE: Re: xen guest hang with TSC_DEADLINE) Date: Wed, 5 Jan 2011 12:09:26 +0100 Message-ID: <201101051209.27540.Christoph.Egger@amd.com> References: <201012171529.56897.Christoph.Egger@amd.com> <201101041200.22612.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Wei, Gang" Cc: "xen-devel@lists.xensource.com" , "Morgan, KeirX" , Fraser List-Id: xen-devel@lists.xenproject.org On Wednesday 05 January 2011 11:11:46 Wei, Gang wrote: > Christoph Egger wrote on=A02011-01-04: > >>>>> c/s 22529 and 22530 cause a xen guest hang. > >>>>> > >>>>> While "normal" guests like Linux and NetBSD boot fine I boot Xen > >>>>> itself as a xen guest for my nested virtualization. > >>>>> > >>>>> When I do that then the guest dom0 hangs at boot when it tries > >>>>> to initialize the first vcpu. > >>>>> The bug is introduced somewhere in c/s 22529 and triggers with > >>>>> c/s 22530. > >>>> > >>>> Can you enable apic_timer debug info var hvm_debug and give more > >>>> serial port log around the guest dom0 hangs? I used to test xen > >>>> guest, it works well expect that it boot a little bit slowly. > >>> > >>> This is the log output I get with TSC_DEADLINE feature enabled: > >> > >> Just found one change was missed while the whole patch was checked in. > >> Apply below patch, it should be ok now. > >> > >> diff -r 0133cf2a72f5 xen/arch/x86/hvm/vlapic.c > >> --- a/xen/arch/x86/hvm/vlapic.c Fri Dec 24 10:56:29 2010 +0000 > >> +++ b/xen/arch/x86/hvm/vlapic.c Tue Dec 28 16:53:06 2010 +0800 > >> @@ -56,7 +56,7 @@ static unsigned int vlapic_lvt_mask[VLAP static > >> unsigned int vlapic_lvt_mask[VLAPIC_LVT_NUM] =3D { > >> /* LVTT */ > >> - LVT_MASK | APIC_TIMER_MODE_PERIODIC, > >> + LVT_MASK | APIC_TIMER_MODE_MASK, > >> /* LVTTHMR */ > >> LVT_MASK | APIC_MODE_MASK, > >> /* LVTPC */ > >> Jimmy > > > > The hang is still reproducable with this change. Sorry. > > Can you still see below line in the serial log? Is there anything > different? > > (XEN) [HVM:1.0] ignore tsc deadline msr write This one disappeared. My serial log is flooded with (XEN) [HVM:1.1] delta[0x00003c7e619fbf47] (XEN) [HVM:1.3] delta[0x00003c7e619fc6de] (XEN) [HVM:1.2] delta[0x00003c7e619fc577] (XEN) [HVM:1.1] tdt_msr[0x00000031ea5955ea],=20 gtsc[0x00000031e936c509], gtime[0x0000001a5ff3f942] (XEN) [HVM:1.3] tdt_msr[0x00000031eb83efd8],=20 gtsc[0x00000031ea615816], gtime[0x0000001a60917e60] (XEN) [HVM:1.2] tdt_msr[0x00000031ecae3dd2],=20 gtsc[0x00000031eb8ba626], gtime[0x0000001a612ee444] But I never see a line starting with [HVM:1.0] or [HVM:1.4]. My guest has four virtual vcpus. nested dom0 output did not change. > > In my side, I can see above line, and nested dom0 will hang while booting > if without this change. But things become ok after applying this change. = So > could you give more details after apply this change (again, serial log, > nested dom0 output, etc) ? > > Jimmy =2D-=20 =2D--to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632