This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] Re: [PATCH] x86, hvm: Allow delivery of timer interrupts to

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH] x86, hvm: Allow delivery of timer interrupts to VCPUs != 0.
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 3 Jul 2009 16:57:18 +0900
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 03 Jul 2009 00:59:13 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C67366BA.EBE4%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <7k4otuo0g8.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx> <C67366BA.EBE4%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Keir Fraser writes:
> This doesn't look too bad, given the current vpt interface we have. My main
> comment is regarding vpit_vcpu(), vrtc_vcpu() and vhpet.vcpu. Seems all of
> these could unconditionally use i8259_target. I suggest also introducing
> vhpet_vcpu(), and then pointing all three *_vcpu() macros at
> pt_i8259_target() only. And get rid of the vhpet.vcpu field.
> Would that work okay?

Probably no problem, but may I modify vlapic.c as follows?

diff -r 80839a223746 xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Jul 01 20:22:29 2009 +0100
+++ b/xen/arch/x86/hvm/vlapic.c Fri Jul 03 15:59:56 2009 +0900
@@ -809,12 +809,11 @@ void vlapic_adjust_i8259_target(struct d
     for_each_vcpu ( d, v )
         if ( __vlapic_accept_pic_intr(v) )
-            goto found;
-    v = d->vcpu ? d->vcpu[0] : NULL;
- found:
-    d->arch.hvm_domain.i8259_target = v;
+        {
+            d->arch.hvm_domain.i8259_target = v;
+            return;
+        }

The reasons are:
- I'm afraid that d->arch.hvm_domain.i8259_target == NULL
- if vcpu[0] is halted and all vlapic.LVT0 are masked,
  timer doesn't work even when vlapic will be unmasked
  not as ExtINT mode.

So, I think that the last __vlapic_accept_pic_intr'ed vcpu
should be reserved in d->arch.hvm_domain.i8259_target.


Xen-devel mailing list