public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Guoheyi <guoheyi@huawei•com>
To: "Michael S. Tsirkin" <mst@redhat•com>
Cc: Mark Rutland <mark.rutland@arm•com>,
	Peter Maydell <peter.maydell@linaro•org>,
	Marc Zyngier <marc.zyngier@arm•com>,
	Cornelia Huck <cohuck@redhat•com>,
	qemu-devel@nongnu•org, Dave Martin <Dave.Martin@arm•com>,
	qemu-arm@nongnu•org, James Morse <james.morse@arm•com>,
	Paolo Bonzini <pbonzini@redhat•com>,
	wanghaibin.wang@huawei•com, kvmarm@lists•cs.columbia.edu,
	linux-arm-kernel@lists•infradead.org
Subject: Re: [RFC PATCH 01/12] linux-headers: import arm_sdei.h
Date: Wed, 25 Sep 2019 16:12:33 +0800	[thread overview]
Message-ID: <f0096ac1-e7d4-78d2-9e8a-21a7f6f266ad@huawei.com> (raw)
In-Reply-To: <20190924113640-mutt-send-email-mst@kernel.org>



On 2019/9/24 23:39, Michael S. Tsirkin wrote:
> On Tue, Sep 24, 2019 at 11:21:40PM +0800, Heyi Guo wrote:
>> Import Linux header file include/uapi/linux/arm_sdei.h from kernel
>> v5.3 release.
>>
>> This is to prepare for qemu SDEI emulation.
>>
>> Signed-off-by: Heyi Guo <guoheyi@huawei•com>
>> Cc: Peter Maydell <peter.maydell@linaro•org>
>> Cc: Dave Martin <Dave.Martin@arm•com>
>> Cc: Marc Zyngier <marc.zyngier@arm•com>
>> Cc: Mark Rutland <mark.rutland@arm•com>
>> Cc: James Morse <james.morse@arm•com>
>> Cc: "Michael S. Tsirkin" <mst@redhat•com>
>> Cc: Cornelia Huck <cohuck@redhat•com>
>> Cc: Paolo Bonzini <pbonzini@redhat•com>
> Some issues with this.  First linux-headers is for linux as a host.
> This is for linux as a guest, so belongs in include/standard-headers.
>
> Second, please add to scripts/update-linux-headers.sh in a 1st patch,
> then add the file in the second patch.

Thanks; now I understand the differences. I'll do that in next version.

HG

>
>
>
>> ---
>>   linux-headers/linux/arm_sdei.h | 73 ++++++++++++++++++++++++++++++++++++++++++
>>   1 file changed, 73 insertions(+)
>>   create mode 100644 linux-headers/linux/arm_sdei.h
>>
>> diff --git a/linux-headers/linux/arm_sdei.h b/linux-headers/linux/arm_sdei.h
>> new file mode 100644
>> index 0000000..af0630b
>> --- /dev/null
>> +++ b/linux-headers/linux/arm_sdei.h
>> @@ -0,0 +1,73 @@
>> +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
>> +/* Copyright (C) 2017 Arm Ltd. */
>> +#ifndef _UAPI_LINUX_ARM_SDEI_H
>> +#define _UAPI_LINUX_ARM_SDEI_H
>> +
>> +#define SDEI_1_0_FN_BASE			0xC4000020
>> +#define SDEI_1_0_MASK				0xFFFFFFE0
>> +#define SDEI_1_0_FN(n)				(SDEI_1_0_FN_BASE + (n))
>> +
>> +#define SDEI_1_0_FN_SDEI_VERSION			SDEI_1_0_FN(0x00)
>> +#define SDEI_1_0_FN_SDEI_EVENT_REGISTER			SDEI_1_0_FN(0x01)
>> +#define SDEI_1_0_FN_SDEI_EVENT_ENABLE			SDEI_1_0_FN(0x02)
>> +#define SDEI_1_0_FN_SDEI_EVENT_DISABLE			SDEI_1_0_FN(0x03)
>> +#define SDEI_1_0_FN_SDEI_EVENT_CONTEXT			SDEI_1_0_FN(0x04)
>> +#define SDEI_1_0_FN_SDEI_EVENT_COMPLETE			SDEI_1_0_FN(0x05)
>> +#define SDEI_1_0_FN_SDEI_EVENT_COMPLETE_AND_RESUME	SDEI_1_0_FN(0x06)
>> +#define SDEI_1_0_FN_SDEI_EVENT_UNREGISTER		SDEI_1_0_FN(0x07)
>> +#define SDEI_1_0_FN_SDEI_EVENT_STATUS			SDEI_1_0_FN(0x08)
>> +#define SDEI_1_0_FN_SDEI_EVENT_GET_INFO			SDEI_1_0_FN(0x09)
>> +#define SDEI_1_0_FN_SDEI_EVENT_ROUTING_SET		SDEI_1_0_FN(0x0A)
>> +#define SDEI_1_0_FN_SDEI_PE_MASK			SDEI_1_0_FN(0x0B)
>> +#define SDEI_1_0_FN_SDEI_PE_UNMASK			SDEI_1_0_FN(0x0C)
>> +#define SDEI_1_0_FN_SDEI_INTERRUPT_BIND			SDEI_1_0_FN(0x0D)
>> +#define SDEI_1_0_FN_SDEI_INTERRUPT_RELEASE		SDEI_1_0_FN(0x0E)
>> +#define SDEI_1_0_FN_SDEI_PRIVATE_RESET			SDEI_1_0_FN(0x11)
>> +#define SDEI_1_0_FN_SDEI_SHARED_RESET			SDEI_1_0_FN(0x12)
>> +
>> +#define SDEI_VERSION_MAJOR_SHIFT			48
>> +#define SDEI_VERSION_MAJOR_MASK				0x7fff
>> +#define SDEI_VERSION_MINOR_SHIFT			32
>> +#define SDEI_VERSION_MINOR_MASK				0xffff
>> +#define SDEI_VERSION_VENDOR_SHIFT			0
>> +#define SDEI_VERSION_VENDOR_MASK			0xffffffff
>> +
>> +#define SDEI_VERSION_MAJOR(x)	(x>>SDEI_VERSION_MAJOR_SHIFT & SDEI_VERSION_MAJOR_MASK)
>> +#define SDEI_VERSION_MINOR(x)	(x>>SDEI_VERSION_MINOR_SHIFT & SDEI_VERSION_MINOR_MASK)
>> +#define SDEI_VERSION_VENDOR(x)	(x>>SDEI_VERSION_VENDOR_SHIFT & SDEI_VERSION_VENDOR_MASK)
>> +
>> +/* SDEI return values */
>> +#define SDEI_SUCCESS		0
>> +#define SDEI_NOT_SUPPORTED	-1
>> +#define SDEI_INVALID_PARAMETERS	-2
>> +#define SDEI_DENIED		-3
>> +#define SDEI_PENDING		-5
>> +#define SDEI_OUT_OF_RESOURCE	-10
>> +
>> +/* EVENT_REGISTER flags */
>> +#define SDEI_EVENT_REGISTER_RM_ANY	0
>> +#define SDEI_EVENT_REGISTER_RM_PE	1
>> +
>> +/* EVENT_STATUS return value bits */
>> +#define SDEI_EVENT_STATUS_RUNNING	2
>> +#define SDEI_EVENT_STATUS_ENABLED	1
>> +#define SDEI_EVENT_STATUS_REGISTERED	0
>> +
>> +/* EVENT_COMPLETE status values */
>> +#define SDEI_EV_HANDLED	0
>> +#define SDEI_EV_FAILED	1
>> +
>> +/* GET_INFO values */
>> +#define SDEI_EVENT_INFO_EV_TYPE			0
>> +#define SDEI_EVENT_INFO_EV_SIGNALED		1
>> +#define SDEI_EVENT_INFO_EV_PRIORITY		2
>> +#define SDEI_EVENT_INFO_EV_ROUTING_MODE		3
>> +#define SDEI_EVENT_INFO_EV_ROUTING_AFF		4
>> +
>> +/* and their results */
>> +#define SDEI_EVENT_TYPE_PRIVATE			0
>> +#define SDEI_EVENT_TYPE_SHARED			1
>> +#define SDEI_EVENT_PRIORITY_NORMAL		0
>> +#define SDEI_EVENT_PRIORITY_CRITICAL		1
>> +
>> +#endif /* _UAPI_LINUX_ARM_SDEI_H */
>> -- 
>> 1.8.3.1
> .
>



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-09-25  8:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24 15:21 [RFC PATCH 00/12] Add SDEI support for arm64 Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 01/12] linux-headers: import arm_sdei.h Heyi Guo
2019-09-24 15:39   ` Michael S. Tsirkin
2019-09-25  8:12     ` Guoheyi [this message]
2019-09-24 15:21 ` [RFC PATCH 02/12] arm/sdei: add virtual device framework Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 03/12] arm/sdei: add support to handle SDEI requests from guest Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 04/12] arm/sdei: add system reset callback Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 05/12] arm/sdei: add support to trigger event by GIC interrupt ID Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 06/12] core/irq: add qemu_irq_remove_intercept interface Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 07/12] arm/sdei: override qemu_irq handler when binding interrupt Heyi Guo
2019-09-30 13:19   ` Peter Maydell
2019-10-09 13:06     ` Guoheyi
2019-09-24 15:21 ` [RFC PATCH 08/12] arm/sdei: add support to register interrupt bind notifier Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 09/12] linux-headers/kvm.h: add capability to forward hypercall Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 10/12] arm/sdei: check KVM cap and enable SDEI Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 11/12] arm/kvm: handle guest exit of hypercall Heyi Guo
2019-09-24 15:21 ` [RFC PATCH 12/12] virt/acpi: add SDEI table if SDEI is enabled Heyi Guo
2019-10-10  9:15   ` Igor Mammedov
2019-10-10 13:08     ` Guoheyi
2019-10-10 13:57       ` Igor Mammedov
2019-10-10 14:01   ` Michael S. Tsirkin
2019-09-25  6:54 ` [RFC PATCH 00/12] Add SDEI support for arm64 no-reply
2019-09-25  6:58 ` no-reply
2019-09-30 13:15 ` Peter Maydell
2019-10-09 13:42   ` Guoheyi

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=f0096ac1-e7d4-78d2-9e8a-21a7f6f266ad@huawei.com \
    --to=guoheyi@huawei$(echo .)com \
    --cc=Dave.Martin@arm$(echo .)com \
    --cc=cohuck@redhat$(echo .)com \
    --cc=james.morse@arm$(echo .)com \
    --cc=kvmarm@lists$(echo .)cs.columbia.edu \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=marc.zyngier@arm$(echo .)com \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=mst@redhat$(echo .)com \
    --cc=pbonzini@redhat$(echo .)com \
    --cc=peter.maydell@linaro$(echo .)org \
    --cc=qemu-arm@nongnu$(echo .)org \
    --cc=qemu-devel@nongnu$(echo .)org \
    --cc=wanghaibin.wang@huawei$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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