From: Paolo Bonzini <pbonzini@redhat.com>
To: Lara Lazier <laramglazier@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] target/i386: Added VGIF feature
Date: Thu, 29 Jul 2021 09:59:00 +0200 [thread overview]
Message-ID: <a2e00340-0506-4d37-05e2-3cc6f4179d4a@redhat.com> (raw)
In-Reply-To: <20210728113742.41464-1-laramglazier@gmail.com>
On 28/07/21 13:37, Lara Lazier wrote:
> + if (virtual_gif_enabled(env, int_ctl) && likely(env->hflags & HF_GUEST_MASK)) {
> + x86_stl_phys(cs, env->vm_vmcb + offsetof(struct vmcb, control.int_ctl),
> + int_ctl | V_GIF_MASK);
> + } else {
I would put the HF_GUEST_MASK check in virtual_gif_enabled.
In fact, the more logical order for the three checks is:
- am I in guest mode? (if not, the VMCB and thus int_ctl is unused)
- is the CPUID bit set? (if not, bit 9 has no effect)
- is bit 9 of int_ctl set?
Thanks,
Paolo
next prev parent reply other threads:[~2021-07-29 7:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 11:37 [PATCH v2] target/i386: Added VGIF feature Lara Lazier
2021-07-29 7:59 ` Paolo Bonzini [this message]
2021-07-29 8:01 ` Paolo Bonzini
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=a2e00340-0506-4d37-05e2-3cc6f4179d4a@redhat.com \
--to=pbonzini@redhat.com \
--cc=laramglazier@gmail.com \
--cc=qemu-devel@nongnu.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).