Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A5E7BC71135 for ; Mon, 16 Jun 2025 05:59:06 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.1016449.1393343 (Exim 4.92) (envelope-from ) id 1uR2ry-00081p-Fq; Mon, 16 Jun 2025 05:58:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 1016449.1393343; Mon, 16 Jun 2025 05:58:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uR2ry-00081i-Cz; Mon, 16 Jun 2025 05:58:58 +0000 Received: by outflank-mailman (input) for mailman id 1016449; Mon, 16 Jun 2025 05:58:57 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1uR2rx-0007qW-FK for xen-devel@lists.xenproject.org; Mon, 16 Jun 2025 05:58:57 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id fd39090b-4a76-11f0-a309-13f23c93f187; Mon, 16 Jun 2025 07:58:56 +0200 (CEST) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-ad56cbc7b07so592462066b.0 for ; Sun, 15 Jun 2025 22:58:56 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adec81c0135sm586975766b.47.2025.06.15.22.58.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 15 Jun 2025 22:58:55 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: fd39090b-4a76-11f0-a309-13f23c93f187 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1750053536; x=1750658336; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=jLx6ksudvbagyxfFpNwotUpr8FoEFp9Gcp/OrQhnumQ=; b=FsQ5/uf32Pn/dHblxY4DhSBliM/gc000gw/IPnjQsQKn5UTopoMR0rDg3iDcO4QejF LSFTjmC4GQemu52QLHXVOWluLgwQ+3P3/hLM7oiSLAKdwS43Qs13q/vsRKx0Ba1+xusN ogHV+9NapT3kmoWPmsVQ1K41D/byzQhHuhhOWdDavfAfNLjz/jtdmlMDtoIOFD2m8WEt 1grkZavyequkW0Hb5nCocLEtFw4Jj9AdVWVeWJYHyENsGtdGbHEZWGHb3BKUJhVK/1qj 54KOYYT45DCANqFlqBz7Es1jaMJmSTcu9XCB8o0GJgUu5eRb0QYuZREFPexC1snyK5A8 AHNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750053536; x=1750658336; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jLx6ksudvbagyxfFpNwotUpr8FoEFp9Gcp/OrQhnumQ=; b=fZLdXzNXPUcVy/rfFz6yumhbqI2ovKtLjB+A2wtZg6FRfI1pz7OnDRtRhpVz51YorA Kp0xyel2Rx3Drqz8oQ/BYjph3l+7PjGAMJSeSLqaovfuP11gtu21ZbaGYgLSdPwT5f1o 8ndqq8QR+nJVTNEqIEKZFKRzSiwl6QcmTKPV5h0e8S2X6cyjRT2tbZVWa1Zp/j3huzl7 CwHyzF8lqc29CZ11uT2r8JaRMOhJldObP73M73py+guPfFp28tO/qubl3ENzszswsFM/ g2+Q2gwMAVBEQ349jL+ZlwMc5Homhx99dAJZYQpC2coLDBxSNpdMDT8CO9kIKebU4017 cZoQ== X-Forwarded-Encrypted: i=1; AJvYcCVImwxaIvaJZQhOznAtE1i9/6FLyxeTOhfv7HR+DFjEgFxUFNTRBFw5tJ/LpzbQvhgogzKScHcN9bM=@lists.xenproject.org X-Gm-Message-State: AOJu0Yy0D+tA02xCMLbvd3qxFqixCZmXxj4mn01hWSAnL1ofZayxS2vw paGW1tao9IILPLVZ46XGvHdJLC2KUMaTA46MfLq3inCqNlrU3tdv6KMsshCbxUvrsg== X-Gm-Gg: ASbGncvJyGQ2/LKnDkeg7EPxXjAuK7R+BTDDYA96IM7gAexgC7n9hL9a5VEtYAJo2pA d8LU1utHwbULOMUUC4OLYJDUFH7xwO8zzrgS91nlwlzF4aVCyZGl1M4yvdej/DxkMrDeqPFj8AN LFiefIUOGdk4LyFmrwhysS3kVf8pk8krQHnmXL5UvndRmoPUESNDAyaB3BdJfpkzBZVA077DUoU l/jEb513FmabUIi0JK4UcHHj25UqehKgaq4L+hlWeH/osMulubiulWjFAPFmCDbuSBBBoG/YdYU lqCI8iuV8qEIhI7HKMJYauLT/Zcy4pnLvoHPqmazIFuHI2wPJlgfhHDoNg0F/DOFMHopQU0cFoV UZW4VIgl27GYlwLFuuDOdI7UaEVHg6V9hIHiFuOSl5JASSPA= X-Google-Smtp-Source: AGHT+IFBc/QwE3hNQaVSDohAWIhYtXzPRNtwq3XqNsyWmCEPomw3q4cdNPBwzKPsuHzwfCiE3s/FzQ== X-Received: by 2002:a17:907:3d8b:b0:ad2:43b6:dd75 with SMTP id a640c23a62f3a-adfad2a1ff8mr707130366b.10.1750053535746; Sun, 15 Jun 2025 22:58:55 -0700 (PDT) Message-ID: <3ef3ed9d-d6af-4621-ab4c-eb2ea88081b3@suse.com> Date: Mon, 16 Jun 2025 07:58:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 3/4] xen: Add DOMAIN_CAPS_DEVICE_MODEL & XEN_DOMCTL_CDF_device_model To: Stefano Stabellini Cc: Jason Andryuk , Christian Lindig , David Scott , Anthony PERARD , Andrew Cooper , Michal Orzel , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Bertrand Marquis , Volodymyr Babchuk , "Daniel P. Smith" , xen-devel@lists.xenproject.org References: <20250610225737.469690-1-jason.andryuk@amd.com> <20250610225737.469690-4-jason.andryuk@amd.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 14.06.2025 00:47, Stefano Stabellini wrote: > On Wed, 11 Jun 2025, Jan Beulich wrote: >> On 11.06.2025 00:57, Jason Andryuk wrote: >>> To add more flexibility in system configuration add the new >>> DOMAIN_CAPS_DEVICE_MODEL flag and XEN_DOMCTL_CDF_device_model. >>> >>> Thie new flag corresponds to allowing XSM_DM_PRIV for the domain. This >>> will enable running device model emulators (QEMU) from the assigne >>> domain for multiple target domains. >>> >>> Stubdoms assign target allowing the stubdom to serve as the device >>> model for a single domain. This new flag allows the single domain to >>> provide emulators for multiple guests. >>> >>> The specific scenario is a disaggregated system with the hardware domain >>> providing device models for muitple guest domains. >> >> Why the hardware domain? Unless a DM also needs access to some of the >> physical hardware, it ought to run in a separate domain. Conceivably >> such a domain could service multiply guests, so maybe the "single >> target" concept presently used for stubdom simply needed extending? > > Not necessarily. While it is possible to have driver domains, it is not > the default configuration. > > In a default configuration, the hardware domain gets all the hardware by > default and therefore will also run the PV backends and Virtio backends. > The Virtio backends require DM hypercalls. Let me elaborate further. > > In the datacenter, we have Dom0 typically with all the hardware, the > backends (PV and Virtio), and also the toolstack. Then all other domains > are created dynamically by the toolstack. Driver domains are possible > but not very common. > > In automotive/embedded, the total number of domains is static, so we can > create them using dom0less. We don't need the toolstack to create VMs. > Also, we have safety concerns, so we want to take away as much > privileges as possible from Dom0. At least purely by the wording, this ... > This is easy because thanks to > dom0less, we don't need the toolstack and we don't need to create VMs > dynamically. > > So the model is that Dom0 becomes the hardware domain: it has all the > drivers and backends but it is not privileged in the sense of > creating/destroying other VMs. If a user wants to have Dom0 "super > powers", they can create an optional Control Domain. The Control Domain > is expected to be tiny, such as XTF or Zephyr. It will have the ability > that Dom0 used to have but without the drivers. From a privilege > perspective, the Control Domain could create additional VMs, but in > automotive/embedded it is not expected to be a use-case because the > total number of VMs is still static. > > So your point about driver domains. Yes, one can have driver domains the > same way that one can have driver domains in the datacenter but it is > not the default. ... kind of contradicts this: Running e.g. qemu in Dom0 gives Dom0 quite a bit of extra privilege. (And no, the term "driver domain" does not describe a domain running DMs, imo.) Jan > The new default for embedded is what I described above > and I think it is a very widely applicable concept across industries: > automotive, industrial, robotics, etc. and also across vendors: AMD, > Xilinx, Renesas, EPAM, ARM, etc.