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

Re: [Xen-devel] [PATCH v5 1/6] x86: allow IRQ to be disabled for resource access



>>> On 21.01.15 at 12:19, <chao.p.peng@xxxxxxxxxxxxxxx> wrote:
> --- a/xen/arch/x86/platform_hypercall.c
> +++ b/xen/arch/x86/platform_hypercall.c
> @@ -90,7 +90,9 @@ static void check_resource_access(struct 
> xen_resource_access *ra)
>          int ret = 0;
>          xenpf_resource_entry_t *entry = ra->entries + i;
>  
> -        if ( entry->rsvd )
> +        /* DISABLE_IRQ flag should never be set for the last entry */
> +        if ( entry->flags & XEN_RESOURCE_ENTRY_FLAGS_DISABLE_IRQ &&

This needs checking that all the other 31 bits are clear as well as
parenthesizing.

> @@ -124,11 +126,19 @@ static void resource_access(void *info)
>  {
>      struct xen_resource_access *ra = info;
>      unsigned int i;
> +    unsigned long irqflags = 0;
> +    bool_t irq_disabled = 0;

I don't think you need two variables for this - this is x86-only code
and EFLAGS bit 1 is always set.

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®.