From patchwork Mon Jul 17 21:24:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9846351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4B62E60392 for ; Mon, 17 Jul 2017 21:31:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F3B427F81 for ; Mon, 17 Jul 2017 21:31:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73FB728409; Mon, 17 Jul 2017 21:31:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id DA33D27F81 for ; Mon, 17 Jul 2017 21:31:44 +0000 (UTC) Received: from localhost ([::1]:52660 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXDcF-0004c4-Hu for patchwork-qemu-devel@patchwork.kernel.org; Mon, 17 Jul 2017 17:31:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXDWT-0008IF-KU for qemu-devel@nongnu.org; Mon, 17 Jul 2017 17:25:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXDWS-0003Yo-Fm for qemu-devel@nongnu.org; Mon, 17 Jul 2017 17:25:45 -0400 Received: from mail-qk0-x244.google.com ([2607:f8b0:400d:c09::244]:35330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXDWS-0003YS-5k for qemu-devel@nongnu.org; Mon, 17 Jul 2017 17:25:44 -0400 Received: by mail-qk0-x244.google.com with SMTP id z22so278532qka.2 for ; Mon, 17 Jul 2017 14:25:44 -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=bKjeI1vGMJ7UqsWgj8SMjKGm2Dk59QRuhpUojVZvOuA=; b=gY/e2ptI2Io8l1u4JyyRf4bJCE/8mfDFuEKeJCi9CO0URh0CcHNkZaj62dzyZj3Un4 M9CDRh97TTGfD3EebHNAnqyZ0VgUTK+qZR/LiY0q3t9iN2r4StjiSs0yMboHf0AbF4vE scJp4ctOV2oBdzME2dsCDCWNI7uDgNsg08EHe9KUzCb+i+f/8k9LpBI5XAIGbwkcmbgZ 0Gzi5B9kcplSwTTbAcbbUClWVRCMWR0fH5+MILg+JfX7JiypFoxADU90FwUNLsL8rWe3 V7mPDd60spQnr+Z6mbusuZMWzT0nVypWAfHls4Awbic0sCNQUYYnsrLM9XS1BvKQdqHi P4LQ== 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=bKjeI1vGMJ7UqsWgj8SMjKGm2Dk59QRuhpUojVZvOuA=; b=GUn3yPhDETnA4C58iEQeSFY11BwRg4QLwMNWZt2zasFB4x59A99rHGdYTWT9i3ANiy Iw3JwdBOxyRNggMPARUwQUytJSiswmqAuR+tZJDrcgVAFiXj47RQohwXfd4Aaleqswct vhnIOZKZNwsoBkkIW94mfM9G9oCDDIcHXxZWI/xU51SzbX/mqSynx4faiDA2iuLLk/uf H+xyyObdEAoukfkqi1jXPK8boRpFoc9dMm8M5CcaobhUFdW+hRn9TB2Q/CurAnI6oE3G VpH31AkHeIWKoKJAP30otnjC1EJpjNdGZpbZd745jvwLKo6XnEIjeo5Pu0SnxMLamgYi 1UCg== X-Gm-Message-State: AIVw110Lq8+jS/jBQ//TxPZO0V90nD/uRUjlBzfe69CAvk9q9vkqo2ow s+j/JnskmkyX6Ft0Vqk= X-Received: by 10.55.158.78 with SMTP id h75mr7362460qke.70.1500326743345; Mon, 17 Jul 2017 14:25:43 -0700 (PDT) Received: from bigtime.com ([101.165.234.197]) by smtp.gmail.com with ESMTPSA id o20sm282034qtc.23.2017.07.17.14.25.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 14:25:42 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Mon, 17 Jul 2017 11:24:45 -1000 Message-Id: <20170717212446.15268-8-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170717212446.15268-1-rth@twiddle.net> References: <20170717212446.15268-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c09::244 Subject: [Qemu-devel] [PULL v2 7/8] target/s390x: Allow to enable "idtes" feature for TCG 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: peter.maydell@linaro.org, David Hildenbrand Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: David Hildenbrand STFL bit 4 and 5 are just indications to the guest, which TLB entries an IDTE call will clear. These are performance indicators for the guest. STFL bit 4: INVALIDATE DAT TABLE ENTRY (IDTE) performs the invalidation-and-clearing operation by selectively clearing TLB segment-table entries when a segment-table entry or entries are invalidated. IDTE also performs the clearing-by- ASCE operation. Unless bit 4 is one, IDTE simply purges all TLBs. Bit 3 is one if bit 4 is one. We can simply set STFL bit 4 ("idtes") and still purge the complete TLB. Purging more than advertised is never bad. E.g. Linux doesn't even care about this bit. We can optimized this later. This is helpful, as the z9 base model contains this facility. STFL bit 5 (clearing TLB region-table-entries) was never implemented on real HW, therefore we can simply ignore it for now. Signed-off-by: David Hildenbrand Message-Id: <20170627161032.5014-1-david@redhat.com> Signed-off-by: Richard Henderson --- target/s390x/cpu_models.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 9e9e649..f4f73b8 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -779,6 +779,7 @@ static void add_qemu_cpu_model_features(S390FeatBitmap fbm) { static const int feats[] = { S390_FEAT_DAT_ENH, + S390_FEAT_IDTE_SEGMENT, S390_FEAT_STFLE, S390_FEAT_EXTENDED_IMMEDIATE, S390_FEAT_EXTENDED_TRANSLATION_2,