All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Yang Weijiang <weijiang.yang@intel.com>
Cc: Sean Christopherson <seanjc@google.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied
Date: Wed, 13 Jan 2021 16:41:20 +0100	[thread overview]
Message-ID: <CABgObfaw2kGhxzDLPJ2wpeoN=tnwafzFwB9suBuMZNfZrfJc+w@mail.gmail.com> (raw)
In-Reply-To: <20210113150429.GA29878@local-michael-cet-test.sh.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2114 bytes --]

Yes, thanks.

Paolo


Il mer 13 gen 2021, 15:52 Yang Weijiang <weijiang.yang@intel.com> ha
scritto:

> On Wed, Jan 13, 2021 at 11:06:09AM +0100, Paolo Bonzini wrote:
> > On 13/01/21 10:04, Yang Weijiang wrote:
> > > QEMU option -cpu max(max_features) means "Enables all features
> supported by
> > > the accelerator in the current host", this looks true for all the
> features
> > > except guest max physical address width, so add this patch to enable
> it.
> > >
> > > Signed-off-by: Yang Weijiang <weijiang.yang@intel.com>
> > > ---
> > >   target/i386/cpu.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > > index 35459a38bb..b5943406f7 100644
> > > --- a/target/i386/cpu.c
> > > +++ b/target/i386/cpu.c
> > > @@ -6673,7 +6673,7 @@ static void x86_cpu_realizefn(DeviceState *dev,
> Error **errp)
> > >                   warned = true;
> > >               }
> > > -            if (cpu->host_phys_bits) {
> > > +            if (cpu->host_phys_bits || cpu->max_features) {
> > >                   /* The user asked for us to use the host physical
> bits */
> > >                   cpu->phys_bits = host_phys_bits;
> > >                   if (cpu->host_phys_bits_limit &&
> > >
> >
> > Can you check if this works?
> >
> Hi, Paolo,
> Yes, below change works for kvm-unit-test/access. Would you add the
> patch?
>
> Thanks!
>
> > diff --git a/target/i386/cpu.c b/target/i386/cpu.c
> > index 35459a38bb..72a79e6019 100644
> > --- a/target/i386/cpu.c
> > +++ b/target/i386/cpu.c
> > @@ -4319,6 +4319,7 @@ static void max_x86_cpu_initfn(Object *obj)
> >          if (lmce_supported()) {
> >              object_property_set_bool(OBJECT(cpu), "lmce", true,
> > &error_abort);
> >          }
> > +        object_property_set_bool(OBJECT(cpu), "host-phys-bits", true,
> > &error_abort);
> >      } else {
> >          object_property_set_str(OBJECT(cpu), "vendor", CPUID_VENDOR_AMD,
> >                                  &error_abort);
> >
> >
> > It should allow people to use -cpu max,host-phys-bits=false.
> >
> > Thanks,
> >
> > Paolo
>
>

[-- Attachment #2: Type: text/html, Size: 3092 bytes --]

  reply	other threads:[~2021-01-13 15:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13  9:04 [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied Yang Weijiang
2021-01-13 10:06 ` Paolo Bonzini
2021-01-13 15:04   ` Yang Weijiang
2021-01-13 15:41     ` Paolo Bonzini [this message]
2021-01-24 21:08 ` Nathan Chancellor
2021-01-25  5:41   ` Yang Weijiang
2021-01-25  7:10     ` Nathan Chancellor
2021-01-25 10:42       ` Paolo Bonzini
2021-01-25 18:19         ` Nathan Chancellor

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='CABgObfaw2kGhxzDLPJ2wpeoN=tnwafzFwB9suBuMZNfZrfJc+w@mail.gmail.com' \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seanjc@google.com \
    --cc=weijiang.yang@intel.com \
    /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.