Re: [RFC] GIC/IRQ related patches

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

 




On 06/20/2014 09:23 AM, Andre Przywara wrote:

On 20/06/14 15:14, Joel Schopp wrote:
On a related note I've just joined AMD and am working on enabling kvm on
an aarch64 SOC with a gic-400.  Looking at upstream it appears that only
the cortex-a15-gic has been merged before on arm. I expect enabling the
cortex-a15-gic is actually kind of a misnomer for a generic GICv2. So
any generic GICv2 (or GIC-400) should be named like this and it should
work. It definitely does on the ARM hardware I have here.
It's my understanding that the gic-400 is GICv2 for the virtualization bits but has some other extensions to GICv2 in other areas such that will be necessary to represent it in the device tree as a new gic. I was able to boot with kvm enabled (but not actually working properly) by just doing the following:

In the dts:
        gic: interrupt-controller@e1101000 {
                compatible = "arm,gic-400";
                #interrupt-cells = <3>;
                #address-cells = <0>;
                interrupt-controller;
                msi-controller;
                reg = <0x0 0xe1110000 0 0x1000>, /* gic dist */
                      <0x0 0xe112f000 0 0x1000>, /* gic cpu */
                      <0x0 0xe1180000 0 0x1000>, /* gic msi */
                      <0x0 0xe1140000 0 0x2000>, /* gic virtual ic*/
                      <0x0 0xe116f000 0 0x2000>; /* gic virtual cpu*/

                interrupts = <1 8 0xf04>;
        };


--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@ -1478,9 +1478,13 @@ int kvm_vgic_hyp_init(void)

vgic_node = of_find_compatible_node(NULL, NULL, "arm,cortex-a15-gic");
        if (!vgic_node) {
-               kvm_err("error: no compatible vgic node in DT\n");
-               return -ENODEV;
+ vgic_node = of_find_compatible_node(NULL, NULL, "arm,gic-400");
        }
+       if (!vgic_node) {
+                       kvm_err("error: no compatible vgic node in DT\n");
+                       return -ENODEV;
+       }
+


gic400 virtualization bits will be a small mount of code compared to
your GICv3 changes, but thought I'd chime in as I'd be happy to be ccd
on and review any gic related patches.
Is there any specific issue you are encountering?

I'm really just starting at this and don't feel like I've done enough investigation to even know what the problem is. That said here's how the issue I'm seeing manifests itself:

When I try to run qemu it outputs:
error: kvm run failed Bad address Aborted

KVM throws this into /var/log/messages (0x20 is HSR_EC_IABT):
Jun 19 14:05:08 joelaarch64 kernel: kvm [1553]: Unsupported fault status: EC=0x20 DFCS=0x14
Jun 19 14:05:08 joelaarch64 kernel: kvm [1553]: Unsupported fault status: EC=0x20 DFCS=0x14

It's probably just a stupid mistake on my part like setting up the device tree incorrectly. It will take me a bit more digging to even get to the root cause .
_______________________________________________
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