lkml.org 
[lkml]   [2022]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/2] KVM: x86: Forbid KVM_SET_CPUID{,2} after KVM_RUN
    On Mon, 03 Jan 2022 09:04:29 +0100
    Vitaly Kuznetsov <vkuznets@redhat.com> wrote:

    > Paolo Bonzini <pbonzini@redhat.com> writes:
    >
    > > On 12/27/21 18:32, Igor Mammedov wrote:
    > >>> Tweaked and queued nevertheless, thanks.
    > >> it seems this patch breaks VCPU hotplug, in scenario:
    > >>
    > >> 1. hotunplug existing VCPU (QEMU stores VCPU file descriptor in parked cpus list)
    > >> 2. hotplug it again (unsuspecting QEMU reuses stored file descriptor when recreating VCPU)
    > >>
    > >> RHBZ:https://bugzilla.redhat.com/show_bug.cgi?id=2028337#c11
    > >>
    > >
    > > The fix here would be (in QEMU) to not call KVM_SET_CPUID2 again.
    > > However, we need to work around it in KVM, and allow KVM_SET_CPUID2 if
    > > the data passed to the ioctl is the same that was set before.
    >
    > Are we sure the data is going to be *exactly* the same? In particular,
    > when using vCPU fds from the parked list, do we keep the same
    > APIC/x2APIC id when hotplugging? Or can we actually hotplug with a
    > different id?

    If I recall it right, it can be a different ID easily.

    \
     
     \ /
      Last update: 2022-01-03 10:41    [W:2.041 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site