Re: [PATCH kvmtool 1/1] riscv: Add zihintpause extension support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux