From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:54264 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbdHRMfV (ORCPT ); Fri, 18 Aug 2017 08:35:21 -0400 Subject: Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO To: David Hildenbrand , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: rkrcmar@redhat.com, "Michael S. Tsirkin" , stable@vger.kernel.org References: <1502890494-35208-1-git-send-email-pbonzini@redhat.com> <901d4c2e-aa94-2002-babc-7f042946a327@redhat.com> From: Paolo Bonzini Message-ID: <3b7afdfc-d308-7645-2105-6bb339188aa6@redhat.com> Date: Fri, 18 Aug 2017 14:35:09 +0200 MIME-Version: 1.0 In-Reply-To: <901d4c2e-aa94-2002-babc-7f042946a327@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: On 18/08/2017 13:57, David Hildenbrand wrote: > What about a hack: > > 1. clear instruction length when entering > 2. check if instruction length is set when trying to forward the RIP > 2a. if set, use it > 2b. if not set, compute it It's undefined, so we don't know that the instruction length remains zero (also, on older processors and possibly some nested setups the field is read-only). Testing the hypervisor bit is the first line of action. Paolo > this at least should give full speedup in existing setups. Not 99% > architecturally correct but might just work. >