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

Re: [Xen-devel] [PATCH v4 11/15] pvh: Send an SCI on VCPU hotplug event



>>> On 29.11.16 at 16:33, <boris.ostrovsky@xxxxxxxxxx> wrote:
> @@ -99,6 +100,7 @@ static int acpi_access_common(struct domain *d, bool 
> is_guest_access,
>          else if ( mask_sts )
>          {
>              uint32_t v = *val;
> +            uint16_t sts_orig = *sts;
>  
>              /* Status register is write-1-to-clear by guests */
>              switch ( port & 3 )
> @@ -132,6 +134,14 @@ static int acpi_access_common(struct domain *d, bool 
> is_guest_access,
>              case 3:
>                  *en = (((v & 0xff) << 8) | (*en & 0xff)) & *mask_en;
>              }
> +
> +            /*
> +             * If a new bit has been set in status register and corresponding
> +             * event is enabled then an SCI is sent to the guest.
> +             */
> +            if ( !is_guest_access &&
> +                 ((*sts ^ sts_orig) & ~sts_orig) && (*sts & *en))
> +                send_guest_global_virq(d, VIRQ_SCI);

I don't think comment and condition match; namely the
"corresponding" doesn't appear to be fulfilled - you raise
SCI if any bit is set both in *sts and *en.

Also (a ^ b) & ~b = a & ~b afaict.

Jan


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

 


Rackspace

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