Il 20/11/2013 00:56, Jim MacArthur ha scritto: > I haven't been able to find much information on it, but by reading the > API document and stracing qemu I've put together a small program which > creates a VM, VCPU, and sets up some memory. All of these ioctls > return successfully, but trying to run always returns with exit code > 17 and suberror 1 which so far as I can tell seems to be a problem > with page tables. I'm on an x86_64 host. > > The question is, how does a new vcpu start up? Will it start in full > 64-bit mode or 16-bit real mode? By default it start in 16-bit real mode, with CS=0xf000 and EIP=0xfff0, but CS.base = 0xffff0000. However, you can send ioctls to modify CR0/CR4/EFER and place the VCPU in whatever mode you'd like to have. > And will I need a full set of > translation tables to run a single instruction or can I just point it > at some memory and expect it to run? Real mode doesn't need page tables of course, and so does 32-bit protected mode with CR0.PG=0. However, 64-bit mode only exists with paging (and PAE) enabled. So you need page tables to enable 64-bit mode. Paolo -- 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