Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbdHQNYB (ORCPT ); Thu, 17 Aug 2017 09:24:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47072 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751574AbdHQNYA (ORCPT ); Thu, 17 Aug 2017 09:24:00 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com C9F39AC2CF Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=rkrcmar@redhat.com Date: Thu, 17 Aug 2017 15:23:55 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Cc: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] kvm: x86: disable KVM_FAST_MMIO_BUS Message-ID: <20170817132354.GB2566@flask> References: <20170816161301-mutt-send-email-mst@kernel.org> <20170816194342-mutt-send-email-mst@kernel.org> <81dabc78-edfd-32fc-024c-c57330386a51@redhat.com> <20170816190316.GA2566@flask> <20170816224815-mutt-send-email-mst@kernel.org> <20170817011815-mutt-send-email-mst@kernel.org> <2e42e64c-f31d-5ccd-2357-1a859cec5b5b@redhat.com> <2f80e82b-3007-0348-72b8-3391c7c57589@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2f80e82b-3007-0348-72b8-3391c7c57589@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 17 Aug 2017 13:23:59 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1240 Lines: 28 2017-08-17 14:14+0200, Paolo Bonzini: > On 17/08/2017 11:00, Paolo Bonzini wrote: > > On 17/08/2017 00:31, Michael S. Tsirkin wrote: > >> On Wed, Aug 16, 2017 at 11:25:35PM +0200, Paolo Bonzini wrote: > >>> Yes, I agree. EMULTYPE_SKIP is fine because failed decoding still > >>> causes an exception to be injected. Maybe it's better to gate the > >>> EMULTYPE_SKIP emulation on the exit qualification saying this is a write > >> > >> I thought it's already limited to writes. I agree that's a reasonable > >> limitation in any case. > >> > >>> and also not a page table walk---just in case. > >> > >> I still don't get it, sorry. Let's assume for the sake of argument > >> that it's a PT walk causing the MMIO access. Just why do you think > >> that it makes sense to skip the instruction that caused the walk? > > > > I think it doesn't. I think in that case it's better to skip the fast > > write and proceed with full emulation. It definitely doesn't. I think it's possible only because virtio forbids other access types, so we assume that every access is a write access. > ... nope, exit qualification is just zero for EPT misconfigurations, so > we cannot do this. Yeah, we'd need to use EPT violation to get that information.