diff mbox

x86: use smp_send_reschedule in kvm_vcpu_kick

Message ID 20090319073849.GB16774@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gleb Natapov March 19, 2009, 7:38 a.m. UTC
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>
--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Zhang, Xiantao March 19, 2009, 7:56 a.m. UTC | #1
Gleb Natapov wrote:
> 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.

Network should work before kvm-82, and not sure latest irq-bits changes has some side-impact for ipf side.
You can reference ioapic_map_irq in ipf.c, and the mapping should match the PRT of bios.  

> @@ -29,7 +29,7 @@
> 
>  #define TARGET_LONG_BITS 64
> 
> -#define TARGET_PAGE_BITS 16
> +#define TARGET_PAGE_BITS 14

If the host kernel's page size is 64k ,bits should be 16, and 16k with 14.  We may reference kernel's page size here.  


>  #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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gleb Natapov March 19, 2009, 8:11 a.m. UTC | #2
On Thu, Mar 19, 2009 at 03:56:07PM +0800, Zhang, Xiantao wrote:
> Gleb Natapov wrote:
> > 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.
> 
> Network should work before kvm-82, and not sure latest irq-bits changes has some side-impact for ipf side.
> You can reference ioapic_map_irq in ipf.c, and the mapping should match the PRT of bios.  
> 
Can you send me your Flash.fd?

> > @@ -29,7 +29,7 @@
> > 
> >  #define TARGET_LONG_BITS 64
> > 
> > -#define TARGET_PAGE_BITS 16
> > +#define TARGET_PAGE_BITS 14
> 
> If the host kernel's page size is 64k ,bits should be 16, and 16k with 14.  We may reference kernel's page size here.  
It should be determined by configure script. I am not sure PAGE_SIZE
define is exported to userspace.

--
			Gleb.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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