Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Mar 2018 11:05:03 -0700 (PDT)
From:      "Rodney W. Grimes" <freebsd-rwg@pdx.rh.CN85.dnsmgr.net>
To:        Chris <syseng@gfsys.co.uk>
Cc:        =?ISO-8859-1?Q?Roger_Pau_Monn=E9?= <roger.pau@citrix.com>, freebsd-xen@freebsd.org
Subject:   Re: [Bug 224003] xen kernel panics
Message-ID:  <201803301805.w2UI531x069099@pdx.rh.CN85.dnsmgr.net>
In-Reply-To: <5ABE7739.2030008@gfsys.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
[ Charset ISO-8859-1 unsupported, converting... ]
> On 03/30/18 12:07, Roger Pau Monn? wrote:
> > On Thu, Mar 29, 2018 at 11:32:19PM +0000, Chris wrote:
> >> I'm having similar problems with xen on 11.1, AMD64, June 2017.
> >> The OS runs fine, but installed xen from package, setup exactly
> >> as per the handbook and get a kernel panic on two machines,
> >> complaining about iommu not being enabled.
> >
> > FreeBSD/Xen Dom0 requires a working IOMMU, that's documented in the
> > handbook [0] section 21.8.1.
> >
> > Can you paste the full output that you get when booting under Xen?
> >
> >> Machines are: a Sun X4170 to start, then  a Proliant DL380 G7
> >> with E5630 cpu. Both have all the virtualisation options
> >> enabled in the bios, but there are no options on either machine
> >>   for iommu.
> >
> > On Intel hardware the IOMMU is called VT-d. I have no idea if the
> > hardware that you list has an IOMMU, it depends on both the CPU and
> > the motherboard.
> >
> > Without VT-d (an IOMMU) FreeBSD/Xen Dom0 won't work.
> >
> > Roger.
> >
> > [0] https://www.freebsd.org/doc/handbook/virtualization-host-xen.html
> > .
> >
> 
> Roger,
> 
> Thanks for the reply and clarification on the meaning of iommu. A bit
> more info on the machine:
> 
> Cpu is actually an E5645, hex core, 2.4GHz
> 32 Gb ram, full ecc
> bios is dated 2011, with:

I can affirm that a E56xx cpu should be very capable of supporting Xen.
CPU: Intel(R) Xeon(R) CPU           X5675  @ 3.07GHz (3059.07-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x206c2  Family=0x6  Model=0x2c  Stepping=2
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x29ee3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,DCA,SSE4.1,SSE4.2,POPCNT,AESNI>
  AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics

I do not have VT-d enabled above infact I can not find that there
is any setting for it on this hardware, though I am pretty sure
I have used hardware passthrough in vmware with that box,
which does requrire an iommu.

But a wiki for bhyve tells me to do this on intel to find if
there is a IOMMU avaliable:
# acpidump -t | grep -A12 DMAR
  DMAR: Length=432, Revision=1, Checksum=213,
        OEMID=DELL, OEM Table ID=PE_SC3, OEM Revision=0x1,
        Creator ID=DELL, Creator Revision=0x1
        Host Address Width=40
        Flags=

        Type=DRHD
        Length=16
        Flags={INCLUDE_ALL}
        Segment=0
        Address=0x00000000fed90000

        Type=RMRR

If you have a DMAR table, you have a visible to FreeBSD iommu

> VT-d, enabled
> Intel virtualisation tech, enabled
> 
> It's difficult to log info on this, as there is just the "needs iommu"
> message on boot, then halt. Live cd and file edits brought the base
> system back, but nothing in /var/log/xen at all.
> 
> DL380 Proliant is industry standard vanilla and they are very common
> and thus affordable second user. I know VMware runs on a G5 version
> of this model, so doubt there is any problem with the hardware.

VMware can run on almost any 64 bit processor, including those
that do not have nested page tables, iommus, or for that matter
even VT-x.  They have software emulation of this stuff since there
software predates many of these features.

> One
> thing found in the searches was a discussion about cpu "advisories ?"
> which produces this problem, but no info on how to get round it. This
> was from 2015, but would think such a bug would have been fixed by
> now. This a first attempt at getting xen running under FreeBSD or Xen at
> all, so a compete newbie in this area. Do Embedded rtos systems here,
> no specialisation in xen or freebsd in particular, but have time and
> can try various solutions if someone has any ideas.
> 
> Today: deleted packages, updated system amd ports and rebuilding
> xen and tools from source. Might just be something out of sync, but
> will report back once it's finished...

Can you boot FreeBSD without Xen on it and get some dmesg output
like I did above, that would help to atleast affirm or deny that
is being seen with respect to VT-x and VT-d?

> Regards & Thanks,
> Chris

-- 
Rod Grimes                                                 rgrimes@freebsd.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803301805.w2UI531x069099>