Re: linux-next: Fixes tag needs some work in the csky tree

2021-01-18 Thread Zhenzhong Duan
On Mon, Jan 18, 2021 at 5:49 AM Stephen Rothwell wrote: > > Hi all, > > In commit > > 8bfb676492da ("csky: Fix a size determination in gpr_get()") > > Fixes tag > > Fixes: dcad7854fcce ("sky: switch to ->regset_get()") > > has these problem(s): > > - Subject does not match target commit

Re: [PATCH] x86/iommu: Fix two minimal issues in check_iommu_entries()

2021-01-06 Thread Zhenzhong Duan
On Tue, Jan 5, 2021 at 3:04 AM Konrad Rzeszutek Wilk wrote: > > On Wed, Dec 23, 2020 at 02:24:12PM +0800, Zhenzhong Duan wrote: > > check_iommu_entries() checks for cyclic dependency in iommu entries > > and fixes the cyclic dependency by setting x->depend to NULL. But >

Re: [PATCH] x86/iommu: Fix two minimal issues in check_iommu_entries()

2021-01-03 Thread Zhenzhong Duan
On Wed, Dec 30, 2020 at 3:02 PM Borislav Petkov wrote: > > On Wed, Dec 23, 2020 at 02:24:12PM +0800, Zhenzhong Duan wrote: > > check_iommu_entries() checks for cyclic dependency in iommu entries > > and fixes the cyclic dependency by setting x->depend to NULL. But > > t

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-12-23 Thread Zhenzhong Duan
On Wed, Dec 23, 2020 at 10:57 PM Guo Ren wrote: > > Hi Zhengzhong, > > I'll take it, thx. Thanks Guo. Zhenzhong

[PATCH] x86/iommu: Fix two minimal issues in check_iommu_entries()

2020-12-22 Thread Zhenzhong Duan
. The second issue is about the report of exectuion order reverse, the order is reversed incorrectly in the report, fix it. Signed-off-by: Zhenzhong Duan --- arch/x86/kernel/pci-iommu_table.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/arch/x86/kernel/pci-iommu_ta

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-12-22 Thread Zhenzhong Duan
On Wed, Sep 23, 2020 at 12:52 PM Al Viro wrote: > > On Wed, Sep 23, 2020 at 10:37:31AM +0800, Guo Ren wrote: > > > > What's going on there? The mapping is really weird - assuming > > > you had v0..v31 in the first 32 elements of regs->vr[], you > > > end up with > > > > > > v0 v1 v2 v3 v2 v3 v6

[PATCH v3 1/2] PCI: move pci_match_device() ahead of new_id_store()

2020-11-16 Thread Zhenzhong Duan
Move pci_match_device() and it's dependencies (pci_match_id() and pci_device_id_any) ahead of new_id_store(). This is preparation work for calling pci_match_device() in new_id_store(). No functional changes. Signed-off-by: Zhenzhong Duan --- drivers/pci/pci-driver.c | 144

[PATCH v3 2/2] PCI: avoid duplicate IDs in dynamic IDs list

2020-11-16 Thread Zhenzhong Duan
, it shows below result which is expected: echo "1af4 1041" > /sys/bus/pci/drivers/vfio-pci/new_id echo "1af4 1041" > /sys/bus/pci/drivers/vfio-pci/new_id -bash: echo: write error: File exists Signed-off-by: Zhenzhong Duan --- drivers/pci/pci-driver.c | 2 +- 1 file changed,

[PATCH v3 0/2] avoid inserting duplicate IDs in dynids list

2020-11-16 Thread Zhenzhong Duan
id -bash: echo: write error: No such device v3: add a separate patch to process dependency issue per Bjorn make commit log more clear per Bjorn v2: revert the export of pci_match_device() per Christoph combind PATCH1 and PATCH2 into one. v2 link:https://lkml.org/lkml/2020/10/25/347 Zhenz

Re: [PATCH v2] PCI: check also dynamic IDs for duplicate in new_id_store()

2020-11-15 Thread Zhenzhong Duan
Hi Bjorn, On Sat, Nov 14, 2020 at 6:47 AM Bjorn Helgaas wrote: > > [+cc Alex, Cornelia in case VFIO cares about new_id/remove_id > semantics] > > On Mon, Oct 26, 2020 at 11:57:10AM +0800, Zhenzhong Duan wrote: > > When a device ID data is writen to /sys/bus/pci/drivers

Re: [PATCH v2] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot system

2020-11-10 Thread Zhenzhong Duan
Hi Lukasz, On Tue, Nov 10, 2020 at 11:53 PM Lukasz Hawrylko wrote: > > Hi Zhenzhong > > On Tue, 2020-11-10 at 15:19 +0800, Zhenzhong Duan wrote: > > "intel_iommu=off" command line is used to disable iommu but iommu is force > > enabled in a tboot system fo

Re: [PATCH v2] PCI: check also dynamic IDs for duplicate in new_id_store()

2020-11-10 Thread Zhenzhong Duan
Hi Bjorn, This patch got reviewed-by, could you kindly check if it can be upstreamed? Thanks very much. Zhenzhong On Tue, Oct 27, 2020 at 3:52 PM Christoph Hellwig wrote: > > On Mon, Oct 26, 2020 at 11:57:10AM +0800, Zhenzhong Duan wrote: > > When a device ID data is writen to

[PATCH v2] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot system

2020-11-09 Thread Zhenzhong Duan
e Intel IOMMU force on") Signed-off-by: Zhenzhong Duan --- v2: move ckeck of intel_iommu_tboot_noforce into iommu code per Baolu. arch/x86/kernel/tboot.c | 3 --- drivers/iommu/intel/iommu.c | 5 +++-- include/linux/intel-iommu.h | 1 - 3 files changed, 3 insertions(+), 6 deletions(-)

Re: [PATCH] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot

2020-11-09 Thread Zhenzhong Duan
Hi Baolu, On Mon, Nov 9, 2020 at 11:15 AM Lu Baolu wrote: > > Hi Zhenzhong, > > On 11/9/20 10:27 AM, Zhenzhong Duan wrote: > > +intel iommu maintainers, > > > > Can anyone help review this patch? Thanks > > > > Zhenzhong > > > > On

Re: [PATCH] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot

2020-11-08 Thread Zhenzhong Duan
+intel iommu maintainers, Can anyone help review this patch? Thanks Zhenzhong On Wed, Nov 4, 2020 at 4:15 PM Zhenzhong Duan wrote: > > "intel_iommu=off" command line is used to disable iommu and iommu is force > enabled in a tboot system. Meanwhile "intel_iommu=tb

Re: [PATCH] iommu/vt-d: remove redundant variable no_platform_optin

2020-11-04 Thread Zhenzhong Duan
Hi Baolu, On Thu, Nov 5, 2020 at 9:47 AM Lu Baolu wrote: > > Hi Zhenzhong, > > On 11/4/20 4:19 PM, Zhenzhong Duan wrote: > > no_platform_optin is redundant with dmar_disabled and it's only used in > > platform_optin_force_iommu(), remove it and use dmar_disabled in

[PATCH] iommu/vt-d: remove redundant variable no_platform_optin

2020-11-04 Thread Zhenzhong Duan
no_platform_optin is redundant with dmar_disabled and it's only used in platform_optin_force_iommu(), remove it and use dmar_disabled instead. Meanwhile remove all the dead code in platform_optin_force_iommu(). Signed-off-by: Zhenzhong Duan --- drivers/iommu/intel/iommu.c | 14

[PATCH] iommu/vt-d: avoid unnecessory panic if iommu init fail in tboot

2020-11-04 Thread Zhenzhong Duan
for security reason, but it's unnecessory if we use "intel_iommu=tboot_noforce,off". Fix it by return 0 in tboot_force_iommu() so that force_on is not set. Fixes: 7304e8f28bb2 ("iommu/vt-d: Correctly disable Intel IOMMU force on") Signed-off-by: Zhenzhong Duan --- arch/x86/ker

[PATCH] x86/iommu: fix a typo in printk

2020-11-02 Thread Zhenzhong Duan
In check_iommu_entries(), p->detect depends on q->detect, so q->detect should be called before p->detect. Signed-off-by: Zhenzhong Duan --- arch/x86/kernel/pci-iommu_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/pci-iommu_table.c b/arc

[PATCH v2] PCI: check also dynamic IDs for duplicate in new_id_store()

2020-10-25 Thread Zhenzhong Duan
, it shows below result which is expected. echo "1af4:1000" > /sys/bus/pci/drivers/vfio-pci/new_id echo "1af4:1000" > /sys/bus/pci/drivers/vfio-pci/new_id -bash: echo: write error: File exists Drop the static specifier and add a prototype to avoid build error. Signed-off-

Re: [PATCH 1/2] PCI: export pci_match_device()

2020-10-25 Thread Zhenzhong Duan
On Thu, Oct 22, 2020 at 11:21 PM Christoph Hellwig wrote: > > On Wed, Oct 21, 2020 at 04:10:29PM +0800, Zhenzhong Duan wrote: > > pci_match_id() is deprecated as it doesn't catch any dynamic ids that > > a driver might want to check for. > > > > Export pci_match_d

[PATCH 2/2] PCI: add support for dynamic ID when checking for duplicate IDs

2020-10-21 Thread Zhenzhong Duan
-by: Zhenzhong Duan --- drivers/pci/pci-driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index bd9cfd1..751c605 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c @@ -125,7 +125,7 @@ static ssize_t new_id_store

[PATCH 1/2] PCI: export pci_match_device()

2020-10-21 Thread Zhenzhong Duan
pci_match_id() is deprecated as it doesn't catch any dynamic ids that a driver might want to check for. Export pci_match_device() as a replacement which supports both dynamic and static ids. Signed-off-by: Zhenzhong Duan --- drivers/pci/pci-driver.c | 3 ++- include/linux/pci.h | 2 ++ 2

Re: [PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-20 Thread Zhenzhong Duan
On Tue, Oct 20, 2020 at 2:32 PM Jason Wang wrote: > > > On 2020/10/19 下午5:06, Zhenzhong Duan wrote: > > In case failure to setup Post interrupt for an IRQ, it make no sense > > to assign irqfd->producer to the producer. > > > > This change makes code more r

Re: [PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-20 Thread Zhenzhong Duan
On Tue, Oct 20, 2020 at 2:23 PM Jason Wang wrote: > > > On 2020/10/19 下午5:06, Zhenzhong Duan wrote: > > If Post interrupt is disabled due to hardware limit or forcely disabled > > by "intremap=nopost" parameter, return -EINVAL so that the legacy mode IRQ >

[PATCH 1/2] KVM: not register a IRQ bypass producer if unsupported or disabled

2020-10-19 Thread Zhenzhong Duan
producer (token 60c8cda5) registration fails: -22" ..which also hints us if a vfio or vdpa device works in PI mode or legacy remapping mode. Add a print to vdpa code just like what vfio_msi_set_vector_signal() does. Signed-off-by: Zhenzhong Duan --- arch/x86/kvm/svm/avic.c | 3 +-- arch/x8

[PATCH 2/2] KVM: not link irqfd with a fake IRQ bypass producer

2020-10-19 Thread Zhenzhong Duan
In case failure to setup Post interrupt for an IRQ, it make no sense to assign irqfd->producer to the producer. This change makes code more robust. Signed-off-by: Zhenzhong Duan --- arch/x86/kvm/x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/x86.

Re: [PATCH] csky: Fix a size determination in gpr_get()

2020-09-22 Thread Zhenzhong Duan
On Wed, Sep 23, 2020 at 12:29 AM Al Viro wrote: > > On Tue, Sep 22, 2020 at 05:15:05PM +0800, Zhenzhong Duan wrote: > > "*" is missed in size determination as we are passing register set > > rather than a pointer. > > Ack. I can push it to Linus today, unles

[PATCH] s390/zcrypt: Fix a size determination in zcrypt_unlocked_ioctl()

2020-09-22 Thread Zhenzhong Duan
rypto adapters.") Signed-off-by: Zhenzhong Duan --- drivers/s390/crypto/zcrypt_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/crypto/zcrypt_api.c b/drivers/s390/crypto/zcrypt_api.c index 4dbbfd88262c..5c3f3f89e2f3 100644 --- a/drivers/s390/crypto/zc

[PATCH] csky: Fix a size determination in gpr_get()

2020-09-22 Thread Zhenzhong Duan
"*" is missed in size determination as we are passing register set rather than a pointer. Fixes: dcad7854fcce ("sky: switch to ->regset_get()") Signed-off-by: Zhenzhong Duan --- arch/csky/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

Re: [PATCH] drm/msm/a6xx: fix a potential overflow issue

2020-09-15 Thread Zhenzhong Duan
On Tue, Sep 15, 2020 at 12:20 AM Jordan Crouse wrote: > > On Sat, Sep 12, 2020 at 06:25:58PM +0800, Zhenzhong Duan wrote: > > It's allocating an array of a6xx_gpu_state_obj structure rathor than > > its pointers. > > > > This patch fix it. > > > &g

[PATCH v2] drm/msm/a6xx: Fix a size determination in a6xx_get_indexed_registers()

2020-09-13 Thread Zhenzhong Duan
It's allocating an array of a6xx_gpu_state_obj structure rather than its pointers. Fixes: d6852b4b2d01 ("drm/msm/a6xx: Track and manage a6xx state memory") Signed-off-by: Zhenzhong Duan --- v2: Update commit message per Markus, thanks drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2

[PATCH] drm/msm/a6xx: fix a potential overflow issue

2020-09-12 Thread Zhenzhong Duan
It's allocating an array of a6xx_gpu_state_obj structure rathor than its pointers. This patch fix it. Signed-off-by: Zhenzhong Duan --- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c b

[PATCH 1/2] spi: spidev: fix a race between spidev_release and spidev_remove

2020-06-17 Thread Zhenzhong Duan
vice_list_lock's protection. Signed-off-by: Zhenzhong Duan --- drivers/spi/spidev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index d753df7..f74ea26 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -787,13 +787,13

[PATCH 2/2] spi: spidev: fix a potential use-after-free in spidev_release()

2020-06-17 Thread Zhenzhong Duan
If an spi device is unbounded from the driver before the release process, there will be an NULL pointer reference when it's referenced in spi_slave_abort(). Fix it by checking it's already freed before reference. Signed-off-by: Zhenzhong Duan --- drivers/spi/spidev.c | 20

[tip: ras/core] x86/mce/inject: Fix a wrong assignment of i_mce.status

2020-06-15 Thread tip-bot2 for Zhenzhong Duan
The following commit has been merged into the ras/core branch of tip: Commit-ID: 5d7f7d1d5e01c22894dee7c9c9266500478dca99 Gitweb: https://git.kernel.org/tip/5d7f7d1d5e01c22894dee7c9c9266500478dca99 Author:Zhenzhong Duan AuthorDate:Thu, 11 Jun 2020 10:32:38 +08:00

Re: [PATCH] EDAC/mc: call edac_inc_ue_error() before panic

2020-06-10 Thread Zhenzhong Duan
On Thu, Jun 11, 2020 at 1:19 AM Luck, Tony wrote: > > On Wed, Jun 10, 2020 at 02:58:46PM +0800, Zhenzhong Duan wrote: > > By calling edac_inc_ue_error() before panic, we get a correct UE error > > count for core dump analysis. > > Looks accurate, and I'll add the patch to

[PATCH] x86/mce: fix a wrong assignment of i_mce.status

2020-06-10 Thread Zhenzhong Duan
The original code is a nop as i_mce.status is or'ed with part of itself, fix it. Signed-off-by: Zhenzhong Duan --- arch/x86/kernel/cpu/mce/inject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c index

Re: [PATCH] efi/libstub: Fix build error with libstub

2020-06-10 Thread Zhenzhong Duan
On Wed, Jun 10, 2020 at 5:10 PM Ard Biesheuvel wrote: > > On Wed, 10 Jun 2020 at 10:59, Nathan Chancellor > wrote: > > > > On Wed, Jun 10, 2020 at 03:14:46PM +0800, Zhenzhong Duan wrote: > > > Got below error during build: ... > > > diff --git a/drivers

Re: [PATCH] EDAC, {skx,i10nm}: Advice mcelog that the error were handled

2020-06-10 Thread Zhenzhong Duan
On Wed, Jun 10, 2020 at 4:20 PM Borislav Petkov wrote: > > On Wed, Jun 10, 2020 at 02:58:01PM +0800, Zhenzhong Duan wrote: > > If one MCE error has been processed in kernel, it's not necessory > > to pass it to user level mcelog. > > > > Signed-off-by: Zhenzhong D

[PATCH] efi/libstub: Fix build error with libstub

2020-06-10 Thread Zhenzhong Duan
/libstub/efi-stub-helper.c:37: confused by earlier errors, bailing out Fix it by adding -maccumulate-outgoing-args for efi libstub build as suggested by gcc. Signed-off-by: Zhenzhong Duan --- drivers/firmware/efi/libstub/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] EDAC/mc: call edac_inc_ue_error() before panic

2020-06-10 Thread Zhenzhong Duan
By calling edac_inc_ue_error() before panic, we get a correct UE error count for core dump analysis. Signed-off-by: Zhenzhong Duan --- drivers/edac/edac_mc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 75ede27

[PATCH] EDAC, pnd2: set MCE_PRIO_EDAC priority for pnd2_mce_dec notifier

2020-06-10 Thread Zhenzhong Duan
...or else it has MCE_PRIO_LOWEST priority by default. Signed-off-by: Zhenzhong Duan --- drivers/edac/pnd2_edac.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/edac/pnd2_edac.c b/drivers/edac/pnd2_edac.c index bc47328..368fae3 100644 --- a/drivers/edac/pnd2_edac.c +++ b/drivers

[PATCH] EDAC, {skx,i10nm}: Advice mcelog that the error were handled

2020-06-10 Thread Zhenzhong Duan
If one MCE error has been processed in kernel, it's not necessory to pass it to user level mcelog. Signed-off-by: Zhenzhong Duan --- drivers/edac/skx_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/edac/skx_common.c b/drivers/edac/skx_common.c index

Re: [PATCH] crypto: caam - fix use after free issue in *_crypt_done

2020-04-28 Thread Zhenzhong Duan
On Tue, Apr 28, 2020 at 3:48 PM Iuliana Prodan wrote: > > On 4/28/2020 8:14 AM, Zhenzhong Duan wrote: > > In both aead_crypt_done and skcipher_crypt_done, edesc->bklog is > > referenced after the structure pointed by edesc is freed. > > > > Fix them by moving kf

[PATCH v8 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-23 Thread Zhenzhong Duan
pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm-guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson

[PATCH v8 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-23 Thread Zhenzhong Duan
The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo M

[PATCH v8 4/5] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-23 Thread Zhenzhong Duan
Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner

[PATCH v8 5/5] x86/hyperv: Mark "hv_nopvspin" parameter obsolete

2019-10-23 Thread Zhenzhong Duan
Map "hv_nopvspin" to "nopvspin". Signed-off-by: Zhenzhong Duan Reviewed-by: Michael Kelley Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "

[PATCH v8 1/5] Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized"

2019-10-23 Thread Zhenzhong Duan
ge for XEN is in commit 090d54bcbc54 ("Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"") Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: W

[PATCH v8 0/5] Add a unified parameter "nopvspin"

2019-10-23 Thread Zhenzhong Duan
ean Christopherson] v3: PATCH2: Fix indentation v2: PATCH1: pick the print code change into separate PATCH2, updated patch description [Vitaly Kuznetsov] PATCH2: new patch with print code change [Vitaly Kuznetsov] PATCH3: add Reviewed-by [Juerg

[PATCH v2] cpuidle: not unset the driver if it already exist

2019-10-22 Thread Zhenzhong Duan
pointers. Signed-off-by: Zhenzhong Duan --- v2: update code logic per Rafael drivers/cpuidle/driver.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c index 80c1a83..acfce04 100644 --- a/drivers/cpuidle

Re: [PATCH v7 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-22 Thread Zhenzhong Duan
On 2019/10/23 5:03, Sean Christopherson wrote: On Tue, Oct 22, 2019 at 08:46:46PM +0800, Zhenzhong Duan wrote: Hi Vitaly, On 2019/10/22 19:36, Vitaly Kuznetsov wrote: Zhenzhong Duan writes: ...snip diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 249f14a..3945aa5

Re: [PATCH v7 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-22 Thread Zhenzhong Duan
On 2019/10/23 5:01, Sean Christopherson wrote: On Mon, Oct 21, 2019 at 05:11:13PM +0800, Zhenzhong Duan wrote: pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by:

Re: [PATCH v7 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-22 Thread Zhenzhong Duan
Hi Vitaly, On 2019/10/22 19:36, Vitaly Kuznetsov wrote: Zhenzhong Duan writes: ...snip diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 249f14a..3945aa5 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -825,18 +825,36 @@ __visible bool

[PATCH v7 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-22 Thread Zhenzhong Duan
The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo M

[PATCH v7 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-22 Thread Zhenzhong Duan
pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson

[PATCH v7 4/5] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-22 Thread Zhenzhong Duan
Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner

[PATCH v7 5/5] x86/hyperv: Mark "hv_nopvspin" parameter obsolete

2019-10-22 Thread Zhenzhong Duan
Map "hv_nopvspin" to "nopvspin". Signed-off-by: Zhenzhong Duan Reviewed-by: Michael Kelley Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "

[PATCH v7 0/5] Add a unified parameter "nopvspin"

2019-10-22 Thread Zhenzhong Duan
rint code change into separate PATCH2, updated patch description [Vitaly Kuznetsov] PATCH2: new patch with print code change [Vitaly Kuznetsov] PATCH3: add Reviewed-by [Juergen Gross] Zhenzhong Duan (5): Revert "KVM: X86: Fix setup the virt_spin_lock_k

[PATCH v7 1/5] Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized"

2019-10-22 Thread Zhenzhong Duan
ge for XEN is in commit 090d54bcbc54 ("Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"") Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: W

Re: [PATCH v6 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-21 Thread Zhenzhong Duan
On 2019/10/21 19:14, Vitaly Kuznetsov wrote: index 249f14a..e9c76d8 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -825,18 +825,44 @@ __visible bool __kvm_vcpu_is_preempted(long cpu) */ void __init kvm_spinlock_init(void) { - /* Does host kernel support

Re: [PATCH v6 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-20 Thread Zhenzhong Duan
Hi vitaly This patch is based on your suggestion on v5, appreciate your further review:) Thanks Zhenzhong On 2019/10/15 9:19, Zhenzhong Duan wrote: There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" on XEN platform and &q

[tip: x86/urgent] x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard

2019-10-18 Thread tip-bot2 for Zhenzhong Duan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 228d120051a2234356690924c1f42e07e54e1eaf Gitweb: https://git.kernel.org/tip/228d120051a2234356690924c1f42e07e54e1eaf Author:Zhenzhong Duan AuthorDate:Sun, 29 Sep 2019 09:13:52 +08:00

Re: [PATCH] x86: Don't use MWAIT if explicitly requested

2019-10-18 Thread Zhenzhong Duan
On 2019/10/18 15:12, Peter Zijlstra wrote: On Fri, Oct 18, 2019 at 11:45:54AM +0800, Zhenzhong Duan wrote: If 'idle=nomwait' is specified or process matching what's in processor_idle_dmi_table, we should't use MWAIT at bootup stage before cpuidle driver loaded, even if it's preferred

[PATCH] x86: Don't use MWAIT if explicitly requested

2019-10-17 Thread Zhenzhong Duan
If 'idle=nomwait' is specified or process matching what's in processor_idle_dmi_table, we should't use MWAIT at bootup stage before cpuidle driver loaded, even if it's preferred by default on Intel. Add a check so that HALT instruction is used in those cases. Signed-off-by: Zhenzhong Duan Cc

[PATCH v2] cpuidle-haltpoll: make haltpoll aware of 'idle=' override

2019-10-17 Thread Zhenzhong Duan
effect. Add a check to not load haltpoll driver if there is 'idle='. Signed-off-by: Zhenzhong Duan Signed-off-by: Joao Martins --- v2: remove #if guard per Rafael drivers/cpuidle/cpuidle-haltpoll.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/cpuidle/cpuidle-haltpoll.c b/d

[tip: x86/urgent] x86/boot/acpi: Move get_cmdline_acpi_rsdp() under #ifdef guard

2019-10-17 Thread tip-bot2 for Zhenzhong Duan
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: c83672e12b98de42bc4549d806588fc3955f8935 Gitweb: https://git.kernel.org/tip/c83672e12b98de42bc4549d806588fc3955f8935 Author:Zhenzhong Duan AuthorDate:Sun, 29 Sep 2019 09:13:52 +08:00

[PATCH] cpuidle-haltpoll: make haltpoll aware of 'idle=' override

2019-10-16 Thread Zhenzhong Duan
effect. Add a check to not load haltpoll driver if there is 'idle=' and haltpoll is built in. If haltpoll is built as a module, still give a chance for admin to use it despite 'idle='. Signed-off-by: Zhenzhong Duan Signed-off-by: Joao Martins --- drivers/cpuidle/cpuidle-haltpoll.c | 6 ++

[PATCH v6 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-14 Thread Zhenzhong Duan
pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson

[PATCH v6 5/5] x86/hyperv: Mark "hv_nopvspin" parameter obsolete

2019-10-14 Thread Zhenzhong Duan
Map "hv_nopvspin" to "nopvspin". Signed-off-by: Zhenzhong Duan Reviewed-by: Michael Kelley Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "

[PATCH v6 1/5] Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized"

2019-10-14 Thread Zhenzhong Duan
ge for XEN is in commit 090d54bcbc54 ("Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"") Signed-off-by: Zhenzhong Duan Reviewed-by: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: W

[PATCH v6 4/5] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-14 Thread Zhenzhong Duan
Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner

[PATCH v6 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-14 Thread Zhenzhong Duan
The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov C

[PATCH v6 0/5] Add a unified parameter "nopvspin"

2019-10-14 Thread Zhenzhong Duan
tsov] PATCH3: add Reviewed-by [Juergen Gross] Zhenzhong Duan (5): Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized" x86/kvm: Change print code to use pr_*() format x86/kvm: Add "nopvspin" parameter to disab

Re: [PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-13 Thread Zhenzhong Duan
On 2019/10/13 17:02, Vitaly Kuznetsov wrote: Zhenzhong Duan writes: ...snip diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index ef836d6..6e14bd4 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -825,18 +825,31 @@ __visible bool __kvm_vcpu_is_preempted(long cpu

Re: [PATCH v5 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-13 Thread Zhenzhong Duan
On 2019/10/13 17:06, Vitaly Kuznetsov wrote: Zhenzhong Duan writes: pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Cc: Paolo Bonzini Cc: Ra

[PATCH] cpuidle: not unset the driver if it already exist

2019-10-13 Thread Zhenzhong Duan
__cpuidle_set_driver() check if there is an already exist driver and unset it before return with -EBUSY. The next call will succeed as it's just unset. This is strange as we should either keep old driver and return -EBUSY or unset and set new driver and return 0. Signed-off-by: Zhenzhong Duan

Re: [PATCH v5 0/5] Add a unified parameter "nopvspin"

2019-10-12 Thread Zhenzhong Duan
The last two patches are reviewed, will any KVM expert be willing to review the first three patches? They are all KVM related changes. Thanks Zhenzhong On 2019/10/7 17:04, Zhenzhong Duan wrote: There are cases folks want to disable spinlock optimization for debug/test purpose. Xen and hyperv

Re: [PATCH] acpi: Mute gcc warning

2019-10-12 Thread Zhenzhong Duan
It's been a while on this patch,still see this warning in daily build. Will anybody be willing to review it? :) Thanks Zhenzhong On 2019/9/29 9:13, Zhenzhong Duan wrote: When build with "EXTRA_CFLAGS=-Wall" gcc warns: arch/x86/boot/compressed/acpi.c:29:30: warning: get_cmdline

[PATCH] cpuidle: cpu hotplug support

2019-10-12 Thread Zhenzhong Duan
no device for a non-existing CPU. At least cpuidle-haltpoll and intel_idle are making their own custom code to support cpu hotplug. This patch ease the work if we need to write a cpuidle driver with cpu hotplug support in the future. Signed-off-by: Zhenzhong Duan --- drivers/cpuidle/cpuidle.c

[PATCH v5 2/5] x86/kvm: Change print code to use pr_*() format

2019-10-08 Thread Zhenzhong Duan
pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng L

[PATCH v5 1/5] Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized"

2019-10-08 Thread Zhenzhong Duan
ge for XEN is in commit 090d54bcbc54 ("Revert "x86/paravirt: Set up the virt_spin_lock_key after static keys get initialized"") Signed-off-by: Zhenzhong Duan Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng Li Cc: Jim Mattson

[PATCH v5 5/5] x86/hyperv: Mark "hv_nopvspin" parameter obsolete

2019-10-08 Thread Zhenzhong Duan
Map "hv_nopvspin" to "nopvspin". Signed-off-by: Zhenzhong Duan Reviewed-by: Michael Kelley Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "

[PATCH v5 4/5] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-08 Thread Zhenzhong Duan
Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Boris Ostrovsky Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner

[PATCH v5 0/5] Add a unified parameter "nopvspin"

2019-10-08 Thread Zhenzhong Duan
etsov] PATCH2: new patch with print code change [Vitaly Kuznetsov] PATCH3: add Reviewed-by [Juergen Gross] Zhenzhong Duan (5): Revert "KVM: X86: Fix setup the virt_spin_lock_key before static key get initialized" x86/kvm: Change print code to use pr_*() fo

[PATCH v5 3/5] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-08 Thread Zhenzhong Duan
The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov C

checkpatch error

2019-10-07 Thread Zhenzhong Duan
eported defects, checkpatch may be able to   mechanically convert to the typical style using --fix or --fix-inplace. # cat 0001-Revert-KVM-X86-Fix-setup-the-virt_spin_lock_key-befo.patch From 5d90690ba0476cab223f5e1d13955858b9c91623 Mon Sep 17 00:00:00 2001 From: Zhenzhong Duan Date: Mon, 7

Re: [PATCH v4 1/4] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-07 Thread Zhenzhong Duan
On 2019/10/7 22:46, Boris Ostrovsky wrote: On 10/6/19 3:49 AM, Zhenzhong Duan wrote: On 2019/10/4 22:52, Boris Ostrovsky wrote: On 10/3/19 10:02 AM, Zhenzhong Duan wrote:   void __init kvm_spinlock_init(void)   { -    /* Does host kernel support KVM_FEATURE_PV_UNHALT

Re: [PATCH v4 3/4] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-06 Thread Zhenzhong Duan
On 2019/10/4 22:57, Boris Ostrovsky wrote: On 10/3/19 10:02 AM, Zhenzhong Duan wrote: Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: Boris Ostrovsky

Re: [PATCH v4 1/4] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-06 Thread Zhenzhong Duan
On 2019/10/4 22:52, Boris Ostrovsky wrote: On 10/3/19 10:02 AM, Zhenzhong Duan wrote: void __init kvm_spinlock_init(void) { - /* Does host kernel support KVM_FEATURE_PV_UNHALT? */ - if (!kvm_para_has_feature(KVM_FEATURE_PV_UNHALT)) - return

[PATCH v4 3/4] xen: Mark "xen_nopvspin" parameter obsolete

2019-10-04 Thread Zhenzhong Duan
Map "xen_nopvspin" to "nopvspin", fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borisl

[PATCH v4 2/4] x86/kvm: Change print code to use pr_*() format

2019-10-04 Thread Zhenzhong Duan
pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "kvm_guest: xxx" style. No functional change. Signed-off-by: Zhenzhong Duan Cc: Paolo Bonzini Cc: Radim Krcmar Cc: Sean Christopherson Cc: Vitaly Kuznetsov Cc: Wanpeng L

[PATCH v4 1/4] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-04 Thread Zhenzhong Duan
The new 'nopvspin' parameter will also replace Xen and Hyper-V specific parameters in future patches. Define variable nopvsin as global because it will be used in future patches as above. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov C

[PATCH v4 4/4] x86/hyperv: Mark "hv_nopvspin" parameter obsolete

2019-10-04 Thread Zhenzhong Duan
Map "hv_nopvspin" to "nopvspin". Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen Hemminger Cc: Sasha Levin Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin"

[PATCH v4 0/4] Add a unified parameter "nopvspin"

2019-10-04 Thread Zhenzhong Duan
ristopherson] v3: PATCH2: Fix indentation v2: PATCH1: pick the print code change into separate PATCH2, updated patch description [Vitaly Kuznetsov] PATCH2: new patch with print code change [Vitaly Kuznetsov] PATCH3: add Reviewed-by [Juergen Gross] Zhenzhong

Re: [PATCH v3 4/4] x86/hyperv: Mark "hv_nopvspin" parameter obsolete and map it to "nopvspin"

2019-10-03 Thread Zhenzhong Duan
On 2019/10/3 1:19, Sean Christopherson wrote: On Mon, Sep 30, 2019 at 08:44:39PM +0800, Zhenzhong Duan wrote: Includes asm/hypervisor.h in order to reference x86_hyper_type. Signed-off-by: Zhenzhong Duan Cc: Jonathan Corbet Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Cc: Stephen

Re: [PATCH v3 3/4] xen: Mark "xen_nopvspin" parameter obsolete and map it to "nopvspin"

2019-10-03 Thread Zhenzhong Duan
On 2019/10/3 1:18, Sean Christopherson wrote: On Mon, Sep 30, 2019 at 08:44:38PM +0800, Zhenzhong Duan wrote: Fix stale description of "xen_nopvspin" as we use qspinlock now. Signed-off-by: Zhenzhong Duan Reviewed-by: Juergen Gross Cc: Jonathan Corbet Cc: Boris Ostrovsky Cc: Juerge

Re: [PATCH v3 2/4] x86/kvm: Change print code to use pr_*() format

2019-10-03 Thread Zhenzhong Duan
On 2019/10/3 1:15, Sean Christopherson wrote: On Mon, Sep 30, 2019 at 08:44:37PM +0800, Zhenzhong Duan wrote: pr_*() is preferred than printk(KERN_* ...), after change all the print in arch/x86/kernel/kvm.c will have "KVM: xxx" style. No functional change. Suggested-by: Vitaly

Re: [PATCH v3 1/4] x86/kvm: Add "nopvspin" parameter to disable PV spinlocks

2019-10-03 Thread Zhenzhong Duan
On 2019/10/3 1:10, Sean Christopherson wrote: On Mon, Sep 30, 2019 at 08:44:36PM +0800, Zhenzhong Duan wrote: There are cases where a guest tries to switch spinlocks to bare metal behavior (e.g. by setting "xen_nopvspin" on XEN platform and "hv_nopvspin" on HYPER_V). Th

  1   2   3   4   5   >