Hi Everyone,
As Andreas just discovered, I accidentally broke builds on old kernels
(older than 2.6.36). The reason the build broke was that we currently
depend on the KVM kernel headers and we require some features from new
kernels (vCPU info from 2.6.33) and want to use other features from more
recent kernels (e.g., XSave).
The way I currently try to solve this is by ifdef:ing things that are
not present in old kernels. This is obviously an error-prone processes
since some data structures are used in multiple functions throughout the
KVM code. The way qemu solves this problem (which is the recommended
solution) is by including the header.
Including the kernel headers from a recent kernel would make the kvm
codebase in gem5 much cleaner since we wouldn't need to check for the
presence of structs and defines. Instead, we'd check for features at
runtime using the API provided by KVM and enable the relevant features
or fail. We need to do this at runtime anyway since the kernel may be
different than the headers. The only problem I can see the license of
the headers. We can obviously link with the kernel headers intended for
userspace (e.g., kvm.h), that is explicitly stated in the COPYING file
in Linux. But, can we redistribute them? Any thoughts?
//Andreas
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev