Current-Users archive

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

Re: NetBSD 9.0 RC1 amd64 not working on VirtualBox 6.1.0



On Sun, 15 Dec 2019 at 19:10, Bodie <bodie%bodie.cz@localhost> wrote:
>
>
>
> On 12.12.2019 17:38, Maxime Villard wrote:
> > Le 12/12/2019 à 16:34, Valery Ushakov a écrit :
> >> On Thu, Dec 12, 2019 at 06:47:50 +0100, Bodie wrote:
> >>
> >>> On 11.12.2019 23:32, Valery Ushakov wrote:
> >>>> On Wed, Dec 11, 2019 at 23:15:38 +0100, Bodie wrote:
> >>>>
> >>>>> FYI https://www.virtualbox.org/ticket/19146
> >>>>>
> >>>>> Not possible to boot installer of NetBSD 9.0RC1. cc me as I am not
> >>>>> subscribed to list.
> >>>>
> >>>> CPUID values are ... = guest (host):
> >>>>
> >>>> IBRS_IBPB - IA32_SPEC_CTRL.IBRS and IA32_PRED_CMD.IBPB  = 0 (1)
> >>>> STIBP - Supports IA32_SPEC_CTRL.STIBP                   = 0 (1)
> >>>> SSBD - Supports IA32_SPEC_CTRL.SSBD                     = 0 (1)
> >>>>
> >>>> so the NetBSD guest is told the cpu doesn't support IA32_SPEC_CTRL
> >>>> (0x48),
> >>>> but still the guest tries to read it:
> >>>
> >>> NetBSD 8.1 STABLE amd64 on same configuration with same values boots
> >>> just fine and works.
> >>
> >> Right, b/c NetBSD 8 doesn't read that nonexistent MSR.
> >>
> >>
> >>>> 00:00:11.518912 IEM: rdmsr(0x48) -> #GP(0)
> >>>> 00:00:11.518920 Changing the VM state from 'RUNNING' to
> >>>> 'GURU_MEDITATION'
> >>
> >> 00:00:11.520158 CPUM0: 0008:ffffffff8022714b 0f 32
> >> rdmsr
> >>
> >> This is mitigation_v2_apply_cpu(), V2_MITIGATION_INTEL_ENHANCED_IBRS
> >> case it seems, so either the kernel misdetects the mitigation variant
> >> to use, or vbox doesnt' scrub host capabilities enough.  Someone with
> >> the clue should look at the VBox.log (it has the cpuinfo dump).
> >>
> >> -uwe
> >
> > The CPU has
> >
> >       CPUID.IBRS = 1
> >       CPUID.STIBP = 1
> >       ARCH_CAP.IBRS_ALL = 1
> >
> > VirtualBox only clears the CPUID:
> >
> >       CPUID.IBRS = 0
> >       CPUID.STIBP = 0
> >       ARCH_CAP.IBRS_ALL = 1
> >
> > NetBSD sees ARCH_CAP.IBRS_ALL == 1, and tries to use the SPEC_CTRL MSR,
> > which
> > faults.
> >
> > Technically, NetBSD is not wrong, because you cannot have
> > ARCH_CAP.IBRS_ALL set
> > to one and CPUID.IBRS/STIBP set to zero. Still, I will add a check on
> > the
> > CPUIDs.
> >
> > Meanwhile VirtualBox should be fixed not to report ARCH_CAP.IBRS_ALL,
> > because
> > this is technically incorrect.
> >
>
> Oracle suggested to try this option:
>
> --spec-ctrl on|off: Enables and disables the exposure of speculation
> control interfaces to the guest, provided they are available on the
> host. Depending on the host CPU and workload, enabling speculation
> control may significantly reduce performance.
>
> it is for 'vboxmanage.exe modifyvm....' command. With setting it on I am
> able to install that RC1 and boot it after install. But even installed
> system is not able to boot without that options.

I guess it does depend on the host CPU. as I said, I have precisely
zero problems with the (released now) 6.1.

> > Maxime



-- 
----


Home | Main Index | Thread Index | Old Index