Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751814AbdHRMl6 (ORCPT ); Fri, 18 Aug 2017 08:41:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54540 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750953AbdHRMl5 (ORCPT ); Fri, 18 Aug 2017 08:41:57 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 120E6C0587DF Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=david@redhat.com Subject: Re: [PATCH] kvm: VMX: do not use vm-exit instruction length for fast MMIO To: Paolo Bonzini , 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> <3b7afdfc-d308-7645-2105-6bb339188aa6@redhat.com> From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <3f6fd875-037c-91c8-b570-d5010751d175@redhat.com> Date: Fri, 18 Aug 2017 14:41:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <3b7afdfc-d308-7645-2105-6bb339188aa6@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Fri, 18 Aug 2017 12:41:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 568 Lines: 26 On 18.08.2017 14:35, Paolo Bonzini wrote: > 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). Oh I see, too bad :( > > Testing the hypervisor bit is the first line of action. > > Paolo -- Thanks, David