Re: [kvm-devel] [announce] [patch] KVM paravirtualization for Linux

Hollis Blanchard
2007-01-07T17:50:43Z

On Sun, 2007-01-07 at 14:20 +0200, Avi Kivity wrote:
>
>
> Well, you did say it was ad-hoc. For reference, this is how I see the
> hypercall API:
[snip]
> - Guest/host communications is by guest physical addressed, as the
> virtual->physical translation is much cheaper on the guest (__pa() vs
> a page table walk).

Strongly agreed. One of the major problems we had with the PowerPC Xen
port was that Xen passes virtual addresses (even userspace virtual
addresses!) to the hypervisor. Performing a MMU search on PowerPC is far
more convoluted than x86's table walk and is not feasible in software.

I'm anxious to avoid the same mistake wherever possible.

Of course, even with physical addresses, data structures that straddle
page boundaries prevent the hypervisor from mapping contiguous physical
pages to discontiguous machine pages (or whatever terminology you want
to use).

IBM's Power Hypervisor passes hypercall data in registers most of the
time. In the places it communicates via memory, I believe the parameter
is actually a physical frame number, and the size is explicitly limited
to one page.

-Hollis