All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: Wei Huang <wei@redhat.com>,
	"kvmarm@lists.cs.columbia.edu" <kvmarm@lists.cs.columbia.edu>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"drjones@redhat.com" <drjones@redhat.com>,
	"a.spyridakis@virtualopensystems.com"
	<a.spyridakis@virtualopensystems.com>,
	"hanjun.guo@linaro.org" <hanjun.guo@linaro.org>
Subject: Re: [PATCH V2 3/5] kvm: arm64: Detect GIC version for proper ACPI vGIC probing
Date: Thu, 11 Jun 2015 08:54:05 +0100	[thread overview]
Message-ID: <55793E9D.7090506@arm.com> (raw)
In-Reply-To: <557913BC.1090201@redhat.com>

Hi Wei,

On 11/06/15 05:51, Wei Huang wrote:
> 
> 
> On 06/10/2015 11:43 AM, Marc Zyngier wrote:
>> On 10/06/15 05:16, Wei Huang wrote:
>>> There are two GICs (GICv2 and GICv3) supported by KVM. So it is necessary
>>> to find out GIC version before calling ACPI probing functions defined
>>> in vgic-v2.c and vgic-v3.c.
>>>
>>> This patch detects GIC version by checking gic_version field of GIC
>>> distributor, which was defined  since ACPI 6.0. In case of ACPI 5.1,
>>> we use manual hardware discovery to find out GIC version.
>>>
>>> NOTE: This patch is based on a recent patch by Hanjun Guo.
>>
>> Well, this is really a duplicate of Hanjun's patch, and I'd rather have
>> some common infrastructure.
>>
>> Surely it should be possible for the ACPI GIC code to export the
>> necessary entry points, or even to provide the required information?
>>
> 
> I agreed that this is a duplication and should be avoided if possible.
> One easy solution is to export from GIC driver to KVM (using
> EXPORT_SYMBOL or something similar). Is this acceptable?

I don't think EXPORT_SYMBOL is required, as we currently don't support
having KVM as a module.

Simply making available a global structure containing the base addresses
and interrupt should be enough, and could be shared with both DT and
ACPI. You could start your series by letting both GIC drivers expose
that information obtained through DT, convert KVM to use this structure,
and later on let ACPI fill in this structure too.

> Anyway the difficulty is to find a common place to store and share info
> between other modules & KVM.

Indeed. As a rule of thumb, I want to minimize the amount of gratuitous
divergence between DT and ACPI. So the sooner we extract the required
information from whatever firmware we have, the better.

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2015-06-11  7:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10  4:16 [PATCH V2 0/5] Enable ACPI support for KVM ARM Wei Huang
2015-06-10  4:16 ` [PATCH V2 1/5] kvm: arm64: Enable ACPI support for virt arch timer Wei Huang
2015-06-10 12:51   ` Andrew Jones
2015-06-11 11:27   ` Hanjun Guo
2015-06-10  4:16 ` [PATCH V2 2/5] kvm: arm64: Dispatch virt GIC probing to device tree and ACPI Wei Huang
2015-06-11 11:34   ` Hanjun Guo
2015-06-10  4:16 ` [PATCH V2 3/5] kvm: arm64: Detect GIC version for proper ACPI vGIC probing Wei Huang
2015-06-10 12:53   ` Andrew Jones
2015-06-10 16:43   ` Marc Zyngier
2015-06-11  4:51     ` Wei Huang
2015-06-11  7:54       ` Marc Zyngier [this message]
2015-06-10  4:16 ` [PATCH V2 4/5] kvm: arm64: Implement ACPI probing code for GICv2 Wei Huang
2015-06-10  4:16 ` [PATCH V2 5/5] kvm: arm64: Implement ACPI probing code for GICv3 Wei Huang
2015-06-10 13:04   ` Andrew Jones
2015-06-10 13:23 ` [PATCH V2 0/5] Enable ACPI support for KVM ARM Andrew Jones
2015-06-11 11:47   ` Hanjun Guo
2016-01-14  0:27 ` Graeme Gregory

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55793E9D.7090506@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=a.spyridakis@virtualopensystems.com \
    --cc=christoffer.dall@linaro.org \
    --cc=drjones@redhat.com \
    --cc=hanjun.guo@linaro.org \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=pbonzini@redhat.com \
    --cc=wei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.