From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Starting a VM using /dev/kvm Date: Fri, 22 Nov 2013 08:56:49 +0200 Message-ID: <20131122065649.GA13898@redhat.com> References: <528CF159.10001@redhat.com> <20131121072719.GF2108@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]:60114 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752069Ab3KVG4y (ORCPT ); Fri, 22 Nov 2013 01:56:54 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Thu, Nov 21, 2013 at 11:57:46PM +0000, Jim MacArthur wrote: > On 21 November 2013 07:27, Gleb Natapov wrote: > > On Thu, Nov 21, 2013 at 12:39:49AM +0000, Jim MacArthur wrote: > >> 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? > > This is on a Mac mini: Linux version 3.2.0-56-generic > (buildd@roseapple) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) > #86-Ubuntu SMP Wed Oct 23 09:20:45 UTC 2013 > > I get the same results from 3.2.0-4-amd64 on my thinkpad. > > The code I'm running is at http://pastebin.com/Z1SR5Vid. > > It's likely to be because I'm doing something wrong, and I've got what > I wanted working anyway. Thanks again for your help. No, this is because old kernels started in incorrect state, on recent kernels KVM_GET_SREGS will return correct one. -- Gleb.