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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to