Closed faushine closed 11 months ago
Did you try the Testing with Bochs section? Some of the errors happen if you use off the shell Bochs.
Did you try the Testing with Bochs section? Some of the errors happen if you use off the shell Bochs.
Yes. Which version of bochs should I use? I just clone from the latest master branch. Is that right?
No. You need to use the gcc
branch. Try it and follow the instructions, and let me know.
No. You need to use the
gcc
branch. Try it and follow the instructions, and let me know.
I try gcc branch and it works. Thank you for your reminding. However I still encountered the problem that bochs throws out a segmentation fault.
spu@ubuntu:~/Hypervisor-101-in-Rust$ gdb /home/spu/bochs_install/bin/bochs
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/spu/bochs_install/bin/bochs...
(gdb) run -q -unlock -rc tests/bochs/dbg_command.txt -f tests/bochs/linux_amd.bxrc
Starting program: /home/spu/bochs_install/bin/bochs -q -unlock -rc tests/bochs/dbg_command.txt -f tests/bochs/linux_amd.bxrc
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
00000000000i[ ] LTDL_LIBRARY_PATH not set. using compile time default '/home/spu/bochs_install/lib/bochs/plugins'
Program received signal SIGSEGV, Segmentation fault.
__strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:111
111 ../sysdeps/x86_64/multiarch/strcmp-avx2.S: No such file or directory.
(gdb) bt
#0 __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:111
#1 0x000055555562e5d4 in bx_init_config_interface_list () at config.cc:318
#2 0x000055555562eaa8 in bx_init_options () at config.cc:417
#3 0x0000555555629ee5 in bx_init_main (argc=7, argv=0x7fffffffe0a8) at main.cc:620
#4 0x0000555555629c3b in bxmain () at main.cc:317
#5 0x0000555555629d7d in main (argc=7, argv=0x7fffffffe0a8) at main.cc:551
After I set bochs compile config to 'normal' I fix it and bochs runs properly.
I'm tring to follow the instruction of https://github.com/tandasat/Hypervisor-101-in-Rust/blob/main/BUILDING.md to build and run hypervisor on bochs. But failed,
probelm 1: compiling bochs with default parameters causes arg '-rc' was not understood.
I tried to add --enable-debugger into bochs compile parameters and fixed it.
problem 2: core dump for getting plugin with 0 count.
PLUG_get_plugins_count returns 0 and config_interface_list[0] is null causes core dump.
I tried to set bochs config to 'normal' instead of 'plugin' to fix it.
problem 3: bochs still cores.
at 'memory_handler = BX_MEM_THIS memory_handlers[a20addr >> 20];'
I have no idea about it. Could you please help me with that?