From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751559AbeAYOtZ (ORCPT ); Thu, 25 Jan 2018 09:49:25 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48308 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750940AbeAYOtX (ORCPT ); Thu, 25 Jan 2018 09:49:23 -0500 Date: Thu, 25 Jan 2018 09:49:22 -0500 (EST) From: Paolo Bonzini To: Jason Wang Cc: Radim =?utf-8?B?S3LEjW3DocWZ?= , Liran Alon , vkuznets@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, "Michael S. Tsirkin" Message-ID: <2039380511.2539348.1516891762406.JavaMail.zimbra@redhat.com> In-Reply-To: References: <6690c53c-fc99-44ea-9090-6e7438c1bc98@default> <20180125141620.GA7663@flask> Subject: Re: [PATCH] x86/kvm: disable fast MMIO when running nested MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [78.12.230.124, 10.4.196.15, 10.4.195.7] Thread-Topic: x86/kvm: disable fast MMIO when running nested Thread-Index: 1FbkeF9fEGiKhQBhpYGwax9SbTSIcQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > Michael and Jason, any progress on implementing a fast virtio mechanism > > that doesn't rely on undefined behavior? > > > > (Encode writing instruction length into last 4 bits of MMIO address, > > side-channel say that accesses to the MMIO area always use certain > > instruction length, use hypercall, ...) > > > > Thanks. > > No progress from my side. But we can use PIO for virtio 1.0 and it's > faster than fast MMIO (qemu supports modern pio notification bar, we can > make it as default). It looks to me that neither encoding nor hypercall > will work for real hardware virtio device. Encoding the instruction length would work, the h/w virtio devices would just ignore it. But... it is really ugly. Using PIO would be a small step backwards for PCIe. As long as the device only needs *one* notification register (either MMIO or PIO) to initialize successfully, it's okay. Then if there is no PIO space you'd just fall back to the slower MMIO notification. Paolo