From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 2/4] i386: implement MSR_SMI_COUNT for TCG
Date: Tue, 31 Jul 2018 10:02:57 +0200 [thread overview]
Message-ID: <20180731080259.15934-3-pbonzini@redhat.com> (raw)
In-Reply-To: <20180731080259.15934-1-pbonzini@redhat.com>
This is trivial, so just do it.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/misc_helper.c | 3 +++
target/i386/smm_helper.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/target/i386/misc_helper.c b/target/i386/misc_helper.c
index 628f64a..78f2020 100644
--- a/target/i386/misc_helper.c
+++ b/target/i386/misc_helper.c
@@ -447,6 +447,9 @@ void helper_rdmsr(CPUX86State *env)
val = env->tsc_aux;
break;
#endif
+ case MSR_SMI_COUNT:
+ val = env->msr_smi_count;
+ break;
case MSR_MTRRphysBase(0):
case MSR_MTRRphysBase(1):
case MSR_MTRRphysBase(2):
diff --git a/target/i386/smm_helper.c b/target/i386/smm_helper.c
index 90621e5..c1c34a7 100644
--- a/target/i386/smm_helper.c
+++ b/target/i386/smm_helper.c
@@ -54,6 +54,7 @@ void do_smm_enter(X86CPU *cpu)
qemu_log_mask(CPU_LOG_INT, "SMM: enter\n");
log_cpu_state_mask(CPU_LOG_INT, CPU(cpu), CPU_DUMP_CCOP);
+ env->msr_smi_count++;
env->hflags |= HF_SMM_MASK;
if (env->hflags2 & HF2_NMI_MASK) {
env->hflags2 |= HF2_SMM_INSIDE_NMI_MASK;
--
1.8.3.1
next prev parent reply other threads:[~2018-07-31 8:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-31 8:02 [Qemu-devel] [PULL 0/4] Misc patches for 2018-07-30 Paolo Bonzini
2018-07-31 8:02 ` Paolo Bonzini [this message]
2018-07-31 8:02 ` [Qemu-devel] [PULL 3/4] timer: remove replay clock probe in deadline calculation Paolo Bonzini
2018-07-31 8:02 ` [Qemu-devel] [PULL 4/4] backends/cryptodev: remove dead code Paolo Bonzini
2018-07-31 12:35 ` [Qemu-devel] [PULL 0/4] Misc patches for 2018-07-30 Peter Maydell
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=20180731080259.15934-3-pbonzini@redhat.com \
--to=pbonzini@redhat.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).