From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc <kvm-ppc@vger.kernel.org>, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs
Date: Thu, 17 May 2012 16:37:45 +0000 [thread overview]
Message-ID: <4FB52959.2070107@freescale.com> (raw)
In-Reply-To: <1337174756-6998-1-git-send-email-agraf@suse.de>
On 05/16/2012 08:25 AM, Alexander Graf wrote:
> When reinjecting host interrupt requests in the exit handler code,
> let's also tell the interrupt handler which interrupt number we're
> coming from.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/booke.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 72f13f4..0512bd7 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -596,7 +596,8 @@ static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
> }
> }
>
> -static void kvmppc_fill_pt_regs(struct pt_regs *regs)
> +static void kvmppc_fill_pt_regs(struct pt_regs *regs,
> + int exit_nr)
> {
> ulong r1, ip, msr, lr;
>
> @@ -610,6 +611,7 @@ static void kvmppc_fill_pt_regs(struct pt_regs *regs)
> regs->nip = ip;
> regs->msr = msr;
> regs->link = lr;
> + regs->trap = exit_nr;
> }
>
> static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
> @@ -619,16 +621,16 @@ static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
>
> switch (exit_nr) {
> case BOOKE_INTERRUPT_EXTERNAL:
> - kvmppc_fill_pt_regs(®s);
> + kvmppc_fill_pt_regs(®s, exit_nr);
> do_IRQ(®s);
> break;
exit_nr is not the same as the trap number that the rest of the kernel
wants to see.
-Scott
WARNING: multiple messages have this Message-ID (diff)
From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: kvm-ppc <kvm-ppc@vger.kernel.org>, kvm list <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: PPC: BookE: Include trap in pt_regs
Date: Thu, 17 May 2012 11:37:45 -0500 [thread overview]
Message-ID: <4FB52959.2070107@freescale.com> (raw)
In-Reply-To: <1337174756-6998-1-git-send-email-agraf@suse.de>
On 05/16/2012 08:25 AM, Alexander Graf wrote:
> When reinjecting host interrupt requests in the exit handler code,
> let's also tell the interrupt handler which interrupt number we're
> coming from.
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
> ---
> arch/powerpc/kvm/booke.c | 12 +++++++-----
> 1 files changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> index 72f13f4..0512bd7 100644
> --- a/arch/powerpc/kvm/booke.c
> +++ b/arch/powerpc/kvm/booke.c
> @@ -596,7 +596,8 @@ static int emulation_exit(struct kvm_run *run, struct kvm_vcpu *vcpu)
> }
> }
>
> -static void kvmppc_fill_pt_regs(struct pt_regs *regs)
> +static void kvmppc_fill_pt_regs(struct pt_regs *regs,
> + int exit_nr)
> {
> ulong r1, ip, msr, lr;
>
> @@ -610,6 +611,7 @@ static void kvmppc_fill_pt_regs(struct pt_regs *regs)
> regs->nip = ip;
> regs->msr = msr;
> regs->link = lr;
> + regs->trap = exit_nr;
> }
>
> static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
> @@ -619,16 +621,16 @@ static void kvmppc_restart_interrupt(struct kvm_vcpu *vcpu,
>
> switch (exit_nr) {
> case BOOKE_INTERRUPT_EXTERNAL:
> - kvmppc_fill_pt_regs(®s);
> + kvmppc_fill_pt_regs(®s, exit_nr);
> do_IRQ(®s);
> break;
exit_nr is not the same as the trap number that the rest of the kernel
wants to see.
-Scott
next prev parent reply other threads:[~2012-05-17 16:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 13:25 [PATCH] KVM: PPC: BookE: Include trap in pt_regs Alexander Graf
2012-05-16 13:25 ` Alexander Graf
2012-05-17 16:37 ` Scott Wood [this message]
2012-05-17 16:37 ` Scott Wood
2012-05-17 20:56 ` Alexander Graf
2012-05-17 20:56 ` Alexander Graf
2012-05-17 20:58 ` Scott Wood
2012-05-17 20:58 ` Scott Wood
2012-05-17 21:03 ` Alexander Graf
2012-05-17 21:03 ` Alexander Graf
2012-05-17 21:08 ` Scott Wood
2012-05-17 21:08 ` Scott Wood
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=4FB52959.2070107@freescale.com \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.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 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.