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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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.> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> 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 . _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > 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" ?Not execute real-mode code bare metal but parse real-mode instruction bytes and emulate each instruction.> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
> > 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 ? _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 8/3/08 07:11, "yushang" <yusunn@gmail.com> wrote:>>> 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 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Thanks . I see . It seems the real-mode emulator is more advanced than vmxassist ? 2008/3/9, Keir Fraser <keir.fraser@eu.citrix.com>:> On 8/3/08 07:11, "yushang" <yusunn@gmail.com> wrote: > > >>> 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 > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
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 On 8/3/08 16:55, "yushang" <yusunn@gmail.com> wrote:> Thanks . I see . It seems the real-mode emulator is more advanced than > vmxassist ? > > 2008/3/9, Keir Fraser <keir.fraser@eu.citrix.com>: >> On 8/3/08 07:11, "yushang" <yusunn@gmail.com> wrote: >> >>>>> 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 >> >> >>_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel