From patchwork Sat Jul 10 00:59:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 472313 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp803405jao; Fri, 9 Jul 2021 18:01:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzavt2l4aIZgDJA4MACRhlDv6Cdo8s+05O2wjEowHaS0/v2JN7MK0vmtwAzxJlRlfbhqZKX X-Received: by 2002:a9f:2b44:: with SMTP id q4mr17793307uaj.84.1625878884293; Fri, 09 Jul 2021 18:01:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625878884; cv=none; d=google.com; s=arc-20160816; b=0RQececRRXv0EydvffK0N9WwxtcEoBqFLYUAUZzHbpkPZ/2lRCWYVfk/3DSIodxRGl JsLizTvazmm5pZsr2OFAzqo7U+xHniO2u8pUIqjN06ypdw4qtSfCzAr/T2IYsu4L+x40 DV/f2sDQ4ShtuFS9dvg+3O7f8TfpoadHxY4xU5u4HHjyt35G8u1SxjotkADfwH5M0e4e BNpmT3aMV0j/4ZJeE49Fihmplg/3CvF60gGkoMFFGiAvXvzR5rDiqaSIvER/QBA1t3vO WhhzcU0juNSq0qNo6WIY4Xm9nEFeN5ywt3zWIX5wdcQ73UbX781bL4QImQ8x7cjZ1azD 8w8g== 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:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=Srsptr7gOEVf5hNWwohSD4JUGlIZ8+5cx0/Uy448QQA=; b=ZU8g66hLx9BYwseefD4k+hEaOfey0Dn+QCvkTUcm+UUPuVGE41hPKadYhbkh9kWHKh 6f6RgRtbynx7t7cG44Zx8k0QEquNSeXlIN3fdoHwEbAG6WZ5ARJyPHIeELoHR29EFv3C QNMQ/sD8Zw4soOu3DNjm6Psw4pJePkbDqut1biZW++R7kDP5ndA9Y/snuuQ/nSRu4O5N WEu2zLC8JQCnWCbjLMMo0sFS/OLSKTb8GkX193QA/3RkNV4INQO1oEJ+1ygFo3s+2gYj Rghwwka7Ksjg214MlbTYD8iea7dabz1LFSElb9/PvgmejTxMev12pHIGjhnazZFInvqf qgrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rUiYRTnD; 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 b13si30493vsf.22.2021.07.09.18.01.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Jul 2021 18:01:24 -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=rUiYRTnD; 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]:46728 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m21Mx-00012z-MF for patch@linaro.org; Fri, 09 Jul 2021 21:01:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m21LC-00012j-Si for qemu-devel@nongnu.org; Fri, 09 Jul 2021 20:59:34 -0400 Received: from mail-pf1-x42a.google.com ([2607:f8b0:4864:20::42a]:38629) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m21LB-0005au-8e for qemu-devel@nongnu.org; Fri, 09 Jul 2021 20:59:34 -0400 Received: by mail-pf1-x42a.google.com with SMTP id j9so4636125pfc.5 for ; Fri, 09 Jul 2021 17:59:32 -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:mime-version :content-transfer-encoding; bh=Srsptr7gOEVf5hNWwohSD4JUGlIZ8+5cx0/Uy448QQA=; b=rUiYRTnDXlL1MzQk3UAbazo9DgFfu0bwBBIemUIPqsN/7t+hgl5RPtiHt2HC8pICeH 6pCym4dctP4EEL94W87pYhOG9t6Munpoq2C6mFChmRejFHAAp0Rcp+3C8Jg49Rk42XFU MZjtHys4GXbiCa8yB07qnJVAomLkTrjMpXIMGPweilj1OVus5vjGXmEIl/+nn7Necx9v mUugjFf5ra0HATMpPozAmQQqBKlSREmUVUdWvh0/cvEI6EVl0G8jZe+dJKfD02UrR7+L WQhcSBP0uRt+gG7X28otr2U/VFZ73nHz2VaimarlKfaFj8s05/fIrBMbFO3IjbGihfWM 6T4w== 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=Srsptr7gOEVf5hNWwohSD4JUGlIZ8+5cx0/Uy448QQA=; b=lMNCDcpX/4wcZsZ68EsONq73KI9jV7uXTLJXCQW3NXxk3MFJzuaWXOiI9gXbN3yjsS iwcuKnsQueqq/ouF6Ecv2A9DPuVhbSR3eWm3TY6nqpOgzrBPzRRBoXFgmo658+ljuEnq Ii8XCDG4MnVHmmDJG1xA7MeJ2zijakunJRPi6H5n6hHtCS89vtU8m868x3o7wFMA2dkT yXz9kNBlDXpB8l5hJiZKMNBFkg4xBgrHPkXYuq+33EL+Y/3EiDky3hy4la37pApqcVPo YbZPe5ZFtuVIlZnLtiiJm4Khwf16CFoJEGcMQsKaTFUj0uM7XgnnlA5Z5xAZ0sSGxmMz OeTg== X-Gm-Message-State: AOAM530rbiIqE8h82nS0K01eVpqLxySGRZQZFDNDN3JjNGtAI2qT0qnm IZWqJ/jiEmhUEQwtNPTvLpE2AQ== X-Received: by 2002:a63:114d:: with SMTP id 13mr19750729pgr.180.1625878771148; Fri, 09 Jul 2021 17:59:31 -0700 (PDT) Received: from p14s.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id w2sm6420932pjq.5.2021.07.09.17.59.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Jul 2021 17:59:30 -0700 (PDT) From: Mathieu Poirier To: mst@redhat.com, alex.bennee@linaro.org Subject: [PATCH v3 0/4] virtio: Add vhost-user based RNG Date: Fri, 9 Jul 2021 18:59:25 -0600 Message-Id: <20210710005929.1702431-1-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::42a; envelope-from=mathieu.poirier@linaro.org; helo=mail-pf1-x42a.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This sets adds a vhost-user based random number generator (RNG), similar to what has been done for i2c and virtiofsd, with the implementation following the patterns already set forth in those. Applies cleanly to git://git.qemu.org/qemu.git master(05de778b5b8a). Thanks, Mathieu Mathieu Poirier (4): vhost-user-rng: Add vhost-user-rng implementation vhost-user-rng-pci: Add vhost-user-rng-pci implementation vhost-user-rng: backend: Add RNG vhost-user daemon implementation docs: Add documentation for vhost based RNG implementation ---- New for V3: - Rebased to latest master branch. - Fixed documentation warning. - Updated call to vhost_dev_init() to match new signature. - Dropped MAINTAINERS patch since it was already applied. docs/tools/index.rst | 1 + docs/tools/vhost-user-rng.rst | 74 +++++ hw/virtio/Kconfig | 5 + hw/virtio/meson.build | 2 + hw/virtio/vhost-user-rng-pci.c | 79 +++++ hw/virtio/vhost-user-rng.c | 294 +++++++++++++++++ include/hw/virtio/vhost-user-rng.h | 33 ++ tools/meson.build | 8 + tools/vhost-user-rng/50-qemu-rng.json.in | 5 + tools/vhost-user-rng/main.c | 403 +++++++++++++++++++++++ tools/vhost-user-rng/meson.build | 10 + 11 files changed, 914 insertions(+) create mode 100644 docs/tools/vhost-user-rng.rst create mode 100644 hw/virtio/vhost-user-rng-pci.c create mode 100644 hw/virtio/vhost-user-rng.c create mode 100644 include/hw/virtio/vhost-user-rng.h create mode 100644 tools/vhost-user-rng/50-qemu-rng.json.in create mode 100644 tools/vhost-user-rng/main.c create mode 100644 tools/vhost-user-rng/meson.build -- 2.25.1