From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55171) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1atcIm-0008W3-5g for qemu-devel@nongnu.org; Fri, 22 Apr 2016 10:43:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1atcIl-0002aC-Aq for qemu-devel@nongnu.org; Fri, 22 Apr 2016 10:43:24 -0400 Date: Fri, 22 Apr 2016 16:43:12 +0200 From: Andrew Jones Message-ID: <20160422144312.ga63a2nsv54st3ck@hawk.localdomain> References: <1458899181-17896-1-git-send-email-zhaoshenglong@huawei.com> <1458899181-17896-4-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1458899181-17896-4-git-send-email-zhaoshenglong@huawei.com> Subject: Re: [Qemu-devel] [PATCH 3/3] hw/arm/virt-acpi-build: Add PMU IRQ number in ACPI table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shannon Zhao Cc: qemu-arm@nongnu.org, peter.maydell@linaro.org, wei@redhat.com, peter.huangpeng@huawei.com, qemu-devel@nongnu.org, shannon.zhao@linaro.org On Fri, Mar 25, 2016 at 05:46:21PM +0800, Shannon Zhao wrote: > From: Shannon Zhao > > Add PMU IRQ number in ACPI table, then we can use PMU in guest through > ACPI. > > Signed-off-by: Shannon Zhao > --- > hw/arm/virt-acpi-build.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c > index 6a86b2c..7a377e5 100644 > --- a/hw/arm/virt-acpi-build.c > +++ b/hw/arm/virt-acpi-build.c > @@ -490,6 +490,9 @@ build_madt(GArray *table_data, GArray *linker, VirtGuestInfo *guest_info) > gicc->arm_mpidr = armcpu->mp_affinity; > gicc->uid = i; > gicc->flags = cpu_to_le32(ACPI_GICC_ENABLED); > + > + if (armcpu->has_pmu) > + gicc->performance_interrupt = VIRTUAL_PMU_IRQ + 16; missing cpu_to_le32(). Actually this function is missing lots of those. Here's another place we could use a PPI() macro to avoid sprinkling 16's around everywhere. > } > > if (guest_info->gic_version == 3) { > -- > 2.0.4 Otherwise looks good. drew