qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peng Hao <peng.hao2@zte.com.cn>
To: rth@twiddle.net, pbonzini@redhat.com, ehabkost@redhat.com,
	kvm@vger.kernel.org, mtosatti@redhat.com
Cc: qemu-devel@nongnu.org, Peng Hao <peng.hao2@zte.com.cn>
Subject: [Qemu-devel] [PATCH] target-i386:kvm_get/put_vcpu_events don't handle sipi_vector
Date: Wed, 12 Jul 2017 17:12:07 +0800	[thread overview]
Message-ID: <1499850727-50728-1-git-send-email-peng.hao2@zte.com.cn> (raw)

qemu call kvm_get_vcpu_events, and kernel return sipi_vector always 0,
never valid when reporting to user space. But qemu call kvm_put_vcpu_events
will make sipi_vector in kernel be 0. This will accidently modify sipi_vector
when sipi_vector in kernel is not 0.

Signed-off-by: Peng Hao <peng.hao2@zte.com.cn>
Reviewed-by: Wang Yechao <wang.yechao255@zte.com.cn>
---
 target/i386/kvm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index f84a49d..bbbd696 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2417,7 +2417,6 @@ static int kvm_put_vcpu_events(X86CPU *cpu, int level)
     events.nmi.masked = !!(env->hflags2 & HF2_NMI_MASK);
     events.nmi.pad = 0;
 
-    events.sipi_vector = env->sipi_vector;
     events.flags = 0;
 
     if (has_msr_smbase) {
@@ -2506,8 +2505,6 @@ static int kvm_get_vcpu_events(X86CPU *cpu)
         }
     }
 
-    env->sipi_vector = events.sipi_vector;
-
     return 0;
 }
 
-- 
1.8.3.1

             reply	other threads:[~2017-07-12  0:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12  9:12 Peng Hao [this message]
2017-07-12 17:00 ` [Qemu-devel] [PATCH] target-i386:kvm_get/put_vcpu_events don't handle sipi_vector 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=1499850727-50728-1-git-send-email-peng.hao2@zte.com.cn \
    --to=peng.hao2@zte.com.cn \
    --cc=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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).