From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v4 6/6] KVM: nSVM: fix SMI injection in guest mode Date: Wed, 11 Oct 2017 13:21:01 +0200 Message-ID: References: <20171010121717.17792-1-lprosek@redhat.com> <20171010121717.17792-7-lprosek@redhat.com> <26129b31-5316-b22c-8282-c912abed3893@redhat.com> <9e8dccc2-3fa1-123a-30d2-de9ae9e9b7db@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: KVM list , Radim Krcmar To: Ladi Prosek Return-path: Received: from mx1.redhat.com ([209.132.183.28]:44910 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751888AbdJKLVE (ORCPT ); Wed, 11 Oct 2017 07:21:04 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A2AD45F2986 for ; Wed, 11 Oct 2017 11:21:04 +0000 (UTC) In-Reply-To: Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: On 11/10/2017 09:50, Ladi Prosek wrote: > To recap, this is what I have in em_rsm() now: > > 1. Go back to real mode - existing code > 2. enter_vmx_non_root_mode() / enter_svm_guest_mode() > 3. rsm_load_state_* - existing code > > Am I just getting lucky or is there a reason why we must have loaded > host state before switching to guest mode? I understand that it would > be cleaner with the intermediate host state load as going directly > from real to guest is kind of unnatural. But it works and saves a > bunch of cycles. Thinking more about it no, it shouldn't be needed. It was just cleaner than the first state load. Paolo