All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	James Hogan <james.hogan@imgtec.com>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-ppc@nongnu.org, Cornelia Huck <cornelia.huck@de.ibm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Leon Alrae <leon.alrae@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate
Date: Fri, 13 Nov 2015 13:21:35 -0200	[thread overview]
Message-ID: <20151113152135.GS4180@thinpad.lan.raisama.net> (raw)
In-Reply-To: <20151113022354.GC26153@hzzhang-OptiPlex-9020.sh.intel.com>

On Fri, Nov 13, 2015 at 10:23:54AM +0800, Haozhong Zhang wrote:
> On 11/11/15 22:27, Haozhong Zhang wrote:
> > On 11/11/15 12:16, Eduardo Habkost wrote:
> [...]
> > > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > > index 2f8f396..858ed69 100644
> > > > --- a/hw/i386/pc_q35.c
> > > > +++ b/hw/i386/pc_q35.c
> > > > @@ -385,6 +385,7 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
> > > >      pc_q35_2_5_machine_options(m);
> > > >      m->alias = NULL;
> > > >      pcmc->broken_reserved_end = true;
> > > > +    pcmc->save_tsc_khz = false;
> > > 
> > > I had suggested the PCMachineClass field, but now I've been thinking:
> > > all other fields related to tsc_khz are in X86CPU, so I believe this
> > > belongs to X86CPU too. It could be a simple X86CPU property set by
> > > PC_COMPAT_2_4.
> > >
> > 
> > Reasonable, will update in the next version.
> 
> Or maybe no ...
> 
> I think there is still a problem to set a X86CPU property in
> PC_COMPAT_2_4:
> 
> if I create a property for save_tsc_khz by adding
>   DEFINE_PROP_BOOL("save-tsc-freq", X86CPU, save_tsc_khz, true)
> in x86_cpu_properties and add
>   {
>       .driver   = TYPE_X86_CPU,
>       .property = "save-tsc-freq",
>       .value    = "off",
>   }
> in PC_COMPAT_2_4, then "save-tsc-freq" will also become a
> user-visible cpu option. But we agreed on keeping it as an
> internal flag in the previous discussion.
> 
> Any other ways to set a property in PC_COMPAT_* while keeping that
> property internal?

I don't think making it internal is a requirement. It just make
things simpler because it allowed us to postpone decisions about
the user-visible parts.

...which seems to be a good reason to keep it on PCMachineClass
by now, if you prefer it that way. The subsection code is already
on machine.c and not on cpu.c, anyway.

-- 
Eduardo

WARNING: multiple messages have this Message-ID (diff)
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	James Hogan <james.hogan@imgtec.com>,
	kvm@vger.kernel.org, "Michael S. Tsirkin" <mst@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Alexander Graf <agraf@suse.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	qemu-ppc@nongnu.org, Cornelia Huck <cornelia.huck@de.ibm.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Leon Alrae <leon.alrae@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate
Date: Fri, 13 Nov 2015 13:21:35 -0200	[thread overview]
Message-ID: <20151113152135.GS4180@thinpad.lan.raisama.net> (raw)
In-Reply-To: <20151113022354.GC26153@hzzhang-OptiPlex-9020.sh.intel.com>

On Fri, Nov 13, 2015 at 10:23:54AM +0800, Haozhong Zhang wrote:
> On 11/11/15 22:27, Haozhong Zhang wrote:
> > On 11/11/15 12:16, Eduardo Habkost wrote:
> [...]
> > > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > > index 2f8f396..858ed69 100644
> > > > --- a/hw/i386/pc_q35.c
> > > > +++ b/hw/i386/pc_q35.c
> > > > @@ -385,6 +385,7 @@ static void pc_q35_2_4_machine_options(MachineClass *m)
> > > >      pc_q35_2_5_machine_options(m);
> > > >      m->alias = NULL;
> > > >      pcmc->broken_reserved_end = true;
> > > > +    pcmc->save_tsc_khz = false;
> > > 
> > > I had suggested the PCMachineClass field, but now I've been thinking:
> > > all other fields related to tsc_khz are in X86CPU, so I believe this
> > > belongs to X86CPU too. It could be a simple X86CPU property set by
> > > PC_COMPAT_2_4.
> > >
> > 
> > Reasonable, will update in the next version.
> 
> Or maybe no ...
> 
> I think there is still a problem to set a X86CPU property in
> PC_COMPAT_2_4:
> 
> if I create a property for save_tsc_khz by adding
>   DEFINE_PROP_BOOL("save-tsc-freq", X86CPU, save_tsc_khz, true)
> in x86_cpu_properties and add
>   {
>       .driver   = TYPE_X86_CPU,
>       .property = "save-tsc-freq",
>       .value    = "off",
>   }
> in PC_COMPAT_2_4, then "save-tsc-freq" will also become a
> user-visible cpu option. But we agreed on keeping it as an
> internal flag in the previous discussion.
> 
> Any other ways to set a property in PC_COMPAT_* while keeping that
> property internal?

I don't think making it internal is a requirement. It just make
things simpler because it allowed us to postpone decisions about
the user-visible parts.

...which seems to be a good reason to keep it on PCMachineClass
by now, if you prefer it that way. The subsection code is already
on machine.c and not on cpu.c, anyway.

-- 
Eduardo

  reply	other threads:[~2015-11-13 15:21 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-02  9:26 [PATCH v3 0/3] target-i386: save/restore vcpu's TSC rate during migration Haozhong Zhang
2015-11-02  9:26 ` [Qemu-devel] " Haozhong Zhang
2015-11-02  9:26 ` [PATCH v3 1/3] target-i386: add a subsection for migrating vcpu's TSC rate Haozhong Zhang
2015-11-02  9:26   ` [Qemu-devel] " Haozhong Zhang
2015-11-11 14:16   ` Eduardo Habkost
2015-11-11 14:16     ` Eduardo Habkost
2015-11-11 14:27     ` Haozhong Zhang
2015-11-11 14:27       ` [Qemu-devel] " Haozhong Zhang
2015-11-13  2:23       ` Haozhong Zhang
2015-11-13  2:23         ` [Qemu-devel] " Haozhong Zhang
2015-11-13 15:21         ` Eduardo Habkost [this message]
2015-11-13 15:21           ` Eduardo Habkost
2015-11-16  0:10           ` Haozhong Zhang
2015-11-16  0:10             ` Haozhong Zhang
2015-11-02  9:26 ` [PATCH v3 2/3] target-i386: calculate vcpu's TSC rate to be migrated Haozhong Zhang
2015-11-02  9:26   ` [Qemu-devel] " Haozhong Zhang
2015-11-02  9:40   ` James Hogan
2015-11-02  9:40     ` [Qemu-devel] " James Hogan
2015-11-02 13:26     ` Haozhong Zhang
2015-11-02 13:26       ` [Qemu-devel] " Haozhong Zhang
2015-11-05  8:05     ` Christian Borntraeger
2015-11-05  8:05       ` [Qemu-devel] " Christian Borntraeger
2015-11-05  8:14       ` Haozhong Zhang
2015-11-05  8:14         ` [Qemu-devel] " Haozhong Zhang
2015-11-04 21:42   ` Eduardo Habkost
2015-11-04 21:42     ` [Qemu-devel] " Eduardo Habkost
2015-11-05  1:30     ` Haozhong Zhang
2015-11-05  1:30       ` [Qemu-devel] " Haozhong Zhang
2015-11-05 16:05       ` Eduardo Habkost
2015-11-05 16:05         ` [Qemu-devel] " Eduardo Habkost
2015-11-06  2:32         ` haozhong.zhang
2015-11-06  2:32           ` [Qemu-devel] " haozhong.zhang
2015-11-06 15:12           ` Eduardo Habkost
2015-11-06 15:12             ` [Qemu-devel] " Eduardo Habkost
2015-11-09  0:33             ` haozhong.zhang
2015-11-09  0:33               ` [Qemu-devel] " haozhong.zhang
2015-11-09 16:01               ` Eduardo Habkost
2015-11-09 16:01                 ` [Qemu-devel] " Eduardo Habkost
2015-11-09 16:37                 ` Dr. David Alan Gilbert
2015-11-09 16:37                   ` [Qemu-devel] " Dr. David Alan Gilbert
2015-11-10  1:08                 ` Haozhong Zhang
2015-11-10  1:08                   ` [Qemu-devel] " Haozhong Zhang
2015-11-11 14:54                   ` Eduardo Habkost
2015-11-11 14:54                     ` [Qemu-devel] " Eduardo Habkost
2015-11-11 15:35                     ` Haozhong Zhang
2015-11-11 15:35                       ` [Qemu-devel] " Haozhong Zhang
2015-11-10 16:57                 ` Haozhong Zhang
2015-11-10 16:57                   ` [Qemu-devel] " Haozhong Zhang
2015-11-11 15:23                   ` Eduardo Habkost
2015-11-11 15:23                     ` [Qemu-devel] " Eduardo Habkost
2015-11-11 15:33                     ` Haozhong Zhang
2015-11-11 15:33                       ` [Qemu-devel] " Haozhong Zhang
2015-11-02  9:26 ` [PATCH v3 3/3] target-i386: load the migrated vcpu's TSC rate Haozhong Zhang
2015-11-02  9:26   ` [Qemu-devel] " Haozhong Zhang
2015-11-05 16:10   ` Eduardo Habkost
2015-11-05 16:10     ` [Qemu-devel] " Eduardo Habkost
2015-11-06  2:32     ` Haozhong Zhang
2015-11-06  2:32       ` [Qemu-devel] " Haozhong Zhang
2015-11-06 15:15       ` Eduardo Habkost
2015-11-06 15:15         ` [Qemu-devel] " Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151113152135.GS4180@thinpad.lan.raisama.net \
    --to=ehabkost@redhat.com \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=dgilbert@redhat.com \
    --cc=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=leon.alrae@imgtec.com \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.