[Lguest] paravirt_ops and HAL
Rusty Russell
rusty at rustcorp.com.au
Thu Jan 17 10:06:03 EST 2008
On Thursday 17 January 2008 08:37:58 Pablo wrote:
> Greetings
>
> First, I want to say thank for this interesting project, which in
> resulting an invaluable source to me to get a better understanding of
> virtualization in Linux.
>
> After reading the criticisms from Ingo about the impact of including
> paravirt_ops in the kernel (http://lwn.net/Articles/225884/) and also
> the disadvantages pointed in this article
> (http://ols.108.redhat.com/2007/Reprints/nakajima-Reprint.pdf) from the
> Linux Symposium, it seams to me that the whole problem comes from the
> lack of a HAL in the Linux kernel that concentrates all the hardware
> related code so that we have a single point of change.
Hi Pablo,
In one sense, Linux does have a HAL. We don't support 25 architectures by
writing 25 kernels!
We have APIs to abstract away the differences between architectures, but at
the lower level we still have minor runtime-detectable differences, so a
second level of abstraction is required. Many architectures already have
this (eg. PowerPC), and i386 had it to a certain extent, for specific cases
(different clock sources, chip bugs, etc).
paravirt_ops started as a set of hooks which covered all the remaining cases
needed for virtualization on non-virtualizing hardware. But interestingly it
is evolving the other way than a Grand Unified Abstraction: into multiple
smaller sets of hooks for specific purposes. We have cpu, mmu,
initialization, etc.
The result is somewhat haphazard (some hooks are located in strange places),
but it works quite well.
Hope that clarifies,
Rusty.
More information about the Lguest
mailing list