|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 14/24] PVH xen: interrupt/event-channel delivery to PVH
On Wed, Jul 17, 2013 at 07:32:58PM -0700, Mukesh Rathor wrote:
> PVH uses HVMIRQ_callback_vector for interrupt delivery. Also, change
> hvm_vcpu_has_pending_irq() as PVH doesn't use vlapic emulation, so we
FYI. Yet. It could in the future if we want to use that and the callback
together. But that is a seperate discussion and you can avoid that for now.
> can skip vlapic checks in the function. Moreover, a PVH guest installs IDT
> natively, and sets callback via for interrupt delivery during boot. Once
The 'sets callback via for' does not make much sense. Did you mean:
"and sets a callback vector for interrupt delivery during boot"?
> that is done, it receives interrupts via the callback.
>
> Signed-off-by: Mukesh Rathor <mukesh.rathor@xxxxxxxxxx>
You can add
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
with the change I mentioned above.
> ---
> xen/arch/x86/hvm/irq.c | 3 +++
> xen/arch/x86/hvm/vmx/intr.c | 8 ++++++--
> xen/include/asm-x86/domain.h | 2 +-
> xen/include/asm-x86/event.h | 2 +-
> 4 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
> index 9eae5de..92fb245 100644
> --- a/xen/arch/x86/hvm/irq.c
> +++ b/xen/arch/x86/hvm/irq.c
> @@ -405,6 +405,9 @@ struct hvm_intack hvm_vcpu_has_pending_irq(struct vcpu *v)
> && vcpu_info(v, evtchn_upcall_pending) )
> return hvm_intack_vector(plat->irq.callback_via.vector);
>
> + if ( is_pvh_vcpu(v) )
> + return hvm_intack_none;
> +
> if ( vlapic_accept_pic_intr(v) && plat->vpic[0].int_output )
> return hvm_intack_pic(0);
>
> diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
> index e376f3c..ce42950 100644
> --- a/xen/arch/x86/hvm/vmx/intr.c
> +++ b/xen/arch/x86/hvm/vmx/intr.c
> @@ -165,6 +165,9 @@ static int nvmx_intr_intercept(struct vcpu *v, struct
> hvm_intack intack)
> {
> u32 ctrl;
>
> + if ( is_pvh_vcpu(v) )
> + return 0;
> +
> if ( nvmx_intr_blocked(v) != hvm_intblk_none )
> {
> enable_intr_window(v, intack);
> @@ -219,8 +222,9 @@ void vmx_intr_assist(void)
> return;
> }
>
> - /* Crank the handle on interrupt state. */
> - pt_vector = pt_update_irq(v);
> + if ( !is_pvh_vcpu(v) )
> + /* Crank the handle on interrupt state. */
> + pt_vector = pt_update_irq(v);
>
> do {
> intack = hvm_vcpu_has_pending_irq(v);
> diff --git a/xen/include/asm-x86/domain.h b/xen/include/asm-x86/domain.h
> index 22a72df..21a9954 100644
> --- a/xen/include/asm-x86/domain.h
> +++ b/xen/include/asm-x86/domain.h
> @@ -16,7 +16,7 @@
> #define is_pv_32on64_domain(d) (is_pv_32bit_domain(d))
> #define is_pv_32on64_vcpu(v) (is_pv_32on64_domain((v)->domain))
>
> -#define is_hvm_pv_evtchn_domain(d) (is_hvm_domain(d) && \
> +#define is_hvm_pv_evtchn_domain(d) (!is_pv_domain(d) && \
> d->arch.hvm_domain.irq.callback_via_type == HVMIRQ_callback_vector)
> #define is_hvm_pv_evtchn_vcpu(v) (is_hvm_pv_evtchn_domain(v->domain))
>
> diff --git a/xen/include/asm-x86/event.h b/xen/include/asm-x86/event.h
> index 06057c7..7ed5812 100644
> --- a/xen/include/asm-x86/event.h
> +++ b/xen/include/asm-x86/event.h
> @@ -18,7 +18,7 @@ int hvm_local_events_need_delivery(struct vcpu *v);
> static inline int local_events_need_delivery(void)
> {
> struct vcpu *v = current;
> - return (is_hvm_vcpu(v) ? hvm_local_events_need_delivery(v) :
> + return (!is_pv_vcpu(v) ? hvm_local_events_need_delivery(v) :
> (vcpu_info(v, evtchn_upcall_pending) &&
> !vcpu_info(v, evtchn_upcall_mask)));
> }
> --
> 1.7.2.3
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |