[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 3/3] Change driftfix default value to slew
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH v5 3/3] Change driftfix default value to slew |
Date: |
Wed, 11 Jul 2012 12:54:16 -0500 |
User-agent: |
Notmuch/0.13.2+60~g7ecf77d (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) |
CrÃstian Viana <address@hidden> writes:
> Windows 2008+ is very sensitive to missed ticks. The RTC is used by default as
> the time source. If driftfix is not enabled, Windows is prone to
> blue screening.
>
> Signed-off-by: CrÃstian Viana <address@hidden>
Reviewed-by: Anthony Liguori <address@hidden>
Regards,
Anthony Liguori
> ---
> hw/mc146818rtc.c | 2 +-
> vl.c | 11 ++++++++++-
> 2 files changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/hw/mc146818rtc.c b/hw/mc146818rtc.c
> index 3777f85..dfd7ee6 100644
> --- a/hw/mc146818rtc.c
> +++ b/hw/mc146818rtc.c
> @@ -686,7 +686,7 @@ ISADevice *rtc_init(ISABus *bus, int base_year, qemu_irq
> intercept_irq)
> static Property mc146818rtc_properties[] = {
> DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980),
> DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState,
> - lost_tick_policy, LOST_TICK_DISCARD),
> + lost_tick_policy, LOST_TICK_SLEW),
> DEFINE_PROP_END_OF_LIST(),
> };
>
> diff --git a/vl.c b/vl.c
> index 1329c30..3ae43fc 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -559,7 +559,16 @@ static void configure_rtc(QemuOpts *opts)
>
> qdev_prop_register_global_list(slew_lost_ticks);
> } else if (!strcmp(value, "none")) {
> - /* discard is default */
> + static GlobalProperty discard_lost_ticks[] = {
> + {
> + .driver = "mc146818rtc",
> + .property = "lost_tick_policy",
> + .value = "discard",
> + },
> + { /* end of list */ }
> + };
> +
> + qdev_prop_register_global_list(discard_lost_ticks);
> } else {
> fprintf(stderr, "qemu: invalid option value '%s'\n", value);
> exit(1);
> --
> 1.7.9.5
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH v5 3/3] Change driftfix default value to slew,
Anthony Liguori <=