[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 4/5] target-arm: add emulation of PSCI calls
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 4/5] target-arm: add emulation of PSCI calls for system emulation |
Date: |
Mon, 1 Sep 2014 13:04:48 +0100 |
On 1 September 2014 12:55, Ard Biesheuvel <address@hidden> wrote:
> From: Rob Herring <address@hidden>
>
> Add support for handling PSCI calls in system emulation. Both version
> 0.1 and 0.2 of the PSCI spec are supported. Platforms can enable support
> by setting "psci-method" QOM property on the cpus to SMC or HVC
> emulation and having PSCI binding in their dtb.
> --- /dev/null
> +++ b/target-arm/psci.c
> @@ -0,0 +1,172 @@
> +/*
> + * Copyright (C) 2014 - Linaro
> + * Author: Rob Herring <address@hidden>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, see <http://www.gnu.org/licenses/>.
> + */
> +#include <cpu.h>
> +#include <cpu-qom.h>
> +#include <kvm-consts.h>
> +#include <sysemu/sysemu.h>
> +#include <linux/psci.h>
This isn't going to compile on non-Linux hosts.
(cf discussion at
http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg00473.html)
I suggest using the QEMU_PSCI_* constants we now have
available in kvm-consts.h and avoiding the plain PSCI_*
ones entirely in non-kvm-specific code. You might need to
add a few new QEMU_PSCI_* where we don't have them yet.
thanks
-- PMM
- [Qemu-devel] [PATCH v2 0/5] ARM: add PSCI 0.2 support in TCG mode, Ard Biesheuvel, 2014/09/01
- [Qemu-devel] [PATCH v2 1/5] target-arm: add powered off cpu state, Ard Biesheuvel, 2014/09/01
- [Qemu-devel] [PATCH v2 2/5] target-arm: do not set do_interrupt handler for AArch64 user mode, Ard Biesheuvel, 2014/09/01
- [Qemu-devel] [PATCH v2 4/5] target-arm: add emulation of PSCI calls for system emulation, Ard Biesheuvel, 2014/09/01
- Re: [Qemu-devel] [PATCH v2 4/5] target-arm: add emulation of PSCI calls for system emulation,
Peter Maydell <=
- [Qemu-devel] [PATCH v2 3/5] target-arm: add hvc and smc exception emulation handling infrastructure, Ard Biesheuvel, 2014/09/01
- [Qemu-devel] [PATCH v2 5/5] arm/virt: enable PSCI emulation support for system emulation, Ard Biesheuvel, 2014/09/01
- Re: [Qemu-devel] [PATCH v2 0/5] ARM: add PSCI 0.2 support in TCG mode, Peter Maydell, 2014/09/01