On Mon, Dec 10, 2012 at 10:33:07PM +0100, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov <imamm...@redhat.com>
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com> Like I said in the previous patch, maybe it would be nice to have a visit_type_frequency() helper, to hide the specific details/parameters required to parse frequency values. > --- > v3: > - s/visit_type_unit_suffixed_int/visit_type_suffixed_int/ > v2: > - replace visit_type_freq() with visit_type_unit_suffixed_int() > in x86_cpuid_set_tsc_freq() > --- > target-i386/cpu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 7be3ad8..18adff4 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -1194,8 +1194,9 @@ static void x86_cpuid_set_tsc_freq(Object *obj, Visitor > *v, void *opaque, > const int64_t min = 0; > const int64_t max = INT64_MAX; > int64_t value; > + const int kHz_factor = 1000; > > - visit_type_int(v, &value, name, errp); > + visit_type_suffixed_int(v, &value, name, kHz_factor, errp); > if (error_is_set(errp)) { > return; > } > -- > 1.7.11.7 > > -- Eduardo