From mboxrd@z Thu Jan 1 00:00:00 1970 From: Radim =?utf-8?B?S3LEjW3DocWZ?= Subject: Re: [PATCH] KVM: x86: Introduce segmented_write_std Date: Fri, 20 Jan 2017 18:57:47 +0100 Message-ID: <20170120175746.GE6291@potion> References: <20170112022829.15140-1-srutherford@google.com> <1890312293.7237408.1484228430752.JavaMail.zimbra@redhat.com> <96b2e3ff-8566-a0b8-3302-3ee6a44ab5bf@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jim Mattson , Steve Rutherford , kvm@vger.kernel.org, Dmitry Vyukov , Prasad Pandit , kernellwp@gmail.com To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33854 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752956AbdATR5u (ORCPT ); Fri, 20 Jan 2017 12:57:50 -0500 Content-Disposition: inline In-Reply-To: <96b2e3ff-8566-a0b8-3302-3ee6a44ab5bf@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: 2017-01-20 18:09+0100, Paolo Bonzini: > 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). What about marking instructions that are not expected to access emulated memory? For now, we could WARN_ONCE if they do, which would pave a way to make unrestricted guest mandatory. Then we would drop instructions that were not needed with the hope that they won't be. (This would imply mandatory EPT. Also a benefit, IMO.) Westmere (the architecture to introduce unrestricted guest) is from 2010, which makes it close to being endangered by expired extended warranties.