From nobody Mon Feb 9 23:01:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1529374333087214.80066581627568; Mon, 18 Jun 2018 19:12:13 -0700 (PDT) Received: from localhost ([::1]:38527 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV67v-0004he-DH for importer@patchew.org; Mon, 18 Jun 2018 22:12:11 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fV5hG-0000ni-UM for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fV5hF-0007zO-SS for qemu-devel@nongnu.org; Mon, 18 Jun 2018 21:44:38 -0400 Received: from mail-ot0-x241.google.com ([2607:f8b0:4003:c0f::241]:40769) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fV5hF-0007zB-Mu; Mon, 18 Jun 2018 21:44:37 -0400 Received: by mail-ot0-x241.google.com with SMTP id w9-v6so20744005otj.7; Mon, 18 Jun 2018 18:44:37 -0700 (PDT) Received: from localhost ([2600:1700:70:e488:b0ee:9bda:ee6f:91be]) by smtp.gmail.com with ESMTPSA id q23-v6sm10131771otd.25.2018.06.18.18.44.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Jun 2018 18:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=NQnr2tEHe1VXNjKBP7tf2rh8M6O8qDYmQa+JeJJs/sk=; b=SR5YZjAOjr7WCuS9LErdCY6QDAA452jSmxsDFhFqmsvb//PDEPg9wRnX6bQhRi0giQ 5ravscJTb8PS1v/uu7pISHGZoCJguseH1RyjF/XMsX3Qn9Ef0ss2lsg9MiyfqXRJbUs2 J3Qa00CPWreSioMVitlTZe4djA1l6UxRYCps2EpvhLy6nG1dvQ/wJ6khBC1xa0DgOIhr mcM0/l597QsHGK1a68kLGoCzQ6FPQz3TdZz6I6qCSzK8JzTljR0A7j466j5gBFu0349b NV+ugeaTPR084MR4Qp8L1eDA/dY/sijI2f8OHaiQz7cqES8S0lCQzD+uOqimwYTXEHxE RhSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=NQnr2tEHe1VXNjKBP7tf2rh8M6O8qDYmQa+JeJJs/sk=; b=tkMmUBbw3tlcy/MwkA15zoYs0pWdA7HfHAwQbgoOcXfMDPzaxeBkCwCggntshiei8b wDzmS15IjSNlZjk5PLVxKAPSgsU+Io7T1H/Y17vws9Xa1+oH/N+ElxKz0vWAxKqVSI34 1YO9Wir6J9+kFTKI+nCWj67Rq2es72ak9jC92pO+7X0YD0ZucoQTyjXGKgP+7EWvWD0L g0CepbY0R6PUzfNsKpSFRUZG4VwmByqnvMrSQKbvNeMi1ERMxzis8bIwO0JL5uwks5qT ND/vg7xTsIQV1iPW+DUXc/ydT/eRnwIwzX+NpAr/jDvZZDulrDHiax0L/YPIlyn9Ztv9 gXJA== X-Gm-Message-State: APt69E1majvu3pYtbse0dSPAKg/8b0Ae7cjUbUSslkGy2NPMNKlTFUon egkJ/upy2Tl/+yqLjy8Wo2htWR/D X-Google-Smtp-Source: ADUXVKISVIE3RnpvRTey5ygKW8504Gv4azxKcOivsi5pvvyLQF+dvs7FVdWvPWgtockNzhetG6cY5w== X-Received: by 2002:a9d:4696:: with SMTP id z22-v6mr9702804ote.57.1529372676526; Mon, 18 Jun 2018 18:44:36 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 18 Jun 2018 20:41:42 -0500 Message-Id: <20180619014319.28272-17-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> References: <20180619014319.28272-1-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::241 Subject: [Qemu-devel] [PATCH 016/113] spapr: make pseries-2.11 the default machine type X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-stable@nongnu.org, Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Greg Kurz The spapr capability framework was introduced in QEMU 2.12. It allows to have an explicit control on how host features are exposed to the guest. This is especially needed to handle migration between hetero- geneous hosts (eg, POWER8 to POWER9). It is also used to expose fixes/ workarounds against speculative execution vulnerabilities to guests. The framework was hence backported to QEMU 2.11.1, especially these commits: 0fac4aa93074 spapr: Add pseries-2.12 machine type 9070f408f491 spapr: Treat Hardware Transactional Memory (HTM) as an optional capability 0fac4aa93074 has the confusing effect of making pseries-2.12 the default machine type for QEMU 2.11.1, instead of the expected pseries-2.11. This patch changes the default machine back to pseries-2.11. Unfortunately, 9070f408f491 enforces the HTM capability for pseries-2.11. This isn't supported by TCG and breaks 'make check'. So this patch also adds a hack to turn HTM off when using TCG. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 4 ++-- hw/ppc/spapr_caps.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 1a2dd1f597..6499a86752 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3820,7 +3820,7 @@ static void spapr_machine_2_12_class_options(MachineC= lass *mc) /* Defaults for the latest behaviour inherited from the base class */ } =20 -DEFINE_SPAPR_MACHINE(2_12, "2.12", true); +DEFINE_SPAPR_MACHINE(2_12, "2.12", false); =20 /* * pseries-2.11 @@ -3842,7 +3842,7 @@ static void spapr_machine_2_11_class_options(MachineC= lass *mc) SET_MACHINE_COMPAT(mc, SPAPR_COMPAT_2_11); } =20 -DEFINE_SPAPR_MACHINE(2_11, "2.11", false); +DEFINE_SPAPR_MACHINE(2_11, "2.11", true); =20 /* * pseries-2.10 diff --git a/hw/ppc/spapr_caps.c b/hw/ppc/spapr_caps.c index 7b229517be..82043e60e7 100644 --- a/hw/ppc/spapr_caps.c +++ b/hw/ppc/spapr_caps.c @@ -285,6 +285,11 @@ static sPAPRCapabilities default_caps_with_cpu(sPAPRMa= chineState *spapr, =20 caps =3D smc->default_caps; =20 + /* HACK for 2.11.2: fix make check */ + if (tcg_enabled()) { + caps.caps[SPAPR_CAP_HTM] =3D SPAPR_CAP_OFF; + } + if (!ppc_check_compat(cpu, CPU_POWERPC_LOGICAL_2_07, 0, spapr->max_compat_pvr)) { caps.caps[SPAPR_CAP_HTM] =3D SPAPR_CAP_OFF; --=20 2.11.0