yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-target-arm-kvm64-kvm64-cpus-have-timer-registers.patch

ddf19c
From 2740a84fe798ade5c1ce725d65cdaffb255da47c Mon Sep 17 00:00:00 2001
ddf19c
From: Andrew Jones <drjones@redhat.com>
ddf19c
Date: Fri, 31 Jan 2020 14:23:11 +0000
ddf19c
Subject: [PATCH 09/15] target/arm/kvm64: kvm64 cpus have timer registers
ddf19c
MIME-Version: 1.0
ddf19c
Content-Type: text/plain; charset=UTF-8
ddf19c
Content-Transfer-Encoding: 8bit
ddf19c
ddf19c
RH-Author: Andrew Jones <drjones@redhat.com>
ddf19c
Message-id: <20200131142314.13175-3-drjones@redhat.com>
ddf19c
Patchwork-id: 93621
ddf19c
O-Subject: [RHEL-AV-8.2.0 qemu-kvm PATCH 2/5] target/arm/kvm64: kvm64 cpus have timer registers
ddf19c
Bugzilla: 1647366
ddf19c
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
ddf19c
RH-Acked-by: Auger Eric <eric.auger@redhat.com>
ddf19c
RH-Acked-by: Gavin Shan <gshan@redhat.com>
ddf19c
ddf19c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1647366
ddf19c
ddf19c
Author: Andrew Jones <drjones@redhat.com>
ddf19c
Date:   Thu, 30 Jan 2020 16:02:06 +0000
ddf19c
ddf19c
    target/arm/kvm64: kvm64 cpus have timer registers
ddf19c
ddf19c
    Add the missing GENERIC_TIMER feature to kvm64 cpus.
ddf19c
ddf19c
    We don't currently use these registers when KVM is enabled, but it's
ddf19c
    probably best we add the feature flag for consistency and potential
ddf19c
    future use. There's also precedent, as we add the PMU feature flag to
ddf19c
    KVM enabled guests, even though we don't use those registers either.
ddf19c
ddf19c
    This change was originally posted as a hunk of a different, never
ddf19c
    merged patch from Bijan Mottahedeh.
ddf19c
ddf19c
    Signed-off-by: Andrew Jones <drjones@redhat.com>
ddf19c
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
ddf19c
    Message-id: 20200120101023.16030-4-drjones@redhat.com
ddf19c
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ddf19c
ddf19c
(cherry picked from commit 65caa415487f4a6e265105446c6ef8f56bb0aa70)
ddf19c
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
ddf19c
---
ddf19c
 target/arm/kvm64.c | 1 +
ddf19c
 1 file changed, 1 insertion(+)
ddf19c
ddf19c
diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c
ddf19c
index e2da756..666a81a 100644
ddf19c
--- a/target/arm/kvm64.c
ddf19c
+++ b/target/arm/kvm64.c
ddf19c
@@ -605,6 +605,7 @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf)
ddf19c
     set_feature(&features, ARM_FEATURE_NEON);
ddf19c
     set_feature(&features, ARM_FEATURE_AARCH64);
ddf19c
     set_feature(&features, ARM_FEATURE_PMU);
ddf19c
+    set_feature(&features, ARM_FEATURE_GENERIC_TIMER);
ddf19c
 
ddf19c
     ahcf->features = features;
ddf19c
 
ddf19c
-- 
ddf19c
1.8.3.1
ddf19c