Received: from eggs.gnu.org ([2001:4830:134:3::10]:39208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bn6V7-0001rx-N1 for qemu-devel@nongnu.org; Thu, 22 Sep 2016 12:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bn6V2-0003cD-ML for qemu-devel@nongnu.org; Thu, 22 Sep 2016 12:05:28 -0400 References: <1473442237-3746-1-git-send-email-eric.auger@redhat.com> <1473442237-3746-6-git-send-email-eric.auger@redhat.com> From: Auger Eric Message-ID: Date: Thu, 22 Sep 2016 18:05:12 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v6 5/8] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: eric.auger.pro@gmail.com, qemu-arm , QEMU Developers , Pavel Fedin , Tomasz Nowicki , Shlomo Pongratz , Diana Craciun , Shannon Zhao , Christoffer Dall , Andrew Jones Hi Peter, On 22/09/2016 17:59, Peter Maydell wrote: > On 22 September 2016 at 16:53, Auger Eric wrote: >> Hi Peter, >> >> On 22/09/2016 17:03, Peter Maydell wrote: >>> Also, I think it would be simpler to just have kvm_its_send_msi() do >>> >>> if (unlikely(!s->translater_gpa_known)) { >>> s->gits_translater_gpa = ...; >>> s->translater_gpa_known = true; >>> } >> My issue precisely is to get the absolue GPA of the ITS translater. >> kvm_its_send_msi is called by the region write callback which works on >> relative address wrt start of the translation region while kvm ioctl >> uses the absolute GPA. I did not see any other way to retrieve the >> absolute GPA than using a machine init done notifier. > > I don't understand. There should be no difference between > (1) calculate gits_translater_gpa in the machine init done notifier > (2) calculate gits_translater_gpa the first time that we need it, > ie on first call to kvm_its_send_msi() > > We don't use it anywhere else, do we ? Oh yes I now understand. Indeed I have all the data needed from kvm_its_send_msi parameters to compute it there. At the moment we do not use it anywhere else. I will proceed that way then. Thanks Eric > > thanks > -- PMM >