Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757555AbbEVNNw (ORCPT ); Fri, 22 May 2015 09:13:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34445 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756636AbbEVNNr (ORCPT ); Fri, 22 May 2015 09:13:47 -0400 Date: Fri, 22 May 2015 15:13:43 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, bsd@redhat.com Subject: Re: [PATCH 08/12] KVM: x86: save/load state on SMM switch Message-ID: <20150522131343.GB31183@potion.brq.redhat.com> References: <1431084034-8425-1-git-send-email-pbonzini@redhat.com> <1431084034-8425-9-git-send-email-pbonzini@redhat.com> <20150521162036.GA31183@potion.brq.redhat.com> <555E061C.1020705@redhat.com> <20150521163335.GA31171@potion.brq.redhat.com> <555E3F02.1020405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <555E3F02.1020405@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1175 Lines: 31 2015-05-21 22:24+0200, Paolo Bonzini: > On 21/05/2015 18:33, Radim Krčmář wrote: > >> > Check the AMD architecture manual. > > I must be blind, is there more than Table 10-2? > > There's Table 10-1! :DDD :D I think I understand ... 10-1 says that amd64 doesn't shift the segment's attributes (they wouldn't fit into a word otherwise), but table 10-2 says nothing about the same for ia32 segment registers; that behavior is model-specific. Some people on http://www.sandpile.org/x86/smm.htm found out that P6 stores SMM state like this 7F84h: ES selector 7F86h: ES access rights 7F88h: ES limit 7F8Ch: ES base which has an extra selector there (makes little sense), but access rights cannot be shifted for they have only a word of space. I guess it stems in conflicting online resources, but it's not an architectural behavior, so we'll be wrong anyway :) (Not shifting them would make the code a bit nicer ...) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/