linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan.Cameron@huawei.com (Jonathan Cameron)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 4/7] support user space to query RAS extension feature
Date: Tue, 22 Aug 2017 08:56:44 +0100	[thread overview]
Message-ID: <20170822085644.00004844@huawei.com> (raw)
In-Reply-To: <1503065517-7920-5-git-send-email-gengdongjiu@huawei.com>

On Fri, 18 Aug 2017 22:11:54 +0800
Dongjiu Geng <gengdongjiu@huawei.com> wrote:

> In armv8.2 RAS extension, it adds virtual SError exception
> syndrome registeri(VSESR_EL2), user space will specify that
> value. so user space will check whether CPU feature has RAS
> extension. if has, it will specify the virtual SError syndrome
> value. Otherwise, it will not set. This patch adds this support

In the armv8.2 RAS extension, a virtual SError exception syndrome
registeri(VSESR_EL) is added.  This value may be specified from userspace.
Userspace will want to check if the CPU has the RAS extension.
If it has, it wil specify the virtual SError syndrome value, otherwise
it will not be set.  This patch adds support for querying the availability
of this extension.

Code is fine.
> 
> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
> ---
>  arch/arm64/kvm/reset.c   | 3 +++
>  include/uapi/linux/kvm.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
> index 3256b9228e75..b7313ee028e9 100644
> --- a/arch/arm64/kvm/reset.c
> +++ b/arch/arm64/kvm/reset.c
> @@ -77,6 +77,9 @@ int kvm_arch_dev_ioctl_check_extension(struct kvm *kvm, long ext)
>  	case KVM_CAP_ARM_PMU_V3:
>  		r = kvm_arm_support_pmu_v3();
>  		break;
> +	case KVM_CAP_ARM_RAS_EXTENSION:
> +		r = cpus_have_const_cap(ARM64_HAS_RAS_EXTN);
> +		break;
>  	case KVM_CAP_SET_GUEST_DEBUG:
>  	case KVM_CAP_VCPU_ATTRIBUTES:
>  		r = 1;
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 6cd63c18708a..5a2a338cae57 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -929,6 +929,7 @@ struct kvm_ppc_resize_hpt {
>  #define KVM_CAP_PPC_SMT_POSSIBLE 147
>  #define KVM_CAP_HYPERV_SYNIC2 148
>  #define KVM_CAP_HYPERV_VP_INDEX 149
> +#define KVM_CAP_ARM_RAS_EXTENSION 150
>  
>  #ifdef KVM_CAP_IRQ_ROUTING
>  

  parent reply	other threads:[~2017-08-22  7:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-18 14:11 [PATCH v5 0/7] Add RAS virtualization support to SEA/SEI notification type Dongjiu Geng
2017-08-18 14:11 ` [PATCH v5 1/7] arm64: cpufeature: Detect CPU RAS Extentions Dongjiu Geng
2017-08-22  7:54   ` Jonathan Cameron
2017-08-18 14:11 ` [PATCH v5 2/7] KVM: arm64: Save ESR_EL2 on guest SError Dongjiu Geng
2017-08-18 14:11 ` [PATCH v5 3/7] acpi: apei: Add SEI notification type support for ARMv8 Dongjiu Geng
2017-08-22  7:56   ` Jonathan Cameron
2017-08-18 14:11 ` [PATCH v5 4/7] support user space to query RAS extension feature Dongjiu Geng
2017-08-21 21:08   ` Christoffer Dall
2017-08-22  1:20     ` gengdongjiu
2017-08-22  7:56   ` Jonathan Cameron [this message]
2017-08-18 14:11 ` [PATCH v5 5/7] arm64: kvm: route synchronous external abort exceptions to el2 Dongjiu Geng
2017-08-18 14:11 ` [PATCH v5 6/7] KVM: arm64: Allow get exception information from userspace Dongjiu Geng
2017-08-22  7:57   ` Jonathan Cameron
2017-08-18 14:11 ` [PATCH v5 7/7] arm64: kvm: handle SEI notification and inject virtual SError Dongjiu Geng
2017-08-22  7:57   ` Jonathan Cameron
2017-08-22  7:54 ` [PATCH v5 0/7] Add RAS virtualization support to SEA/SEI notification type Jonathan Cameron
2017-08-23  2:01   ` gengdongjiu

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=20170822085644.00004844@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).