From: Scott Wood <scottwood@freescale.com>
To: Alexander Graf <agraf@suse.de>
Cc: Bharat Bhushan <r65777@freescale.com>, <kvm-ppc@vger.kernel.org>,
<kvm@vger.kernel.org>,
Bharat Bhushan <bharat.bhushan@freescale.com>
Subject: Re: [PATCH 6/7] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER
Date: Thu, 28 Feb 2013 10:53:26 -0600 [thread overview]
Message-ID: <1362070406.25315.3@snotra> (raw)
In-Reply-To: <DBD226DD-03CC-477F-9ED4-7B6C7F5E4419@suse.de> (from agraf@suse.de on Thu Feb 28 10:51:10 2013)
On 02/28/2013 10:51:10 AM, Alexander Graf wrote:
>
> On 28.02.2013, at 17:31, Scott Wood wrote:
>
> > On 02/27/2013 10:13:15 PM, Bharat Bhushan wrote:
> >> Instruction emulation return EMULATE_DO_PAPR when it requires
> >> exit to userspace on book3s. Similar return is required
> >> for booke. EMULATE_DO_PAPR reads out to be confusing so it is
> >> renamed to EMULATE_EXIT_USER.
> >> Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
> >> ---
> >> arch/powerpc/include/asm/kvm_ppc.h | 2 +-
> >> arch/powerpc/kvm/book3s_emulate.c | 2 +-
> >> arch/powerpc/kvm/book3s_pr.c | 2 +-
> >> 3 files changed, 3 insertions(+), 3 deletions(-)
> >> diff --git a/arch/powerpc/include/asm/kvm_ppc.h
> b/arch/powerpc/include/asm/kvm_ppc.h
> >> index 44a657a..8b81468 100644
> >> --- a/arch/powerpc/include/asm/kvm_ppc.h
> >> +++ b/arch/powerpc/include/asm/kvm_ppc.h
> >> @@ -44,7 +44,7 @@ enum emulation_result {
> >> EMULATE_DO_DCR, /* kvm_run filled with DCR request */
> >> EMULATE_FAIL, /* can't emulate this instruction */
> >> EMULATE_AGAIN, /* something went wrong. go again */
> >> - EMULATE_DO_PAPR, /* kvm_run filled with PAPR request */
> >> + EMULATE_EXIT_USER, /* emulation requires exit to user-space
> */
> >> };
> >> extern int kvmppc_vcpu_run(struct kvm_run *kvm_run, struct
> kvm_vcpu *vcpu);
> >> diff --git a/arch/powerpc/kvm/book3s_emulate.c
> b/arch/powerpc/kvm/book3s_emulate.c
> >> index 836c569..cdd19d6 100644
> >> --- a/arch/powerpc/kvm/book3s_emulate.c
> >> +++ b/arch/powerpc/kvm/book3s_emulate.c
> >> @@ -194,7 +194,7 @@ int kvmppc_core_emulate_op(struct kvm_run
> *run, struct kvm_vcpu *vcpu,
> >> run->papr_hcall.args[i] = gpr;
> >> }
> >> - emulated = EMULATE_DO_PAPR;
> >> + emulated = EMULATE_EXIT_USER;
> >> break;
> >> }
> >> #endif
> >> diff --git a/arch/powerpc/kvm/book3s_pr.c
> b/arch/powerpc/kvm/book3s_pr.c
> >> index 73ed11c..8df2d2d 100644
> >> --- a/arch/powerpc/kvm/book3s_pr.c
> >> +++ b/arch/powerpc/kvm/book3s_pr.c
> >> @@ -760,7 +760,7 @@ program_interrupt:
> >> run->exit_reason = KVM_EXIT_MMIO;
> >> r = RESUME_HOST_NV;
> >> break;
> >> - case EMULATE_DO_PAPR:
> >> + case EMULATE_EXIT_USER:
> >> run->exit_reason = KVM_EXIT_PAPR_HCALL;
> >> vcpu->arch.hcall_needed = 1;
> >> r = RESUME_HOST_NV;
> >
> > I don't think it makes sense to genericize this.
>
> It makes sense if the run->exit_reason = ... and hcall_needed = ...
> lines get pulled into the emulator.
That would be fine.
-Scott
next prev parent reply other threads:[~2013-02-28 16:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 4:13 [PATCH 0/7] KVM :PPC: Userspace Debug support Bharat Bhushan
2013-02-28 4:13 ` [PATCH 1/7] KVM: PPC: booke: Added debug handler Bharat Bhushan
2013-03-07 14:02 ` Alexander Graf
2013-02-28 4:13 ` [PATCH 2/7] Added ONE_REG interface for debug instruction Bharat Bhushan
2013-02-28 16:23 ` Scott Wood
2013-02-28 16:52 ` Alexander Graf
2013-03-01 5:28 ` Bhushan Bharat-R65777
2013-03-07 13:07 ` Alexander Graf
2013-03-14 4:30 ` Bhushan Bharat-R65777
2013-03-14 11:56 ` Alexander Graf
2013-02-28 4:13 ` [PATCH 3/7] KVM: PPC: debug stub interface parameter defined Bharat Bhushan
2013-03-07 13:20 ` Alexander Graf
2013-03-14 4:42 ` Bhushan Bharat-R65777
2013-03-14 11:54 ` Alexander Graf
2013-03-14 11:57 ` Jan Kiszka
2013-03-14 12:09 ` Alexander Graf
2013-03-14 12:13 ` Jan Kiszka
2013-03-14 12:19 ` Alexander Graf
2013-03-14 12:22 ` Jan Kiszka
2013-03-14 12:28 ` Alexander Graf
2013-02-28 4:13 ` [PATCH 4/7] booke: Save and restore debug registers on guest entry and exit Bharat Bhushan
2013-03-07 13:25 ` Alexander Graf
2013-03-14 4:50 ` Bhushan Bharat-R65777
2013-03-14 11:52 ` Alexander Graf
2013-03-14 14:44 ` Bhushan Bharat-R65777
2013-02-28 4:13 ` [PATCH 5/7] bookehv: " Bharat Bhushan
2013-02-28 4:13 ` [PATCH 6/7] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER Bharat Bhushan
2013-02-28 16:31 ` Scott Wood
2013-02-28 16:51 ` Alexander Graf
2013-02-28 16:53 ` Scott Wood [this message]
2013-03-07 10:47 ` Alexander Graf
2013-03-14 5:59 ` Bhushan Bharat-R65777
2013-02-28 4:13 ` [PATCH 7/7] KVM: PPC: Add userspace debug stub support Bharat Bhushan
2013-03-07 13:39 ` Alexander Graf
2013-03-14 5:18 ` Bhushan Bharat-R65777
2013-03-14 11:50 ` Alexander Graf
2013-03-14 13:57 ` Bhushan Bharat-R65777
2013-03-14 16:05 ` Scott Wood
2013-03-14 16:11 ` Bhushan Bharat-R65777
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=1362070406.25315.3@snotra \
--to=scottwood@freescale.com \
--cc=agraf@suse.de \
--cc=bharat.bhushan@freescale.com \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=r65777@freescale.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox