public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Emilio G. Cota" <cota@braap.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	kvm@vger.kernel.org, Richard Henderson <rth@twiddle.net>
Subject: [PATCH 32/35] target/i386/kvm: do not acquire the BQL to call cpu_reset_interrupt
Date: Mon, 17 Sep 2018 12:31:00 -0400	[thread overview]
Message-ID: <20180917163103.6113-33-cota@braap.org> (raw)
In-Reply-To: <20180917163103.6113-1-cota@braap.org>

From: Paolo Bonzini <pbonzini@redhat.com>

It's not needed anymore.

Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Emilio G. Cota <cota@braap.org>
---
 target/i386/kvm.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index e40c8d5461..41c4830be8 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -3007,9 +3007,7 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)
     /* Inject NMI */
     if (interrupt_request & (CPU_INTERRUPT_NMI | CPU_INTERRUPT_SMI)) {
         if (interrupt_request & CPU_INTERRUPT_NMI) {
-            qemu_mutex_lock_iothread();
             cpu_reset_interrupt(cpu, CPU_INTERRUPT_NMI);
-            qemu_mutex_unlock_iothread();
             DPRINTF("injected NMI\n");
             ret = kvm_vcpu_ioctl(cpu, KVM_NMI);
             if (ret < 0) {
@@ -3018,9 +3016,7 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)
             }
         }
         if (atomic_read(&cpu->interrupt_request) & CPU_INTERRUPT_SMI) {
-            qemu_mutex_lock_iothread();
             cpu_reset_interrupt(cpu, CPU_INTERRUPT_SMI);
-            qemu_mutex_unlock_iothread();
             DPRINTF("injected SMI\n");
             ret = kvm_vcpu_ioctl(cpu, KVM_SMI);
             if (ret < 0) {
-- 
2.17.1

  parent reply	other threads:[~2018-09-17 16:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-17 16:30 [PATCH 00/35] exec: drop BQL from interrupt handling Emilio G. Cota
2018-09-17 16:30 ` [PATCH 02/35] target/i386: use cpu_reset_interrupt Emilio G. Cota
2018-09-18 20:47   ` Richard Henderson
2018-09-17 16:30 ` [PATCH 11/35] target/i386: access cpu->interrupt_request with atomics Emilio G. Cota
2018-09-18 21:04   ` Richard Henderson
2018-09-19 15:02     ` Emilio G. Cota
2018-09-17 16:31 ` Emilio G. Cota [this message]
2018-09-18 21:12   ` [PATCH 32/35] target/i386/kvm: do not acquire the BQL to call cpu_reset_interrupt Richard Henderson
2018-09-19 21:19   ` Philippe Mathieu-Daudé
2018-09-17 16:31 ` [PATCH 34/35] exec: push BQL down to cpu->do_interrupt Emilio G. Cota
2018-09-18  4:11   ` David Gibson
2018-09-18  7:12   ` David Hildenbrand
2018-09-19 16:38   ` Cornelia Huck
2018-09-17 16:31 ` [PATCH 35/35] exec: push BQL down to cpu->cpu_exec_interrupt Emilio G. Cota
2018-09-18  4:12   ` David Gibson
2018-09-18  7:48   ` David Hildenbrand
2018-09-18  9:51 ` [PATCH 00/35] exec: drop BQL from interrupt handling David Hildenbrand
2018-09-20 20:05 ` Mark Cave-Ayland

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=20180917163103.6113-33-cota@braap.org \
    --to=cota@braap.org \
    --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