On Thu, 2006-07-27 at 23:29 -0700, Jeremy Fitzhardinge wrote: > Rusty Russell wrote: > > As you can see in my patch, I chose an even *simpler* route: (1) then > > call paravirts[%ebx]->init(paravirts[%ebx]), which does the rest. > > 1) setup C running environment, 2) install paravirt_ops, then 3) call > pvo.init, then 4) start_kernel. Doesn't look any simpler to me, and > that's assuming the hypervisor is cooperative. I originally installed paravirt_ops in asm, but realized it was just overly complex. As to assuming a cooperative hypervisor, err, yes. > > Since > > this deliberately only uses %eax and %ebx, I can't see anyone having > > issues with this. > > Well, it doesn't work if the hypervisor wants to use eax/ebx for > something else or nothing at all. If the hypervisor doesn't conform to > this model for whatever reason, it still needs to arrange to run some > code before getting to the pv_startup. Err, if they want to boot Linux, they're going to have to figure out some system for booting. If they really can't use ours, then, yes, they're going to have to submit a patch with justification of why they have to do it differently. I agree that it's a little ad-hoc, but setting a simple standard fits well with my ideal of making it easy for implementers, starting with you two. And we both know Xen doesn't care, so I find your protests lack oomph 8) Zach, I think we should (1) check for ring 0, then (2) check for paging. That way we don't read CR0 unless we're in ring0, and we keep close to our general guarantee of "no sensitive insns". (BTW, I committed your previous patch, please mod...). Thanks! Rusty. -- Help! Save Australia from the worst of the DMCA: http://linux.org.au/law