From patchwork Thu Mar 2 19:53:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 94802 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp322951qgd; Thu, 2 Mar 2017 11:54:48 -0800 (PST) X-Received: by 10.237.37.165 with SMTP id x34mr19692579qtc.0.1488484488856; Thu, 02 Mar 2017 11:54:48 -0800 (PST) Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id t18si7691596qtc.335.2017.03.02.11.54.48 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 02 Mar 2017 11:54:48 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjWoI-0007z4-Gg for patch@linaro.org; Thu, 02 Mar 2017 14:54:46 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjWnG-0007xE-O2 for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjWnE-0002SR-36 for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:42 -0500 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:35590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjWnD-0002Rl-T7 for qemu-devel@nongnu.org; Thu, 02 Mar 2017 14:53:40 -0500 Received: by mail-wr0-x22d.google.com with SMTP id g10so60204629wrg.2 for ; Thu, 02 Mar 2017 11:53:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NfWq+gz6cUUsu5Ldmr/m3FwjQ6EOS/r0SfWGXWd8DyU=; b=QGcYPh1jkLuIxr1c4dgQk2VDE2/Vh5eN1eEcCwguhFa4mWZA/lWSQi7iVPjS9MwlMx XIYbuwfn6ung4p3cylufryIU7ILJ/KVp5rixLLaRwN7mskvWGmUDrDSRjxgMZG8db7R+ +Vr6zCCqAg+ZRXohruvXbDtHh8MeG1x0rJbBc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NfWq+gz6cUUsu5Ldmr/m3FwjQ6EOS/r0SfWGXWd8DyU=; b=PrN7Gpndl7IaTEbrzr9DdHimkRrvWDl/xh4h5AaApU+kWilwsUcnSeLHZDVKwgsqHW kygmbBCmVn2DuXioVLK2vqOo3zfZrj5VJjYApmtvW8vBUQ1KYLeC6N7aPNJ7h/xPRZIv 9oWDVhSx+Aaf3L8X1YTho3RquIfQUKq7Ga3JsT40OXPFgn00/TXqYBltf3Gbm8P76mb6 IEITn8oomIiov9kOgnq/oxc3tZ5sQ03DepY7H/UWly5kwO3l8DkopB9BH/6imhDFC1J3 ieNmrG6K1OvDTRSYVASXPDw5grj+vwaSr6H6TGGTGwtOiWpGbmHwysUvOkChrWQHU0P5 UrwA== X-Gm-Message-State: AMke39m1OE8Z1I0SesvWWQ4Wu3Bxqsli6p8ASwXAyyeoyCdkiQMaIjzuEXSVATyECi4CdkuW X-Received: by 10.223.150.211 with SMTP id u77mr14048537wrb.6.1488484416914; Thu, 02 Mar 2017 11:53:36 -0800 (PST) Received: from zen.linaro.local ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v196sm12435666wmv.5.2017.03.02.11.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 11:53:34 -0800 (PST) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaro.local (Postfix) with ESMTP id 1626D3E004E; Thu, 2 Mar 2017 19:53:37 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org, rth@twiddle.net, pbonzini@redhat.com Date: Thu, 2 Mar 2017 19:53:26 +0000 Message-Id: <20170302195337.31558-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::22d Subject: [Qemu-devel] [PATCH v2 00/11] MTTCG fixups for 2.9 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: mttcg@listserver.greensocs.com, nikunj@linux.vnet.ibm.com, a.rigo@virtualopensystems.com, qemu-devel@nongnu.org, cota@braap.org, bobby.prani@gmail.com, =?utf-8?q?Alex_Benn=C3=A9e?= , fred.konrad@greensocs.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi Peter, So perhaps predictably the merging of MTTCG has thrown up some issues during soft-freeze. The following patches fix up some of those: The following where in v1 and just have r-b tags: vl/cpus: be smarter with icount and MTTCG target/i386/cpu.h: declare TCG_GUEST_DEFAULT_MO cpus.c: add additional error_report when !TARGET_SUPPORT_MTTCG The next change downgrades the asserts to tcg_debug_asserts. This will reduce the instances of production builds failing on non-MTTCG enabled guests. The races still need to be fixed but you now have to --enable-debug-tcg to go hunting for them: translate: downgrade IRQ BQL asserts to tcg_debug_assert This never came up in my testing but it seems some guests can translate while doing a tlb_fill. The call to cpu_restore_state never worked before (as we are translating the block you are looking for) but by bugging out we avoid the double tb_lock(). translate-all: exit cpu_restore_state early if translating Then we have a bunch of fixes from the reports on the list. They are safe to merge but I'll leave that up to the maintainers. There may be an argument for holding these patches back until the guest is converted to be MTTCG aware and a full audit of the CPU<->HW emulation boundaries is done for each one: sparc/sparc64: grab BQL before calling cpu_check_irqs s390x/misc_helper.c: wrap IO instructions in BQL target/xtensa: hold BQL for interrupt processing target/mips/op_helper: hold BQL before calling cpu_mips_get_count Finally these are just tiny debug fixes while investigating the icount regression: target/arm/helper: make it clear the EC field is also in hex hw/intc/arm_gic: modernise the DPRINTF Going forward I think 1-5 are ready to be merged now. For 6-9 we should await decisions from the target maintainers. The last two are entirely up to you. It looks like the -icount regression is a poor interaction between icount timers and the BQL but this is going to require discussion with Paolo in the morning. Cheers, Alex Bennée (11): vl/cpus: be smarter with icount and MTTCG target/i386/cpu.h: declare TCG_GUEST_DEFAULT_MO cpus.c: add additional error_report when !TARGET_SUPPORT_MTTCG translate: downgrade IRQ BQL asserts to tcg_debug_assert translate-all: exit cpu_restore_state early if translating sparc/sparc64: grab BQL before calling cpu_check_irqs s390x/misc_helper.c: wrap IO instructions in BQL target/xtensa: hold BQL for interrupt processing target/mips/op_helper: hold BQL before calling cpu_mips_get_count target/arm/helper: make it clear the EC field is also in hex hw/intc/arm_gic: modernise the DPRINTF cpus.c | 11 +++++++---- hw/intc/arm_gic.c | 13 +++++++++---- hw/sparc/sun4m.c | 3 +++ hw/sparc64/sparc64.c | 3 +++ target/arm/helper.c | 2 +- target/i386/cpu.h | 3 +++ target/mips/op_helper.c | 17 ++++++++++++++--- target/s390x/misc_helper.c | 21 +++++++++++++++++++++ target/sparc/int64_helper.c | 3 +++ target/sparc/win_helper.c | 11 +++++++++++ target/xtensa/helper.c | 1 + target/xtensa/op_helper.c | 7 +++++++ translate-all.c | 9 ++++++++- translate-common.c | 3 ++- vl.c | 7 ++----- 15 files changed, 95 insertions(+), 19 deletions(-) -- 2.11.0