From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>,
benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: PPC: BOOK3S: PR: Doorbell support
Date: Fri, 06 Jun 2014 09:40:49 +0000 [thread overview]
Message-ID: <87tx7ye69a.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <539060B5.9040808@suse.de>
Alexander Graf <agraf@suse.de> writes:
> On 05.06.14 14:08, Aneesh Kumar K.V wrote:
>> We don't have SMT support yet, hence we should not find a doorbell
>> message generated
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/kvm/book3s_emulate.c | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
>> index 1bb16a59dcbc..d6c87d085182 100644
>> --- a/arch/powerpc/kvm/book3s_emulate.c
>> +++ b/arch/powerpc/kvm/book3s_emulate.c
>> @@ -28,7 +28,9 @@
>> #define OP_19_XOP_RFI 50
>>
>> #define OP_31_XOP_MFMSR 83
>> +#define OP_31_XOP_MSGSNDP 142
>> #define OP_31_XOP_MTMSR 146
>> +#define OP_31_XOP_MSGCLRP 174
>> #define OP_31_XOP_MTMSRD 178
>> #define OP_31_XOP_MTSR 210
>> #define OP_31_XOP_MTSRIN 242
>> @@ -303,6 +305,22 @@ int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu,
>>
>> break;
>> }
>> + case OP_31_XOP_MSGSNDP:
>> + {
>> + /*
>> + * PR KVM still don't support SMT mode. So we should
>
> still?
>
>> + * not see a MSGSNDP/MSGCLRP used with PR KVM
>> + */
>> + pr_info("KVM: MSGSNDP used in non SMT case\n");
>> + emulated = EMULATE_FAIL;
>
> What would happen on an HV guest with only 1 thread that MSGSNDs to
> thread 0? Would the guest get an illegal instruction trap, a
> self-interrupt or would this be a simple nop?
>
We do get a self-interrupt. I tried the below
tag = mfspr(SPRN_TIR) & 0x7f;
ppc_msgsnd(5, 0, tag);
And that results in doorbell exception. That implies we will have to
have full implementation of doorbell. You can drop patch 2 and 3 from
this series. I will rework them.
NOTE: This is not an issue for Linux guest, because we don't send ipi
to self. But to complete the emulation of msgsndp we will need to
emulate it properly.
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>,
benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: PPC: BOOK3S: PR: Doorbell support
Date: Fri, 06 Jun 2014 14:58:49 +0530 [thread overview]
Message-ID: <87tx7ye69a.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <539060B5.9040808@suse.de>
Alexander Graf <agraf@suse.de> writes:
> On 05.06.14 14:08, Aneesh Kumar K.V wrote:
>> We don't have SMT support yet, hence we should not find a doorbell
>> message generated
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/kvm/book3s_emulate.c | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
>> index 1bb16a59dcbc..d6c87d085182 100644
>> --- a/arch/powerpc/kvm/book3s_emulate.c
>> +++ b/arch/powerpc/kvm/book3s_emulate.c
>> @@ -28,7 +28,9 @@
>> #define OP_19_XOP_RFI 50
>>
>> #define OP_31_XOP_MFMSR 83
>> +#define OP_31_XOP_MSGSNDP 142
>> #define OP_31_XOP_MTMSR 146
>> +#define OP_31_XOP_MSGCLRP 174
>> #define OP_31_XOP_MTMSRD 178
>> #define OP_31_XOP_MTSR 210
>> #define OP_31_XOP_MTSRIN 242
>> @@ -303,6 +305,22 @@ int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu,
>>
>> break;
>> }
>> + case OP_31_XOP_MSGSNDP:
>> + {
>> + /*
>> + * PR KVM still don't support SMT mode. So we should
>
> still?
>
>> + * not see a MSGSNDP/MSGCLRP used with PR KVM
>> + */
>> + pr_info("KVM: MSGSNDP used in non SMT case\n");
>> + emulated = EMULATE_FAIL;
>
> What would happen on an HV guest with only 1 thread that MSGSNDs to
> thread 0? Would the guest get an illegal instruction trap, a
> self-interrupt or would this be a simple nop?
>
We do get a self-interrupt. I tried the below
tag = mfspr(SPRN_TIR) & 0x7f;
ppc_msgsnd(5, 0, tag);
And that results in doorbell exception. That implies we will have to
have full implementation of doorbell. You can drop patch 2 and 3 from
this series. I will rework them.
NOTE: This is not an issue for Linux guest, because we don't send ipi
to self. But to complete the emulation of msgsndp we will need to
emulate it properly.
-aneesh
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Alexander Graf <agraf@suse.de>,
benh@kernel.crashing.org, paulus@samba.org
Cc: linuxppc-dev@lists.ozlabs.org, kvm@vger.kernel.org,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2/4] KVM: PPC: BOOK3S: PR: Doorbell support
Date: Fri, 06 Jun 2014 14:58:49 +0530 [thread overview]
Message-ID: <87tx7ye69a.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <539060B5.9040808@suse.de>
Alexander Graf <agraf@suse.de> writes:
> On 05.06.14 14:08, Aneesh Kumar K.V wrote:
>> We don't have SMT support yet, hence we should not find a doorbell
>> message generated
>>
>> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
>> ---
>> arch/powerpc/kvm/book3s_emulate.c | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/arch/powerpc/kvm/book3s_emulate.c b/arch/powerpc/kvm/book3s_emulate.c
>> index 1bb16a59dcbc..d6c87d085182 100644
>> --- a/arch/powerpc/kvm/book3s_emulate.c
>> +++ b/arch/powerpc/kvm/book3s_emulate.c
>> @@ -28,7 +28,9 @@
>> #define OP_19_XOP_RFI 50
>>
>> #define OP_31_XOP_MFMSR 83
>> +#define OP_31_XOP_MSGSNDP 142
>> #define OP_31_XOP_MTMSR 146
>> +#define OP_31_XOP_MSGCLRP 174
>> #define OP_31_XOP_MTMSRD 178
>> #define OP_31_XOP_MTSR 210
>> #define OP_31_XOP_MTSRIN 242
>> @@ -303,6 +305,22 @@ int kvmppc_core_emulate_op_pr(struct kvm_run *run, struct kvm_vcpu *vcpu,
>>
>> break;
>> }
>> + case OP_31_XOP_MSGSNDP:
>> + {
>> + /*
>> + * PR KVM still don't support SMT mode. So we should
>
> still?
>
>> + * not see a MSGSNDP/MSGCLRP used with PR KVM
>> + */
>> + pr_info("KVM: MSGSNDP used in non SMT case\n");
>> + emulated = EMULATE_FAIL;
>
> What would happen on an HV guest with only 1 thread that MSGSNDs to
> thread 0? Would the guest get an illegal instruction trap, a
> self-interrupt or would this be a simple nop?
>
We do get a self-interrupt. I tried the below
tag = mfspr(SPRN_TIR) & 0x7f;
ppc_msgsnd(5, 0, tag);
And that results in doorbell exception. That implies we will have to
have full implementation of doorbell. You can drop patch 2 and 3 from
this series. I will rework them.
NOTE: This is not an issue for Linux guest, because we don't send ipi
to self. But to complete the emulation of msgsndp we will need to
emulate it properly.
-aneesh
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
next prev parent reply other threads:[~2014-06-06 9:40 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 12:08 KVM: PPC: BOOK3S: PR: P8 Support Aneesh Kumar K.V
2014-06-05 12:20 ` Aneesh Kumar K.V
2014-06-05 12:08 ` Aneesh Kumar K.V
2014-06-05 12:08 ` [PATCH 1/4] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register Aneesh Kumar K.V
2014-06-05 12:20 ` Aneesh Kumar K.V
2014-06-05 12:08 ` Aneesh Kumar K.V
2014-06-05 12:19 ` Alexander Graf
2014-06-05 12:19 ` Alexander Graf
2014-06-05 12:19 ` Alexander Graf
2014-06-05 15:50 ` Aneesh Kumar K.V
2014-06-05 15:50 ` Aneesh Kumar K.V
2014-06-05 15:50 ` Aneesh Kumar K.V
2014-06-05 16:53 ` Alexander Graf
2014-06-05 16:53 ` Alexander Graf
2014-06-05 16:53 ` Alexander Graf
2014-06-05 17:33 ` Aneesh Kumar K.V
2014-06-05 17:45 ` Aneesh Kumar K.V
2014-06-05 17:33 ` Aneesh Kumar K.V
2014-06-05 22:32 ` Alexander Graf
2014-06-05 22:32 ` Alexander Graf
2014-06-05 22:32 ` Alexander Graf
2014-06-05 22:36 ` Alexander Graf
2014-06-05 22:36 ` Alexander Graf
2014-06-05 22:36 ` Alexander Graf
2014-06-06 10:44 ` Alexander Graf
2014-06-06 10:44 ` Alexander Graf
2014-06-06 10:44 ` Alexander Graf
2014-06-06 16:27 ` Aneesh Kumar K.V
2014-06-06 16:39 ` Aneesh Kumar K.V
2014-06-06 16:27 ` Aneesh Kumar K.V
2014-07-28 13:25 ` Alexander Graf
2014-07-28 13:25 ` Alexander Graf
2014-07-28 13:25 ` Alexander Graf
2014-07-28 22:59 ` Stewart Smith
2014-07-28 22:59 ` Stewart Smith
2014-07-28 22:59 ` Stewart Smith
2014-06-05 12:08 ` [PATCH 2/4] KVM: PPC: BOOK3S: PR: Doorbell support Aneesh Kumar K.V
2014-06-05 12:20 ` Aneesh Kumar K.V
2014-06-05 12:08 ` Aneesh Kumar K.V
2014-06-05 12:21 ` Alexander Graf
2014-06-05 12:21 ` Alexander Graf
2014-06-05 12:21 ` Alexander Graf
2014-06-05 12:23 ` Alexander Graf
2014-06-05 12:23 ` Alexander Graf
2014-06-05 12:23 ` Alexander Graf
2014-06-05 15:55 ` Aneesh Kumar K.V
2014-06-05 15:55 ` Aneesh Kumar K.V
2014-06-05 15:55 ` Aneesh Kumar K.V
2014-06-06 9:28 ` Aneesh Kumar K.V [this message]
2014-06-06 9:40 ` Aneesh Kumar K.V
2014-06-06 9:28 ` Aneesh Kumar K.V
2014-06-05 12:08 ` [PATCH 3/4] KVM: PPC: BOOK3S: PR: Emulate DPDES register Aneesh Kumar K.V
2014-06-05 12:20 ` Aneesh Kumar K.V
2014-06-05 12:08 ` Aneesh Kumar K.V
2014-06-05 12:08 ` [PATCH 4/4] KVM: PPC: BOOK3S: PR: Emulate instruction counter Aneesh Kumar K.V
2014-06-05 12:20 ` Aneesh Kumar K.V
2014-06-05 12:08 ` Aneesh Kumar K.V
2014-06-06 10:24 ` KVM: PPC: BOOK3S: PR: P8 Support Alexander Graf
2014-06-06 10:24 ` Alexander Graf
2014-06-06 10:24 ` Alexander Graf
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=87tx7ye69a.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.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.