All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mats Petersson <mats@planetcatfish.com>
To: Brady Chen <chenchp@gmail.com>
Cc: Keir Fraser <keir@xensource.com>,
	tygrawy@gazeta.pl, xen-devel@lists.xensource.com,
	Z24 <z24@gmx.net>,
	AL.LINUX@bcpraha.com
Subject: Re: Re: [Xen-users] boot a existing windows in hvm domain
Date: Wed, 08 Aug 2007 18:45:12 +0100	[thread overview]
Message-ID: <46ba0137.18e7300a.328b.ffffab4c@mx.google.com> (raw)
In-Reply-To: <C2DFAB87.13D04%keir@xensource.com>

At 17:19 08/08/2007, Keir Fraser wrote:
>No, it's a processor mode halfway between real mode and protected mode which
>all x86 processors support, but which vmxassist is really rather bad at
>handling. If this is a big-real-mode copy loop then that might explain why
>the loop is executing so bizarrely, and may mean you are out of luck until
>we retire vmxassist.


And the fact that EDI is 0xC33FE when it tries to write to the memory 
at address of EDI indicates that it's Big-Real-Mode.

In real-mode, any register access beyond segment+0xFFFF is a GP-fault 
on 386 and later processors. To get around this and simplify the 
process of for example loading large chunks of data into memory, 
someone figured out that segment register limits (and base-address) 
is not being RESET by the processor when resetting the protected-mode 
bit in CR0, so one can go into protected mode, load a segment 
register with a bigger limit (e.g. a "no limit" of 4GB), and a 
base-addres of (say) zero.

Unfortunately, since VMXassist uses the VM806 mode of the processor, 
it doesn't support transitions back and forth between protected mode 
with segment registers preserved (you can't run in Real Mode with VMX 
enabled).

The other option for possibly getting this working (plug for my 
former employer) is to use an AMD processor, as that supports 
"real-mode virtualization", so you can run real-mode with "SVM" 
enabled, and in this case, the segment registers can be manipulated 
in protected mode, and then go back to real-mode, without any loss of 
segment data.

As Keir hints, there is work to "remove" the VMXassist mode (which by 
all accounts, and I don't think I'm offending anyone by saying this, 
is a quick hack to get around the fact that real-mode code is needed 
to boot the OS).

--
Mats


>  -- Keir
>
>On 8/8/07 16:50, "Brady Chen" <chenchp@gmail.com> wrote:
>
> > "big-real-mode"? is it something related to PAE? my CPU is Intel
> > T2400, Centrino Duo
> > thanks
> >
> > [root@localhost firmware]# cat /proc/cpuinfo
> > processor       : 0
> > vendor_id       : GenuineIntel
> > cpu family      : 6
> > model           : 14
> > model name      : Genuine Intel(R) CPU           T2400  @ 1.83GHz
> > stepping        : 8
> > cpu MHz         : 1828.831
> > cache size      : 2048 KB
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : no
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 10
> > wp              : yes
> > flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat
> > clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc pni
> > monitor vmx est tm2 xtpr
> > bogomips        : 3660.35
> >
> > processor       : 1
> > vendor_id       : GenuineIntel
> > cpu family      : 6
> > model           : 14
> > model name      : Genuine Intel(R) CPU           T2400  @ 1.83GHz
> > stepping        : 8
> > cpu MHz         : 1828.831
> > cache size      : 2048 KB
> > fdiv_bug        : no
> > hlt_bug         : no
> > f00f_bug        : no
> > coma_bug        : no
> > fpu             : yes
> > fpu_exception   : yes
> > cpuid level     : 10
> > wp              : yes
> > flags           : fpu tsc msr pae mce cx8 apic mtrr mca cmov pat
> > clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx constant_tsc up pni
> > monitor vmx est tm2 xtprbogomips        : 3660.35
> >
> >
> > On 8/8/07, Mats Petersson <mats@planetcatfish.com> wrote:
> >> At 14:32 08/08/2007, Keir Fraser wrote:
> >>> Disassembled the interesting bit by hand:
> >>>
> >>> D700: 66 03 DF               add %edi,%ebx
> >>> D703: 66 83 C3 02            add $2,%ebx
> >>> D707: 66 81 C7 FE 01 00 00   add $0x1fe,%edi
> >>> D70E: 66 49                  dec %ecx
> >>> D710: 66 0B C9               or  %ecx,%ecx
> >>> D713: 0F 84 17 00            jz  0xd72e
> >>> D717: 26 67 8B 03            mov %es:(%ebx),%ax
> >>> D71B: 26 67 89 07            mov %ax,%es:(%edi)
> >>> D71F: 66 83 C3 02            add $2,%ebx
> >>> D723: 66 81 C7 00 02 00 00   add $0x200,%edi
> >>> D72A: 66 49                  dec %ecx
> >>> D72C: EB E2                  jmp 0xd710
> >>> D72E: 66 61                  popal
> >>> D730: 90                     nop
> >>> D731: 1F                     pop %ds
> >>> D732: 07                     pop %es
> >>> D733: C3                     ret
> >>
> >>
> >> Any chance that the segment(s) involved are "big-real-mode"?
> >>
> >> --
> >> Mats
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel

  reply	other threads:[~2007-08-08 17:45 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8fec1fce0707300537g5a1f9e2dgdb4cc27add99d218@mail.gmail.com>
     [not found] ` <f8sbfr.2so.1@z24.net.invalid.my>
     [not found]   ` <8fec1fce0708020247k242c53f9ne3eab45cc85aaad1@mail.gmail.com>
     [not found]     ` <f8srjg.1no.1@z24.net.invalid.my>
     [not found]       ` <8fec1fce0708020811q73017eb7g85f8fd353a3a20dc@mail.gmail.com>
     [not found]         ` <8fec1fce0708061955xb5018b4tf1e51863154e0f1a@mail.gmail.com>
2007-08-07  5:48           ` [Xen-users] boot a existing windows in hvm domain Brady Chen
2007-08-07  5:59             ` Keir Fraser
2007-08-07  6:06               ` Brady Chen
2007-08-07  6:32                 ` Keir Fraser
2007-08-07  7:58                   ` Brady Chen
2007-08-07  8:02                     ` Keir Fraser
2007-08-07  8:22                       ` Brady Chen
2007-08-07  8:47                         ` Keir Fraser
2007-08-07  9:06                           ` Brady Chen
2007-08-07  9:29                             ` Keir Fraser
2007-08-07  9:35                               ` Keir Fraser
2007-08-07 10:30                                 ` Brady Chen
2007-08-07 10:37                                   ` Keir Fraser
2007-08-07 11:03                                     ` Brady Chen
2007-08-07 11:35                                       ` Brady Chen
2007-08-07 11:50                                         ` Keir Fraser
2007-08-07 16:06                                           ` Brady Chen
2007-08-07 16:26                                             ` Keir Fraser
2007-08-08  7:37                                               ` Brady Chen
2007-08-08  8:25                                                 ` Brady Chen
2007-08-08  8:41                                                   ` Keir Fraser
2007-08-08  9:38                                                     ` Brady Chen
2007-08-08 10:26                                                       ` Keir Fraser
2007-08-08 12:12                                                         ` Brady Chen
2007-08-08 13:32                                                           ` Keir Fraser
2007-08-08 14:52                                                             ` Mats Petersson
2007-08-08 15:50                                                               ` Brady Chen
2007-08-08 16:19                                                                 ` Keir Fraser
2007-08-08 17:45                                                                   ` Mats Petersson [this message]
2007-08-08 20:26                                                                     ` Keir Fraser
2007-08-09  3:05                                                                       ` Brady Chen
2007-08-09  4:01                                                                         ` Brady Chen
2007-08-09  7:10                                                                           ` Keir Fraser
2007-08-09 10:35                                                                             ` Brady Chen
2007-08-09  7:13                                                                         ` Keir Fraser
2007-08-09 10:40                                                                           ` Brady Chen
2007-08-08 15:42                                                             ` Brady Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46ba0137.18e7300a.328b.ffffab4c@mx.google.com \
    --to=mats@planetcatfish.com \
    --cc=AL.LINUX@bcpraha.com \
    --cc=chenchp@gmail.com \
    --cc=keir@xensource.com \
    --cc=tygrawy@gazeta.pl \
    --cc=xen-devel@lists.xensource.com \
    --cc=z24@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.