Re: [PATCH 27/27] KVM: PPC: Add Documentation about PV interface

Alexander Graf
2010-07-04T09:30:36Z

On 04.07.2010, at 11:17, Alexander Graf wrote:

>
> On 04.07.2010, at 11:10, Avi Kivity wrote:
>
>> On 07/04/2010 12:04 PM, Alexander Graf wrote:
>>>
>>> My biggest concern about putting things in the device-tree is that I was trying to keep things as separate as possible. Why does the firmware have to know that it's running in KVM?
>>
>> It doesn't need to know about kvm, it needs to know that a particular hypercall protocol is available.
>
> Considering how the parts of the draft that I read about sound like, that's not the inventor's idea. PPC people love to see the BIOS be part of the virtualization solution. I don't. That's the biggest difference here and reason for us going different directions.
>
> I think what they thought of is something like
>
> if (in_kvm()) {
> device_tree_put("/hypervisor/exit", EXIT_TYPE_MAGIC);
> device_tree_put("/hypervisor/exit_magic", EXIT_MAGIC);
> }
>
> which then the OS reads out. But that's useless, as the hypercalls are hypervisor specific. So why make the detection on the Linux side generic?

In fact, it's even worse. Right now with KVM for PPC we have 3 different ways of generating the device tree:

1) OpenBIOS (Mac emulation)
2) Qemu libfdt (BookE)
3) MOL OF implementation

So I'd have to touch even more projects. Just for the sake of splitting out something that belongs together anyway. And probably even create new interfaces just for that sake (qemu asking the kernel which type of hypercalls the vm should use) even though the guest could just query all that itself.

Alex