Garth Goodson
2006-Aug-22 17:13 UTC
[Xen-devel] virtualization of cr0 reg flags on hvm system
I''m experimenting with getting a fully virtualized i386 system up and running on AMD HVM hardware under Xen. (The reason for using i386 and not amd64 is that the amd64 dies early in the kernel loading process.) I have found that the kernel boots until it reaches a point where it tries to load the cr0 register with the current cr0 value or''ed with a set of flags. In particular the load_cr0 call below never seems to complete. If I remove the CR0_WP (write-protect) flag, the kernel continues booting. I''m using xen unstable (tip''s changeset: 11217:6a8204e4619d). Is the support of the WP flag a known issue? Are there any fixes for it? 1224 cr0 = rcr0(); 1225 /* 1226 * CR0_MP, CR0_NE and CR0_TS are also set by npx_probe() for the 1227 * BSP. See the comments there about why we set them. 1228 */ 1229 cr0 |= CR0_MP | CR0_NE | CR0_TS | CR0_WP | CR0_AM; 1230 load_cr0(cr0); Thanks, -Garth _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2006-Aug-23 09:35 UTC
Re: [Xen-devel] virtualization of cr0 reg flags on hvm system
On 22/8/06 6:13 pm, "Garth Goodson" <ggoodson@gmail.com> wrote:> I''m experimenting with getting a fully virtualized i386 system up and > running on AMD HVM hardware under Xen. (The reason for using i386 and > not amd64 is that the amd64 dies early in the kernel loading process.) > > I have found that the kernel boots until it reaches a point where it > tries to load the cr0 register with the current cr0 value or''ed with a > set of flags. In particular the load_cr0 call below never seems to > complete. If I remove the CR0_WP (write-protect) flag, the kernel > continues booting. > > I''m using xen unstable (tip''s changeset: 11217:6a8204e4619d). Is the > support of the WP flag a known issue? Are there any fixes for it?Most OSes run with CR0.WP set all the time, so it''s certainly supported. You might need to add some tracing to Xen to find out why this particular write to CR0 is failing for you. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel