RE: [PATCH v18 7/7] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2021-03-30 Thread Jianyong Wu
Poulose ; Andre Przywara ; Steven Price ; Lorenzo Pieralisi ; Sudeep Holla Cc: linux-kernel@vger.kernel.org; linux-arm-ker...@lists.infradead.org; kvm...@lists.cs.columbia.edu; k...@vger.kernel.org; Steve Capper ; Justin He ; Jianyong Wu ; kernel-t...@android.com; Mark Rutland Subject: [PATCH

RE: [PATCH v18 6/7] KVM: arm64: Add support for the KVM PTP service

2021-03-30 Thread Jianyong Wu
...@kernel.org; Suzuki Poulose ; Andre Przywara ; Steven Price ; Lorenzo Pieralisi ; Sudeep Holla Cc: linux-kernel@vger.kernel.org; linux-arm-ker...@lists.infradead.org; kvm...@lists.cs.columbia.edu; k...@vger.kernel.org; Steve Capper ; Justin He ; Jianyong Wu ; kernel-t...@android.com Subject: [PATCH

RE: [PATCH v16 0/9] Enable ptp_kvm for arm/arm64

2021-02-02 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Tuesday, February 2, 2021 10:15 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; richardcoch...@gmail.com; Mark > Rutl

RE: [PATCH v16 0/9] Enable ptp_kvm for arm/arm64

2021-01-06 Thread Jianyong Wu
Ping... Any comments? Thanks! > -Original Message- > From: Jianyong Wu > Sent: Wednesday, December 9, 2020 2:09 PM > To: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; &g

[PATCH v16 1/9] arm64: Probe for the presence of KVM hypervisor

2020-12-08 Thread Jianyong Wu
compatible with KVM. Once this has been established, additional services can be discovered via a feature bitmap. Change from Jianyong Wu: mv kvm_arm_hyp_service_available to common place to let both arm/arm64 touch it. add kvm_init_hyp_services also under arm arch to let arm kvm guest use this service.

[PATCH v16 6/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-12-08 Thread Jianyong Wu
ptp_kvm will get this service through SMCC call. The service offers wall time and cycle count of host to guest. The caller must specify whether they want the host cycle count or the difference between host cycle count and cntvoff. Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 59

[PATCH v16 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2020-12-08 Thread Jianyong Wu
0 3 377 8 +4ns[ +5ns] +/-4ns The PHC0 is the ptp clock which choose the host clock as its source clock. So we can see that the clock difference between host and guest is in order of ns. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 29

[PATCH v16 8/9] doc: add ptp_kvm introduction for arm64 support

2020-12-08 Thread Jianyong Wu
PTP_KVM implementation depends on hypercall using SMCCC. So we introduce a new SMCCC service ID. This doc explains how does the ID define and how does PTP_KVM works on arm/arm64. Signed-off-by: Jianyong Wu --- Documentation/virt/kvm/api.rst | 9 +++ Documentation/virt/kvm/arm

[PATCH v16 5/9] clocksource: Add clocksource id for arm arch counter

2020-12-08 Thread Jianyong Wu
Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers

[PATCH v16 9/9] arm64: Add kvm capability check extension for ptp_kvm

2020-12-08 Thread Jianyong Wu
Let userspace check if there is kvm ptp service in host. Before VMs migrate to another host, VMM may check if this cap is available to determine the next behavior. Signed-off-by: Jianyong Wu Suggested-by: Marc Zyngier --- arch/arm64/kvm/arm.c | 1 + include/uapi/linux/kvm.h | 1 + 2 files

[PATCH v16 4/9] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-12-08 Thread Jianyong Wu
to take the snapshot and act accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Jianyong Wu --- include/linux/clocksource.h | 6 ++ include/linux/clocksource_ids.h | 11 +++ include/linux/timekeeping.h | 12 +++- kernel/time/clocksource.c | 2 ++ kernel

[PATCH v16 3/9] ptp: Reorganize ptp_kvm module to make it arch-independent.

2020-12-08 Thread Jianyong Wu
Currently, ptp_kvm modules implementation is only for x86 which includes large part of arch-specific code. This patch moves all of this code into a new arch related file in the same directory. Signed-off-by: Jianyong Wu --- drivers/ptp/Makefile| 1 + drivers/ptp

[PATCH v16 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-12-08 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 27 ++- 1

[PATCH v16 0/9] Enable ptp_kvm for arm/arm64

2020-12-08 Thread Jianyong Wu
ptp_kvm code for arm64 into hypervisor part and guest part. (4) add API to expose monotonic clock and counter value. (5) refine code: remove no necessary part and reconsitution. [1] https://patchwork.kernel.org/cover/11373351/ Jianyong Wu (6): ptp: Reorganize ptp_kvm module to

RE: [PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2020-11-24 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Tuesday, November 24, 2020 5:05 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > ric

RE: [PATCH v15 6/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-11-24 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Tuesday, November 24, 2020 5:07 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > ric

RE: [PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2020-11-23 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Monday, November 23, 2020 6:49 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > ric

RE: [PATCH v15 8/9] doc: add ptp_kvm introduction for arm64 support

2020-11-23 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Monday, November 23, 2020 6:58 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > ric

RE: [PATCH v15 6/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-11-23 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Monday, November 23, 2020 6:44 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > ric

RE: [PATCH v15 6/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-11-23 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Monday, November 23, 2020 7:59 PM > To: Jianyong Wu > Cc: Justin He ; k...@vger.kernel.org; > net...@vger.kernel.org; richardcoch...@gmail.com; linux- > ker...@vger.kernel.org; sean.j.christopher...@in

RE: [PATCH v15 0/9] Enable ptp_kvm for arm/arm64

2020-11-23 Thread Jianyong Wu
Hi, Ping ... Any comments? > -Original Message- > From: Jianyong Wu > Sent: Wednesday, November 11, 2020 2:22 PM > To: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; &g

[PATCH v15 3/9] ptp: Reorganize ptp_kvm module to make it arch-independent.

2020-11-10 Thread Jianyong Wu
Currently, ptp_kvm modules implementation is only for x86 which includes large part of arch-specific code. This patch moves all of this code into a new arch related file in the same directory. Signed-off-by: Jianyong Wu --- drivers/ptp/Makefile| 1 + drivers/ptp

[PATCH v15 7/9] ptp: arm/arm64: Enable ptp_kvm for arm/arm64

2020-11-10 Thread Jianyong Wu
0 3 377 8 +4ns[ +5ns] +/-4ns The PHC0 is the ptp clock which choose the host clock as its source clock. So we can see that the clock difference between host and guest is in order of ns. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 28

[PATCH v15 5/9] clocksource: Add clocksource id for arm arch counter

2020-11-10 Thread Jianyong Wu
Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers

[PATCH v15 9/9] arm64: Add kvm capability check extension for ptp_kvm

2020-11-10 Thread Jianyong Wu
Let userspace check if there is kvm ptp service in host. Before VMs migrate to another host, VMM may check if this cap is available to determine the next behavior. Signed-off-by: Jianyong Wu Suggested-by: Marc Zyngier --- arch/arm64/kvm/arm.c | 1 + include/uapi/linux/kvm.h | 1 + 2 files

[PATCH v15 4/9] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-11-10 Thread Jianyong Wu
to take the snapshot and act accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Jianyong Wu --- include/linux/clocksource.h | 6 ++ include/linux/clocksource_ids.h | 11 +++ include/linux/timekeeping.h | 12 +++- kernel/time/clocksource.c | 2 ++ kernel

[PATCH v15 8/9] doc: add ptp_kvm introduction for arm64 support

2020-11-10 Thread Jianyong Wu
PTP_KVM implementation depends on hypercall using SMCCC. So we introduce a new SMCCC service ID. This doc explains how does the ID define and how does PTP_KVM works on arm/arm64. Signed-off-by: Jianyong Wu --- Documentation/virt/kvm/api.rst | 9 +++ Documentation/virt/kvm/arm

[PATCH v15 6/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-11-10 Thread Jianyong Wu
ptp_kvm will get this service through SMCC call. The service offers wall time and cycle count of host to guest. The caller must specify whether they want the host cycle count or the difference between host cycle count and cntvoff. Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 61

[PATCH v15 1/9] arm64: Probe for the presence of KVM hypervisor

2020-11-10 Thread Jianyong Wu
compatible with KVM. Once this has been established, additional services can be discovered via a feature bitmap. Change from Jianyong Wu: mv kvm_arm_hyp_service_available to common place to let both arm/arm64 touch it. add kvm_init_hyp_services also under arm arch to let arm kvm guest use this service.

[PATCH v15 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-11-10 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 27 ++- 1

[PATCH v15 0/9] Enable ptp_kvm for arm/arm64

2020-11-10 Thread Jianyong Wu
econsitution. [1] https://patchwork.kernel.org/cover/11373351/ Jianyong Wu (6): ptp: Reorganize ptp_kvm module to make it arch-independent. clocksource: Add clocksource id for arm arch counter arm64/kvm: Add hypercall service for kvm ptp. ptp: arm/arm64: Enable ptp_kvm for arm/arm64 doc:

RE: [PATCH RFC v2 4/4] 9p: fix race issue in fid contention.

2020-11-04 Thread Jianyong Wu
Hi Dominique, Good News! I'm happy to see that you have time to pick this up again. All the changes are OK for me. Thanks Jianyong > -Original Message- > From: Dominique Martinet > Sent: Tuesday, November 3, 2020 6:41 PM > To: Jianyong Wu > Cc: eri...@gmail.com; l

RE: [PATCH RFC v2 4/4] 9p: fix race issue in fid contention.

2020-09-25 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Thursday, September 24, 2020 5:52 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; qemu_...@crudebyte.com; > gr...@kaod.org; v9fs-develo...@lists.sourceforge.net; linux- > ker...@vg

RE: [PATCH RFC v2 4/4] 9p: fix race issue in fid contention.

2020-09-24 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Wednesday, September 23, 2020 10:50 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; qemu_...@crudebyte.com; > gr...@kaod.org; v9fs-develo...@lists.sourceforge.net; linux- > k

[PATCH v2 2/4] fs/9p: track open fids

2020-09-23 Thread Jianyong Wu
From: Greg Kurz This patch adds accounting of open fids in a list hanging off the i_private field of the corresponding inode. This allows faster lookups compared to searching the full 9p client list. The lookup code is modified accordingly. Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu

[PATCH v2 1/4] fs/9p: fix create-unlink-getattr idiom

2020-09-23 Thread Jianyong Wu
(changed v9fs_fid_find_global to v9fs_fid_find_inode in comment) Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu --- fs/9p/fid.c | 30 ++ fs/9p/vfs_inode.c | 4 net/9p/client.c | 5 - 3 files changed, 38 insertions(+), 1 deletion(-) diff --git

[PATCH RFC v2 4/4] 9p: fix race issue in fid contention.

2020-09-23 Thread Jianyong Wu
own fchmod faccessat. Signed-off-by: Jianyong Wu --- fs/9p/fid.c | 22 ++ fs/9p/fid.h | 10 +- fs/9p/vfs_dentry.c | 2 ++ fs/9p/vfs_dir.c | 9 + fs/9p/vfs_inode.c | 37 + fs

[PATCH v2 3/4] fs/9p: search open fids first

2020-09-23 Thread Jianyong Wu
ftruncate(4, 0) = 0 Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu --- fs/9p/fid.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/9p/fid.c b/fs/9p/fid.c index d11dd430590d..0b23b0fe6c51 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -95

[PATCH RFC v2 0/4] 9p: fix open-unlink-f*syscall bug.

2020-09-23 Thread Jianyong Wu
: (1) in patch 4/4: do fid refcounter down in the clunk helper. (2) int patch 4/4: remove the enum value denoting from which of the inode or dentry fids are allcated. Eric Van Hensbergen (1): fs/9p: fix create-unlink-getattr idiom Greg Kurz (1): fs/9p: search open fids first Jianyong Wu

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-18 Thread Jianyong Wu
> -Original Message- > From: Dominique Martinet > Sent: Friday, September 18, 2020 5:35 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Justin He > ; Greg Kurz > Subject: Re:

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-18 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Monday, September 14, 2020 4:32 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Justin He > ; Greg Kurz >

RE: [V9fs-developer] [PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-14 Thread Jianyong Wu
> -Original Message- > From: Greg Kurz > Sent: Monday, September 14, 2020 4:36 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; asmad...@codewreck.org; v9fs- > develo...@lists.sourceforge.net; Justin He ; linux- > ker...@vger.kernel.org;

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Monday, September 14, 2020 4:32 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Justin He > ; Greg Kurz >

RE: [V9fs-developer] [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Monday, September 14, 2020 2:32 PM > To: Jianyong Wu > Cc: lu...@ionkov.net; Justin He ; eri...@gmail.com; > linux-kernel@vger.kernel.org; v9fs-develo...@lists.sourceforge.net; Greg > Kurz

RE: [PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-14 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Monday, September 14, 2020 1:56 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Justin He > ; Greg Kurz >

[PATCH RFC 4/4] 9p: fix race issue in fid contention.

2020-09-13 Thread Jianyong Wu
the old test case: for file in {01..50}; do touch f.${file}; done seq 1 1000 | xargs -n 1 -P 50 -I{} cat f.* > /dev/null open-unlink-f*syscall test: I have tested for f*syscall include: ftruncate fstat fchown fchmod faccessat. Signed-off-by: Jianyong Wu --- fs/9p/fid.c |

[PATCH RFC 3/4] fs/9p: search open fids first

2020-09-13 Thread Jianyong Wu
mission denied) ftruncate(4, 0) = 0 Change-Id: Icb657359493fc9c06956881551e83c7e1af4f024 Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu --- fs/9p/fid.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/fs/9p/fid.c b/fs/9p/fid.c index d11dd430590d..0

[PATCH RFC 1/4] fs/9p: fix create-unlink-getattr idiom

2020-09-13 Thread Jianyong Wu
(changed v9fs_fid_find_global to v9fs_fid_find_inode in comment) Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu Change-Id: Ifd5c8cdca8b40216e3e7d021eb6d0afd750096e7 --- fs/9p/fid.c | 30 ++ fs/9p/vfs_inode.c | 4 net/9p/client.c | 5 - 3 files

[PATCH RFC 2/4] fs/9p: track open fids

2020-09-13 Thread Jianyong Wu
Signed-off-by: Greg Kurz Signed-off-by: Jianyong Wu --- fs/9p/fid.c | 32 +++- fs/9p/fid.h | 1 + fs/9p/vfs_dir.c | 3 +++ fs/9p/vfs_file.c| 1 + fs/9p/vfs_inode.c | 6 +- fs/9p/vfs_inode_dotl.c | 1 + include/net

[PATCH RFC 0/4] 9p: fix open-unlink-f*syscall bug

2020-09-13 Thread Jianyong Wu
): fs/9p: fix create-unlink-getattr idiom Greg Kurz (1): fs/9p: search open fids first Jianyong Wu (2): fs/9p: track open fids 9p: fix race issue in fid contention. fs/9p/fid.c | 72 +++-- fs/9p/fid.h | 25 +++--- fs/9p

RE: [PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-07 Thread Jianyong Wu
> -Original Message- > From: Marc Zyngier > Sent: Monday, September 7, 2020 5:47 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > richardco

RE: [PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-07 Thread Jianyong Wu
> -Original Message- > From: Marc Zyngier > Sent: Monday, September 7, 2020 4:55 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > richardco

RE: [PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-07 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Saturday, September 5, 2020 7:33 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.

RE: [PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-07 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Saturday, September 5, 2020 7:02 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.

RE: [PATCH v14 07/10] arm64/kvm: Add hypercall service for kvm ptp.

2020-09-07 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Saturday, September 5, 2020 7:04 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.

RE: [PATCH v14 07/10] arm64/kvm: Add hypercall service for kvm ptp.

2020-09-07 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Saturday, September 5, 2020 12:15 AM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.

RE: [PATCH v14 09/10] doc: add ptp_kvm introduction for arm64 support

2020-09-07 Thread Jianyong Wu
Hi Marc, > -Original Message- > From: Marc Zyngier > Sent: Saturday, September 5, 2020 12:19 AM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.

[PATCH v14 05/10] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-09-04 Thread Jianyong Wu
to take the snapshot and act accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Jianyong Wu --- include/linux/clocksource.h | 6 ++ include/linux/clocksource_ids.h | 11 +++ include/linux/timekeeping.h | 12 +++- kernel/time/clocksource.c | 2 ++ kernel

[PATCH v14 09/10] doc: add ptp_kvm introduction for arm64 support

2020-09-04 Thread Jianyong Wu
ptp_kvm implementation depends on hypercall using SMCCC. So we introduce a new SMCCC service ID. This doc explain how we define and use this new ID. Signed-off-by: Jianyong Wu --- Documentation/virt/kvm/arm/ptp_kvm.rst | 72 ++ 1 file changed, 72 insertions(+) create

[PATCH v14 06/10] clocksource: Add clocksource id for arm arch counter

2020-09-04 Thread Jianyong Wu
Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers

[PATCH v14 04/10] ptp: Reorganize ptp_kvm module to make it arch-independent.

2020-09-04 Thread Jianyong Wu
Currently, ptp_kvm modules implementation is only for x86 which includs large part of arch-specific code. This patch move all of those code into new arch related file in the same directory. Signed-off-by: Jianyong Wu --- drivers/ptp/Makefile| 5 ++ drivers/ptp

[PATCH v14 08/10] ptp: arm64: Enable ptp_kvm for arm64

2020-09-04 Thread Jianyong Wu
0 3 377 8 +4ns[ +5ns] +/-4ns The PHC0 is the ptp clock which choose the host clock as its source clock. So we can see that the clock difference between host and guest is in order of ns. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 24

[PATCH v14 10/10] arm64: Add kvm capability check extension for ptp_kvm

2020-09-04 Thread Jianyong Wu
Let userspace check if there is kvm ptp service in host. Before VMs migrate to another host, VMM may check if this cap is available to determine the next behavior. Signed-off-by: Jianyong Wu Suggested-by: Marc Zyngier --- arch/arm64/kvm/arm.c | 4 include/uapi/linux/kvm.h | 1 + 2

[PATCH v14 02/10] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-09-04 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1

[PATCH v14 03/10] smccc: Export smccc conduit get helper.

2020-09-04 Thread Jianyong Wu
Export arm_smccc_1_1_get_conduit then modules can use smccc helper which adopts it. Acked-by: Mark Rutland Signed-off-by: Jianyong Wu --- drivers/firmware/smccc/smccc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c index

[PATCH v14 07/10] arm64/kvm: Add hypercall service for kvm ptp.

2020-09-04 Thread Jianyong Wu
ptp_kvm will get this service through smccc call. The service offers wall time and counter cycle of host for guest. caller must explicitly determines which cycle of virtual counter or physical counter to return if it needs counter cycle. Signed-off-by: Jianyong Wu --- arch/arm64/kvm/Kconfig

[PATCH v14 01/10] arm64: Probe for the presence of KVM hypervisor services during boot

2020-09-04 Thread Jianyong Wu
compatible with KVM. Once this has been established, additional services can be discovered via a feature bitmap. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/include/asm/hypervisor.h | 11 + arch/arm64/kernel/setup.c

[PATCH v14 00/10] Enable ptp_kvm for arm64

2020-09-04 Thread Jianyong Wu
ptp_kvm code for arm64 into hypervisor part and guest part. (4) add API to expose monotonic clock and counter value. (5) refine code: remove no necessary part and reconsitution. [1] https://patchwork.kernel.org/cover/11373351/ Jianyong Wu (9): arm64: Probe for the presence of KV

RE: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-07-27 Thread Jianyong Wu
> -Original Message- > From: Will Deacon > Sent: Monday, July 27, 2020 7:38 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > m...@ke

RE: [PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-07-26 Thread Jianyong Wu
Hi Will, > -Original Message- > From: Jianyong Wu > Sent: Friday, June 19, 2020 9:01 PM > To: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com; > m...@kernel.org; richardcoch.

RE: [RFC PATCH 1/2] vfs: pass file down when getattr to avoid losing info.

2020-07-21 Thread Jianyong Wu
> -Original Message- > From: Dominique Martinet > Sent: Monday, July 20, 2020 10:54 PM > To: Jianyong Wu > Cc: eri...@gmail.com; h...@lst.de; dhowe...@redhat.com; > lu...@ionkov.net; v9fs-develo...@lists.sourceforge.net; linux- > ker...@vger.kernel.org; Kaly Xi

RE: [RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug

2020-07-19 Thread Jianyong Wu
> -Original Message- > From: Al Viro On Behalf Of Al Viro > Sent: Monday, July 20, 2020 9:52 AM > To: Jianyong Wu > Cc: eri...@gmail.com; h...@lst.de; dhowe...@redhat.com; > lu...@ionkov.net; asmad...@codewreck.org; v9fs- > develo...@lists.sourceforge.net; linux-k

[RFC PATCH 1/2] vfs: pass file down when getattr to avoid losing info.

2020-07-19 Thread Jianyong Wu
-by: Jianyong Wu --- fs/stat.c| 1 + include/linux/stat.h | 6 ++ 2 files changed, 7 insertions(+) diff --git a/fs/stat.c b/fs/stat.c index 44f8ad346db4..0dee5487f6d6 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -147,6 +147,7 @@ int vfs_statx_fd(unsigned int fd, struct kstat *stat

[RFC PATCH 0/2] vfs:9p: fix open-unlink-fstat bug

2020-07-19 Thread Jianyong Wu
o we should pass the file info down in 9p guest in getattr op. it need add a new file member in "struct kstat" as "struct istat" does. Jianyong Wu (2): vfs: pass file down when getattr to avoid losing info. 9p: retrieve fid from file if it exists when getattr. fs/9p/vfs_inod

[RFC PATCH 2/2] 9p: retrieve fid from file if it exists when getattr.

2020-07-19 Thread Jianyong Wu
fid should be retrieved from file when it is not NULL in getattr. it denotes that getattr is called by fdstat from userspace when file is exist, which means we should get info from file context not dentry to avoid the failure when the dentry has gone. Signed-off-by: Jianyong Wu --- fs/9p

RE: [PATCH v4] 9p: retrieve fid from file when file instance exist.

2020-07-13 Thread Jianyong Wu
> -Original Message- > From: Dominique Martinet > Sent: Friday, July 10, 2020 7:09 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Steve > Capper ; Kaly Xin ; Justin He > ;

[PATCH v4] 9p: retrieve fid from file when file instance exist.

2020-07-10 Thread Jianyong Wu
t;tmp", O_RDWR); ftruncate(fd, 10); The file context related with the fd will be lost as fid is always retrieved from dentry, then the backend can't get the info of file context. It is against the original intention of user and may lead to bug. Signed-off-by: Jianyong Wu --- fs/9p/vfs_inode.

[PATCH v3] 9p: retrieve fid from file when file instance exist.

2020-07-03 Thread Jianyong Wu
t;tmp", O_RDWR); ftruncate(fd, 10); The file context related with the fd will be lost as fid is retrieved from dentry, then the backend can't get the info of file context. It is against the original intention of user and may lead to bug. Signed-off-by: Jianyong Wu --- fs/9p/vfs_inode.

RE: [PATCH v2] 9p: retrieve fid from file when file instance exist.

2020-07-02 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Thursday, July 2, 2020 3:56 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Steve > Capper ; Kaly Xin ; J

RE: [PATCH v2] 9p: retrieve fid from file when file instance exist.

2020-07-01 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Wednesday, July 1, 2020 6:59 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Steve > Capper ; Kaly Xin ; J

[PATCH v2] 9p: retrieve fid from file when file instance exist.

2020-06-30 Thread Jianyong Wu
("tmp", O_RDWR); ftruncate(fd, 10); The file context related with fd will be lost as fid is always retrieved from dentry, then the backend can't get the info of file context. It is against the original intention of user and may lead to bug. Signed-off-by: Jianyong Wu --- fs/9p/vfs_inode.

[PATCH] 9p: remove unused code in 9p

2020-06-28 Thread Jianyong Wu
These codes have been commented out since 2007 and lay in kernel since then. So, it's better to remove them. Signed-off-by: Jianyong Wu --- fs/9p/vfs_inode.c | 53 --- 1 file changed, 53 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c

RE: [RFC PATCH 2/2] 9p: remove unused code in 9p

2020-06-28 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Sunday, June 28, 2020 1:52 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Steve > Capper ; Kaly Xin ; J

RE: [RFC PATCH 1/2] 9p: retrieve fid from file when file instance exist.

2020-06-28 Thread Jianyong Wu
Hi Dominique, > -Original Message- > From: Dominique Martinet > Sent: Sunday, June 28, 2020 2:28 PM > To: Jianyong Wu > Cc: eri...@gmail.com; lu...@ionkov.net; v9fs- > develo...@lists.sourceforge.net; linux-kernel@vger.kernel.org; Steve > Capper ; Kaly Xin ; J

[RFC PATCH 2/2] 9p: remove unused code in 9p

2020-06-27 Thread Jianyong Wu
These code has been commented out since 2007 and lied in kernel since then. it's time to remove thest no used code. Signed-off-by: Jianyong Wu --- fs/9p/vfs_inode.c | 53 --- 1 file changed, 53 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p

[RFC PATCH 1/2] 9p: retrieve fid from file when file instance exist.

2020-06-27 Thread Jianyong Wu
: fd=open("tmp", O_RDWR); ftruncate(fd, 10); the file context related with fd info will lost as fid will always be retrieved from dentry, then the backend can't get the info of file context. it is against the original intention of user and may lead to bug. Signed-off-by: Jianyong Wu

[RFC PATCH 0/2] 9p: retrieve fid from file if it exsits

2020-06-27 Thread Jianyong Wu
in the current implementation in setattr in 9p, fid will always be retrieved from dentry, which may be against the original intension of user and lead to bug. also, remove no used code in 9p. Signed-off-by: Jianyong Wu Jianyong Wu (2): 9p: retrive fid from file when file instance exist. 9p

RE: [RFC PATCH v13 7/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-06-23 Thread Jianyong Wu
Hi steven, > -Original Message- > From: Steven Price > Sent: Monday, June 22, 2020 5:51 PM > To: Jianyong Wu ; net...@vger.kernel.org; > yangbo...@nxp.com; john.stu...@linaro.org; t...@linutronix.de; > pbonz...@redhat.com; sean.j.christopher...@intel.com; m...@kernel.

RE: [RFC PATCH v13 7/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-06-21 Thread Jianyong Wu
Hi Steven, > -Original Message- > From: Steven Price > Sent: Friday, June 19, 2020 6:45 PM > To: Jianyong Wu ; net...@vger.kernel.org; > yangbo...@nxp.com; john.stu...@linaro.org; t...@linutronix.de; > pbonz...@redhat.com; sean.j.christopher...@intel.com; m...@kernel.

RE: [PATCH v13 3/9] smccc: Export smccc conduit get helper.

2020-06-21 Thread Jianyong Wu
Hi Christoph, > -Original Message- > From: Christoph Hellwig > Sent: Friday, June 19, 2020 9:57 PM > To: Jianyong Wu > Cc: net...@vger.kernel.org; yangbo...@nxp.com; john.stu...@linaro.org; > t...@linutronix.de; pbonz...@redhat.com; sean.j.christopher...@intel.com;

[PATCH v13 3/9] smccc: Export smccc conduit get helper.

2020-06-19 Thread Jianyong Wu
Export arm_smccc_1_1_get_conduit then modules can use smccc helper which adopts it. Acked-by: Mark Rutland Signed-off-by: Jianyong Wu --- drivers/firmware/smccc/smccc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/firmware/smccc/smccc.c b/drivers/firmware/smccc/smccc.c index

[PATCH v13 6/9] clocksource: Add clocksource id for arm arch counter

2020-06-19 Thread Jianyong Wu
Add clocksource id for arm arch counter to let it be identified easily and elegantly in ptp_kvm implementation for arm. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/linux/clocksource_ids.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers

[PATCH v13 5/9] time: Add mechanism to recognize clocksource in time_get_snapshot

2020-06-19 Thread Jianyong Wu
to take the snapshot and act accordingly. Signed-off-by: Thomas Gleixner Signed-off-by: Jianyong Wu --- include/linux/clocksource.h | 6 ++ include/linux/clocksource_ids.h | 11 +++ include/linux/timekeeping.h | 12 +++- kernel/time/clocksource.c | 3 +++ kernel

[PATCH v13 8/9] ptp: arm64: Enable ptp_kvm for arm64

2020-06-19 Thread Jianyong Wu
0 3 377 8 +4ns[ +5ns] +/-4ns The PHC0 is the ptp clock which choose the host clock as its source clock. So we can see that the clock difference between host and guest is in order of ns. Signed-off-by: Jianyong Wu --- drivers/clocksource/arm_arch_timer.c | 24

[PATCH v13 9/9] arm64: Add kvm capability check extension for ptp_kvm

2020-06-19 Thread Jianyong Wu
Let userspace check if there is kvm ptp service in host. Before VMs migrate to another host, VMM may check if this cap is available to determine the next behavior. Signed-off-by: Jianyong Wu Suggested-by: Marc Zyngier --- arch/arm64/kvm/arm.c | 4 include/uapi/linux/kvm.h | 1 + 2

[PATCH v13 4/9] ptp: Reorganize ptp_kvm module to make it arch-independent.

2020-06-19 Thread Jianyong Wu
Currently, ptp_kvm modules implementation is only for x86 which includs large part of arch-specific code. This patch move all of those code into new arch related file in the same directory. Signed-off-by: Jianyong Wu --- drivers/ptp/Makefile| 1 + drivers/ptp/ptp_kvm.h

[PATCH v13 7/9] arm64/kvm: Add hypercall service for kvm ptp.

2020-06-19 Thread Jianyong Wu
ptp_kvm will get this service through smccc call. The service offers wall time and counter cycle of host for guest. caller must explicitly determines which cycle of virtual counter or physical counter to return if it needs counter cycle. Signed-off-by: Jianyong Wu --- arch/arm64/kvm/Kconfig

[PATCH v13 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-06-19 Thread Jianyong Wu
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/kvm/hypercalls.c | 29 +++-- 1

[PATCH v13 1/9] arm64: Probe for the presence of KVM hypervisor services during boot

2020-06-19 Thread Jianyong Wu
compatible with KVM. Once this has been established, additional services can be discovered via a feature bitmap. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Jianyong Wu --- arch/arm64/include/asm/hypervisor.h | 11 + arch/arm64/kernel/setup.c

[PATCH v13 0/9] Enable ptp_kvm for arm64

2020-06-19 Thread Jianyong Wu
code: remove no necessary part and reconsitution. [1] https://patchwork.kernel.org/cover/11373351/ Jianyong Wu (7): arm/arm64: KVM: Advertise KVM UID to guests via SMCCC smccc: export smccc conduit get helper. ptp: Reorganize ptp_kvm modules to make it arch-independent. clocksource: Add clocksourc

  1   2   >