From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: KVM ARM interrupt virtualization
Date: Thu, 8 Sep 2011 09:54:49 +0100 [thread overview]
Message-ID: <20110908085449.GA29243@e102109-lin.cambridge.arm.com> (raw)
In-Reply-To: <CAOMgcGJBoeKJ8FjDW9eESfT+FiXmFF9PfShJ=a2adbESLD2YkA@mail.gmail.com>
On Thu, Sep 08, 2011 at 02:44:45AM +0100, carson bill wrote:
> 2011/9/7 Catalin Marinas <catalin.marinas@arm.com>:
> > On 2 September 2011 04:01, carson bill <bill4carson@gmail.com> wrote:
> >> I am trying to put interrupt virtualization support into KVM ARM
> >> implementation by Christoffer.
...
> >> Problem:
> >> ? ?I did the experiment, and found the biggest obstoble on the way
> >> ? ?is creating the mapping.
> >>
> >> ? ?arch/arm/mach-vexpress/include/mach/ct-ca9x4.h
> >> ? ?#define CT_CA9X4_MPIC ? ? ? (0x1e000000)
> >> ? ?#define A9_MPCORE_SCU ? ? ? (CT_CA9X4_MPIC + 0x0000)
> >> ? ?#define A9_MPCORE_GIC_CPU ? (CT_CA9X4_MPIC + 0x0100)
> >> ? ?#define A9_MPCORE_GIT ? ? ? (CT_CA9X4_MPIC + 0x0200)
> >> ? ?#define A9_MPCORE_TWD ? ? ? (CT_CA9X4_MPIC + 0x0600)
> >> ? ?#define A9_MPCORE_GIC_DIST ?(CT_CA9X4_MPIC + 0x1000)
> >>
> >> ? ?If I create an identical mapping at A9_MPCORE_GIC_CPU, all the iomem
> >> ? ?from CT_CA9X4_MPIC ~ CT_CA9X4_MPIC + 0x1000 could be access for
> >> ? ?Guest OS, which means access to SCU/GIT/TWD will not been trapped
> >> ? ?any more.
> >
> > Shouldn't you use the CT_CA15X4_MPIC base address? As for TWD, with
> > A15 we use the generic timers (which also have support for
> > virtualisation). The SCU doesn't need to be touched on A15, AFAIK.
...
> Thanks Catalin for your reply :)
>
> Do you mean Guest OS have to be built with A15 too ?
Only if you need to benefit from the virtual GIC interface. The GIC CPU
interface on A9 starts at offset 0x100, which isn't multiple of
PAGE_SIZE, so there is no way to map the GICV page (PAGE_SIZE aligned)
there. As you noted, there are other private peripherals in the same
page like TWD. This was cleaned up with A15 making the GIC interfaces
page-aligned.
> Currently Versatile Express Cortex-A9x4 tile is used as Guest OS.
> That's why I have to map A9_MPCORE_GIC_CPU from Guest OS into
> A15_MPCORE_GIC_CPU at host side.
Can the guest OS not run with the VE/A15 memory map? You don't even need
to have LPAE enabled, just the A15 core tile support for VE
(unfortunately kernel.org is down now and cannot point you to the
relevant patches).
--
Catalin
next prev parent reply other threads:[~2011-09-08 8:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 3:01 KVM ARM interrupt virtualization carson bill
2011-09-07 15:35 ` Catalin Marinas
2011-09-08 1:44 ` carson bill
2011-09-08 8:54 ` Catalin Marinas [this message]
2011-09-08 10:32 ` bill4carson
2011-09-08 12:01 ` [Android-virt] " Peter Maydell
2011-09-13 5:24 ` bill4carson
2011-09-13 7:43 ` Peter Maydell
2011-09-13 9:50 ` bill4carson
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=20110908085449.GA29243@e102109-lin.cambridge.arm.com \
--to=catalin.marinas@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).