From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [Qemu-devel] [PATCH v5 00/12] KVM Support for MIPS32 Processors Date: Thu, 10 Jul 2014 14:47:22 +0200 Message-ID: <53BE8B5A.4070404@redhat.com> References: <1403043037-1271-1-git-send-email-james.hogan@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: QEMU Developers , kvm-devel , Gleb Natapov , Sanjay Lal , Aurelien Jarno , Christoffer Dall To: Peter Maydell , James Hogan Return-path: Received: from mail-qc0-f175.google.com ([209.85.216.175]:55392 "EHLO mail-qc0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752909AbaGJMr3 (ORCPT ); Thu, 10 Jul 2014 08:47:29 -0400 Received: by mail-qc0-f175.google.com with SMTP id i8so7690265qcq.20 for ; Thu, 10 Jul 2014 05:47:28 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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