Message ID | 20190510012458.22706-18-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:142:0:0:0:0 with SMTP id j2csp1735072ilr; Thu, 9 May 2019 18:44:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyPPiBfvRE7teUOOfpEWenAR6oNnCrJCQJUjfFCFVxOTZcsYFAmkl9dLPVja/5PqMiBXchd X-Received: by 2002:adf:ea86:: with SMTP id s6mr404555wrm.44.1557452694160; Thu, 09 May 2019 18:44:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557452694; cv=none; d=google.com; s=arc-20160816; b=bAXGw/UJJwlS7Y+2t+pzq6N/RNo4IKOa/B8QE7oJCL4qMVcA2nxewPC9jFoKJXHh7b BGMGpiEiO6yTzLFNhLHGp0uJfi5OW/u3Brj7NM7IBB2AyecyOveNYWNJTEy0anT/Fn2a 5YIuZBMqTuyKtv3VHb+JFLcWENkczOL3XUVnCXeoCvYiBAFPD07LISt0iTXj60SE7lOk 3ZA7QJWaUwn44bAMQxKNa/LTpYsudPgbNakJCalEXf0qP2YEmToQI7u0hokrC56QOiuW VL44jmO4Ia6QAQsjmU8qXnJjm6+ssBQ/NN2LdBB/K5csOqK6jDRwuKWcc4beDxWZNL5S ktxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=NqFQGLUWEK2q+OruuYLxByccY86fvPfXVx23TDmISjI=; b=GQ3wdmR32ReRxIQxbWu9tizkISd/UYBxMaOoKx/T7v7wr2yW+c7UnNF/xRRzCDJtCW awnWRFt5LY2GpV1lzlx8oMNuXwVTZejnrLFvv3fK9ZIDx1RVDyX0zbSrnLiBjG9F9tL0 YFhNkqh6Utjyovv6PLNCa6VpB1Grodj0umx+4H0lli2m4MA9hpaaBzen568vQ8fWp9JP XW6SlpZ46T65kKIE7dD0xCy8JVnjn/BeGh1syYrvKEjnO7HXlnCONXQPUBF7lHnmuLaQ /iQWUDdLdSk7Zqm84dlaFJXmGUIwiWFUGMjIEJok2aA0n1Q2tjTpxf7xcubzaGee1O/l r47A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PmKaoaZe; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id u124si2647319wmb.23.2019.05.09.18.44.53 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 09 May 2019 18:44:54 -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=fail header.i=@linaro.org header.s=google header.b=PmKaoaZe; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1]:35258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hOuaj-0006BB-6s for patch@linaro.org; Thu, 09 May 2019 21:44:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHr-0006MG-MD for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHq-0001HM-Gu for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:23 -0400 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]:44641) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1hOuHq-0001GO-Av for qemu-devel@nongnu.org; Thu, 09 May 2019 21:25:22 -0400 Received: by mail-pf1-x444.google.com with SMTP id g9so2244611pfo.11 for <qemu-devel@nongnu.org>; Thu, 09 May 2019 18:25:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NqFQGLUWEK2q+OruuYLxByccY86fvPfXVx23TDmISjI=; b=PmKaoaZexxoZh96Z5SSBy4MbrFYGDyGKI6XKBNjH7wuaKs10QNgrTo1r9QxWIm2Cxt o9BXZS6H/B/w1JbrIW62I5XQTVJ2JlkpYmG9vea9erBWiW8RnLJlcExHDm9tv4oWRvVy fn14ogW1auLxR6kQG1c07EiYK0NnlBTeh6377EL8KTopwKRG3l+gIsuBKJ6UTihSQioE r+HMobJf+sYB91Zk+V6XdadNcyhtm6c0ULvTP/pKGjhTt8SB6g6t8PXm1oAiaI/QlmsF F3jUIInF2+ic9gJ0zx/REhj82vTKXclXusWv6lzvAqUcitO/1FQs7rBqjnTDAZZSg1ft BMyw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=NqFQGLUWEK2q+OruuYLxByccY86fvPfXVx23TDmISjI=; b=mFfLX/azz4z0gdHbD8yk9OImpVoeLtCgXlNC+UrVzGmm/fOqSw5jdZUmvhqAKfPYT9 2xtcxdBr2V4K6jcbNdzVnuDvNHQqY7+SikXbDwI4p5usJ0d3nzlF2wLQrU3JrhR0Tla9 EgMyhH5TBuVIUVPA4k4iT9gaCueJtNBmTFk1l2kiOgEFJqMde/4m6QdCoueJhyI312gc OsqgNp5wWxIVzCixc+daSy6seSTRAfwhKx4KvmGCEEcZ3iteQkNHi547bO7yx+V6pRfM Mvz1aWI2jVuSsLXxM+sf5tZgOjUD61UP5wboWksHrW+dCGTY2yRaU/Bw2HlU1t4fuyTm fDyg== X-Gm-Message-State: APjAAAVgOlzajDOJsNFEKjlRzcW3yKkbzShRKsHXKvCgvH47TRRneOL8 uGzQIVu8jNzEMAYtdMdxJ9Hrgv1zSZs= X-Received: by 2002:aa7:842f:: with SMTP id q15mr9927856pfn.161.1557451521062; Thu, 09 May 2019 18:25:21 -0700 (PDT) Received: from localhost.localdomain (97-113-13-231.tukw.qwest.net. [97.113.13.231]) by smtp.gmail.com with ESMTPSA id n18sm8252700pfi.48.2019.05.09.18.25.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 May 2019 18:25:20 -0700 (PDT) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 9 May 2019 18:24:51 -0700 Message-Id: <20190510012458.22706-18-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190510012458.22706-1-richard.henderson@linaro.org> References: <20190510012458.22706-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::444 Subject: [Qemu-devel] [PATCH v5 17/24] aspeed/scu: Use qemu_guest_getrandom_nofail X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Andrew Jeffery <andrew@aj.id.au>, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
Add qemu_getrandom and ARMv8.5-RNG etc
|
expand
|
diff --git a/hw/misc/aspeed_scu.c b/hw/misc/aspeed_scu.c index c8217740ef..ab1e18ed4b 100644 --- a/hw/misc/aspeed_scu.c +++ b/hw/misc/aspeed_scu.c @@ -16,7 +16,7 @@ #include "qapi/visitor.h" #include "qemu/bitops.h" #include "qemu/log.h" -#include "crypto/random.h" +#include "qemu/guest-random.h" #include "trace.h" #define TO_REG(offset) ((offset) >> 2) @@ -157,14 +157,8 @@ static const uint32_t ast2500_a1_resets[ASPEED_SCU_NR_REGS] = { static uint32_t aspeed_scu_get_random(void) { - Error *err = NULL; uint32_t num; - - if (qcrypto_random_bytes((uint8_t *)&num, sizeof(num), &err)) { - error_report_err(err); - exit(1); - } - + qemu_guest_getrandom_nofail(&num, sizeof(num)); return num; }