qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386
@ 2010-06-23 14:29 Amit Shah
  2010-06-23 14:29 ` [Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix Amit Shah
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Amit Shah @ 2010-06-23 14:29 UTC (permalink / raw)
  To: qemu list; +Cc: Amit Shah, Jan Kiszka, Gleb Natapov, Juan Quintela

The driftfix option is only useful for Windows guests, and for the x86
architecture, so limit the option parsing to TARGET_I386. This ifdef
conditional is moved from qemu-config.c to vl.c. The next patch will fix
a bug where the driftfix option wasn't exposed at all even to the x86
architecture.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 vl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/vl.c b/vl.c
index 920717a..f9c8086 100644
--- a/vl.c
+++ b/vl.c
@@ -418,6 +418,7 @@ static void configure_rtc(QemuOpts *opts)
             exit(1);
         }
     }
+#ifdef TARGET_I386
     value = qemu_opt_get(opts, "driftfix");
     if (value) {
         if (!strcmp(value, "slew")) {
@@ -429,6 +430,7 @@ static void configure_rtc(QemuOpts *opts)
             exit(1);
         }
     }
+#endif
 }
 
 /***********************************************************/
-- 
1.7.0.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix
  2010-06-23 14:29 [Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Amit Shah
@ 2010-06-23 14:29 ` Amit Shah
  2010-06-23 14:35 ` [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Paolo Bonzini
  2010-06-23 14:39 ` Juan Quintela
  2 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2010-06-23 14:29 UTC (permalink / raw)
  To: qemu list; +Cc: Amit Shah, Jan Kiszka, Gleb Natapov, Juan Quintela

qemu-config.c doesn't contain any target-specific code, and the
TARGET_I386 conditional code didn't get compiled as a result. Removing
this enables the driftfix parameter for rtc.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 qemu-config.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/qemu-config.c b/qemu-config.c
index 95abe61..730ffd9 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -247,11 +247,9 @@ QemuOptsList qemu_rtc_opts = {
         },{
             .name = "clock",
             .type = QEMU_OPT_STRING,
-#ifdef TARGET_I386
         },{
             .name = "driftfix",
             .type = QEMU_OPT_STRING,
-#endif
         },
         { /* end if list */ }
     },
-- 
1.7.0.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386
  2010-06-23 14:29 [Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Amit Shah
  2010-06-23 14:29 ` [Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix Amit Shah
@ 2010-06-23 14:35 ` Paolo Bonzini
  2010-06-23 14:43   ` Amit Shah
  2010-06-23 14:39 ` Juan Quintela
  2 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2010-06-23 14:35 UTC (permalink / raw)
  To: Amit Shah; +Cc: Jan Kiszka, qemu list, Gleb Natapov, Juan Quintela

On 06/23/2010 04:29 PM, Amit Shah wrote:
> The driftfix option is only useful for Windows guests, and for the x86
> architecture, so limit the option parsing to TARGET_I386. This ifdef
> conditional is moved from qemu-config.c to vl.c. The next patch will fix
> a bug where the driftfix option wasn't exposed at all even to the x86
> architecture.
>
> Signed-off-by: Amit Shah<amit.shah@redhat.com>
> ---
>   vl.c |    2 ++
>   1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 920717a..f9c8086 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -418,6 +418,7 @@ static void configure_rtc(QemuOpts *opts)
>               exit(1);
>           }
>       }
> +#ifdef TARGET_I386
>       value = qemu_opt_get(opts, "driftfix");
>       if (value) {
>           if (!strcmp(value, "slew")) {
> @@ -429,6 +430,7 @@ static void configure_rtc(QemuOpts *opts)
>               exit(1);
>           }
>       }
> +#endif
>   }
>
>   /***********************************************************/

This file is compiled only once for upstream qemu, so it will never see 
TARGET_I386.  Any reason to have the #ifdef at all?

Paolo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386
  2010-06-23 14:29 [Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Amit Shah
  2010-06-23 14:29 ` [Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix Amit Shah
  2010-06-23 14:35 ` [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Paolo Bonzini
@ 2010-06-23 14:39 ` Juan Quintela
  2 siblings, 0 replies; 5+ messages in thread
From: Juan Quintela @ 2010-06-23 14:39 UTC (permalink / raw)
  To: Amit Shah; +Cc: Jan Kiszka, qemu list, Gleb Natapov

Amit Shah <amit.shah@redhat.com> wrote:
> The driftfix option is only useful for Windows guests, and for the x86
> architecture, so limit the option parsing to TARGET_I386. This ifdef
> conditional is moved from qemu-config.c to vl.c. The next patch will fix
> a bug where the driftfix option wasn't exposed at all even to the x86
> architecture.
>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>

Acked-by: Juan Quintela <quintela@redhat.com>

(for both patches).

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386
  2010-06-23 14:35 ` [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Paolo Bonzini
@ 2010-06-23 14:43   ` Amit Shah
  0 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2010-06-23 14:43 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Jan Kiszka, qemu list, Gleb Natapov, Juan Quintela

On (Wed) Jun 23 2010 [16:35:26], Paolo Bonzini wrote:
> On 06/23/2010 04:29 PM, Amit Shah wrote:
> >The driftfix option is only useful for Windows guests, and for the x86
> >architecture, so limit the option parsing to TARGET_I386. This ifdef
> >conditional is moved from qemu-config.c to vl.c. The next patch will fix
> >a bug where the driftfix option wasn't exposed at all even to the x86
> >architecture.
> >
> >Signed-off-by: Amit Shah<amit.shah@redhat.com>
> >---
> >  vl.c |    2 ++
> >  1 files changed, 2 insertions(+), 0 deletions(-)
> >
> >diff --git a/vl.c b/vl.c
> >index 920717a..f9c8086 100644
> >--- a/vl.c
> >+++ b/vl.c
> >@@ -418,6 +418,7 @@ static void configure_rtc(QemuOpts *opts)
> >              exit(1);
> >          }
> >      }
> >+#ifdef TARGET_I386
> >      value = qemu_opt_get(opts, "driftfix");
> >      if (value) {
> >          if (!strcmp(value, "slew")) {
> >@@ -429,6 +430,7 @@ static void configure_rtc(QemuOpts *opts)
> >              exit(1);
> >          }
> >      }
> >+#endif
> >  }
> >
> >  /***********************************************************/
> 
> This file is compiled only once for upstream qemu, so it will never
> see TARGET_I386.  Any reason to have the #ifdef at all?

Er, yeah; I wanted to drop 1/2 before sending out the patch -- just
patch 2 should be considered. I'll send a v2.


		Amit

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-23 14:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-23 14:29 [Qemu-devel] [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Amit Shah
2010-06-23 14:29 ` [Qemu-devel] [PATCH 2/2] rtc: Remove TARGET_I386 from qemu-config.c, enables driftfix Amit Shah
2010-06-23 14:35 ` [Qemu-devel] Re: [PATCH 1/2] rtc: Parse the 'driftfix' option only for TARGET_I386 Paolo Bonzini
2010-06-23 14:43   ` Amit Shah
2010-06-23 14:39 ` Juan Quintela

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).