From patchwork Tue Jul 2 15:35:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eduardo Habkost X-Patchwork-Id: 168335 Delivered-To: patch@linaro.org Received: by 2002:ac9:6410:0:0:0:0:0 with SMTP id r16csp4123277ock; Tue, 2 Jul 2019 09:41:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwo5OhJM+yuHW79GMR1w5eyed2qExNr4U+kqz+iLeXMTJqQWKiF7F4cOtybtzIKqilrAccz X-Received: by 2002:a50:be01:: with SMTP id a1mr37497464edi.287.1562085698584; Tue, 02 Jul 2019 09:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562085698; cv=none; d=google.com; s=arc-20160816; b=jE7A5+b70sCQ+PNisZuTgQcUeNJzTrv70hLY3bfYlKcCfrJNLF/8mYle2NJ096v3Pr AtFyMg5d2wXithOM5I5vUBTL6QkRMjECjCa4E+B2EBFLZB489wHw4CLFgdSZMHvQVosR iPFxL4VtRZJku7XBa8HjlD9iOXM7ShoVIJuAFIsqesXH68d38xAz1EFkMCyrGaxIYUQ/ Ru4voYf+YmPQG9GCy+mykrHfgJ3gxIs19zji9GJVM1GkQina9ikYIgT5dZCcSMlR4k83 3/ZFgspQLzhtjyfIg003Fqp5yx8fVAB5GaOYE4AZ8+K3WDEreomoqSCxzf5nX5EjqWnf AZ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from; bh=LByaWuEsXdBwxEnu19XEi/XO5aCj/66zNDea4gXshYY=; b=eHqjLZtkbl3a/5gDD3sxd7zZmDAVmcRVRx2V7B/OhM5wF2vm1kqjYADxg0fXruZ/xw bVRBaQyVIIxEzuheCFDUpbKdS0uGujCiVogme3m5UO6zWaRe2LJaxf0yV406bbQymgiW hWBU5zt9WRIUSQ/hDP2y/OXId99niYb6YoxXkRypm81eUy1cFo6RBRxVO1ldmivQ1TS6 j/vXMcpKhdghTsu13RpRoXdNMkGZwQlCutZx6/9guOuKm4WwEz3tyulbjjArCsLgpkoL VEh80PiaO2r5iMROVhGxsjsRwWf+BJ9qH1mldAeBWXCUGLvYePiRMVXhBuntIy0eXH7B 2QZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k28si13166195ede.404.2019.07.02.09.41.38 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 02 Jul 2019 09:41:38 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from localhost ([::1]:55124 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiLqb-0008Mu-Ht for patch@linaro.org; Tue, 02 Jul 2019 12:41:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37585) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKpX-0007zc-Ht for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:36:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiKpS-00065d-1l for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:36:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiKpQ-00063P-S1 for qemu-devel@nongnu.org; Tue, 02 Jul 2019 11:36:21 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 91652308FFB1; Tue, 2 Jul 2019 15:36:19 +0000 (UTC) Received: from localhost (ovpn-116-30.gru2.redhat.com [10.97.116.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E6C9608BA; Tue, 2 Jul 2019 15:36:18 +0000 (UTC) From: Eduardo Habkost To: Peter Maydell , Paolo Bonzini , qemu-devel@nongnu.org, Marcel Apfelbaum , Richard Henderson Date: Tue, 2 Jul 2019 12:35:13 -0300 Message-Id: <20190702153535.9851-21-ehabkost@redhat.com> In-Reply-To: <20190702153535.9851-1-ehabkost@redhat.com> References: <20190702153535.9851-1-ehabkost@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Tue, 02 Jul 2019 15:36:19 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL v3 20/42] target/i386: fix feature check in hyperv-stub.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Vitaly Kuznetsov , =?utf-8?q?Alex_Benn=C3=A9e?= , Roman Kagan Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Alex Bennée Commit 2d384d7c8 broken the build when built with: configure --without-default-devices --disable-user The reason was the conversion of cpu->hyperv_synic to cpu->hyperv_synic_kvm_only although the rest of the patch introduces a feature checking mechanism. So I've fixed the KVM_EXIT_HYPERV_SYNIC in hyperv-stub to do the same feature check as in the real hyperv.c Signed-off-by: Alex Bennée Cc: Vitaly Kuznetsov Cc: Paolo Bonzini Cc: Roman Kagan Message-Id: <20190624123835.28869-1-alex.bennee@linaro.org> Reviewed-by: Vitaly Kuznetsov Acked-by: Paolo Bonzini Reviewed-by: Roman Kagan Signed-off-by: Eduardo Habkost --- target/i386/hyperv-stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0.rc1.1.g3f1ff2140 diff --git a/target/i386/hyperv-stub.c b/target/i386/hyperv-stub.c index fe548cbae2..0028527e79 100644 --- a/target/i386/hyperv-stub.c +++ b/target/i386/hyperv-stub.c @@ -15,7 +15,7 @@ int kvm_hv_handle_exit(X86CPU *cpu, struct kvm_hyperv_exit *exit) { switch (exit->type) { case KVM_EXIT_HYPERV_SYNIC: - if (!cpu->hyperv_synic) { + if (!hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) { return -1; }