Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751818AbbEDT7N (ORCPT ); Mon, 4 May 2015 15:59:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35106 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751963AbbEDT7J (ORCPT ); Mon, 4 May 2015 15:59:09 -0400 Date: Mon, 4 May 2015 21:59:02 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, bsd@redhat.com, guangrong.xiao@linux.intel.com, Yang Zhang , wanpeng.li@linux.intel.com Subject: Re: [PATCH 09/13] KVM: x86: save/load state on SMM switch Message-ID: <20150504195902.GA15848@potion.brq.redhat.com> References: <1430393772-27208-1-git-send-email-pbonzini@redhat.com> <1430393772-27208-10-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430393772-27208-10-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1214 Lines: 30 2015-04-30 13:36+0200, Paolo Bonzini: > The big ugly one. This patch adds support for switching in and out of > system management mode, respectively upon receiving KVM_REQ_SMI and upon > executing a RSM instruction. Both 32- and 64-bit formats are supported > for the SMM state save area. > > Signed-off-by: Paolo Bonzini > --- > diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c > +static void rsm_set_desc_flags(struct desc_struct *desc, u16 flags) > +{ > + desc->g = (flags >> 15) & 1; > + desc->d = (flags >> 14) & 1; > + desc->l = (flags >> 13) & 1; > + desc->avl = (flags >> 12) & 1; > + desc->p = (flags >> 7) & 1; > + desc->dpl = (flags >> 5) & 3; > + desc->s = (flags >> 4) & 1; > + desc->type = flags & 15; I can't find a description of this ... can you point me to a place where the gap between 'p' and 'avl' is documented? (Not that it matters unless the guest reads it, but it's a bit weird.) Thanks. -- 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/