From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932289AbbCaPQs (ORCPT ); Tue, 31 Mar 2015 11:16:48 -0400 Received: from 8bytes.org ([81.169.241.247]:34360 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752866AbbCaPQp (ORCPT ); Tue, 31 Mar 2015 11:16:45 -0400 Date: Tue, 31 Mar 2015 17:16:43 +0200 From: Joerg Roedel To: "Wu, Feng" Cc: "dwmw2@infradead.org" , "jiang.liu@linux.intel.com" , "iommu@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [v4 2/8] iommu, x86: Define new irte structure for VT-d Posted-Interrupts Message-ID: <20150331151643.GF22683@8bytes.org> References: <1422864424-19411-1-git-send-email-feng.wu@intel.com> <1422864424-19411-3-git-send-email-feng.wu@intel.com> <20150323115754.GN4441@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 24, 2015 at 02:32:01AM +0000, Wu, Feng wrote: > > I think it is better to put this as a union into struct irte. It saves > > memory and unnecessary casting in later patches. > > Thanks for the comments! Thinking more about this, I think its probably fine to keep the two versions of the irte seperate like in this patch-set. It allows to update the non-posted irte when the posted irte is active at the moment and makes the transition between both irte variants easier. But what I still don't like is the type casting necessary when calling modify_irte(). Can you abstract this and put the decission whether irte or irte_pi is set active into modify_irte? It required to change the interface of modify_irte, but that should be easy. Joerg