From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nadav Amit Subject: Re: [PATCH v2 1/4] x86/hyper-v: move synic/stimer control structures definitions to hyperv-tlfs.h Date: Tue, 27 Nov 2018 17:49:29 -0800 Message-ID: <8A215F49-BB8F-4E93-AC62-EC33B4734F24@gmail.com> References: <20181126154732.23025-1-vkuznets@redhat.com> <20181126154732.23025-2-vkuznets@redhat.com> <20181126200413.GA7852@rkaganb.sw.ru> <87wooyk6na.fsf@vitty.brq.redhat.com> <20181127184835.GA5147@rkaganip.lan> Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Vitaly Kuznetsov , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , "kvm@vger.kernel.org" , Paolo Bonzini , =?utf-8?B?UmFkaW0gS3LEjW3DocWZ?= , "linux-kernel@vger.kernel.org" , "x86@kernel.org" To: Roman Kagan Return-path: In-Reply-To: <20181127184835.GA5147@rkaganip.lan> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org > On Nov 27, 2018, at 10:48 AM, Roman Kagan = wrote: >=20 > On Tue, Nov 27, 2018 at 02:10:49PM +0100, Vitaly Kuznetsov wrote: >> Roman Kagan writes: >>> On Mon, Nov 26, 2018 at 04:47:29PM +0100, Vitaly Kuznetsov wrote: >>> I personally tend to prefer masks over bitfields, so I'd rather do = the >>> consolidation in the opposite direction: use the definitions in >>> hyperv-tlfs.h and replace those unions/bitfields elsewhere. (I = vaguely >>> remember posting such a patchset a couple of years ago but I lacked = the >>> motivation to complete it). >>=20 >> Are there any known advantages of using masks over bitfields or the >> resulting binary code is the same? >=20 > Strictly speaking bitwise ops are portable while bitfields are not, = but > I guess this is not much of an issue with gcc which is dependable to > produce the right thing. >=20 > I came to dislike the bitfields for the false feeling of atomicity of > assignment while most of the time they are read-modify-write = operations. >=20 > And no, I don't feel strong about it, so if nobody backs me on this I > give up :) Last time I tried to push a change from bitmasks to bitfields I failed: https://lkml.org/lkml/2014/9/16/245 On a different note: how come all of the hyper-v structs are not marked with the =E2=80=9Cpacked" attribute?=