lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Jun 2015 05:42:21 +0000
From:	"Wu, Feng" <feng.wu@...el.com>
To:	Paolo Bonzini <pbonzini@...hat.com>,
	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:	"mtosatti@...hat.com" <mtosatti@...hat.com>,
	"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
	"eric.auger@...aro.org" <eric.auger@...aro.org>,
	"Wu, Feng" <feng.wu@...el.com>
Subject: RE: [v4 01/16] KVM: Extend struct pi_desc for VT-d Posted-Interrupts



> -----Original Message-----
> From: Paolo Bonzini [mailto:pbonzini@...hat.com]
> Sent: Tuesday, June 23, 2015 11:50 PM
> To: Wu, Feng; kvm@...r.kernel.org; linux-kernel@...r.kernel.org
> Cc: mtosatti@...hat.com; alex.williamson@...hat.com;
> eric.auger@...aro.org
> Subject: Re: [v4 01/16] KVM: Extend struct pi_desc for VT-d Posted-Interrupts
> 
> 
> 
> On 11/06/2015 12:51, Feng Wu wrote:
> > +	union {
> > +		struct {
> > +				/* bit 256 - Outstanding Notification */
> > +			u64	on	: 1,
> > +				/* bit 257 - Suppress Notification */
> > +				sn	: 1,
> > +				/* bit 271:258 - Reserved */
> > +				rsvd_1	: 14,
> > +				/* bit 279:272 - Notification Vector */
> > +				nv	: 8,
> > +				/* bit 287:280 - Reserved */
> > +				rsvd_2	: 8,
> > +				/* bit 319:288 - Notification Destination */
> > +				ndst	: 32;
> 
> Please do not use bitfields, Linus doesn't like them.  Use static
> inlines instead to extract or set the fields from the control field.

Do you mean we don't use bitfields at all, or the following format is
acceptable, in which, we use bitfileds as less as possible?

    union {
        struct
        {
        u16 on     : 1,  /* bit 256 - Outstanding Notification */
            sn     : 1,  /* bit 257 - Suppress Notification */
            rsvd_1 : 14; /* bit 271:258 - Reserved */
        u8  nv;          /* bit 279:272 - Notification Vector */
        u8  rsvd_2;      /* bit 287:280 - Reserved */
        u32 ndst;        /* bit 319:288 - Notification Destination */
        };
        u64 control;
    };

Thanks,
Feng

> 
> Paolo
> 
> > +		};
> > +		u64 control;
> > +	};
> > +	u32 rsvd[6];
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ