From: Ian Campbell <ian.campbell@citrix.com>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
Vijaya Kumar K <vijaya.kumar@caviumnetworks.com>,
Julien Grall <julien.grall@linaro.org>, Tim Deegan <tim@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: Re: [PATCH v6 4/5] xen/arm: add SGI handling for GICv3
Date: Fri, 11 Jul 2014 10:24:12 +0100 [thread overview]
Message-ID: <1405070652.4613.14.camel@hastur.hellion.org.uk> (raw)
In-Reply-To: <CALicx6unMz8dT9bpejsXg+4rtVpjSutPQKPgXHY=NxJCxocSrQ@mail.gmail.com>
On Fri, 2014-07-11 at 10:39 +0530, Vijay Kilari wrote:
> On Thu, Jul 3, 2014 at 8:03 PM, Julien Grall <julien.grall@linaro.org> wrote:
> > Hi Vijay,
> >
> > On 07/03/2014 09:37 AM, vijay.kilari@gmail.com wrote:
> >> From: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >>
> >> In ARMv8, write to ICC_SGI1R_EL1 register raises trap to EL2.
> >> Handle the trap and inject SGI to vcpu.
> >>
> >> Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
> >> ---
> >> xen/arch/arm/traps.c | 30 +++++++++++++++++
> >> xen/arch/arm/vgic-v3.c | 65 +++++++++++++++++++++++++++++++++----
> >> xen/include/asm-arm/gic_v3_defs.h | 7 ++++
> >> xen/include/asm-arm/sysregs.h | 3 ++
> >> xen/include/asm-arm/vgic.h | 1 +
> >> 5 files changed, 100 insertions(+), 6 deletions(-)
> >>
> >> struct reg_ctxt {
> >> /* Guest-side state */
> >> uint32_t sctlr_el1;
> >> @@ -1591,6 +1604,7 @@ static void do_sysreg(struct cpu_user_regs *regs,
> >> union hsr hsr)
> >> {
> >> register_t *x = select_user_reg(regs, hsr.sysreg.reg);
> >> + register_t addr;
> >>
> >> switch ( hsr.bits & HSR_SYSREG_REGS_MASK )
> >> {
> >> @@ -1641,6 +1655,22 @@ static void do_sysreg(struct cpu_user_regs *regs,
> >> domain_crash_synchronous();
> >> }
> >> break;
> >> + case HSR_SYSREG_ICC_SGI1R_EL1:
> >> + if ( !vgic_emulate(regs, hsr) )
> >> + {
> >> + addr = READ_SYSREG64(FAR_EL2);
> >> + dprintk(XENLOG_WARNING,
> >> + "failed emulation of sysreg ICC_SGI1R_EL1 access\n");
> >> + inject_undef_exception(regs, addr, hsr.len);
> >
> > AFAIK, sysreg only exist for 64 bits guest. At least the precondition to
> > call this function is the guest is 64 bits (see the caller). So you can
> > use directly inject_undef64_exception.
>
> What if the Guest is running int Aarch32 bit mode and make
> sysreg access?
Won't that trap as a MCRR/MRRC access rather than a sysreg access? Those
would come via a different HSR.EC code and would need plumbing in there
not here.
Ian.
next prev parent reply other threads:[~2014-07-11 9:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-03 8:37 [PATCH v6 0/5]xen/arm: Add GICv3 support vijay.kilari
2014-07-03 8:37 ` [PATCH v6 1/5] xen/arm: Add support for GIC v3 vijay.kilari
2014-07-03 9:09 ` Jan Beulich
2014-07-04 6:19 ` Vijay Kilari
2014-07-04 6:34 ` Jan Beulich
2014-07-16 10:30 ` Ian Campbell
2014-07-16 11:45 ` Vijay Kilari
2014-07-03 13:58 ` Julien Grall
2014-07-03 8:37 ` [PATCH v6 2/5] xen/arm: Add virtual GICv3 support vijay.kilari
2014-07-03 8:37 ` [PATCH v6 3/5] xen/arm: Update Dom0 GIC dt node with GICv3 information vijay.kilari
2014-07-03 8:37 ` [PATCH v6 4/5] xen/arm: add SGI handling for GICv3 vijay.kilari
2014-07-03 14:33 ` Julien Grall
2014-07-11 5:09 ` Vijay Kilari
2014-07-11 9:24 ` Ian Campbell [this message]
2014-07-03 8:37 ` [PATCH v6 5/5] xen/arm: check for GICv3 platform support vijay.kilari
2014-07-03 14:35 ` Julien Grall
2014-07-03 14:03 ` [PATCH v6 0/5]xen/arm: Add GICv3 support Julien Grall
2014-07-04 6:23 ` Vijay Kilari
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=1405070652.4613.14.camel@hastur.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=julien.grall@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--cc=vijaya.kumar@caviumnetworks.com \
--cc=xen-devel@lists.xen.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).