[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/13] target-arm: Set CPU secure prop during virt i
From: |
Greg Bellows |
Subject: |
[Qemu-devel] [PATCH 12/13] target-arm: Set CPU secure prop during virt init |
Date: |
Wed, 3 Dec 2014 14:06:06 -0600 |
Add setting of the CPU secure property based on the virt machine secure
property during initialization. This enables/disables secure state during
start-up.
Signed-off-by: Greg Bellows <address@hidden>
---
hw/arm/virt.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index ba034e4..2f075e2 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -547,6 +547,7 @@ static void *machvirt_dtb(const struct arm_boot_info
*binfo, int *fdt_size)
static void machvirt_init(MachineState *machine)
{
+ VirtMachineState *vms = VIRT_MACHINE(machine);
qemu_irq pic[NUM_IRQS];
MemoryRegion *sysmem = get_system_memory();
int n;
@@ -584,6 +585,16 @@ static void machvirt_init(MachineState *machine)
}
cpuobj = object_new(object_class_get_name(oc));
+ if (vms->secure) {
+ Error *err = NULL;
+ object_property_set_bool(cpuobj, true, "secure", &err);
+ if (err) {
+ error_report("'secure' machine property not supported "
+ "with %s cpu", cpu_model);
+ exit(1);
+ }
+ }
+
object_property_set_int(cpuobj, QEMU_PSCI_CONDUIT_HVC, "psci-conduit",
NULL);
--
1.8.3.2
- Re: [Qemu-devel] [PATCH 04/13] target-arm: Add secure qemu machine option, (continued)
[Qemu-devel] [PATCH 07/13] target-arm: Add virt class and machine types, Greg Bellows, 2014/12/03
[Qemu-devel] [PATCH 09/13] target-arm: Add feature unset function, Greg Bellows, 2014/12/03
[Qemu-devel] [PATCH 08/13] target-arm: Add virt machine secure property, Greg Bellows, 2014/12/03
[Qemu-devel] [PATCH 10/13] target-arm: Add ARMCPU secure property, Greg Bellows, 2014/12/03
[Qemu-devel] [PATCH 11/13] target-arm: Set CPU secure prop during VE init, Greg Bellows, 2014/12/03
[Qemu-devel] [PATCH 12/13] target-arm: Set CPU secure prop during virt init,
Greg Bellows <=
[Qemu-devel] [PATCH 13/13] target-arm: add cpu feature EL3 to CPUs with Security Extensions, Greg Bellows, 2014/12/03