From patchwork Mon Aug 22 16:56:05 2022 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: 599196 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp1903424mae; Mon, 22 Aug 2022 12:17:20 -0700 (PDT) X-Google-Smtp-Source: AA6agR7vSbros3mJyiIhtNcVgPUbHcasK8YrpDPeigimQ4OJtL7eVuXMEhCff2QDR1xqzRK7jYZ5 X-Received: by 2002:a05:6214:27e4:b0:476:f199:40c with SMTP id jt4-20020a05621427e400b00476f199040cmr16624077qvb.118.1661195840781; Mon, 22 Aug 2022 12:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661195840; cv=none; d=google.com; s=arc-20160816; b=m60hjyo1R/7UY9ZqnAihZ//Low9InIt5R9sEI6o1ZpWRqebvg4FwI3vf/tccUzAAtg T7eWLQxxFWrooCeFDMimqmSjDPjtGMRVJNX+HvZqY3mbbsfVUNVoEGWCyszPLAQNQGxL hvqPU8LiM10ydAWDAg/ibD46QKnU2BPLJWqXeT5hy0L3ex/E319LIauB46cj0JtyEa2R Z7AbUWSuz/c+W1DXxoW5KSAXVPMkbaMDLf8HtAV7BVkUbeZEPnMIukdXF8LSqE5iAGN3 fNQeBv38ul1IzHdGYqMhyVrFTf/BzvdJRDDIwD1sXRe/8/qcpi3FvIdLsaH+9z6RJ5zT B/Sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=QjQUv7sIYW2ZLqYfMzD+9aob4dpIVdREF3LrFmbU6pU=; b=z+tD0LIEZrTRdCYyP5xYrmXwtG89vI4st9FK35JmV3xcaHOwEQpBb/LBgTw2QNHvtI 9Q20FrY0d1IWorwMRT2B5X/hciLfY7NrQEedJKueiGqoLbLIOJbp6SyhqjYD/FlfxHTr iPbLsotJOBgHIAIW7hKl4iQhbHbb/mpGBzeV8KkJgJR/cRdGRVCsLvq+8fZEt+c8HGYx gYM2pDpr3yTTOVvGJ3qVGXGW6qQBgC8dWQoN9zq6GmQkyc1rOPpJsALy8WmHJkWypaln oBnxf0GzMSL5N6J1NRSR9AbA9p4A3xHSXeged+B3v9K8YQjUWRmxlW6HEa7Q8uwAyAAU 3M8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=krH7RFoH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id t21-20020a05620a451500b006bae7e78f96si5411373qkp.676.2022.08.22.12.17.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 Aug 2022 12:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=krH7RFoH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56328 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQCvI-0004zJ-Bm for patch@linaro.org; Mon, 22 Aug 2022 15:17:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQAil-0008K9-Hd for qemu-devel@nongnu.org; Mon, 22 Aug 2022 12:56:15 -0400 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]:38676) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQAij-0005zp-MN for qemu-devel@nongnu.org; Mon, 22 Aug 2022 12:56:15 -0400 Received: by mail-ed1-x52c.google.com with SMTP id a22so14733236edj.5 for ; Mon, 22 Aug 2022 09:56:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=QjQUv7sIYW2ZLqYfMzD+9aob4dpIVdREF3LrFmbU6pU=; b=krH7RFoH5ZlPJCB7xbFT1asc8YC+ll2lWWC1EP0DYgpRt1/psURxHpjM+tMNfDZgX5 BAbZpZuMlAv+/Q16qOUZ/m91/cZ4UWQEz6AGZE1YcKvnbrNsOo3FOlTjJdaFizhv71k9 oO93yY/9aCkJIZqzlFjqJYVbv7WXAEC3CwfgX6ngOK6zNpTF7UYbi6jE6NHb8Vxb/7gc nV9SrCjrf8hEPhqvprfc0xZvm/IVIsWF/AM4JGYTLYJoNtHJcTqpz4MAGWkJZcTawynf q5blUzZ8nlECKMWU+UaYRHl/zV8SY5yEVs2BFHLyFCJQFSuL115LKonBaviTIFDg0PqB hClg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=QjQUv7sIYW2ZLqYfMzD+9aob4dpIVdREF3LrFmbU6pU=; b=BL2SGGv/fTBEmKTHW2bvMZwO68K277igUv+d6N4meiueBxJsdIikfNFKmMlp+jWRad iB0HRgKUb6/bBAfqeAqeDYv5FiW2R/i4ZHtQ4l+1P1YEdjPNTO56qeROD+wKjeke9xmq kTCpSa7Lr5o1XN257pfLgY62F8uz9kpThuVEH4rqbTDgtEJm4cHbaKqc15rcBjtKKFD3 efDTh+hEp0HB1ocRgrb4IPYjZpslfMEgR+Aj17RKPOD4uNe6Mm1YSBbElt4dz6XAhSGE cB25kYMJdwRBD3I7nqGy05UEypvEyxEdmkFNOid+XpwUi+lel0IuXZWepzYZWBit6ZSL i+cQ== X-Gm-Message-State: ACgBeo0Y8OqqRDECEwkctNa5Dx+P7gPqGmX/b56VVtF6NTSg7hFpt3ex hWWMP0iB8ad9fxk5D3mwPyrIpA== X-Received: by 2002:a50:fe91:0:b0:43d:c97d:1b93 with SMTP id d17-20020a50fe91000000b0043dc97d1b93mr81285edt.67.1661187372207; Mon, 22 Aug 2022 09:56:12 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id j2-20020a17090623e200b00730bbd81646sm6417342ejg.87.2022.08.22.09.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 09:56:10 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 34F4B1FFBB; Mon, 22 Aug 2022 17:56:09 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , =?utf-8?q?Ale?= =?utf-8?q?x_Benn=C3=A9e?= , Juan Quintela , "Dr. David Alan Gilbert" Subject: [PATCH v1 3/6] tests/migration/aarch64: Speed up the aarch64 migration test Date: Mon, 22 Aug 2022 17:56:05 +0100 Message-Id: <20220822165608.2980552-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220822165608.2980552-1-alex.bennee@linaro.org> References: <20220822165608.2980552-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52c; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Thomas Huth The migration tests spend a lot of time waiting for a sign of live of the guest on the serial console. The aarch64 migration code only outputs "B"s every couple of seconds (at least it takes more than 4 seconds between each characeter on my x86 laptop). There are a lot of migration tests, and if each test that checks for a successful migration waits for these characters before and after migration, the wait time sums up to multiple minutes! Let's use a shorter delay to speed things up. While we're at it, also remove a superfluous masking with 0xff - we're reading and storing bytes, so the upper bits of the register do not matter anyway. With these changes, the test runs twice as fast on my laptop, decreasing the total run time from approx. 8 minutes to only 4 minutes! Signed-off-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Message-Id: <20220819053802.296584-3-thuth@redhat.com> Signed-off-by: Alex Bennée --- tests/migration/aarch64/a-b-kernel.h | 10 +++++----- tests/migration/aarch64/a-b-kernel.S | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/migration/aarch64/a-b-kernel.h b/tests/migration/aarch64/a-b-kernel.h index 0a9b01137e..34e518d061 100644 --- a/tests/migration/aarch64/a-b-kernel.h +++ b/tests/migration/aarch64/a-b-kernel.h @@ -10,9 +10,9 @@ unsigned char aarch64_kernel[] = { 0x03, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x00, 0x39, 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0xad, 0xff, 0xff, 0x54, 0x05, 0x00, 0x80, 0x52, 0xe4, 0x03, 0x00, 0xaa, 0x83, 0x00, 0x40, 0x39, - 0x63, 0x04, 0x00, 0x11, 0x63, 0x1c, 0x00, 0x12, 0x83, 0x00, 0x00, 0x39, - 0x24, 0x7e, 0x0b, 0xd5, 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, - 0x2b, 0xff, 0xff, 0x54, 0xa5, 0x04, 0x00, 0x11, 0xa5, 0x1c, 0x00, 0x12, - 0xbf, 0x00, 0x00, 0x71, 0x81, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52, - 0x43, 0x00, 0x00, 0x39, 0xf1, 0xff, 0xff, 0x17 + 0x63, 0x04, 0x00, 0x11, 0x83, 0x00, 0x00, 0x39, 0x24, 0x7e, 0x0b, 0xd5, + 0x84, 0x04, 0x40, 0x91, 0x9f, 0x00, 0x01, 0xeb, 0x4b, 0xff, 0xff, 0x54, + 0xa5, 0x04, 0x00, 0x11, 0xa5, 0x10, 0x00, 0x12, 0xbf, 0x00, 0x00, 0x71, + 0xa1, 0xfe, 0xff, 0x54, 0x43, 0x08, 0x80, 0x52, 0x43, 0x00, 0x00, 0x39, + 0xf2, 0xff, 0xff, 0x17 }; diff --git a/tests/migration/aarch64/a-b-kernel.S b/tests/migration/aarch64/a-b-kernel.S index 0225945348..a4103ecb71 100644 --- a/tests/migration/aarch64/a-b-kernel.S +++ b/tests/migration/aarch64/a-b-kernel.S @@ -53,7 +53,6 @@ innerloop: /* increment the first byte of each page by 1 */ ldrb w3, [x4] add w3, w3, #1 - and w3, w3, #0xff strb w3, [x4] /* make sure QEMU user space can see consistent data as MMU is off */ @@ -64,7 +63,7 @@ innerloop: blt innerloop add w5, w5, #1 - and w5, w5, #0xff + and w5, w5, #0x1f cmp w5, #0 bne mainloop