Re: pekka-vm and kvm documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/25/2010 10:23 PM, Pekka Enberg wrote:
Hi Avi,

Avi Kivity wrote:
When you come up against something that is undocumented or badly described, please complain on kvm@. We will then update the documentation.

So one thing I'm wondering is in what mode do we enter the guest? Is that entirely specified with KVM_SET_REGS and KVM_SET_SREGS?

Yes. cr0.pe = real/protected, eflags.vm = vm86 mode, cs.d = prot16/prot32, efer.lme/efer.lma/cs.l = longmode.


I assume we're entering real mode as per how I set up "rflags" but for some reason I'm seeing "cs" base being zeroed out before first instruction is executed with my simple kvm program which could mean that it's trying to use GDT (which is not set up at that point).

I see you set up the cpu as if after reset (cs:ip = f000:fff0) but just dumped a kernel there. That won't work, you need real code.

Try poking 'e9 fd ff' at your entry point (ffff0) and see the cpu pegged at 100% (1: jmp 1b) (this is probably the largest possible kernel that is bug-free).

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux