From: Zhao Liu <zhao1.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>,
Xiaoyao Li <xiaoyao.li@intel.com>
Subject: Re: [PATCH for-9.1 v5 3/3] kvm: add support for guest physical bits
Date: Wed, 27 Mar 2024 16:21:44 +0800 [thread overview]
Message-ID: <ZgPXGIufIBnC9xCj@intel.com> (raw)
In-Reply-To: <20240325141422.1380087-4-pbonzini@redhat.com>
Hi Paolo,
On Mon, Mar 25, 2024 at 03:14:22PM +0100, Paolo Bonzini wrote:
> Date: Mon, 25 Mar 2024 15:14:22 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH for-9.1 v5 3/3] kvm: add support for guest physical bits
> X-Mailer: git-send-email 2.44.0
[snip]
> static bool kvm_cpu_realizefn(CPUState *cs, Error **errp)
> {
> X86CPU *cpu = X86_CPU(cs);
> CPUX86State *env = &cpu->env;
> + bool ret;
>
> /*
> * The realize order is important, since x86_cpu_realize() checks if
> @@ -50,7 +72,17 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp)
> MSR_IA32_UCODE_REV);
> }
> }
> - return host_cpu_realizefn(cs, errp);
> + ret = host_cpu_realizefn(cs, errp);
> + if (!ret) {
> + return ret;
> + }
> +
> + if ((env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) &&
> + cpu->guest_phys_bits == -1) {
> + kvm_set_guest_phys_bits(cs);
> + }
> +
> + return true;
> }
>
Just nit, it seems the comment about "realize order" in
kvm_cpu_realizefn() should also be updated to include this new
kvm_set_guest_phys_bits().
Or, I feel the guest_phys_bits could also be set in host_cpu_realizefn()
since it also indicates the host support.
Anyway, this won't affect this current series. LGTM,
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
prev parent reply other threads:[~2024-03-27 8:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 14:14 [PATCH for-9.1 v5 0/3] kvm: add support for guest physical bits Paolo Bonzini
2024-03-25 14:14 ` [PATCH for-9.1 v5 1/3] hw: Add compat machines for 9.1 Paolo Bonzini
2024-03-25 15:02 ` Cornelia Huck
2024-03-25 15:07 ` Thomas Huth
2024-03-26 10:10 ` Harsh Prateek Bora
2024-03-27 7:57 ` Zhao Liu
2024-03-28 10:21 ` Zhao Liu
2024-03-29 12:54 ` Paolo Bonzini
2024-03-25 14:14 ` [PATCH for-9.1 v5 2/3] target/i386: add guest-phys-bits cpu property Paolo Bonzini
2024-03-27 3:00 ` Xiaoyao Li
2024-03-27 8:05 ` Zhao Liu
2024-03-25 14:14 ` [PATCH for-9.1 v5 3/3] kvm: add support for guest physical bits Paolo Bonzini
2024-03-27 8:21 ` Zhao Liu [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=ZgPXGIufIBnC9xCj@intel.com \
--to=zhao1.liu@intel.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiaoyao.li@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.