qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	"Riku Voipio" <riku.voipio@iki.fi>,
	"Blue Swirl" <blauwirbel@gmail.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Richard Henderson" <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 3/5] target-i386: Use X86CPU on cpu_get_pic_interrupt()
Date: Fri, 24 Apr 2015 15:30:07 -0300	[thread overview]
Message-ID: <1429900209-31811-4-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1429900209-31811-1-git-send-email-ehabkost@redhat.com>

Cc: Blue Swirl <blauwirbel@gmail.com>
Cc: Riku Voipio <riku.voipio@iki.fi>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 bsd-user/main.c          | 2 +-
 hw/i386/pc.c             | 3 +--
 linux-user/main.c        | 2 +-
 target-i386/cpu.h        | 2 +-
 target-i386/kvm.c        | 2 +-
 target-i386/seg_helper.c | 2 +-
 6 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 1bb2754..85d0860 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -62,7 +62,7 @@ void gemu_log(const char *fmt, ...)
 }
 
 #if defined(TARGET_I386)
-int cpu_get_pic_interrupt(CPUX86State *env)
+int cpu_get_pic_interrupt(X86CPU *cpu)
 {
     return -1;
 }
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index a8e6be1..f86c58e 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -185,9 +185,8 @@ void cpu_smm_update(CPUX86State *env)
 
 
 /* IRQ handling */
-int cpu_get_pic_interrupt(CPUX86State *env)
+int cpu_get_pic_interrupt(X86CPU *cpu)
 {
-    X86CPU *cpu = x86_env_get_cpu(env);
     int intno;
 
     intno = apic_get_interrupt(cpu->apic_state);
diff --git a/linux-user/main.c b/linux-user/main.c
index a8adb04..e6a93b2 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -85,7 +85,7 @@ void gemu_log(const char *fmt, ...)
 }
 
 #if defined(TARGET_I386)
-int cpu_get_pic_interrupt(CPUX86State *env)
+int cpu_get_pic_interrupt(X86CPU *cpu)
 {
     return -1;
 }
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index 5f4dab1..5eb8a79 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -986,7 +986,7 @@ void x86_cpu_list(FILE *f, fprintf_function cpu_fprintf);
 void x86_cpudef_setup(void);
 int cpu_x86_support_mca_broadcast(X86CPU *cpu);
 
-int cpu_get_pic_interrupt(CPUX86State *s);
+int cpu_get_pic_interrupt(X86CPU *cpu);
 /* MSDOS compatibility mode FPU exception support */
 void cpu_set_ferr(CPUX86State *s);
 
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index bb2477d..50b2978 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -2215,7 +2215,7 @@ void kvm_arch_pre_run(CPUState *cpu, struct kvm_run *run)
             int irq;
 
             cpu->interrupt_request &= ~CPU_INTERRUPT_HARD;
-            irq = cpu_get_pic_interrupt(env);
+            irq = cpu_get_pic_interrupt(x86_cpu);
             if (irq >= 0) {
                 struct kvm_interrupt intr;
 
diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c
index 2bc757a..ff361ce 100644
--- a/target-i386/seg_helper.c
+++ b/target-i386/seg_helper.c
@@ -1325,7 +1325,7 @@ bool x86_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
             cpu_svm_check_intercept_param(env, SVM_EXIT_INTR, 0);
             cs->interrupt_request &= ~(CPU_INTERRUPT_HARD |
                                        CPU_INTERRUPT_VIRQ);
-            intno = cpu_get_pic_interrupt(env);
+            intno = cpu_get_pic_interrupt(cpu);
             qemu_log_mask(CPU_LOG_TB_IN_ASM,
                           "Servicing hardware INT=0x%02x\n", intno);
             do_interrupt_x86_hardirq(env, intno, 1);
-- 
2.1.0

  parent reply	other threads:[~2015-04-24 18:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 18:30 [Qemu-devel] [PATCH 0/5] target-i386: Some CPUX86State -> X86CPU conversions Eduardo Habkost
2015-04-24 18:30 ` [Qemu-devel] [PATCH 1/5] target-i386: Use X86CPU on cpu_x86_support_mca_broadcast() Eduardo Habkost
2015-04-24 18:30 ` [Qemu-devel] [PATCH 2/5] target-i386: Use X86CPU on cpu_x86_version() Eduardo Habkost
2015-04-24 18:30 ` Eduardo Habkost [this message]
2015-04-24 18:30 ` [Qemu-devel] [PATCH 4/5] target-i386: Use X86CPU on cpu_report_tpr_access() Eduardo Habkost
2015-04-24 18:30 ` [Qemu-devel] [PATCH 5/5] target-i386: Use X86CPU on cpu_x86_cpuid() Eduardo Habkost

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=1429900209-31811-4-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=afaerber@suse.de \
    --cc=blauwirbel@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --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).