From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] KVM: x86: Introduce segmented_write_std Date: Fri, 20 Jan 2017 18:09:07 +0100 Message-ID: <96b2e3ff-8566-a0b8-3302-3ee6a44ab5bf@redhat.com> References: <20170112022829.15140-1-srutherford@google.com> <1890312293.7237408.1484228430752.JavaMail.zimbra@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Steve Rutherford , kvm@vger.kernel.org, Dmitry Vyukov , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Prasad Pandit , kernellwp@gmail.com To: Jim Mattson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:60368 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752041AbdATRJK (ORCPT ); Fri, 20 Jan 2017 12:09:10 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 20/01/2017 17:55, Jim Mattson wrote: > Why attempt to emulate these instructions at all, if we're not going > to handle a data access to emulated/special memory? > > It seems that one of the following three cases must hold: > > 1) The data accessed by the instruction is emulated/special memory. > 2) The instruction was fetched from emulated/special memory. > 3) The instruction has been modified since the VM-exit. 4) The processor is in big real mode and you don't have unrestricted guest support in your processor (or you disabled EPT). Paolo > The proposed patch is incorrect for case (1). Case (2) violates the > emulator's assumptions outlined in kvm_emulate.h. Case (3) seems best > handled by simply re-entering VMX non-root mode.