From patchwork Sat Jul 1 20:25:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9820985 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 0009660375 for ; Sat, 1 Jul 2017 20:30:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E37C9283CA for ; Sat, 1 Jul 2017 20:30:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D62EC28419; Sat, 1 Jul 2017 20:30:44 +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 5BE7A283CA for ; Sat, 1 Jul 2017 20:30:44 +0000 (UTC) Received: from localhost ([::1]:55793 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dRP2R-0003XJ-Hn for patchwork-qemu-devel@patchwork.kernel.org; Sat, 01 Jul 2017 16:30:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dROyL-0001gx-Gu for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dROyK-0006o9-RM for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:29 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:34098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dROyK-0006o1-Ms for qemu-devel@nongnu.org; Sat, 01 Jul 2017 16:26:28 -0400 Received: by mail-qt0-x242.google.com with SMTP id m54so16673818qtb.1 for ; Sat, 01 Jul 2017 13:26:28 -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=yULRTX/EaRC7+QjpgWfZKBlP4MO3lDwcIXvehTH0rg8=; b=kfAbLp8EpvV0Nc0iWFwT991luNMqrnbuhSlBdu8hvl+fdhYnTPCo1w8YPf9RJsjJ8g zMilSa8JQK8aydbpFRycJOOc6+ySHBTMBDHYnxDq13BpCmylvd00SLYRt7zwop26irk+ xAU/KtrZL7qITgsTONnzhVA/v/NZZa34TEawIfMbg5VMUH6Gv3qiaMAC0+Ka9jw/9LTi j+TPCLARK/D9iFb9hAw/AAt8l6E6a7t9ade05iqJudcDzI6WD+5z2xJeZbMGeH/dXyQB JNYlV4AeJwpi6CGuKCFprAcrUGK2KcuCXgo7pEcJAiSx2pJi7wi/9XLRzwTdXybI8CI6 KxBg== 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=yULRTX/EaRC7+QjpgWfZKBlP4MO3lDwcIXvehTH0rg8=; b=fnc144yKZdsdcTqPLe5+ETx54PaWQHuOWsmmGI4Ud8T0NDCCYtiyQ+b5NA6n8nfZ7O GVr3lWaiUZcxOq83EM5LlJcB6kmHssd5rAsQgquCnNnXowMZRMLPngw/WBLcX6s7+V1H plwrOTnz2qHPxGvrZVafSUMUwFUEt6EgtWMTqQldcW5aHmRBC1xj7bebjzY8NPTS3WPO GgKbHagoMohzsHFfUf1QRhc394e0aYTIJj3Dl1TH/1iVGnXCDnntJ3cHyAUHczHrIfsb /hNfU14sDBiFqY9aTwCx5pbMQlWV5havpHtY1Ddv2ghufJ5XAhFnzgWMU5EP/bUYXtUH Jm2A== X-Gm-Message-State: AKS2vOwE6IyIc6n6zqamfLLq3vOMgipBOMkJk9yvLsIWNnCZiy8LlYqw rfd8GY5kMc5Wk6XbpiQ= X-Received: by 10.200.42.27 with SMTP id k27mr36173741qtk.40.1498940788045; Sat, 01 Jul 2017 13:26:28 -0700 (PDT) Received: from bigtime.twiddle.net.com (97-113-165-157.tukw.qwest.net. [97.113.165.157]) by smtp.gmail.com with ESMTPSA id f128sm8559985qkc.13.2017.07.01.13.26.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2017 13:26:27 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sat, 1 Jul 2017 13:25:59 -0700 Message-Id: <20170701202600.14057-8-rth@twiddle.net> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170701202600.14057-1-rth@twiddle.net> References: <20170701202600.14057-1-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH 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: aurelien@aurel32.net, david@redhat.com 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 91ef8eb..ca9168d 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -676,6 +676,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,