qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Implement nmi() callback


From: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH v2 2/5] target-i386: Implement nmi() callback
Date: Mon, 31 Mar 2014 14:33:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130910 Thunderbird/17.0.9

On 03/28/2014 01:51 PM, Alexey Kardashevskiy wrote:
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
  target-i386/cpu.c | 14 ++++++++++++++
  1 file changed, 14 insertions(+)

diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 8fd1497..35f20e0 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -2489,6 +2489,19 @@ static void x86_cpu_reset(CPUState *s)
  #endif
  }
+static int x86_cpu_nmi(CPUState *cs)
+{
+    X86CPU *cpu = X86_CPU(cs);
+
+    if (!cpu->apic_state) {
+        cpu_interrupt(cs, CPU_INTERRUPT_NMI);
+    } else {
+        apic_deliver_nmi(cpu->apic_state);
+    }

Where does this hunk come from? Shouldn't this be moved from somewhere else to here?


Alex

+
+    return 0;
+}
+
  #ifndef CONFIG_USER_ONLY
  bool cpu_is_bsp(X86CPU *cpu)
  {
@@ -2797,6 +2810,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc, 
void *data)
xcc->parent_reset = cc->reset;
      cc->reset = x86_cpu_reset;
+    cc->nmi = x86_cpu_nmi;
      cc->reset_dump_flags = CPU_DUMP_FPU | CPU_DUMP_CCOP;
cc->class_by_name = x86_cpu_class_by_name;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]