From: gengdongjiu <gengdongjiu@huawei.com>
To: Christoffer Dall <cdall@linaro.org>
Cc: <james.morse@arm.com>, <marc.zyngier@arm.com>,
<christoffer.dall@linaro.org>, <rkrcmar@redhat.com>,
<linux@armlinux.org.uk>, <tbaicar@codeaurora.org>,
<imammedo@redhat.com>, <zhaoshenglong@huawei.com>,
<peter.maydell@linaro.org>, <pbonzini@redhat.com>,
<qemu-devel@nongnu.org>, <qemu-arm@nongnu.org>,
<lersek@redhat.com>, <ard.biesheuvel@linaro.org>,
<mtsirkin@redhat.com>, <drjones@redhat.com>,
<ben@skyportsystems.com>, <kvm@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<kvmarm@lists.cs.columbia.edu>, <xiexiuqi@huawei.com>,
<wangxiongfeng2@huawei.com>, <songwenjun@huawei.com>,
<wuquanming@huawei.com>, <huangshaoyu@huawei.com>,
gengdongjiu <gengdongjiu@huawei.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature
Date: Tue, 2 May 2017 20:15:03 +0800 [thread overview]
Message-ID: <c3b355e7-0358-25ea-9617-80be489a3f83@huawei.com> (raw)
In-Reply-To: <20170502075631.GE16940@cbox>
Hi Christoffer,
thanks for your review and comments.
On 2017/5/2 15:56, Christoffer Dall wrote:
> Hi Dongjiu,
>
> Please send a cover letter for patch series with more than a single
> patch.
OK, got it.
>
> The subject and description of these patches are also misleading.
> Hopefully this is in no way tied to kvmtool, but to userspace
> generically, for example also to be used by QEMU?
>
> On Sun, Apr 30, 2017 at 01:37:55PM +0800, Dongjiu Geng wrote:
>> Handle kvmtool's detection for RAS extension, because sometimes
>> the APP needs to know the CPU's capacity
>
> the APP ?
>
> the CPU's capacity?
I will fix it.
>
>>
>> Signed-off-by: Dongjiu Geng <gengdongjiu@huawei.com>
>> ---
>> arch/arm64/kvm/reset.c | 11 +++++++++++
>> include/uapi/linux/kvm.h | 1 +
>> 2 files changed, 12 insertions(+)
>>
>> diff --git a/arch/arm64/kvm/reset.c b/arch/arm64/kvm/reset.c
>> index d9e9697..1004039 100644
>> --- a/arch/arm64/kvm/reset.c
>> +++ b/arch/arm64/kvm/reset.c
>> @@ -64,6 +64,14 @@ static bool cpu_has_32bit_el1(void)
>> return !!(pfr0 & 0x20);
>> }
>>
>> +static bool kvm_arm_support_ras_extension(void)
>> +{
>> + u64 pfr0;
>> +
>> + pfr0 = read_system_reg(SYS_ID_AA64PFR0_EL1);
>> + return !!(pfr0 & 0x10000000);
>> +}
>> +
>> /**
>> * kvm_arch_dev_ioctl_check_extension
>> *
>> @@ -87,6 +95,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 = kvm_arm_support_ras_extension();
>> + break;
>
> You need to document this capability and API in
> Documentation/virtual/kvm/api.txt and explain how this works.
Ok, thanks for your suggestion.
>
>
>
>> 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 f51d508..27fe556 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -883,6 +883,7 @@ struct kvm_ppc_resize_hpt {
>> #define KVM_CAP_PPC_MMU_RADIX 134
>> #define KVM_CAP_PPC_MMU_HASH_V3 135
>> #define KVM_CAP_IMMEDIATE_EXIT 136
>> +#define KVM_CAP_ARM_RAS_EXTENSION 137
>>
>> #ifdef KVM_CAP_IRQ_ROUTING
>>
>> --
>> 2.10.1
>>
>
> Thanks,
> -Christoffer
>
> .
>
next parent reply other threads:[~2017-05-02 12:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1493530677-4919-1-git-send-email-gengdongjiu@huawei.com>
[not found] ` <20170502075631.GE16940@cbox>
2017-05-02 12:15 ` gengdongjiu [this message]
[not found] ` <1493530677-4919-2-git-send-email-gengdongjiu@huawei.com>
[not found] ` <20170502080342.GF16940@cbox>
2017-05-02 12:20 ` [PATCH v3 2/3] arm64: kvm: inject SError with virtual syndrome gengdongjiu
2017-05-04 17:20 [PATCH v3 1/3] arm64: kvm: support kvmtool to detect RAS extension feature gengdongjiu
2017-05-08 17:31 ` James Morse
2017-05-10 8:53 ` 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=c3b355e7-0358-25ea-9617-80be489a3f83@huawei.com \
--to=gengdongjiu@huawei.com \
--cc=ard.biesheuvel@linaro.org \
--cc=ben@skyportsystems.com \
--cc=cdall@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=drjones@redhat.com \
--cc=huangshaoyu@huawei.com \
--cc=imammedo@redhat.com \
--cc=james.morse@arm.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=lersek@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marc.zyngier@arm.com \
--cc=mtsirkin@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.com \
--cc=songwenjun@huawei.com \
--cc=tbaicar@codeaurora.org \
--cc=wangxiongfeng2@huawei.com \
--cc=wuquanming@huawei.com \
--cc=xiexiuqi@huawei.com \
--cc=zhaoshenglong@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®