[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [V8 PATCH 7/8] pvh dom0: add check for pvh in vioapic_range



>>> On 22.03.14 at 02:39, <mukesh.rathor@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/vioapic.c
> +++ b/xen/arch/x86/hvm/vioapic.c
> @@ -238,8 +238,13 @@ static int vioapic_write(
>  
>  static int vioapic_range(struct vcpu *v, unsigned long addr)
>  {
> -    struct hvm_hw_vioapic *vioapic = domain_vioapic(v->domain);
> +    struct hvm_hw_vioapic *vioapic;
> +
> +    /* pvh uses event channel callback */
> +    if ( is_pvh_vcpu(v) )
> +        return 0;
>  
> +    vioapic = domain_vioapic(v->domain);

I can see why the extra check is needed, but I can't see why you
convert the initializer to an assignment: Afaict domain_vioapic() is
safe even if d->arch.hvm_domain.vioapic == NULL.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.