public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts
@ 2008-08-18 11:21 Avi Kivity
  2008-08-18 11:38 ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2008-08-18 11:21 UTC (permalink / raw)
  To: avi; +Cc: kvm, Amit Shah

From: Amit Shah <amit.shah@qumranet.com>

... instead of using the pic and ioapic variants

Signed-off-by: Amit Shah <amit.shah@qumranet.com>
---
 arch/x86/kvm/i8254.c |    6 ++----
 arch/x86/kvm/x86.c   |    8 +-------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 7d04dd3..c43894f 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -596,10 +596,8 @@ void kvm_free_pit(struct kvm *kvm)
 static void __inject_pit_timer_intr(struct kvm *kvm)
 {
 	mutex_lock(&kvm->lock);
-	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 1);
-	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 0);
-	kvm_pic_set_irq(pic_irqchip(kvm), 0, 1);
-	kvm_pic_set_irq(pic_irqchip(kvm), 0, 0);
+	kvm_set_irq(kvm, 0, 1);
+	kvm_set_irq(kvm, 0, 0);
 	mutex_unlock(&kvm->lock);
 }
 
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ee005a6..4933f0c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1951,13 +1951,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 			goto out;
 		if (irqchip_in_kernel(kvm)) {
 			mutex_lock(&kvm->lock);
-			if (irq_event.irq < 16)
-				kvm_pic_set_irq(pic_irqchip(kvm),
-					irq_event.irq,
-					irq_event.level);
-			kvm_ioapic_set_irq(kvm->arch.vioapic,
-					irq_event.irq,
-					irq_event.level);
+			kvm_set_irq(kvm, irq_event.irq, irq_event.level);
 			mutex_unlock(&kvm->lock);
 			r = 0;
 		}
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts
  2008-08-18 11:21 Avi Kivity
@ 2008-08-18 11:38 ` Avi Kivity
  2008-08-18 12:06   ` Amit Shah
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2008-08-18 11:38 UTC (permalink / raw)
  To: avi, Amit Shah; +Cc: kvm

Configuration problem?

Avi Kivity doesn't think he wrote:
> From: Amit Shah <amit.shah@qumranet.com>
>
> ... instead of using the pic and ioapic variants
>
> Signed-off-by: Amit Shah <amit.shah@qumranet.com>
> ---
>  arch/x86/kvm/i8254.c |    6 ++----
>  arch/x86/kvm/x86.c   |    8 +-------
>  2 files changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
> index 7d04dd3..c43894f 100644
> --- a/arch/x86/kvm/i8254.c
> +++ b/arch/x86/kvm/i8254.c
> @@ -596,10 +596,8 @@ void kvm_free_pit(struct kvm *kvm)
>  static void __inject_pit_timer_intr(struct kvm *kvm)
>  {
>  	mutex_lock(&kvm->lock);
> -	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 1);
> -	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 0);
> -	kvm_pic_set_irq(pic_irqchip(kvm), 0, 1);
> -	kvm_pic_set_irq(pic_irqchip(kvm), 0, 0);
> +	kvm_set_irq(kvm, 0, 1);
> +	kvm_set_irq(kvm, 0, 0);
>  	mutex_unlock(&kvm->lock);
>  }
>  
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index ee005a6..4933f0c 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -1951,13 +1951,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
>  			goto out;
>  		if (irqchip_in_kernel(kvm)) {
>  			mutex_lock(&kvm->lock);
> -			if (irq_event.irq < 16)
> -				kvm_pic_set_irq(pic_irqchip(kvm),
> -					irq_event.irq,
> -					irq_event.level);
> -			kvm_ioapic_set_irq(kvm->arch.vioapic,
> -					irq_event.irq,
> -					irq_event.level);
> +			kvm_set_irq(kvm, irq_event.irq, irq_event.level);
>  			mutex_unlock(&kvm->lock);
>  			r = 0;
>  		}
>   


-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts
  2008-08-18 11:38 ` Avi Kivity
@ 2008-08-18 12:06   ` Amit Shah
  0 siblings, 0 replies; 5+ messages in thread
From: Amit Shah @ 2008-08-18 12:06 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm

* On Monday 18 Aug 2008 17:08:20 Avi Kivity wrote:
> Configuration problem?

Strange! Maybe the server I sent it from did something bad; I had sent another 
patch just some time ago and that didn't get mangled.

> Avi Kivity doesn't think he wrote:
> > From: Amit Shah <amit.shah@qumranet.com>
> >
> > ... instead of using the pic and ioapic variants
> >
> > Signed-off-by: Amit Shah <amit.shah@qumranet.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts
@ 2008-08-18 12:07 Amit Shah
  2008-08-18 12:12 ` Avi Kivity
  0 siblings, 1 reply; 5+ messages in thread
From: Amit Shah @ 2008-08-18 12:07 UTC (permalink / raw)
  To: avi; +Cc: kvm, Amit Shah

... instead of using the pic and ioapic variants

Signed-off-by: Amit Shah <amit.shah@qumranet.com>
---
 arch/x86/kvm/i8254.c |    6 ++----
 arch/x86/kvm/x86.c   |    8 +-------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
index 7d04dd3..c43894f 100644
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -596,10 +596,8 @@ void kvm_free_pit(struct kvm *kvm)
 static void __inject_pit_timer_intr(struct kvm *kvm)
 {
 	mutex_lock(&kvm->lock);
-	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 1);
-	kvm_ioapic_set_irq(kvm->arch.vioapic, 0, 0);
-	kvm_pic_set_irq(pic_irqchip(kvm), 0, 1);
-	kvm_pic_set_irq(pic_irqchip(kvm), 0, 0);
+	kvm_set_irq(kvm, 0, 1);
+	kvm_set_irq(kvm, 0, 0);
 	mutex_unlock(&kvm->lock);
 }
 
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index ee005a6..4933f0c 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1951,13 +1951,7 @@ long kvm_arch_vm_ioctl(struct file *filp,
 			goto out;
 		if (irqchip_in_kernel(kvm)) {
 			mutex_lock(&kvm->lock);
-			if (irq_event.irq < 16)
-				kvm_pic_set_irq(pic_irqchip(kvm),
-					irq_event.irq,
-					irq_event.level);
-			kvm_ioapic_set_irq(kvm->arch.vioapic,
-					irq_event.irq,
-					irq_event.level);
+			kvm_set_irq(kvm, irq_event.irq, irq_event.level);
 			mutex_unlock(&kvm->lock);
 			r = 0;
 		}
-- 
1.5.4.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts
  2008-08-18 12:07 [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts Amit Shah
@ 2008-08-18 12:12 ` Avi Kivity
  0 siblings, 0 replies; 5+ messages in thread
From: Avi Kivity @ 2008-08-18 12:12 UTC (permalink / raw)
  To: Amit Shah; +Cc: kvm

Amit Shah wrote:
> ... instead of using the pic and ioapic variants
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-08-18 12:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-18 12:07 [PATCH] KVM: x86: Use kvm_set_irq to inject interrupts Amit Shah
2008-08-18 12:12 ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2008-08-18 11:21 Avi Kivity
2008-08-18 11:38 ` Avi Kivity
2008-08-18 12:06   ` Amit Shah

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox