Discussion:
For Nova under VirtualBox I get that error
Paul Dufresne
2016-09-18 09:32:25 UTC
Permalink
NOVA Microhypervisor v7-23e7882 (x86_32): Aug 29 2016 10:39:41 [gcc 4.9.2]

[ 0] CORE:0:0:0 f:4:9:4 [0] Intel(R) Celeron(R) CPU 2.66GHz
[ 0] Killed EC:0xc23ca160 SC:0xc23cb100 V:0x6 CS:0x8 EIP:0xc000002c
CR2:0x0 ERR:0x0 (EXC)
***@arcturus:~$

------------------------------------------------------------------------------
Udo Steinberg
2016-09-18 11:20:16 UTC
Permalink
On Sun, 18 Sep 2016 05:32:25 -0400 Paul Dufresne (PD) wrote:

PD> NOVA Microhypervisor v7-23e7882 (x86_32): Aug 29 2016 10:39:41 [gcc 4.9.2]
PD>
PD> [ 0] CORE:0:0:0 f:4:9:4 [0] Intel(R) Celeron(R) CPU 2.66GHz
PD> [ 0] Killed EC:0xc23ca160 SC:0xc23cb100 V:0x6 CS:0x8 EIP:0xc000002c
PD> CR2:0x0 ERR:0x0 (EXC)

This is an invalid opcode exception and it means your CPU is rather old and
does not understand the instruction at IP 0xc000002c. You can disassemble
the hypervisor binary using objdump and check which instruction that is.

- Udo
Christian Helmuth
2016-09-18 15:10:43 UTC
Permalink
Hello,
Post by Udo Steinberg
PD> NOVA Microhypervisor v7-23e7882 (x86_32): Aug 29 2016 10:39:41 [gcc 4.9.2]
PD>
PD> [ 0] CORE:0:0:0 f:4:9:4 [0] Intel(R) Celeron(R) CPU 2.66GHz
PD> [ 0] Killed EC:0xc23ca160 SC:0xc23cb100 V:0x6 CS:0x8 EIP:0xc000002c
PD> CR2:0x0 ERR:0x0 (EXC)
This is an invalid opcode exception and it means your CPU is rather old and
does not understand the instruction at IP 0xc000002c. You can disassemble
the hypervisor binary using objdump and check which instruction that is.
With a recent build of NOVA/32 I get
Post by Udo Steinberg
objdump -ldSC build/nova_x86_32/kernel/hypervisor | grep > "c000002c:"
c000002c: 0f 35 sysexit

But I had expected those CPUs to support sysenter/sysexit.

Greets
--
Christian Helmuth
Genode Labs

http://www.genode-labs.com/ · http://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth

------------------------------------------------------------------------------
Udo Steinberg
2016-09-18 15:21:00 UTC
Permalink
The subject sounds like Paul is running NOVA in a virtual machine. So maybe the VM does not support those instructions.

- Udo
Post by Christian Helmuth
Hello,
Post by Udo Steinberg
PD> NOVA Microhypervisor v7-23e7882 (x86_32): Aug 29 2016 10:39:41 [gcc 4.9.2]
PD>
PD> [ 0] CORE:0:0:0 f:4:9:4 [0] Intel(R) Celeron(R) CPU 2.66GHz
PD> [ 0] Killed EC:0xc23ca160 SC:0xc23cb100 V:0x6 CS:0x8 EIP:0xc000002c
PD> CR2:0x0 ERR:0x0 (EXC)
This is an invalid opcode exception and it means your CPU is rather old and
does not understand the instruction at IP 0xc000002c. You can disassemble
the hypervisor binary using objdump and check which instruction that is.
With a recent build of NOVA/32 I get
Post by Udo Steinberg
objdump -ldSC build/nova_x86_32/kernel/hypervisor | grep > "c000002c:"
c000002c: 0f 35 sysexit
But I had expected those CPUs to support sysenter/sysexit.
Greets
--
Christian Helmuth
Genode Labs
http://www.genode-labs.com/ · http://genode.org/
https://twitter.com/GenodeLabs · /ˈdʒiː.nəʊd/
Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
GeschÀftsfÌhrer: Dr.-Ing. Norman Feske, Christian Helmuth
------------------------------------------------------------------------------
_______________________________________________
genode-main mailing list
https://lists.sourceforge.net/lists/listinfo/genode-main
Paul Dufresne
2016-09-18 22:38:53 UTC
Permalink
Well,I never got understanding clearly these SYSENTER/SYSEXIT instructions.
Trying to google it a bit, I find this that seems to make some kind of
sense (but not too much honestly).
Basically, someone in similar situation was told it need to save MSR
(most particularly IA32_STAR MSR),
for using SYSENTER/SYSEXIT correctly:
https://software.intel.com/en-us/forums/virtualization-software-development/topic/278918

Also about SysExit and link to MSR: http://wiki.osdev.org/SYSENTER

------------------------------------------------------------------------------
Paul Dufresne
2016-09-19 01:01:41 UTC
Permalink
Ok, first this talk about saving MSR is for AMD instructions
(SYSENTER/SYSRET), not for Intel SYSEXIT.

And indeed, the CPU simulated, a pentium 4, does not support SysEnter/SysExit.

I know because when I go to Machine menu, show journal I can see:
...

00:00:02.740255 VM: fHMEnabled=true (configured) fRecompileUser=false
fRecompileSupervisor=false
00:00:02.740262 VM: fRawRing1Enabled=false CSAM=true PATM=true
00:00:02.740694 HM: HMR3Init: Falling back to raw-mode: VT-x is not available
00:00:02.740865 MM: cbHyperHeap=0x140000 (1310720)
00:00:02.746936 CPUM: fXStateHostMask=0x0; initial: 0x0; host XCR0=0x0
00:00:02.774577 CPUM: Matched host CPU INTEL 0xf/0x4/0x9
Intel_NB_Prescott2M with CPU DB entry 'Intel Pentium 4 3.00GHz' (INTEL
0xf/0x4/0x3 Intel_NB_Prescott2M)
00:00:02.774696 CPUM: MSR fudge: 0x000001db P6_LAST_BRANCH_FROM_IP
...

00:00:03.265885 Features
00:00:03.265886 Mnemonic - Description = guest (host)
00:00:03.265889 FPU - x87 FPU on Chip = 1 (1)
00:00:03.265893 VME - Virtual 8086 Mode Enhancements = 1 (1)
00:00:03.265896 DE - Debugging extensions = 1 (1)
00:00:03.265899 PSE - Page Size Extension = 1 (1)
00:00:03.265902 TSC - Time Stamp Counter = 1 (1)
00:00:03.265906 MSR - Model Specific Registers = 1 (1)
00:00:03.265909 PAE - Physical Address Extension = 1 (1)
00:00:03.265912 MCE - Machine Check Exception = 1 (1)
00:00:03.265915 CX8 - CMPXCHG8B instruction = 1 (1)
00:00:03.265918 APIC - APIC On-Chip = 1 (1)
*** 00:00:03.265921 SEP - SYSENTER and SYSEXIT Present = 0 (1) ***
00:00:03.265924 MTRR - Memory Type Range Registers = 1 (1)
00:00:03.265927 PGE - PTE Global Bit = 1 (1)
00:00:03.265930 MCA - Machine Check Architecture = 1 (1)
00:00:03.265933 CMOV - Conditional Move instructions = 1 (1)
00:00:03.265936 PAT - Page Attribute Table = 1 (1)
00:00:03.265938 PSE-36 - 36-bit Page Size Extension = 1 (1)
00:00:03.265941 PSN - Processor Serial Number = 0 (0)
00:00:03.265944 CLFSH - CLFLUSH instruction = 1 (1)
00:00:03.265947 DS - Debug Store = 0 (1)
00:00:03.265951 ACPI - Thermal Mon. & Soft. Clock Ctrl. = 0 (1)
00:00:03.265954 MMX - Intel MMX Technology = 1 (1)
00:00:03.265957 FXSR - FXSAVE and FXRSTOR instructions = 1 (1)
00:00:03.265959 SSE - SSE support = 1 (1)
00:00:03.265963 SSE2 - SSE2 support = 1 (1)
00:00:03.265966 SS - Self Snoop = 0 (1)
00:00:03.265969 HTT - Hyper-Threading Technology = 0 (1)
00:00:03.265972 TM - Therm. Monitor = 0 (1)
00:00:03.265976 PBE - Pending Break Enabled = 0 (1)
00:00:03.265979 SSE3 - SSE3 support = 1 (1)
00:00:03.265982 PCLMUL - PCLMULQDQ support (for AES-GCM) = 0 (0)
00:00:03.265985 DTES64 - DS Area 64-bit Layout = 0 (1)
00:00:03.265988 MONITOR - MONITOR/MWAIT instructions = 1 (1)
00:00:03.265991 CPL-DS - CPL Qualified Debug Store = 0 (1)
00:00:03.265994 VMX - Virtual Machine Extensions = 0 (0)
00:00:03.265997 SMX - Safer Mode Extensions = 0 (0)
00:00:03.266000 EST - Enhanced SpeedStep Technology = 0 (0)
00:00:03.266002 TM2 - Terminal Monitor 2 = 0 (1)
00:00:03.266006 SSSE3 - Supplemental Streaming SIMD Extensions 3 = 0 (0)
00:00:03.266008 CNTX-ID - L1 Context ID = 0 (1)
00:00:03.266011 SDBG - Silicon Debug interface = 0 (0)
00:00:03.266014 FMA - Fused Multiply Add extensions = 0 (0)
00:00:03.266017 CX16 - CMPXCHG16B instruction = 0 (1)
00:00:03.266020 TPRUPDATE - xTPR Update Control = 0 (1)
00:00:03.266023 PDCM - Perf/Debug Capability MSR = 0 (0)
00:00:03.266026 PCID - Process Context Identifiers = 0 (0)
00:00:03.266029 DCA - Direct Cache Access = 0 (0)
00:00:03.266032 SSE4_1 - SSE4_1 support = 0 (0)
00:00:03.266035 SSE4_2 - SSE4_2 support = 0 (0)
00:00:03.266038 X2APIC - x2APIC support = 0 (0)
00:00:03.266041 MOVBE - MOVBE instruction = 0 (0)
00:00:03.266045 POPCNT - POPCNT instruction = 0 (0)
00:00:03.266048 TSCDEADL - Time Stamp Counter Deadline = 0 (0)
00:00:03.266050 AES - AES instructions = 0 (0)
00:00:03.266054 XSAVE - XSAVE instruction = 0 (0)
00:00:03.266057 OSXSAVE - OSXSAVE instruction = 0 (0)
00:00:03.266060 AVX - AVX support = 0 (0)
00:00:03.266063 F16C - 16-bit floating point conversion instructions = 0 (0)
00:00:03.266065 RDRAND - RDRAND instruction = 0 (0)
00:00:03.266068 HVP - Hypervisor Present (we're a guest) = 0 (0)

So my host CPU does support SysEnter/SysExit, but not my Guest CPU.
Not sure if I can fix that... easily.

------------------------------------------------------------------------------
Paul Dufresne
2016-09-20 12:23:47 UTC
Permalink
I got my hands on a Core2 Duo computer, that allows me to run this in
VirtualBox without problems.

On real hardware, it had hang on boot line however... but since that
computer still have a com port
I might be able to figure out why when I will have enough time.

------------------------------------------------------------------------------
Paul Dufresne
2016-09-18 15:16:16 UTC
Permalink
Oh well, it seems I get the error only under Virtuabox (which is version 5.1.4).
I just burn a CD with that nova.iso, and after showing fast invalid
hints messages,
goes to the not handled by monitor video mode.
This is the same computer I tried under VirtualBox (Debian
4.6.0-1-amd64, Celeron D, 2Go).

A bit to my own surprise, VirtualBox does not give much option for the
simulated CPU.

------------------------------------------------------------------------------
Loading...