From: David Gibson <david@gibson.dropbear.id.au>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org, aik@ozlabs.ru, mpe@ellerman.id.au,
agraf@suse.de, qemu-devel@nongnu.org, paulus@samba.org
Subject: Re: [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM
Date: Wed, 20 Jul 2016 09:16:42 +0000 [thread overview]
Message-ID: <20160720091642.GD27358@voom.fritz.box> (raw)
In-Reply-To: <7286403003b30fc87740f1c1d6cb67d8f8eaafd7.1468986094.git.sam.bobroff@au1.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]
On Wed, Jul 20, 2016 at 01:41:36PM +1000, Sam Bobroff wrote:
> Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to
> determine if a PowerPC KVM guest should use HTM (Hardware Transactional
> Memory).
>
> This will be used by QEMU to populate the pa-features bits in the
> guest's device tree.
>
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> v2:
>
> * Use CPU_FTR_TM_COMP instead of CPU_FTR_TM.
> * I didn't unbreak the line, as with the extra characters checkpatch will
> complain if I do. I did move the break to a more usual place.
>
> arch/powerpc/kvm/powerpc.c | 4 ++++
> include/uapi/linux/kvm.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 02416fe..5ebc8ff 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -588,6 +588,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> r = 1;
> break;
> #endif
> + case KVM_CAP_PPC_HTM:
> + r = cpu_has_feature(CPU_FTR_TM_COMP) &&
> + is_kvmppc_hv_enabled(kvm);
> + break;
> default:
> r = 0;
> break;
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 05ebf47..f421d0e 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -866,6 +866,7 @@ struct kvm_ppc_smmu_info {
> #define KVM_CAP_ARM_PMU_V3 126
> #define KVM_CAP_VCPU_ATTRIBUTES 127
> #define KVM_CAP_MAX_VCPU_ID 128
> +#define KVM_CAP_PPC_HTM 129
>
> #ifdef KVM_CAP_IRQ_ROUTING
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org, aik@ozlabs.ru, mpe@ellerman.id.au,
agraf@suse.de, qemu-devel@nongnu.org, paulus@samba.org
Subject: Re: [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM
Date: Wed, 20 Jul 2016 19:16:42 +1000 [thread overview]
Message-ID: <20160720091642.GD27358@voom.fritz.box> (raw)
In-Reply-To: <7286403003b30fc87740f1c1d6cb67d8f8eaafd7.1468986094.git.sam.bobroff@au1.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]
On Wed, Jul 20, 2016 at 01:41:36PM +1000, Sam Bobroff wrote:
> Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to
> determine if a PowerPC KVM guest should use HTM (Hardware Transactional
> Memory).
>
> This will be used by QEMU to populate the pa-features bits in the
> guest's device tree.
>
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> v2:
>
> * Use CPU_FTR_TM_COMP instead of CPU_FTR_TM.
> * I didn't unbreak the line, as with the extra characters checkpatch will
> complain if I do. I did move the break to a more usual place.
>
> arch/powerpc/kvm/powerpc.c | 4 ++++
> include/uapi/linux/kvm.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 02416fe..5ebc8ff 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -588,6 +588,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> r = 1;
> break;
> #endif
> + case KVM_CAP_PPC_HTM:
> + r = cpu_has_feature(CPU_FTR_TM_COMP) &&
> + is_kvmppc_hv_enabled(kvm);
> + break;
> default:
> r = 0;
> break;
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 05ebf47..f421d0e 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -866,6 +866,7 @@ struct kvm_ppc_smmu_info {
> #define KVM_CAP_ARM_PMU_V3 126
> #define KVM_CAP_VCPU_ATTRIBUTES 127
> #define KVM_CAP_MAX_VCPU_ID 128
> +#define KVM_CAP_PPC_HTM 129
>
> #ifdef KVM_CAP_IRQ_ROUTING
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: David Gibson <david@gibson.dropbear.id.au>
To: Sam Bobroff <sam.bobroff@au1.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org, aik@ozlabs.ru, mpe@ellerman.id.au,
agraf@suse.de, qemu-devel@nongnu.org, paulus@samba.org
Subject: Re: [Qemu-devel] [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM
Date: Wed, 20 Jul 2016 19:16:42 +1000 [thread overview]
Message-ID: <20160720091642.GD27358@voom.fritz.box> (raw)
In-Reply-To: <7286403003b30fc87740f1c1d6cb67d8f8eaafd7.1468986094.git.sam.bobroff@au1.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 1838 bytes --]
On Wed, Jul 20, 2016 at 01:41:36PM +1000, Sam Bobroff wrote:
> Introduce a new KVM capability, KVM_CAP_PPC_HTM, that can be queried to
> determine if a PowerPC KVM guest should use HTM (Hardware Transactional
> Memory).
>
> This will be used by QEMU to populate the pa-features bits in the
> guest's device tree.
>
> Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
>
> v2:
>
> * Use CPU_FTR_TM_COMP instead of CPU_FTR_TM.
> * I didn't unbreak the line, as with the extra characters checkpatch will
> complain if I do. I did move the break to a more usual place.
>
> arch/powerpc/kvm/powerpc.c | 4 ++++
> include/uapi/linux/kvm.h | 1 +
> 2 files changed, 5 insertions(+)
>
> diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
> index 02416fe..5ebc8ff 100644
> --- a/arch/powerpc/kvm/powerpc.c
> +++ b/arch/powerpc/kvm/powerpc.c
> @@ -588,6 +588,10 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
> r = 1;
> break;
> #endif
> + case KVM_CAP_PPC_HTM:
> + r = cpu_has_feature(CPU_FTR_TM_COMP) &&
> + is_kvmppc_hv_enabled(kvm);
> + break;
> default:
> r = 0;
> break;
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 05ebf47..f421d0e 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -866,6 +866,7 @@ struct kvm_ppc_smmu_info {
> #define KVM_CAP_ARM_PMU_V3 126
> #define KVM_CAP_VCPU_ATTRIBUTES 127
> #define KVM_CAP_MAX_VCPU_ID 128
> +#define KVM_CAP_PPC_HTM 129
>
> #ifdef KVM_CAP_IRQ_ROUTING
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-20 9:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-20 3:41 [PATCH v2 1/1] KVM: PPC: Introduce KVM_CAP_PPC_HTM Sam Bobroff
2016-07-20 3:41 ` [Qemu-devel] " Sam Bobroff
2016-07-20 3:41 ` Sam Bobroff
2016-07-20 4:20 ` Balbir Singh
2016-07-20 4:20 ` [Qemu-devel] " Balbir Singh
2016-07-20 4:20 ` Balbir Singh
2016-07-20 5:46 ` Michael Ellerman
2016-07-20 6:30 ` Paolo Bonzini
2016-07-20 6:30 ` [Qemu-devel] " Paolo Bonzini
2016-07-20 6:30 ` Paolo Bonzini
2016-07-20 10:20 ` Michael Ellerman
2016-07-20 10:20 ` Michael Ellerman
2016-07-20 10:20 ` Michael Ellerman
2016-07-20 10:20 ` [Qemu-devel] " Michael Ellerman
2016-07-20 10:20 ` Michael Ellerman
2016-08-01 18:52 ` Paolo Bonzini
2016-08-01 18:52 ` [Qemu-devel] " Paolo Bonzini
2016-08-01 18:52 ` Paolo Bonzini
2016-08-01 18:52 ` Paolo Bonzini
2016-07-20 5:46 ` Michael Ellerman
2016-07-20 5:46 ` Michael Ellerman
2016-07-20 5:46 ` Michael Ellerman
2016-07-20 5:46 ` [Qemu-devel] " Michael Ellerman
2016-07-20 9:16 ` David Gibson [this message]
2016-07-20 9:16 ` David Gibson
2016-07-20 9:16 ` David Gibson
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=20160720091642.GD27358@voom.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=aik@ozlabs.ru \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=qemu-devel@nongnu.org \
--cc=sam.bobroff@au1.ibm.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.