From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5DlD-0003C5-0A for qemu-devel@nongnu.org; Thu, 10 Jul 2014 08:47:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5Dl3-0002CY-TW for qemu-devel@nongnu.org; Thu, 10 Jul 2014 08:47:38 -0400 Received: from mail-qa0-x230.google.com ([2607:f8b0:400d:c00::230]:44632) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5Dl3-0002AZ-OX for qemu-devel@nongnu.org; Thu, 10 Jul 2014 08:47:29 -0400 Received: by mail-qa0-f48.google.com with SMTP id x12so7235224qac.35 for ; Thu, 10 Jul 2014 05:47:28 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <53BE8B5A.4070404@redhat.com> Date: Thu, 10 Jul 2014 14:47:22 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1403043037-1271-1-git-send-email-james.hogan@imgtec.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 00/12] KVM Support for MIPS32 Processors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , James Hogan Cc: kvm-devel , Gleb Natapov , QEMU Developers , Sanjay Lal , Aurelien Jarno , Christoffer Dall Il 10/07/2014 14:17, Peter Maydell ha scritto: > > More generally, there doesn't really seem to be provision in the > KVM KVM_EXIT_MMIO API for returning "this access failed". > I guess in theory userspace could do all the "figure out how > to adjust CPU state to do exception entry and then run VCPU", > but that seems like quite a lot of work which the kernel already > knows how to do; is there some way to provide a simpler API > that lets userspace just inform the kernel that it needs to > fault the access? There are 3 free padding bytes in struct kvm_run's mmio field. It's possible to add a per-VM capability and have the kernel check one of these bytes when the capability is set. Paolo