KVM: Build in most of the KVM stuff even if we're not going to use it.
Review Request #2513 - Created Nov. 17, 2014 and discarded
| Information | |
|---|---|
| Gabe Black | |
| gem5 | |
| default | |
| Reviewers | |
| Default | |
Changeset 10548:47efc3192cf5 --------------------------- KVM: Build in most of the KVM stuff even if we're not going to use it. Otherwise it's impossible (or at least highly impractical) to use the KVM VM as an optional parameter on objects which aren't conditionally built. If there's no KVM instance that gets set up, those pointers should just be NULL.
Posted (Nov. 17, 2014, 6:54 p.m.)
This will break compilation on non-linux platforms, so if we need something like this, it will need to have two checks, one that kvm is possible, and the other that it's enabled. However, that alone doesn't solve the problem because the issue is that now devices will exist that need KVM, but if KVM isn't compiled... One solution is a skeleton header that can be used in case !USE_KVM, but as you allude to this is very ugly. Off the top of my head the way I'd prefer to see it done is let objects register ranges with the System object and then the KVM code could iterate that list if it was compiled in. Sound reasonable?
