From: "Jan Beulich" Subject: Re: [PATCH v2] x86/hvm: Add per-vcpu evtchn upcalls Date: Fri, 07 Nov 2014 11:48:02 +0000 Message-ID: <545CBF820200007800045A27@mail.emea.novell.com> References: <1415287995-11437-1-git-send-email-paul.durrant@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1415287995-11437-1-git-send-email-paul.durrant@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Paul Durrant Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 06.11.14 at 16:33, wrote: > HVM guests have always been confined to using the domain callback > via (see HVM_PARAM_CALLBACK_IRQ) to receive event notifications > which is an IOAPIC vector and is only used if the event channel is > bound to vcpu 0. Iirc the callback-via-vector method was specifically added to have a way to spread the IRQ handling load. And even if this didn't work out as intended, wouldn't simply setting a flag to avoid the restriction in > This patch adds a new HVM op allowing a guest to specify a local > APIC vector to use as an upcall notification for a specific vcpu. > This therefore allows a guest which sets a vector for a vcpu > other than 0 to then bind event channels to that vcpu. So is there really a need for a per-vCPU vector value (rather than a single domain wide one)? > @@ -220,6 +227,8 @@ void hvm_assert_evtchn_irq(struct vcpu *v) > > if ( is_hvm_pv_evtchn_vcpu(v) ) > vcpu_kick(v); > + else if ( v->arch.hvm_vcpu.evtchn_upcall_vector != 0 ) > + hvm_set_upcall_irq(v); The context code above your insertion is clearly not enforcing vCPU 0 only; the code below this change is. Jan