From patchwork Mon Apr 4 11:09:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Blanchard X-Patchwork-Id: 605844 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qdq8Y2JdDz9s4x for ; Mon, 4 Apr 2016 21:12:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=lists.ozlabs.org header.i=@lists.ozlabs.org header.b=X5o+xnCA; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=samba.org header.i=@samba.org header.b=At3N1QbY; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qdq8Y1GmvzDqHy for ; Mon, 4 Apr 2016 21:12:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.ozlabs.org; s=201601; t=1459768365; bh=nwfrOphrFubhk2fqp0DmBCZt13eouhNFlE+6hM/ldHU=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=X5o+xnCAf0nmG5KIpe7b+O+2zEGjLztuE7/QpM8l+UKxmaJb3RQ7FJAyTHmBbZpQL pf7od6auhxTbz4NLys+ZdFr45QpVRP1wUarjkwSK5Sfqf6zs0lYFLBCOXBNOiqryaU AI5Ke+/tzuNCBa7ZE5U8jwcM3UmuTx0S1DaTlutU= X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from hr2.samba.org (hr2.samba.org [IPv6:2a01:4f8:192:486::147:1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3qdq5F0KcCzDqF7 for ; Mon, 4 Apr 2016 21:09:53 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; secure) header.d=samba.org header.i=@samba.org header.b=At3N1QbY; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=samba.org; s=42627210; h=Message-ID:Cc:To:From:Date; bh=yaKN92tSPOiPYVvCzJztq1Jqy0NnfQSg+wuRYS6IzGc=; b=At3N1QbYvNwFfXdGgExCZHkc6WZep74MogvY0mfhNbODTMdx/yUsPdeG4YrZtHJOOhZBz7I63f8ySkhsGe2kShca9zYMwbfEDKwKruWaU663Z89L5I8QcbDexWo1/0xmyPXjdhzlKs+fWfKTZl7Tir8LXnG/OeiR0/rDA6eRVPU=; Received: from [127.0.0.2] (localhost [127.0.0.1]) by hr2.samba.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim) id 1an2O7-0007h5-NF; Mon, 04 Apr 2016 11:09:44 +0000 Date: Mon, 4 Apr 2016 21:09:28 +1000 To: Alexey Kardashevskiy , Michael Ellerman , Paul Mackerras , Benjamin Herrenschmidt , Michael Neuling , David Gibson , Alexander Graf Subject: [PATCH] spapr: Don't set the TM ibm,pa-features bit in PR KVM mode Message-ID: <20160404210928.0d9ae644@kryten> In-Reply-To: <20160404204346.1cf44df8@kryten> References: <20160404164457.539a55f0@kryten> <57021123.6050506@ozlabs.ru> <20160404204346.1cf44df8@kryten> X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Anton Blanchard via Linuxppc-dev Reply-To: Anton Blanchard Cc: qemu-ppc@nongnu.org, linuxppc-dev@lists.ozlabs.org, qemu-devel@nongnu.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" We don't support transactional memory in PR KVM, so don't tell the OS that we do. Signed-off-by: Anton Blanchard diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index e7be21e..538bd87 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -696,6 +696,12 @@ static void spapr_populate_cpu_dt(CPUState *cs, void *fdt, int offset, } else /* env->mmu_model == POWERPC_MMU_2_07 */ { pa_features = pa_features_207; pa_size = sizeof(pa_features_207); + + /* Don't enable TM in PR KVM mode */ + if (kvm_enabled() && + kvm_vm_check_extension(cs->kvm_state, KVM_CAP_PPC_GET_PVINFO)) { + pa_features[24] &= ~0x80; + } } if (env->ci_large_pages) { pa_features[3] |= 0x20;