From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Starting a VM using /dev/kvm Date: Thu, 21 Nov 2013 09:27:19 +0200 Message-ID: <20131121072719.GF2108@redhat.com> References: <528CF159.10001@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Paolo Bonzini , kvm@vger.kernel.org To: Jim MacArthur Return-path: Received: from mx1.redhat.com ([209.132.183.28]:52077 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750805Ab3KUH1Y (ORCPT ); Thu, 21 Nov 2013 02:27:24 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Nov 21, 2013 at 12:39:49AM +0000, Jim MacArthur wrote: > On 20 November 2013 17:28, Paolo Bonzini wrote: > > Il 20/11/2013 00:56, Jim MacArthur ha scritto: > >> 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. > > After reading this I added a call to KVM_GET_SREGS. Everything you say > here matches my experience except that CS.base=0xf0000. > So I adjusted my memory to cover physical address 0xFFFF0, and now > it's happily running instructions (NOPs, at least.) > I'm a bit puzzled that it didn't start with CS.base=0xffff0000, but it > doesn't matter, I've done what I wanted to do for now. > What is your kernel version? -- Gleb.