Skip to contentSkip to conversation

about vmxassist

DISCUSSION yushang 3 participants 8 messages Mar 6, 2008 – Mar 8, 2008

lore
Share & tools
lore

yushang

author
#0 lore raw

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

#1 lore raw
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

author
#2 lore raw
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 .

#3 lore raw
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 in
xen/arch/x86/hvm/vmx/realmode.c

author
#4 lore raw
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 ?

#5 lore raw
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

author
#6 lore raw

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

#7 lore raw

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