Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4481103imm; Fri, 18 May 2018 05:57:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpHZd7Y7c72zowicReaoTSS9I9ZrMBfMAIOWA3dLT2GKeOOso1typkxT6/oNaRa0pSm6f9u X-Received: by 2002:a63:784a:: with SMTP id t71-v6mr7504224pgc.382.1526648259294; Fri, 18 May 2018 05:57:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526648259; cv=none; d=google.com; s=arc-20160816; b=EWbEYS8oCESA++5R0PJrHWLo+YIjHiuY3ZPl00F4nsLZrGmCw6JHiM5lfKo39tclRd GlR5ZxnZ00bjvLecvm44J3Dxm/a+L/dkZlgLQYHeusIaoncLDFFGhznGEWBq+eTf6sto enJV3ueZvMf6y//Z9Jh7VSXRmHsqf/JgG5xA4OvjIOR98wS1vZpRMMIm8ug8Ue+t9FEk jn5Gi8JKUyomFVSgcKSwJO1fXwyWo8C3t3pKIyg6QPaDnj0pST1ejxRDq1D0nco/Hd2k 4W82IwxapopLb8GvSGgAnGj8HttlHFzpfbRWVnSJmidYNdCN0Pqc7AqQfFc9PKhUPwJv vJ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=d7myFZIgZbVOSFu8CEqFSGeVbKTt6u++0m/Glt+esqQ=; b=H8BzlUGtBaJ1RLtKWGKvvd+o+lIrV7NxFSW6rxq0CzQTZqD8te+tvS3xJERbAS5e9F vSVhkKXqqpWuP9hOvX64xsa377WT1w+Nk/4OaE33SLcHJKeT4lq8rIZgUAfCfgi/EroM 7k/LwuLI0hfizmfkvvoiSPqO/7uEkCP6zgy6Vvo2CX8r47Fcej9o6CmRhZXFG3zrmuZf PWi1A7dPchCoEMfPKPWxcaFklQbzSqod8U+gcrC4pkUWr3mePK4I6Lls9bIct7oeS2C5 2XNnJ29SDVCopZLmpQzYiEuk0E/np8XCLunQlmFV6nEuIOHq10g8b+yuB1bUBanSE4ij 0S8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G3p0j41H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d65-v6si7688127pfa.263.2018.05.18.05.57.24; Fri, 18 May 2018 05:57:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G3p0j41H; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752103AbeERMz1 (ORCPT + 99 others); Fri, 18 May 2018 08:55:27 -0400 Received: from mail-ot0-f180.google.com ([74.125.82.180]:41941 "EHLO mail-ot0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbeERMzZ (ORCPT ); Fri, 18 May 2018 08:55:25 -0400 Received: by mail-ot0-f180.google.com with SMTP id t1-v6so8959007oth.8; Fri, 18 May 2018 05:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=d7myFZIgZbVOSFu8CEqFSGeVbKTt6u++0m/Glt+esqQ=; b=G3p0j41HdLZWv2SaGIQNiGKzpETCW0d8cEpq1SslGlijRcHzAhNSbpfXtFUVYBJHcz EXo9tKFKnWES10T8EilzfQlGt+gT9GkA9nOwos5kgOHIk2EVUS2yO37t06983Zvhijos 3yocI9UxYCSTlkNtFbim/95X73m0Vb/PmH+c6MZMmc8liQ/DwNnQ7lwz0B6rQuAk2R2y uDK9GwKBU0gQ+QdPMDu0mXArkZIjlBF/Hr5yGE6Z+bUO+d+NIExUSCurCFiwYXwfhzUI 77ZKL+f3XH4RfK+9BesbCzT81Uh8N3mCfhPu3BXvz0R7+seP4g6Z7I/PSRB5URkwIqfD YyYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=d7myFZIgZbVOSFu8CEqFSGeVbKTt6u++0m/Glt+esqQ=; b=mV6+UiHzkm3C/voo5vb1Si524sllBVrWxr2L3Dqw6DLdTd9wxpEaW/lDMvc3/GGoaS F9S1V2h90sl6tTk3Ko6fKmcQykECVeJmH1NPUHutb1J/ntnjv6Whb/r9MZW5+kUDJURN RtCpgmpgbfrLZfq6PkdYKsVDS9ZeBlbf/ys1hJ6HoqAxmYI7DdOeQfVMLN3fsaSGJR4O 22Z0oYvTb5HXw8HtKUCUNrj1vBKu3byZduRiuKW3qZ9wqxAu7w/p27zMTWboh4dB1CMk 5Jfb7c252da1Y+zD6J+Eg+rnYgvOm0wyfG7mU8+ucVvgPfTb7wPvVBIesbUSZEY6XV91 5pOw== X-Gm-Message-State: ALKqPwcSXqLfhyiei8eEcTcegfOrGUZHSe1ElEsgSizgaCzHb0oWnVXI TO0b2f6+CtOH14hMOVAjuhOT2xkOrRxGP8ABIP0= X-Received: by 2002:a9d:4181:: with SMTP id p1-v6mr6675431ote.2.1526648124397; Fri, 18 May 2018 05:55:24 -0700 (PDT) MIME-Version: 1.0 Received: by 10.74.70.211 with HTTP; Fri, 18 May 2018 05:55:24 -0700 (PDT) In-Reply-To: <87y3ghf83r.fsf@vitty.brq.redhat.com> References: <20180516152131.30689-1-vkuznets@redhat.com> <87bmddgrex.fsf@vitty.brq.redhat.com> <8736ypgqie.fsf@vitty.brq.redhat.com> <87y3ghf83r.fsf@vitty.brq.redhat.com> From: Wanpeng Li Date: Fri, 18 May 2018 20:55:24 +0800 Message-ID: Subject: Re: [PATCH v4 0/8] KVM: x86: hyperv: PV TLB flush for Windows guests To: Vitaly Kuznetsov Cc: kvm , "the arch/x86 maintainers" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Roman Kagan , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , "Michael Kelley (EOSG)" , Mohammed Gamal , Cathy Avery , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-05-18 20:42 GMT+08:00 Vitaly Kuznetsov : > Wanpeng Li writes: > >> 2018-05-18 19:19 GMT+08:00 Vitaly Kuznetsov : >>> Vitaly Kuznetsov writes: >>> >>>> Wanpeng Li writes: >>>> >>>>> Hi Vitaly, >>>>> 2018-05-16 23:21 GMT+08:00 Vitaly Kuznetsov : >>>>>> Changes since v3 [Radim Krcmar]: >>>>>> - PATCH2 fixing 'HV_GENERIC_SET_SPARCE_4K' typo added. >>>>>> - PATCH5 introducing kvm_make_vcpus_request_mask() API added. >>>>>> - Fix undefined behavior for hv->vp_index >= 64. >>>>>> - Merge kvm_hv_flush_tlb() and kvm_hv_flush_tlb_ex() >>>>>> - For -ex case preload all banks with a single kvm_read_guest(). >>>>>> >>>>>> Description: >>>>>> >>>>>> This is both a new feature and a bugfix. >>>>>> >>>>>> Bugfix description: >>>>>> >>>>>> It was found that Windows 2016 guests on KVM crash when they have > 64 >>>>>> vCPUs, non-flat topology (>1 core/thread per socket; in case it has >64 >>>>>> sockets Windows just ignores vCPUs above 64) and Hyper-V enlightenments >>>>> >>>>> We try the below command line, the Windows 2016 guest successfully to >>>>> login and there are 80 vCPUs can be observed in the guest w/o the >>>>> patchset, why you mentioned the crash and ignore? >>>>> >>>>> /usr/local/bin/qemu-system-x86_64 -machine pc-i440fx-rhel7.3.0 -m >>>>> 8192 -smp 80,sockets=2,cores=40,threads=1 -device >>>>> ide-drive,bus=ide.0,drive=test -drive >>>>> id=test,if=none,file=/instanceimage/359b18ab-05bb-460d-9b53-89505bca68ed/359b18ab-05bb-460d-9b53-89505bca68ed_vda_1.qcow2 >>>>> -net nic,model=virtio -net user -monitor stdio -usb -usbdevice tablet >>>>> --enable-kvm --cpu host -vnc 0.0.0.0:2 >>>> >>>> Crash happens when you manifest yourself as Hyper-V, you can do this by >>>> adding any 'hv-*' feature (e.g. try '-cpu host,hv_vpindex'). >>> >>> Oh, and the 'ignore' happens when you pass more than 64 sockets >>> (somthing like "-smp 128,sockets=128,cores=1,threads=1") -- and this >>> happens regardless of Hyper-V enlightenments. But I guess it's just >>> because Windows doesn't support more than 64 sockets. >> >> Is there an option in the guest to avoid to check pvtlb support in hyperv? >> > > You mean to tell Windows to not use PV TLB flush when it's available? I > have no idea. My guess would be that it's left up to the hypervisor: if > the feature is available Windows will use it. I mean a way to work around Windows guest crash since there is no PV TLB flush enabled in product environment currently. Regards, Wanpeng Li