public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: "Zhang, Xiantao" <xiantao.zhang@intel.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Ingo Molnar <mingo@elte.hu>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	Peter Zijlstra <peter@programming.kicks-ass.net>
Subject: Re: x86: use smp_send_reschedule in kvm_vcpu_kick
Date: Thu, 19 Mar 2009 09:38:49 +0200	[thread overview]
Message-ID: <20090319073849.GB16774@redhat.com> (raw)
In-Reply-To: <706158FABBBA044BAD4FE898A02E4BC224452426@pdsmsx503.ccr.corp.intel.com>

On Fri, Mar 13, 2009 at 10:15:22AM +0800, Zhang, Xiantao wrote:
> We also hacked the source like the patch. But the issue is not caused by it. We are still trying to figure the reason out. Thanks!  
> Xiantao
> 

With the patch below I am able to compile kvm-userspace on IA64 and run linux guest.
Network doesn't work since there is some kind of problem with PCI interrupts. They are
not delivered to a guest.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
index e2b53ee..bbe789a 100644
--- a/qemu/hw/ipf.c
+++ b/qemu/hw/ipf.c
@@ -700,7 +700,7 @@ void ioapic_set_irq(void *opaque, int irq_num, int level)
         ioapic_irq_count[vector] -= 1;
 
     if (kvm_enabled()) {
-	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0))
+	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0, NULL))
 	    return;
     }
 }
@@ -709,3 +709,17 @@ int ipf_map_irq(PCIDevice *pci_dev, int irq_num)
 {
 	return ioapic_map_irq(pci_dev->devfn, irq_num);
 }
+
+static int apic_irq_delivered;
+void apic_reset_irq_delivered(void)
+{
+    apic_irq_delivered = 0;
+}
+int apic_get_irq_delivered(void)
+{
+    return apic_irq_delivered;
+}
+void apic_set_irq_delivered(void)
+{
+    apic_irq_delivered = 1;
+}
diff --git a/qemu/target-ia64/cpu.h b/qemu/target-ia64/cpu.h
index 9bad6f6..5960bb9 100644
--- a/qemu/target-ia64/cpu.h
+++ b/qemu/target-ia64/cpu.h
@@ -29,7 +29,7 @@
 
 #define TARGET_LONG_BITS 64
 
-#define TARGET_PAGE_BITS 16
+#define TARGET_PAGE_BITS 14
 
 #define ELF_MACHINE	EM_IA_64
 
@@ -40,13 +40,14 @@
 #include "cpu-defs.h"
 
 #include "softfloat.h"
+#define CPUState struct CPUIA64State
+
 typedef struct CPUIA64State {
     CPU_COMMON;
     uint32_t hflags;
     int mp_state;
 } CPUIA64State;
 
-#define CPUState CPUIA64State
 #define cpu_gen_code cpu_ia64_gen_code
 #define cpu_init cpu_ia64_init
 #define cpu_signal_handler cpu_ia64_signal_handler
--
			Gleb.

  reply	other threads:[~2009-03-19  7:43 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-03  0:14 KVM: x86: use smp_send_reschedule in kvm_vcpu_kick Marcelo Tosatti
2009-03-03  7:53 ` Zhang, Xiantao
2009-03-03 13:25   ` Marcelo Tosatti
2009-03-03 13:25     ` Gleb Natapov
2009-03-03 13:56       ` Marcelo Tosatti
2009-03-09 10:17 ` KVM: " Avi Kivity
2009-03-09 10:58   ` Ingo Molnar
2009-03-09 11:09     ` Peter Zijlstra
2009-03-09 23:23       ` Marcelo Tosatti
2009-03-10  8:01         ` Avi Kivity
2009-03-12  2:31           ` Zhang, Xiantao
2009-03-12  7:06             ` Avi Kivity
2009-03-12 11:04             ` Gleb Natapov
2009-03-13  2:15               ` Zhang, Xiantao
2009-03-19  7:38                 ` Gleb Natapov [this message]
2009-03-19  7:56                   ` Zhang, Xiantao
2009-03-19  8:11                     ` Gleb Natapov

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=20090319073849.GB16774@redhat.com \
    --to=gleb@redhat.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mtosatti@redhat.com \
    --cc=peter@programming.kicks-ass.net \
    --cc=xiantao.zhang@intel.com \
    /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