From patchwork Fri Mar 11 18:47:53 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 8568441 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 4CCB8C0554 for ; Fri, 11 Mar 2016 18:48:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA1D520211 for ; Fri, 11 Mar 2016 18:48:16 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DEA212022A for ; Fri, 11 Mar 2016 18:48:15 +0000 (UTC) Received: from localhost ([::1]:57171 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeS6g-0001uQ-4k for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 13:48:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeS6T-0001ph-SW for qemu-devel@nongnu.org; Fri, 11 Mar 2016 13:48:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeS6S-0002qe-9s for qemu-devel@nongnu.org; Fri, 11 Mar 2016 13:48:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43996) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeS6S-0002qT-5D for qemu-devel@nongnu.org; Fri, 11 Mar 2016 13:48:00 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id BA78E2DC353; Fri, 11 Mar 2016 18:47:59 +0000 (UTC) Received: from localhost (vpn1-4-76.gru2.redhat.com [10.97.4.76]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BIlwTA028249; Fri, 11 Mar 2016 13:47:59 -0500 From: Eduardo Habkost To: Peter Maydell Date: Fri, 11 Mar 2016 15:47:53 -0300 Message-Id: <1457722074-25406-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1457722074-25406-1-git-send-email-ehabkost@redhat.com> References: <1457722074-25406-1-git-send-email-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org, Paolo Bonzini , "Denis V. Lunev" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Richard Henderson Subject: [Qemu-devel] [PULL 1/2] hyperv: cpu hotplug fix with HyperV enabled X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Denis V. Lunev" With Hyper-V enabled CPU hotplug stops working. The CPU appears in device manager on Windows but does not appear in peformance monitor and control panel. The root of the problem is the following. Windows checks HV_X64_CPU_DYNAMIC_PARTITIONING_AVAILABLE bit in CPUID. The presence of this bit is enough to cure the situation. The bit should be set when CPU hotplug is allowed for HyperV VM. The check that hot_add_cpu callback is defined is enough from the protocol point of view. Though this callback is defined almost always thus there is no need to export that knowledge in the other way. Signed-off-by: Denis V. Lunev Reviewed-by: Roman Kagan CC: Paolo Bonzini CC: Richard Henderson CC: Eduardo Habkost CC: "Andreas Färber" Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- roms/SLOF | 2 +- roms/openbios | 2 +- target-i386/kvm.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roms/SLOF b/roms/SLOF index e3d0572..b4c9380 160000 --- a/roms/SLOF +++ b/roms/SLOF @@ -1 +1 @@ -Subproject commit e3d05727a074619fc12d0a67f05cf2c42c875cce +Subproject commit b4c93802a5b2c72f096649c497ec9ff5708e4456 diff --git a/roms/openbios b/roms/openbios index 0dbda5d..bd95e4c 160000 --- a/roms/openbios +++ b/roms/openbios @@ -1 +1 @@ -Subproject commit 0dbda5d935f95391d16431cd3c079fbf53d668df +Subproject commit bd95e4c193905d5ed867e96f1a720ce4cb53b59f diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 7974acb..08d6444 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -639,6 +639,7 @@ int kvm_arch_init_vcpu(CPUState *cs) if (cpu->hyperv_crash && has_msr_hv_crash) { c->edx |= HV_X64_GUEST_CRASH_MSR_AVAILABLE; } + c->edx |= HV_X64_CPU_DYNAMIC_PARTITIONING_AVAILABLE; if (cpu->hyperv_reset && has_msr_hv_reset) { c->eax |= HV_X64_MSR_RESET_AVAILABLE; }