linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marc.zyngier@arm.com (Marc Zyngier)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 08/10] ARM: KVM: VGIC initialisation code
Date: Tue, 02 Oct 2012 12:25:25 +0200	[thread overview]
Message-ID: <b4b11d71544812cff978b3457a99b90e@localhost> (raw)
In-Reply-To: <20121002092412.GB8847@mudshark.cambridge.arm.com>

On Tue, 2 Oct 2012 10:24:13 +0100, Will Deacon <will.deacon@arm.com>
wrote:
> On Mon, Oct 01, 2012 at 10:14:26AM +0100, Christoffer Dall wrote:
>> From: Marc Zyngier <marc.zyngier@arm.com>
>> 
>> Add the init code for the hypervisor, the virtual machine, and
>> the virtual CPUs.
>> 
>> An interrupt handler is also wired to allow the VGIC maintenance
>> interrupts, used to deal with level triggered interrupts and LR
>> underflows.
>> 
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
>> ---
> 
> [...]
> 
>> diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c
>> index b52d4c2..fc2a138 100644
>> --- a/arch/arm/kvm/vgic.c
>> +++ b/arch/arm/kvm/vgic.c
>> @@ -20,7 +20,14 @@
>>  #include <linux/kvm_host.h>
>>  #include <linux/interrupt.h>
>>  #include <linux/io.h>
>> +#include <linux/of.h>
>> +#include <linux/of_address.h>
>> +#include <linux/of_irq.h>
>> +
>>  #include <asm/kvm_emulate.h>
>> +#include <asm/hardware/gic.h>
>> +#include <asm/kvm_arm.h>
>> +#include <asm/kvm_mmu.h>
>>  
>>  /*
>>   * How the whole thing works (courtesy of Christoffer Dall):
>> @@ -61,6 +68,13 @@
>>  /* Temporary hacks, need to be provided by userspace emulation */
>>  #define VGIC_DIST_BASE		0x2c001000
>>  #define VGIC_DIST_SIZE		0x1000
>> +#define VGIC_CPU_BASE		0x2c002000
>> +#define VGIC_CPU_SIZE		0x2000
> 
> We really don't want the physical memory map for the guest hardwired in
the
> kernel. Please find a way to parameterise this from userspace.

Yes, this is a known problem. KVM doesn't offer a standard way of passing
the address of an interrupt controller (none of the other architectures
have it memory mapped).

We probably need a separate ioctl for that...

        M.
-- 
Fast, cheap, reliable. Pick two.

  reply	other threads:[~2012-10-02 10:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  9:12 [PATCH v2 00/10] KVM/ARM vGIC support Christoffer Dall
2012-10-01  9:13 ` [PATCH v2 01/10] ARM: KVM: Keep track of currently running vcpus Christoffer Dall
2012-10-01  9:13 ` [PATCH v2 02/10] ARM: KVM: Initial VGIC infrastructure support Christoffer Dall
2012-10-01  9:13 ` [PATCH v2 03/10] ARM: KVM: Initial VGIC MMIO support code Christoffer Dall
2012-10-01  9:13 ` [PATCH v2 04/10] ARM: KVM: VGIC distributor handling Christoffer Dall
2012-10-01  9:13 ` [PATCH v2 05/10] ARM: KVM: VGIC virtual CPU interface management Christoffer Dall
2012-10-01  9:14 ` [PATCH v2 06/10] ARM: KVM: VGIC interrupt injection Christoffer Dall
2012-10-01  9:14 ` [PATCH v2 07/10] ARM: KVM: VGIC control interface world switch Christoffer Dall
2012-10-01  9:14 ` [PATCH v2 08/10] ARM: KVM: VGIC initialisation code Christoffer Dall
2012-10-02  9:24   ` Will Deacon
2012-10-02 10:25     ` Marc Zyngier [this message]
2012-10-02 17:55       ` Christoffer Dall
2012-10-02 18:31         ` [kvmarm] " Peter Maydell
2012-10-02 19:28           ` Will Deacon
2012-10-02 19:45             ` Peter Maydell
2012-10-03 10:02               ` Will Deacon
2012-10-03 15:05                 ` Christoffer Dall
2012-10-01  9:14 ` [PATCH v2 09/10] ARM: KVM: vgic: reduce the number of vcpu kick Christoffer Dall
2012-10-01  9:14 ` [PATCH v2 10/10] ARM: KVM: Add VGIC configuration option Christoffer Dall

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=b4b11d71544812cff978b3457a99b90e@localhost \
    --to=marc.zyngier@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).