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

Re: [Xen-devel] [PATCH 1/4] xen/spinlocks: in debug builds store cpu holding the lock


  • To: Juergen Gross <JGross@xxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Thu, 8 Aug 2019 07:59:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=suse.com;dmarc=pass action=none header.from=suse.com;dkim=pass header.d=suse.com;arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OV2ibZ3ZtfGxRLATdzGxgoldyxv5gybqHdRBfJMTUcM=; b=A+Bchr8PmCwS09mfl19P0h6fFnm+A9/4BEdDu3/gqPEwkg2vdOfrrcyG5CaBK7BBdDh+Bxx81PqbwWMNBJ/BPVOW0/8vNYXc3Kc+jclcatMZnYX7+w1pZalN/xYHn22QexVo3Sn5K1XN81jD2saIZSODB8gyCf4Fx9quOYfmF2QOZByODyomNFVZshxcmbHy1WQZYn2ENF9ymGaT3PICOX3zY1cz7iinpsSOxEByNbLTbd2/J78T/m9pBa0CAdXnyh0lqGg/F6/oHSFevQvfCKHNEZUpPyFL5JJ0Ka1eihp7lqa8RUg7VdaCJIUVKDSu4Lr9JPwrHSlbkE4/TNI/RQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KWjyPYcNwJ90thIXgEsHfmC8p9ykWRf/alyQffEEr8BABuTEu9u2gttnVbReWYTYit/TmllnMaADQOvgEXILQM+kJfuZKVtoz1CSPNAPxdrvKWHlgsvFGyJoZabM5jW88O0OJUKxIoLg3GmDrVN4bAKToL14GWZAGkHFaP8xdNEsuha6ryVoGgqkUCpNpMH+vkp+2Y2w0FjyW62T7IY1Xs2l4v0IWtmjnjXI72BcS/3gWYvaj1nggHcsYfe/BKVElHvs43JrpV0r2Hpj7cRUeLMLG6qWwTRMkjz9L4EhXIpc9kfobNwnaWQi2a22KfPZo+3xw/WlKL2maiNVE0cqxQ==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 08 Aug 2019 08:00:12 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVTSzXlrQ8kurvmUW1rudnDuQmCKbw9GCA///tid6AAAICgA==
  • Thread-topic: [PATCH 1/4] xen/spinlocks: in debug builds store cpu holding the lock

On 08.08.2019 09:51, Juergen Gross wrote:
> On 08.08.19 08:58, Jan Beulich wrote:
>> On 07.08.2019 16:31, Juergen Gross wrote:
>>> +        unsigned short irq_safe:1;
>>> +        unsigned short pad:2;
>>> +        unsigned short cpu:12;
>>> +    };
>>>    };
>>
>> Do we have an implied assumption somewhere that unsigned short is
>> exactly 16 bits wide? I think "val" wants to be uint16_t here (as
>> you really mean "exactly 16 bits"), the two boolean fields want
>> to be bool, and the remaining two ones unsigned int.
> 
> But that would increase the size of the union to 4 bytes instead of 2.
> So at least pad and cpu must be unsigned short or (better) uint16_t.

Oh, right.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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