[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANRm+Cw-DkVHU-q5cq1q6Md587Qu2n3utwNPx8gMJPCUw51zrA@mail.gmail.com>
Date: Thu, 28 Jan 2021 15:41:09 +0800
From: Wanpeng Li <kernellwp@...il.com>
To: Paolo Bonzini <pbonzini@...hat.com>
Cc: LKML <linux-kernel@...r.kernel.org>, kvm <kvm@...r.kernel.org>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Brijesh Singh <brijesh.singh@....com>
Subject: Re: [PATCH v2] KVM: kvmclock: Fix vCPUs > 64 can't be online/hotpluged
On Wed, 27 Jan 2021 at 08:28, Wanpeng Li <kernellwp@...il.com> wrote:
>
> On Wed, 27 Jan 2021 at 01:26, Paolo Bonzini <pbonzini@...hat.com> wrote:
> >
> > On 26/01/21 02:28, Wanpeng Li wrote:
> > > pingļ¼
> > > On Mon, 18 Jan 2021 at 17:08, Wanpeng Li <kernellwp@...il.com> wrote:
> > >>
> > >> From: Wanpeng Li <wanpengli@...cent.com>
> > >>
> > >> The per-cpu vsyscall pvclock data pointer assigns either an element of the
> > >> static array hv_clock_boot (#vCPU <= 64) or dynamically allocated memory
> > >> hvclock_mem (vCPU > 64), the dynamically memory will not be allocated if
> > >> kvmclock vsyscall is disabled, this can result in cpu hotpluged fails in
> > >> kvmclock_setup_percpu() which returns -ENOMEM. This patch fixes it by not
> > >> assigning vsyscall pvclock data pointer if kvmclock vdso_clock_mode is not
> > >> VDSO_CLOCKMODE_PVCLOCK.
> >
> > I am sorry, I still cannot figure out this patch.
> >
> > Is hotplug still broken if kvm vsyscall is enabled?
>
> Just when kvm vsyscall is disabled. :)
>
> # lscpu
> Architecture: x86_64
> CPU op-mode(s): 32-bit, 64-bit
> Byte Order: Little Endian
> CPU(s): 88
> On-line CPU(s) list: 0-63
> Off-line CPU(s) list: 64-87
>
> # cat /proc/cmdline
> BOOT_IMAGE=/vmlinuz-5.10.0-rc3-tlinux2-0050+ root=/dev/mapper/cl-root
> ro rd.lvm.lv=cl/root rhgb quiet console=ttyS0 LANG=en_US
> .UTF-8 no-kvmclock-vsyscall
>
> # echo 1 > /sys/devices/system/cpu/cpu76/online
> -bash: echo: write error: Cannot allocate memory
The original bug report is here.
https://bugzilla.kernel.org/show_bug.cgi?id=210213
Wanpeng
Powered by blists - more mailing lists