Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753330AbbFDN7m (ORCPT ); Thu, 4 Jun 2015 09:59:42 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:38473 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751955AbbFDN7h (ORCPT ); Thu, 4 Jun 2015 09:59:37 -0400 Message-ID: <557059C4.1060601@redhat.com> Date: Thu, 04 Jun 2015 15:59:32 +0200 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= CC: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, guangrong.xiao@linux.intel.com, bdas@redhat.com Subject: Re: [PATCH v2 06/13] KVM: x86: save/load state on SMM switch References: <1432746314-50196-1-git-send-email-pbonzini@redhat.com> <1432746314-50196-7-git-send-email-pbonzini@redhat.com> <20150603190253.GA13488@potion.brq.redhat.com> In-Reply-To: <20150603190253.GA13488@potion.brq.redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 713 Lines: 20 On 03/06/2015 21:02, Radim Krčmář wrote: > > + if (r < 0) > > + return; > > And if we fail to write it, is there other option than throwing an error > to userspace? (Unset HF_SMM_MASK and pretend that nothing happened > doesn't find much support in docs.) Just do nothing, I guess. If this is ROM, things will work (for some definition of work) the same as in real hardware. If it's MMIO, they will break as soon as the next instruction is executed. Paolo -- 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/