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

Re: [PATCH 0/4] x86/PVH: Dom0 building adjustments


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Wed, 1 Sep 2021 18:13:03 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=w3gAsDWXO8sHjqoatlOYh71lPbgIcsOnbCK8nxc/AU8=; b=IgFaIPFwhhJiYJS0zw7CxwqvXc6aEedghCJz0kJUprOhCoDrpxnSYaGO+NFccbBMY10r7Tc6eiTI3jYLpKiP09mK09t/OveUEMsH3TihLnSc5MhITb9P2kU8DGd0a3WOQNL8cCHSkvaEAtVYVIXApVVzm66EEveMc8AO5/KIcsqAd7fHKfLtzRl+hGqSwP0LHeyeuP0ZiKpyyxHiHQ4FHlc8veRwmT+rspemna9LrmlyhhqdaNCGp3BUcPcU5TbRZ/9naGcYJi/zAAq53O7zroQZ8ualvTOsb9t+5vX+ey+y38sN+9AKi9BKTYn9K00OxSQ4eBWhQm4eZz4Dc118/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PEd3Rn+azAXta2wzmUGSDW4o+AADo4swardXmAKHmIuiy4joq8yOmiViEfUVhIq19MO2NZ0tuXrCpO0ni5/awd5OPmp4qYplWiYL26Ui5FC1/i9M4qoShUk/mO74d/Yo2nNP+2L7sL2azabKrkReNKGqE3sfDtsOfSSR/bbG17G/vhWwEdMW9w+GW7sakfCpn/ksV0TNVTlo/56Z9xUn7k/i8duOMf9gkc/yF/uqPFo5yo96mmpOHpU5CXhuRlQOlkMHfggdAGGQ+rkigAHtEegKufFEJenWiBgOdDiZRmXg0rSsBz8mGasr2bhqwIeMb6qZtlbl4shrZzSvexSDdA==
  • Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 01 Sep 2021 16:13:27 +0000
  • Ironport-hdrordr: A9a23:9huq46hoVw77GhpT+UxzAz1XoXBQXhEji2hC6mlwRA09TyXBrb HXoBwavSWVtN9jYgBapTngAtjwfZqyz+8Q3WB8B9mftUzdyRKVxeJZnPvfKl/bakrDH4dmvM 8LHsQQNDSzNykdsS+Q2njaLz9U+qjjzEnev5a9854Cd2BXgqdbhDuRQTzraHGeDDM2eKYRBd 6Y4MxfzgDQB0j+eKyAdwU4tsb41qL2qK4=
  • Ironport-sdr: gjr09FkSY08HDDV29MdiUKT/rneNt0X7U9fFtSFhq1QEe++zSzlICW/mIUFtakzC7vxvoe8ajh 67T8B9xtSr+LGaPLqlRXyJlcgGVZ6Ciumx1fdvbnPBgtjZ7lFqnbu47pG5lEycjTllAHZx94bH Vxl3NGZxwOqSMqn+SmMRZCX0Q+4m2UhthqodgOkRK7LZ/nrOuCPntC6kRD5A1VfOuMzN5G6pN0 kn6ycrgTSiNUDG6eMtSf9f1iPRMPINEAMRxf0xkQB2wiELjJyTPHz31J4AAwVFL9QNlRPwVYpO SXgXxn/1eMiz8KjRoEN9S0H+
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Wed, Sep 01, 2021 at 04:19:40PM +0200, Jan Beulich wrote:
> On 01.09.2021 15:56, Roger Pau Monné wrote:
> > On Tue, Aug 31, 2021 at 10:53:59AM +0200, Jan Beulich wrote:
> >> On 30.08.2021 15:01, Jan Beulich wrote:
> >>> The code building PVH Dom0 made use of sequences of P2M changes
> >>> which are disallowed as of XSA-378. First of all population of the
> >>> first Mb of memory needs to be redone. Then, largely as a
> >>> workaround, checking introduced by XSA-378 needs to be slightly
> >>> relaxed.
> >>>
> >>> Note that with these adjustments I get Dom0 to start booting on my
> >>> development system, but the Dom0 kernel then gets stuck. Since it
> >>> was the first time for me to try PVH Dom0 in this context (see
> >>> below for why I was hesitant), I cannot tell yet whether this is
> >>> due further fallout from the XSA, or some further unrelated
> >>> problem.
> > 
> > Iff you have some time could you check without the XSA applied? I have
> > to admit I haven't been testing staging, so it's possible some
> > breakage as slipped in (however osstest seemed fine with it).
> 
> Well, I'd rather try to use the time to find the actual issue. From
> osstest being fine I'm kind of inferring this might be machine
> specific, or this might be due to yet some other of the overly many
> patches I'm carrying. So if I can't infer anything from the stack
> once I can actually dump that, I may indeed need to bisect my pile,
> which would then also include the XSA-378 patches (as I didn't have
> time to re-base so far).
> 
> >>> Dom0's BSP is in VPF_blocked state while all APs are
> >>> still in VPF_down. The 'd' debug key, unhelpfully, doesn't produce
> >>> any output, so it's non-trivial to check whether (like PV likes to
> >>> do) Dom0 has panic()ed without leaving any (visible) output.
> > 
> > Not sure it would help much, but maybe you can post the Xen+Linux
> > output?
> 
> There's no Linux output yet by that point (and either
> "earlyprintk=xen" doesn't work in PVH mode, or it's even too early
> for that). All Xen has to say is
> 
> (XEN) Dom0 callback via changed to Direct Vector 0xf3
> (XEN) vmx.c:3265:d0v0 RDMSR 0x0000064e unimplemented
> (XEN) vmx.c:3265:d0v0 RDMSR 0x00000034 unimplemented

Weird, I don't see why earlyprintk=xen shouldn't work in PVH mode,
unless it's not properly wired up. Certainly needs checking and
fixing, or else we won't be able to make much progress I think.

> > Do you have iommu debug/verbose enabled to catch iommu faults?
> 
> I'll try to remember to check that, but since Linux hasn't
> brought up APs yet I don't think there's any device activity
> just yet.
> 
> >> Correction: I did mean '0' here, producing merely
> >>
> >> (XEN) '0' pressed -> dumping Dom0's registers
> >> (XEN) *** Dumping Dom0 vcpu#0 state: ***
> >> (XEN) *** Dumping Dom0 vcpu#1 state: ***
> >> (XEN) *** Dumping Dom0 vcpu#2 state: ***
> >> (XEN) *** Dumping Dom0 vcpu#3 state: ***
> >>
> >> 'd' output supports the "system is idle" that was also visible from
> >> 'q' output.
> > 
> > Can you dump the state of the VMCS and see where the IP points to in
> > Linux?
> 
> Both that and the register dumping I have meanwhile working tell
> me that it's the HLT in default_idle(). IOW Dom0 gives the impression
> of also being idle, at the first glance. The stack pointer, however,
> is farther away from the stack top than I would have expected, so it
> may still have entered default_idle() for other reasons.
> 
> The VMCS also told me that the last VM entry was to deliver an
> interrupt at vector 0xf3 (i.e. the "callback" one).

That's all quite weird. Did dom0 setup the vCPU timer? What version of
Linux are you using?

It seems to get stuck very early (or either fail to output anything
while booting), which seems unlikely to be related to your specific
hardware.

Thanks, Roger.



 


Rackspace

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