From patchwork Thu Jun 11 11:47:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 6587721 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4F2019F2F4 for ; Thu, 11 Jun 2015 11:47:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6441F2060E for ; Thu, 11 Jun 2015 11:47:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 56A8720605 for ; Thu, 11 Jun 2015 11:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752301AbbFKLrs (ORCPT ); Thu, 11 Jun 2015 07:47:48 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36409 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbbFKLrq (ORCPT ); Thu, 11 Jun 2015 07:47:46 -0400 Received: by pabqy3 with SMTP id qy3so2880134pab.3 for ; Thu, 11 Jun 2015 04:47:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=ffAYmTbs8L42wFD+O+1nTe1vOj06wJzZ4NqmPCWi4ZU=; b=mYgzeScAJqzTJY6bOU387/UWpnsi7dSxRLQVJzx1/TpI/R63twq+7Bjtt9Umi3Nlwi fb7Cv0yhULSWdbkDynxIKwNz4L6xGXag36AYMcBf9vKQQE9z3Vv7uwFjA8JkzUw2+Afa T4TYL4Xsn5IPGfmINRaOeDUw+iUVyCZY0v/ZiVre0Gv3D3pq3ytzVNV71soa2FCmU0V+ XjcHhorj+UDaBGN0ATKTSFnkAuffJccq/VeruwD1z6H23D/jHfW0Zle/74sSa5gv2NO1 ddkvs446JB77BrF9e2b5D3CH8rTiUvPCoDucWMPk5ar6IpDnwBRxWuEcKfSiUoROBkLs BxSg== X-Gm-Message-State: ALoCoQnNQAxBi5ajvQ2oDFbkFbRXCwAAkpEHUIIzgY+bGeVltl6fYfgKlyEjWnkjqs6+W+sc7wVZ X-Received: by 10.70.51.67 with SMTP id i3mr14255440pdo.145.1434023265694; Thu, 11 Jun 2015 04:47:45 -0700 (PDT) Received: from [10.10.1.18] ([104.207.83.5]) by mx.google.com with ESMTPSA id bx8sm541679pab.38.2015.06.11.04.47.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jun 2015 04:47:44 -0700 (PDT) Message-ID: <5579754B.1040105@linaro.org> Date: Thu, 11 Jun 2015 19:47:23 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Andrew Jones , Wei Huang CC: kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, marc.zyngier@arm.com, christoffer.dall@linaro.org, pbonzini@redhat.com, a.spyridakis@virtualopensystems.com Subject: Re: [PATCH V2 0/5] Enable ACPI support for KVM ARM References: <1433909767-12189-1-git-send-email-wei@redhat.com> <20150610132325.GD4307@hawk.localdomain> In-Reply-To: <20150610132325.GD4307@hawk.localdomain> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 06/10/2015 09:23 PM, Andrew Jones wrote: > On Wed, Jun 10, 2015 at 12:16:02AM -0400, Wei Huang wrote: >> Initial ACPI support for ARM64 has been accepted into Linux kernel recently. >> Now it is a good time to re-visit ACPI support for KVM. This patchset >> enables ACPI for both arch_timer and vGIC by probing related ACPI tables >> and does necessary initialization. >> >> Note that Alexander Spyridaki submitted similar patches before. Some of >> his ideas were borrowed in this patchset, but with substancial changes. >> In addition we extend support for both GICv2 and GICv3. >> >> This patchset would work better on top of recent GIC/IRQCHIP patches by >> Hanjun Guo, who added support for gic_version in ACPI struct of GIC >> distributor (search "ACPICA: Introduce GIC version for arm based system"). >> >> This patchset can be applied cleanly on top of kvmarm.git queue branch. >> >> -Wei >> >> V1->V2: >> * Initialize vgic->max_gic_vcpus field in GICv2 code (found by Andrew Jones) >> * Rewrite arch_timer ACPI PPI parsing code >> * Verified patches on APM Mustang machine, which has arch_timer & GICv2 >> >> V1: >> * Initial patchset >> >> Wei Huang (5): >> kvm: arm64: Enable ACPI support for virt arch timer >> kvm: arm64: Dispatch virt GIC probing to device tree and ACPI >> kvm: arm64: Detect GIC version for proper ACPI vGIC probing >> kvm: arm64: Implement ACPI probing code for GICv2 >> kvm: arm64: Implement ACPI probing code for GICv3 >> >> include/kvm/arm_vgic.h | 36 +++++++++--- >> virt/kvm/arm/arch_timer.c | 75 ++++++++++++++++++++----- >> virt/kvm/arm/vgic-v2.c | 66 ++++++++++++++++++++-- >> virt/kvm/arm/vgic-v3.c | 56 +++++++++++++++++-- >> virt/kvm/arm/vgic.c | 140 ++++++++++++++++++++++++++++++++++++++++++---- >> 5 files changed, 332 insertions(+), 41 deletions(-) > > I've looked over the series and made a couple nits. I think we need to > wait until "ACPICA: Introduce GIC version for arm based system" is > accepted, as it may still change, and this series duplicates parts of it. Yes, it was changed. Part of them is accepted by ACPICA core, but the new release of ACPICA 20150515 missed some code below, include/acpi/actbl1.h | 11 +++++++++++ 1 file changed, 11 insertions(+) send them to Lv and Rafael, hope it can be merged for 4.2. Thanks Hanjun --- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h index cadf21c..d382de8 100644 --- a/include/acpi/actbl1.h +++ b/include/acpi/actbl1.h @@ -834,6 +834,17 @@ struct acpi_madt_generic_distributor { u8 reserved2[3]; /* reserved - must be zero */ }; +/* Values for Version field above */ + +enum acpi_madt_gic_version { + ACPI_MADT_GIC_VERSION_NONE = 0, + ACPI_MADT_GIC_VERSION_V1 = 1, + ACPI_MADT_GIC_VERSION_V2 = 2, + ACPI_MADT_GIC_VERSION_V3 = 3, + ACPI_MADT_GIC_VERSION_V4 = 4, + ACPI_MADT_GIC_VERSION_RESERVED = 5 /* 5 and greater are reserved */ +}; + it was accepted by ACPICA tools but not ACPICA for linux, I already