[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 21/37] target-i386: convert 'hv_relaxed' to static p
From: |
Igor Mammedov |
Subject: |
[Qemu-devel] [PATCH 21/37] target-i386: convert 'hv_relaxed' to static property |
Date: |
Mon, 22 Oct 2012 17:03:07 +0200 |
Signed-off-by: Igor Mammedov <address@hidden>
---
target-i386/cpu.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 122e01a..029f28c 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -181,6 +181,34 @@ PropertyInfo qdev_prop_spinlocks = {
#define DEFINE_PROP_HV_SPINLOCKS(_n)
\
DEFINE_ABSTRACT_PROP(_n, qdev_prop_spinlocks)
+static void x86_get_hv_relaxed(Object *obj, Visitor *v, void *opaque,
+ const char *name, Error **errp)
+{
+ bool value = hyperv_relaxed_timing_enabled();
+
+ visit_type_bool(v, &value, name, errp);
+}
+
+static void x86_set_hv_relaxed(Object *obj, Visitor *v, void *opaque,
+ const char *name, Error **errp)
+{
+ bool value;
+
+ visit_type_bool(v, &value, name, errp);
+ if (error_is_set(errp)) {
+ return;
+ }
+ hyperv_enable_relaxed_timing(value);
+}
+
+PropertyInfo qdev_prop_hv_relaxed = {
+ .name = "boolean",
+ .get = x86_get_hv_relaxed,
+ .set = x86_set_hv_relaxed,
+};
+#define DEFINE_PROP_HV_RELAXED(_n)
\
+ DEFINE_ABSTRACT_PROP(_n, qdev_prop_hv_relaxed)
+
static Property cpu_x86_properties[] = {
DEFINE_PROP_BIT("f-fpu", X86CPU, env.cpuid_features, 0, false),
DEFINE_PROP_BIT("f-vme", X86CPU, env.cpuid_features, 1, false),
@@ -296,6 +324,7 @@ static Property cpu_x86_properties[] = {
DEFINE_PROP_UINT32("xlevel", X86CPU, env.cpuid_xlevel, 0),
DEFINE_PROP_UINT32("level", X86CPU, env.cpuid_level, 0),
DEFINE_PROP_HV_SPINLOCKS("hv_spinlocks"),
+ DEFINE_PROP_HV_RELAXED("hv_relaxed"),
DEFINE_PROP_END_OF_LIST(),
};
--
1.7.11.7
- [Qemu-devel] [PATCH 02/37] target-i386: cpu_x86_register(): report error from property setter, (continued)
- [Qemu-devel] [PATCH 02/37] target-i386: cpu_x86_register(): report error from property setter, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 10/37] target-i386: parse cpu_model string into set of stringified properties, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 01/37] target-i386: return Error from cpu_x86_find_by_name(), Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 03/37] target-i386: if x86_cpu_realize() failed report error and do cleanup, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 13/37] target-i386: convert "level" to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 06/37] add visitor for parsing hz[KMG] input string, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 14/37] target-i386: postpone cpuid_level update to realize time, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 08/37] target-i386: define static properties for cpuid features, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 21/37] target-i386: convert 'hv_relaxed' to static property,
Igor Mammedov <=
- [Qemu-devel] [PATCH 11/37] target-i386: introduce vendor-override static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 28/37] target-i386: convert "model-id" to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 20/37] target-i386: convert 'hv_spinlocks' to static property, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 19/37] qdev: add DEFINE_ABSTRACT_PROP() helper, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 34/37] qdev: introduce QDEV_FIND_PROP_FROM_BIT and qdev_prop_find_bit(), Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 25/37] target-i386: replace uint32_t vendor fields by vendor string in x86_def_t, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 23/37] target-i386: convert 'check' and 'enforce' to static properties, Igor Mammedov, 2012/10/22
- [Qemu-devel] [PATCH 36/37] target-i386: use static properties to list CPUID features, Igor Mammedov, 2012/10/22