Re: detecting the GIC version in the host and in the guest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10/22/2014 10:07 AM, Marc Zyngier wrote:
<snip>
>> Hi Andre,
>>
>> For the convenience of other kernel components, is there anyway to merge
>> *parts* of GICv2 and GICv3 at high-level? So others can probe/poke the
>> GIC details in the system, which includes the version of GIC.
>>
>> For instance, I am working a patch to get rid of DT-ACPI in
>> virt/kvm/arm/vgic.c file and facing a similar issue as described by
>> Claudio. Current vgic.c parses DT-tree then dispatches to vgic-v2.c and
>> vgic-v3.c. Getting rid of DT will make dispatching impossible (a
>> dilemma). The version info provided by GIC drivers will be helpful for
>> this case, at least.
> 
> If you had a chance to read the architecture document (it is
> unfortunately not public yet), you'd quickly notice that the similarity
> between GICv2 and GICv3 is fairly superficial, specially in the absence
> of the GICv2 compatibility regions (they are optional).
> 

Thanks for the explanation.

> We have DT/ACPI/whatever for this exact purpose: finding out what the
> hardware is. These mechanisms give us structured information that
> describe the available HW in great detail, and I will strongly oppose
> any form of guess-work.
> 
> Sorry, but I have to ask: what is wrong with the current DT parsing?

A bit long story.  DT parsing itself was not a problem until recently
when ACPI was enabled. It broke KVM because KVM doesn't support ACPI. So
we started to add ACPI parsing into KVM code (virt/kvm/arm/, see
Alexander Spyridakis' recent patches, very similar to our internal
fixes). It turned out to be quite messy due to the if-DT-else-ACPI in
arch_timer and vgic code. Additionally kernel does the parsing twice,
one in native drivers and the other in KVM, which is unnecessary.

My proposal is to get rid of DT-ACPI parsing in KVM completely. We rely
on device drivers to provide necessary info, which makes the interface
cleaner. arch_timer is very easy to fix (see
https://lists.cs.columbia.edu/pipermail/kvmarm/2014-October/011526.html); but
GIC is complicated because vgic.c dispatches to vgic-v2 and vgic-v3.

My question to Andre was: could GIC drivers provides some info for KVM
to query, such as GIC version. This request in fact is to eliminate
guess work from KVM's perspective.

> 
> Thanks,
> 
> 	M.
> 
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm




[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux