[libvirt-users] [issue] Accessing SMBIOSTable in FreeBSD Kernel

sundareswaram pv
Mon, 15 Feb 2016 17:30:56 -0000

<div
style="font-family: Verdana;font-size: 12.0px;">
Hi All,


Setup:


- x86 based platforms, running Yocto-Linux with QEMU/KVM to launch our FreeBSD
VM&#39;s




Issue in brief:


I&rsquo;m encountering an issue in one of our platforms, while accessing the
SMBIOSTable with SMP Enabled 64-bit FreeBSD kernel




- This issue is NOT observed on all our platforms.


- just seeing it on a specific platform, which has changes to the HostOS
BIOS




The FreeBSD VM&#39;s access the SMBIOS table, where the smbios is shared to
the VM using


<smbios
mode=&#39;host&#39;/>




While enabling SMP on 64-bit FreeBSD Kernel, I see that the SMBIOSTable is
accessed at different location compared to the
address shared when SMP is disabled.




=== with 1 vCPU to FreeBSD (No SMP)
====

addr found @ 0x800f0c20

SMBIOS map : 800f0c40 f0c40 kva 0 > 140
{800f0c40, f0c40&nbsp; &lt;----&gt; virtual address(va), physical
address(pa) }

SMBIOS map 800f0c40 f0c40 page num
0 140

SMBIOS mapped 800f0c40 f0c40 0xffff807fffc00780

Found SMBIOS Ver 2.8 at 0xffffffff800f0c40 - Beyond mapped
region

smbios: Found SMBIOS Ver 2.8 at 0xffffffff800f0c20

smbios: Table at 0xffffffff800f0c40 len 568

Fast boot:0




=== with 2 vCPU to FreeBSD (SMP enabled)
====


addr found @ 0x800f0e40

SMBIOS map : fa1ffd80 7a1ffd80 kva 3d0 >
140&nbsp;&nbsp; {fa1ffd80, 7a1ffd80 &lt;----&gt; va, pa
}

Found SMBIOS Ver 2.8 at 0xfffffffffa1ffd80 - Beyond mapped
region

Fast boot:0

kernel trap 12 with interrupts disabled &egrave; PANIC PANIC
PANIC






Questions & Resolutions:


The following are couple of questions:

1. why is that the SMBIOSTable gets mapped at different addresses
when launching the VM with and without SMP (SMP with 2 vCPUs

2. Is there a way to PIN the SMBIOSTable for the VM ? This probably
will help address the issue

3. The issue is seen only with a specific platform. While, SMP in
64-bit OCCAM works fine on many other platforms.
Does it mean, it is an issue specific to the bios release for
Porter?

4 .I could address the issue by using


&lt;smbios
mode=&#39;sysinfo&#39;/>





please suggest ways to identify the problem and any potential
solutions



thanks in advance & rgds,

Sundareswaram