* [PATCH kvmtool 0/1] riscv: Add zihintpause extension support
@ 2022-09-16 6:43 Mayuresh Chitale
2022-09-16 6:43 ` [PATCH kvmtool 1/1] " Mayuresh Chitale
0 siblings, 1 reply; 3+ messages in thread
From: Mayuresh Chitale @ 2022-09-16 6:43 UTC (permalink / raw)
To: Will Deacon, Julien Thierry; +Cc: Mayuresh Chitale, kvm, Anup Patel
This patch exports the zihintpause extension to the guest if it is
available on the host. It depends on the following tree from Anup:
https://github.com/avpatel/kvmtool/tree/riscv_svpbmt_sstc_v1
Mayuresh Chitale (1):
riscv: Add zihintpause extension support
riscv/fdt.c | 2 ++
riscv/include/asm/kvm.h | 1 +
2 files changed, 3 insertions(+)
--
2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH kvmtool 1/1] riscv: Add zihintpause extension support
2022-09-16 6:43 [PATCH kvmtool 0/1] riscv: Add zihintpause extension support Mayuresh Chitale
@ 2022-09-16 6:43 ` Mayuresh Chitale
2022-09-16 8:21 ` Andrew Jones
0 siblings, 1 reply; 3+ messages in thread
From: Mayuresh Chitale @ 2022-09-16 6:43 UTC (permalink / raw)
To: Will Deacon, Julien Thierry; +Cc: Mayuresh Chitale, kvm, Anup Patel
The zihintpause extension allows software to use the PAUSE instruction to
reduce energy consumption while executing spin-wait code sequences. Add the
zihintpause extension to the device tree if it is supported by the host.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
---
riscv/fdt.c | 2 ++
riscv/include/asm/kvm.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/riscv/fdt.c b/riscv/fdt.c
index e3d7717..7997edc 100644
--- a/riscv/fdt.c
+++ b/riscv/fdt.c
@@ -19,6 +19,8 @@ struct isa_ext_info {
struct isa_ext_info isa_info_arr[] = {
{"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT},
{"sstc", KVM_RISCV_ISA_EXT_SSTC},
+ {"Zihintpause", KVM_RISCV_ISA_EXT_ZIHINTPAUSE},
+
};
static void dump_fdt(const char *dtb_file, void *fdt)
diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h
index 7351417..f6f7963 100644
--- a/riscv/include/asm/kvm.h
+++ b/riscv/include/asm/kvm.h
@@ -98,6 +98,7 @@ enum KVM_RISCV_ISA_EXT_ID {
KVM_RISCV_ISA_EXT_M,
KVM_RISCV_ISA_EXT_SVPBMT,
KVM_RISCV_ISA_EXT_SSTC,
+ KVM_RISCV_ISA_EXT_ZIHINTPAUSE,
KVM_RISCV_ISA_EXT_MAX,
};
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH kvmtool 1/1] riscv: Add zihintpause extension support
2022-09-16 6:43 ` [PATCH kvmtool 1/1] " Mayuresh Chitale
@ 2022-09-16 8:21 ` Andrew Jones
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2022-09-16 8:21 UTC (permalink / raw)
To: Mayuresh Chitale; +Cc: Will Deacon, Julien Thierry, kvm, Anup Patel
On Fri, Sep 16, 2022 at 12:13:24PM +0530, Mayuresh Chitale wrote:
> The zihintpause extension allows software to use the PAUSE instruction to
> reduce energy consumption while executing spin-wait code sequences. Add the
> zihintpause extension to the device tree if it is supported by the host.
>
> Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
> ---
> riscv/fdt.c | 2 ++
> riscv/include/asm/kvm.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/riscv/fdt.c b/riscv/fdt.c
> index e3d7717..7997edc 100644
> --- a/riscv/fdt.c
> +++ b/riscv/fdt.c
> @@ -19,6 +19,8 @@ struct isa_ext_info {
> struct isa_ext_info isa_info_arr[] = {
> {"svpbmt", KVM_RISCV_ISA_EXT_SVPBMT},
> {"sstc", KVM_RISCV_ISA_EXT_SSTC},
> + {"Zihintpause", KVM_RISCV_ISA_EXT_ZIHINTPAUSE},
We don't capitalize the first S in 'Sstc' above, so I don't think we want
to capitalize this Z either.
> +
extra blank line
> };
>
> static void dump_fdt(const char *dtb_file, void *fdt)
> diff --git a/riscv/include/asm/kvm.h b/riscv/include/asm/kvm.h
> index 7351417..f6f7963 100644
> --- a/riscv/include/asm/kvm.h
> +++ b/riscv/include/asm/kvm.h
> @@ -98,6 +98,7 @@ enum KVM_RISCV_ISA_EXT_ID {
> KVM_RISCV_ISA_EXT_M,
> KVM_RISCV_ISA_EXT_SVPBMT,
> KVM_RISCV_ISA_EXT_SSTC,
> + KVM_RISCV_ISA_EXT_ZIHINTPAUSE,
This should be updated with a uapi header update using
util/update_headers.sh
> KVM_RISCV_ISA_EXT_MAX,
> };
>
> --
> 2.34.1
>
Thanks,
drew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-16 8:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 6:43 [PATCH kvmtool 0/1] riscv: Add zihintpause extension support Mayuresh Chitale
2022-09-16 6:43 ` [PATCH kvmtool 1/1] " Mayuresh Chitale
2022-09-16 8:21 ` Andrew Jones
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.