From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC9qm-0006rt-1L for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:53:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TC9ql-00043B-10 for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:52:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TC9qk-000431-Om for qemu-devel@nongnu.org; Thu, 13 Sep 2012 09:52:58 -0400 Date: Thu, 13 Sep 2012 16:54:26 +0300 From: "Michael S. Tsirkin" Message-ID: <20120913135426.GB7640@redhat.com> References: <1347382813-5662-1-git-send-email-Don@CloudSwitch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1347382813-5662-1-git-send-email-Don@CloudSwitch.com> Subject: Re: [Qemu-devel] [PATCH] hw: Add support for new LSI Logic devices. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Don Slutz Cc: qemu-devel@nongnu.org On Tue, Sep 11, 2012 at 01:00:13PM -0400, Don Slutz wrote: > + if (next_chain_offset) { > + MptSGEntryChain sgec; > + cpu_physical_memory_read(seg_start_pa + next_chain_offset, > + &sgec, sizeof(MptSGEntryChain)); > + assert(sgec.u2ElementType == MPTSGENTRYTYPE_CHAIN); > + next_sge_pa = sgec.u32SegmentAddressLow; > + if (sgec.f64BitAddress) { > + next_sge_pa |= > + ((uint64_t)sgec.u32SegmentAddressHigh) << 32; > + } > + seg_start_pa = next_sge_pa; > + next_chain_offset = sgec.u8NextChainOffset * sizeof(uint32_t); BTW all this logic seems wrong on big endian. Maybe we don't care short term but we do long term. I think you need to fix it up using le_to_cpu or something. And in particular this likely means bitfields can not be used cleanly, so you will not be able to resync lsilogic.h from virtualbox. The implication I guess is that we should just fix up the style to match qemu. -- MST