From: Fabiano Rosas <farosas@linux.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
kvm@vger.kernel.org, benh@kernel.crashing.org,
mpe@ellerman.id.au, pbonzini@redhat.com, rkrcmar@redhat.com,
david@gibson.dropbear.id.au, aik@ozlabs.ru
Subject: Re: [PATCH v2] KVM: PPC: Report single stepping capability
Date: Mon, 17 Jun 2019 19:25:49 +0000 [thread overview]
Message-ID: <87y3202ev6.fsf@linux.ibm.com> (raw)
In-Reply-To: <20190617061608.y5qw26i53si76qqt@oak.ozlabs.ibm.com>
Paul Mackerras <paulus@ozlabs.org> writes:
> On Wed, May 29, 2019 at 07:22:19PM -0300, Fabiano Rosas wrote:
>> When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request
>> the next instruction to be single stepped via the
>> KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure.
>>
>> We currently don't have support for guest single stepping implemented
>> in Book3S HV.
>>
>> This patch adds the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability in order
>> to inform userspace about the state of single stepping support.
>
> Comment/question below:
>
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -538,6 +538,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>> case KVM_CAP_IMMEDIATE_EXIT:
>> r = 1;
>> break;
>> + case KVM_CAP_PPC_GUEST_DEBUG_SSTEP:
>> +#ifdef CONFIG_BOOKE
>> + r = 1;
>> + break;
>> +#endif
>
> In the !CONFIG_BOOKE case, this will fall through to code which will
> return 0 for HV KVM or 1 for PR KVM. Is that what was intended?
Yes. The intention is to return 0 for HV and 1 for everything else.
> If so, then why do we need the CONFIG_BOOKE case? Isn't hv_enabled
> always 0 on Book E?
Good point. I made a mistake there indeed.
> In any case, I think this needs at least a /* fall through */ comment
> in the code, and something explicit in the patch description to say
> that we intend to return 1 on PR KVM.
I'll send another version.
Thanks
WARNING: multiple messages have this Message-ID (diff)
From: Fabiano Rosas <farosas@linux.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm@vger.kernel.org, rkrcmar@redhat.com, aik@ozlabs.ru,
kvm-ppc@vger.kernel.org, pbonzini@redhat.com,
linuxppc-dev@lists.ozlabs.org, david@gibson.dropbear.id.au
Subject: Re: [PATCH v2] KVM: PPC: Report single stepping capability
Date: Mon, 17 Jun 2019 16:25:49 -0300 [thread overview]
Message-ID: <87y3202ev6.fsf@linux.ibm.com> (raw)
In-Reply-To: <20190617061608.y5qw26i53si76qqt@oak.ozlabs.ibm.com>
Paul Mackerras <paulus@ozlabs.org> writes:
> On Wed, May 29, 2019 at 07:22:19PM -0300, Fabiano Rosas wrote:
>> When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request
>> the next instruction to be single stepped via the
>> KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure.
>>
>> We currently don't have support for guest single stepping implemented
>> in Book3S HV.
>>
>> This patch adds the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability in order
>> to inform userspace about the state of single stepping support.
>
> Comment/question below:
>
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -538,6 +538,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>> case KVM_CAP_IMMEDIATE_EXIT:
>> r = 1;
>> break;
>> + case KVM_CAP_PPC_GUEST_DEBUG_SSTEP:
>> +#ifdef CONFIG_BOOKE
>> + r = 1;
>> + break;
>> +#endif
>
> In the !CONFIG_BOOKE case, this will fall through to code which will
> return 0 for HV KVM or 1 for PR KVM. Is that what was intended?
Yes. The intention is to return 0 for HV and 1 for everything else.
> If so, then why do we need the CONFIG_BOOKE case? Isn't hv_enabled
> always 0 on Book E?
Good point. I made a mistake there indeed.
> In any case, I think this needs at least a /* fall through */ comment
> in the code, and something explicit in the patch description to say
> that we intend to return 1 on PR KVM.
I'll send another version.
Thanks
WARNING: multiple messages have this Message-ID (diff)
From: Fabiano Rosas <farosas@linux.ibm.com>
To: Paul Mackerras <paulus@ozlabs.org>
Cc: kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
kvm@vger.kernel.org, benh@kernel.crashing.org,
mpe@ellerman.id.au, pbonzini@redhat.com, rkrcmar@redhat.com,
david@gibson.dropbear.id.au, aik@ozlabs.ru
Subject: Re: [PATCH v2] KVM: PPC: Report single stepping capability
Date: Mon, 17 Jun 2019 16:25:49 -0300 [thread overview]
Message-ID: <87y3202ev6.fsf@linux.ibm.com> (raw)
In-Reply-To: <20190617061608.y5qw26i53si76qqt@oak.ozlabs.ibm.com>
Paul Mackerras <paulus@ozlabs.org> writes:
> On Wed, May 29, 2019 at 07:22:19PM -0300, Fabiano Rosas wrote:
>> When calling the KVM_SET_GUEST_DEBUG ioctl, userspace might request
>> the next instruction to be single stepped via the
>> KVM_GUESTDBG_SINGLESTEP control bit of the kvm_guest_debug structure.
>>
>> We currently don't have support for guest single stepping implemented
>> in Book3S HV.
>>
>> This patch adds the KVM_CAP_PPC_GUEST_DEBUG_SSTEP capability in order
>> to inform userspace about the state of single stepping support.
>
> Comment/question below:
>
>> --- a/arch/powerpc/kvm/powerpc.c
>> +++ b/arch/powerpc/kvm/powerpc.c
>> @@ -538,6 +538,11 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
>> case KVM_CAP_IMMEDIATE_EXIT:
>> r = 1;
>> break;
>> + case KVM_CAP_PPC_GUEST_DEBUG_SSTEP:
>> +#ifdef CONFIG_BOOKE
>> + r = 1;
>> + break;
>> +#endif
>
> In the !CONFIG_BOOKE case, this will fall through to code which will
> return 0 for HV KVM or 1 for PR KVM. Is that what was intended?
Yes. The intention is to return 0 for HV and 1 for everything else.
> If so, then why do we need the CONFIG_BOOKE case? Isn't hv_enabled
> always 0 on Book E?
Good point. I made a mistake there indeed.
> In any case, I think this needs at least a /* fall through */ comment
> in the code, and something explicit in the patch description to say
> that we intend to return 1 on PR KVM.
I'll send another version.
Thanks
next prev parent reply other threads:[~2019-06-17 19:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-29 22:22 [PATCH v2] KVM: PPC: Report single stepping capability Fabiano Rosas
2019-05-29 22:22 ` Fabiano Rosas
2019-05-29 22:22 ` Fabiano Rosas
2019-06-17 6:16 ` Paul Mackerras
2019-06-17 6:16 ` Paul Mackerras
2019-06-17 6:16 ` Paul Mackerras
2019-06-17 19:25 ` Fabiano Rosas [this message]
2019-06-17 19:25 ` Fabiano Rosas
2019-06-17 19:25 ` Fabiano Rosas
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=87y3202ev6.fsf@linux.ibm.com \
--to=farosas@linux.ibm.com \
--cc=aik@ozlabs.ru \
--cc=benh@kernel.crashing.org \
--cc=david@gibson.dropbear.id.au \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@ozlabs.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.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 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.