about vmxassist
Hi All,
Can someone clarify this for me : when using vmxassist , is BIOS running in virtual8086 mode ? And if do not use it , BIOS will run in real-address mode , right ?
Best regards
yushang
Quoted 3 lines
Hi All,
Can someone clarify this for me : when using vmxassist , is BIOS running in virtual8086 mode ?
When using vmxassist, the ROMBIOS/VGABIOS code executed within a
HVM (VMX) domain runs in VM8086 mode. Instructions unsupported in this mode generate a GPF when executed which vmxassist catches and attempts to emulate. I would suggest referring to tools/firmware/README for further information.
Quoted 2 lines
And if do not use it , BIOS will run in
real-address mode , right ?
Intel VT-x doesn't provide real mode support for HVM guests. If
you don't use vmxassist, you could use full real-mode emulation. In fact, this is the default with the latest xen-unstable which doesn't support vmxassist anymore.
Kamala
Quoted 2 lines
Intel VT-x doesn't provide real mode support for HVM guests. If
you don't use vmxassist, you could use full real-mode emulation.
What do you mean by "full real-mode emulation" ? I find the code path will enter the native real mode if do not use vmxassist , not a emulation one .
Quoted 1 line
Quoted 1 line
Intel VT-x doesn't provide real mode support for HVM guests.
If
Quoted 2 lines
Quoted 1 line
you don't use vmxassist, you could use full real-mode emulation.
What do you mean by "full real-mode emulation" ?
Not execute real-mode code bare metal but parse real-mode instruction bytes and emulate each instruction.
Quoted 3 lines
I find the code path
will enter the native real mode if do not use vmxassist , not a emulation one .
I would suggest referring to vmx_realmode inxen/arch/x86/hvm/vmx/realmode.c
Quoted 3 lines
Quoted 3 lines
I find the code path
will enter the native real mode if do not use vmxassist , not a emulation one .
Sorry but I mean the code path of hvmloader , just at the beginning of hvmloader, if do not use vmxassist execution will return from main and enter real-address mode then jmp to bios , so bios will run in real-address mode , is this true ?
Quoted 7 lines · yushang
Quoted 3 lines
Quoted 3 lines
I find the code path
will enter the native real mode if do not use vmxassist , not a emulation one .Sorry but I mean the code path of hvmloader , just at the beginning of hvmloader, if do not use vmxassist execution will return from main and enter real-address mode then jmp to bios , so bios will run in real-address mode , is this true ?
Yes, as soon as real mode is entered (CR0 bit 0 is cleared) Xen notices that and runs the guest through the full real-mode emulator until CR0 bit 0 is set again.
-- Keir
Thanks . I see . It seems the real-mode emulator is more advanced than vmxassist ?
2008/3/9, Keir Fraser <[email protected]>:
Quoted 20 lines · yushang
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
I find the code path
will enter the native real mode if do not use vmxassist , not a emulation one .Sorry but I mean the code path of hvmloader , just at the beginning of hvmloader, if do not use vmxassist execution will return from main and enter real-address mode then jmp to bios , so bios will run in real-address mode , is this true ?
Yes, as soon as real mode is entered (CR0 bit 0 is cleared) Xen notices that
and runs the guest through the full real-mode emulator until CR0 bit 0 is set again.-- Keir
Yes, that's why it replaces vmxassist! It more accurately simulates the real-mode environment than vmxassist was able to, hence more real-mode code runs correctly under full emulation (e.g., a wider range of bootloaders).
-- Keir
Quoted 24 lines · yushang
Thanks . I see . It seems the real-mode emulator is more advanced than vmxassist ?
2008/3/9, Keir Fraser <[email protected]>:
Quoted 20 lines · yushang
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
I find the code path
will enter the native real mode if do not use vmxassist , not a emulation one .Sorry but I mean the code path of hvmloader , just at the beginning of hvmloader, if do not use vmxassist execution will return from main and enter real-address mode then jmp to bios , so bios will run in real-address mode , is this true ?
Yes, as soon as real mode is entered (CR0 bit 0 is cleared) Xen notices that
and runs the guest through the full real-mode emulator until CR0 bit 0 is set again.-- Keir