From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 5/24] Introduce vmcs12: a VMCS structure for L1 Date: Wed, 23 Jun 2010 12:24:41 +0300 Message-ID: <4C21D2D9.3050605@redhat.com> References: <1276431753-nyh@il.ibm.com> <201006131225.o5DCP79H012922@rice.haifa.ibm.com> <4C15E95D.9000300@redhat.com> <20100622145441.GA23496@fermat.math.technion.ac.il> <4C21BE6C.1060404@redhat.com> <5AA8A9BF-D300-400D-9D9B-CBF1A9FC42C8@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Nadav Har'El" , kvm@vger.kernel.org, Joerg Roedel To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31441 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059Ab0FWJYt (ORCPT ); Wed, 23 Jun 2010 05:24:49 -0400 In-Reply-To: <5AA8A9BF-D300-400D-9D9B-CBF1A9FC42C8@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 06/23/2010 12:15 PM, Alexander Graf wrote: > >> Alex, Joerg, well gvmcb_{read,write}{32,64}() work for nsvm? All that kmapping is incredibly annoying. >> > I'm sceptical that we can actually get that to be as fast as a direct kmap, but apart from that I don't see an obvious reason why it wouldn't. > I'm thinking of struct kvm_cached_guest_page { void __user **pmem; }; static u64 kvm_read_cached_guest_page(struct kvm_vcpu *vcpu, struct kvm_cached_guest_page *kcgp, unsigned offset) { u64 __user *mem = *rcu_dereference(kcgp->kcgp) + offset; u64 ret; if (get_user(ret, mem)) kvm_make_request(KVM_REQ_TRIPLE_FAULT, vcpu); return ret; } We could even use our own exception handler to take the error case out of line. -- error compiling committee.c: too many arguments to function