From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkeeZ-0003Dv-7j for qemu-devel@nongnu.org; Wed, 14 May 2014 15:15:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WkeeU-0004VS-DD for qemu-devel@nongnu.org; Wed, 14 May 2014 15:15:47 -0400 Received: from mail-lb0-f171.google.com ([209.85.217.171]:50856) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WkeeT-0004UD-W6 for qemu-devel@nongnu.org; Wed, 14 May 2014 15:15:42 -0400 Received: by mail-lb0-f171.google.com with SMTP id 10so69lbg.30 for ; Wed, 14 May 2014 12:15:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1399305623-22016-1-git-send-email-robherring2@gmail.com> <1399305623-22016-7-git-send-email-robherring2@gmail.com> From: Rob Herring Date: Wed, 14 May 2014 14:15:20 -0500 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 6/7] arm/virt: enable PSCI emulation support for system emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Pranavkumar Sawargaonkar Cc: Rob Herring , QEMU Developers , Christoffer Dall On Wed, May 14, 2014 at 12:51 PM, Peter Maydell wrote: > On 5 May 2014 17:00, Rob Herring wrote: >> From: Rob Herring >> >> Now that we have PSCI emulation, enable it for the virt platform. >> This simplifies the virt machine a bit now that PSCI and SMP no longer >> need to be KVM only features. [...] >> + qemu_fdt_add_subnode(fdt, "/psci"); >> + qemu_fdt_setprop_string(fdt, "/psci", "method", "hvc"); >> + if (kvm_enabled() && !kvm_check_extension(kvm_state, KVM_CAP_ARM_PSCI_0_2)) { >> + 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)); >> } > > 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. Rob