From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: Userspace MSR handling Date: Fri, 29 May 2009 11:47:38 +0200 Message-ID: <4A1FAF3A.8040302@redhat.com> References: <9ae48b020905221311h1859d5a1v3653404721d5208b@mail.gmail.com> <790CB8FA-1660-4F6B-BEEC-AAB9724DDD64@suse.de> <4A193878.4030206@redhat.com> <4A1A7B14.5000205@redhat.com> <4A1A7F03.1020106@redhat.com> <9ae48b020905270912ib832446q28c47ebaf0da1720@mail.gmail.com> <4A1D6A1D.2040400@redhat.com> <9ae48b020905271009k4e3b646bva958f78516e69122@mail.gmail.com> <4A1D9191.1070600@redhat.com> <4A1E5108.5080307@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Ed Swierk , Alexander Graf , "kvm@vger.kernel.org" To: Avi Kivity Return-path: Received: from mx2.redhat.com ([66.187.237.31]:39197 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751661AbZE2Jro (ORCPT ); Fri, 29 May 2009 05:47:44 -0400 In-Reply-To: <4A1E5108.5080307@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/28/09 10:53, Avi Kivity wrote: > Gerd Hoffmann wrote: >> Trying to use in-kernel xen netback driver adds this problem: >> * Host kernel does xen hypercalls. Ouch. We have to emulate them >> in-kernel (otherwise using in-kernel netback would be a quite >> pointless exercise). > > Or do the standard function pointer trick. Event channel notifications > change to eventfd_signal, grant table ops change to copy_to_user(). grant table ops include mapping pages of the guest (aka domU) into the host (aka dom0) address space, fill the pointer into some struct (bio for blkback, skb for netback), send it down the road for processing. netback and blkback do quite some lowlevel xen memory management to get that done, including m2p and p2m table updates due to direct paging mode. It isn't as easy as s/hypercall/get_user_pages/ ... cheers, Gerd