qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Haozhong Zhang <haozhong.zhang@intel.com>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL
Date: Fri, 17 Jun 2016 01:32:03 -0400 (EDT)	[thread overview]
Message-ID: <607161709.23546274.1466141523872.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20160617005103.ipyoz7p3eh2z6odu@hz-desktop>


> > > diff --git a/src/fw/msr_feature_control.c b/src/fw/msr_feature_control.c
> > > new file mode 100644
> > > index 0000000..35d4ab8
> > > --- /dev/null
> > > +++ b/src/fw/msr_feature_control.c
> > > @@ -0,0 +1,16 @@
> > > +#include "util.h" // msr_feature_control_setup
> > > +#include "x86.h" // wrmsr
> > > +#include "romfile.h" // romfile_find
> > > +
> > > +u64 feature_control_bits;
> > > +
> > > +void msr_feature_control_setup(void)
> > > +{
> > > +    struct romfile_s *f = romfile_find("etc/msr_feature_control");
> > > +    if (!f)
> > > +        return;
> > > +
> > > +    f->copy(f, &feature_control_bits, sizeof(feature_control_bits));
> > > +    if (feature_control_bits)
> > > +        wrmsr(MSR_IA32_FEATURE_CONTROL, feature_control_bits);
> > 
> > You can use wrmsr_smp and avoid the change below to handle_smp().  It
> > also removes the need for the feature_control_bits global variable.
> >
> 
> Good idea. I think I should also rename smp_mtrr and smp_mtrr_count to
> something like smp_msr and smp_msr_count, because they will not be used
> only for MTRR.

Yes, pleaase do!

Thanks,

Paolo

      reply	other threads:[~2016-06-17  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-16 11:49 [Qemu-devel] [PATCH] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL Haozhong Zhang
2016-06-16 12:03 ` Paolo Bonzini
2016-06-17  0:51   ` Haozhong Zhang
2016-06-17  5:32     ` Paolo Bonzini [this message]

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=607161709.23546274.1466141523872.JavaMail.zimbra@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=haozhong.zhang@intel.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /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 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).