qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 6/7] arm/virt: enable PSCI emulation support for


From: Rob Herring
Subject: Re: [Qemu-devel] [PATCH 6/7] arm/virt: enable PSCI emulation support for system emulation
Date: Wed, 14 May 2014 17:58:27 -0500

On Wed, May 14, 2014 at 4:25 PM, Peter Maydell <address@hidden> wrote:
> On 14 May 2014 20:15, Rob Herring <address@hidden> wrote:
>> On Wed, May 14, 2014 at 12:51 PM, Peter Maydell
>> <address@hidden> wrote:
>>> My suggestion to Pranav was that we abstract away the "which PSCI
>>> version?" decision into a field in ARMCPU, in which case we can
>>> just have TCG always set it to 0.2. So some of this logic
>>> will get a little simpler on rebase.
>>
>> You can't. You have to support both because you don't know what the
>> kernel supports. An old kernel will only support arm,psci.
>
> An old host kernel, or an old guest kernel? The former is fine,
> because the KVM CPU init code will just ask for the KVM
> capability and fill in the ARMCPU field appropriately.
> For the latter, how are you supposed to determine what the
> guest kernel can support?

Guest kernels and this was exactly my point that you can't determine
it. The virt dtb is for the guest kernel and must be either 0.1 PSCI
only or both 0.1 and 0.2. I think I misread what you meant. Reading
the other thread, as long as you just mean changing the if statement
like this, then we are in agreement:

    if (psci version is 0.1) {
        qemu_fdt_setprop_string(fdt, "/psci", "compatible", "arm,psci");
    } else {
        const char compat[] = "arm,psci-0.2\0arm,psci";
        qemu_fdt_setprop(fdt, "/psci", "compatible", compat, sizeof(compat));
    }

Rob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]