From nobody Wed Dec 17 21:51:18 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612950357; cv=none; d=zohomail.com; s=zohoarc; b=F/+JQ/ClFL0FRBKPvvnWEHKdvSnJUu5+NOV61kbP51PcPB5SjV1WJitWiK/Kk4kFt1we05XVHdtPqXjCS4uGss59+AegKuAQNeiwvBAskQ7ovzZ3KJS9UHBLPblugQjBDaymeSQM7c2ZNNQwHp8KeEviM+zl8sdJHGjPx2cA4l4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612950357; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qusdGUvJRfUArz9VEKmIEc5pyvqsCVc0zRjN4WyQ0Gc=; b=dP2l6KcR2ETzz9kLvH97je8r45X3QWaE0jNITi9LjrN/E03Fw7HWg6Wm63Kqs2mgzYb6t9wQo0bw9BDr4GdMyIZN5C67W89IWgMPWYT//Xb/9XjsYvvIxDkrQWcKGQwXXRFhoct473gpcszXRs2YqnuCQvdbpTw4ASIjPR+FBXQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1612950357348654.441829921327; Wed, 10 Feb 2021 01:45:57 -0800 (PST) Received: from localhost ([::1]:53190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9m4J-0004Ix-VW for importer@patchew.org; Wed, 10 Feb 2021 04:45:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:56012) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9lnF-000316-OY for qemu-devel@nongnu.org; Wed, 10 Feb 2021 04:28:17 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:44442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1l9lnB-00066r-Km for qemu-devel@nongnu.org; Wed, 10 Feb 2021 04:28:17 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-344-fjn1qCTDPO-Ef1SjZOZtnA-1; Wed, 10 Feb 2021 04:28:10 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2AAFF8710E5; Wed, 10 Feb 2021 09:28:09 +0000 (UTC) Received: from localhost (ovpn-115-120.ams2.redhat.com [10.36.115.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7173719486; Wed, 10 Feb 2021 09:27:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612949293; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qusdGUvJRfUArz9VEKmIEc5pyvqsCVc0zRjN4WyQ0Gc=; b=P6lOHbdrQZeXGy/2b7LfdQ6V2iy+QEJ6YE+xLWUErDdB6B/6UYxCxIGGDw7LjpvvBt/yFt UBSB5jvwjwjKaWks+k2q6/ESD5BKfGAs3hIjo2LA87baVhaauQoVwcJduEKMn6mtlU7bY7 gUgDr2Ct+7yT7QAwQCrKVrmMICdYVZY= X-MC-Unique: fjn1qCTDPO-Ef1SjZOZtnA-1 From: Stefan Hajnoczi To: Peter Maydell , qemu-devel@nongnu.org Subject: [PULL v4 08/27] multi-process: add configure and usage information Date: Wed, 10 Feb 2021 09:26:09 +0000 Message-Id: <20210210092628.193785-9-stefanha@redhat.com> In-Reply-To: <20210210092628.193785-1-stefanha@redhat.com> References: <20210210092628.193785-1-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=stefanha@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=63.128.21.124; envelope-from=stefanha@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -15 X-Spam_score: -1.6 X-Spam_bar: - X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.57, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MIME_BASE64_TEXT=1.741, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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: Fam Zheng , John G Johnson , thuth@redhat.com, Jagannathan Raman , Eduardo Habkost , qemu-block@nongnu.org, "Michael S. Tsirkin" , "Denis V. Lunev" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Hajnoczi , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Wainer dos Santos Moschetta , Elena Ufimtseva , Igor Mammedov , Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Elena Ufimtseva Adds documentation explaining the command-line arguments needed to use multi-process. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi Message-id: 49f757a84e5dd6fae14b22544897d1124c5fdbad.1611938319.git.jag.ram= an@oracle.com [Move orphan docs/multi-process.rst document into docs/system/ and add it to index.rst to prevent Sphinx "document isn't included in any toctree" error. --Stefan] Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 1 + docs/system/index.rst | 1 + docs/system/multi-process.rst | 64 +++++++++++++++++++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 docs/system/multi-process.rst diff --git a/MAINTAINERS b/MAINTAINERS index ddff8d25e8..1658397762 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3206,6 +3206,7 @@ M: Jagannathan Raman M: John G Johnson S: Maintained F: docs/devel/multi-process.rst +F: docs/system/multi-process.rst =20 Build and test automation ------------------------- diff --git a/docs/system/index.rst b/docs/system/index.rst index d40f72c92b..625b494372 100644 --- a/docs/system/index.rst +++ b/docs/system/index.rst @@ -34,6 +34,7 @@ Contents: pr-manager targets security + multi-process deprecated removed-features build-platforms diff --git a/docs/system/multi-process.rst b/docs/system/multi-process.rst new file mode 100644 index 0000000000..46bb0cafc2 --- /dev/null +++ b/docs/system/multi-process.rst @@ -0,0 +1,64 @@ +Multi-process QEMU +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +This document describes how to configure and use multi-process qemu. +For the design document refer to docs/devel/qemu-multiprocess. + +1) Configuration +---------------- + +multi-process is enabled by default for targets that enable KVM + + +2) Usage +-------- + +Multi-process QEMU requires an orchestrator to launch. + +Following is a description of command-line used to launch mpqemu. + +* Orchestrator: + + - The Orchestrator creates a unix socketpair + + - It launches the remote process and passes one of the + sockets to it via command-line. + + - It then launches QEMU and specifies the other socket as an option + to the Proxy device object + +* Remote Process: + + - QEMU can enter remote process mode by using the "remote" machine + option. + + - The orchestrator creates a "remote-object" with details about + the device and the file descriptor for the device + + - The remaining options are no different from how one launches QEMU with + devices. + + - Example command-line for the remote process is as follows: + + /usr/bin/qemu-system-x86_64 \ + -machine x-remote \ + -device lsi53c895a,id=3Dlsi0 = \ + -drive id=3Ddrive_image2,file=3D/build/ol7-nvme-test-1.qcow2 = \ + -device scsi-hd,id=3Ddrive2,drive=3Ddrive_image2,bus=3Dlsi0.0,scsi-i= d=3D0 \ + -object x-remote-object,id=3Drobj1,devid=3Dlsi1,fd=3D4, + +* QEMU: + + - Since parts of the RAM are shared between QEMU & remote process, a + memory-backend-memfd is required to facilitate this, as follows: + + -object memory-backend-memfd,id=3Dmem,size=3D2G + + - A "x-pci-proxy-dev" device is created for each of the PCI devices emul= ated + in the remote process. A "socket" sub-option specifies the other end of + unix channel created by orchestrator. The "id" sub-option must be spec= ified + and should be the same as the "id" specified for the remote PCI device + + - Example commandline for QEMU is as follows: + + -device x-pci-proxy-dev,id=3Dlsi0,socket=3D3 --=20 2.29.2