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 CC932CDB474 for ; Tue, 17 Oct 2023 10:16:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.618193.961548 (Exim 4.92) (envelope-from ) id 1qsh7L-0005G5-Nz; Tue, 17 Oct 2023 10:16:03 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 618193.961548; Tue, 17 Oct 2023 10:16:03 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qsh7L-0005Fy-LG; Tue, 17 Oct 2023 10:16:03 +0000 Received: by outflank-mailman (input) for mailman id 618193; Tue, 17 Oct 2023 10:16:03 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qsh7L-0005Fs-1S for xen-devel@lists.xenproject.org; Tue, 17 Oct 2023 10:16:03 +0000 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [2a00:1450:4864:20::52b]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 2b08c937-6cd6-11ee-9b0e-b553b5be7939; Tue, 17 Oct 2023 12:15:59 +0200 (CEST) Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-53d8320f0easo9380164a12.3 for ; Tue, 17 Oct 2023 03:15:59 -0700 (PDT) Received: from [10.80.67.28] (default-46-102-197-194.interdsl.co.uk. [46.102.197.194]) by smtp.gmail.com with ESMTPSA id c14-20020a50f60e000000b0053dff5568acsm951092edn.58.2023.10.17.03.15.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Oct 2023 03:15:59 -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: 2b08c937-6cd6-11ee-9b0e-b553b5be7939 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1697537759; x=1698142559; darn=lists.xenproject.org; h=in-reply-to:autocrypt:references:cc:to:content-language:subject :from:user-agent:mime-version:date:message-id:from:to:cc:subject :date:message-id:reply-to; bh=x1xnZKfx94PXTI1sJ4b4vYHEkGEOy/fo3hPTelC5fWI=; b=VszHHtB131C7Au8jWcySgstXWTUJB+nByN7VWJ/ZOlPDdbPtWadSjGYDHFXgsFZZYl wkHZFRS0VGebxuJO90n7b2inl9vOvUB4PQYXiHyu81iM/DSEQABhO7HjX5y417NY2YVP GndsiNBGw5//Zq0lOivENqNSjeY1FK15r4DZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697537759; x=1698142559; h=in-reply-to:autocrypt:references:cc:to:content-language:subject :from:user-agent:mime-version:date:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=x1xnZKfx94PXTI1sJ4b4vYHEkGEOy/fo3hPTelC5fWI=; b=SruQ45egqwjXc7wPhxjthMqMtMYCyTptEwdnidh3+jyZuzIOdsE2fiWyg3/mpkjVsZ JyTpH/Zruf3A3kKSe9I+zgKUfoPIb1WIFRSZJlIbSKnG0NWK5AGd3lXfpt77eW5BgBMM YSGJJqu+Qx7+oNy9PKaRV527OObZxFUh32A5lVn5Hw2RrMZRNSekkp54dSoOTSoQlpLp zQkZz4Ng09jLrM7VRSQBx2JPgFeTa8jI0jpT2jM1Wny6L6xOMFF3xOhGqUvrdP/EEteT ub82wAthM7h8cdPraSp8VC8+5c0+fJuO8CBY7LWXp4RP7XMBJtp5NXeIi5UqdHCMV+y0 o0oA== X-Gm-Message-State: AOJu0YyPYPaKlPnsUs9dPEzTD6gGjrhdbagPSSPhNDMN1YKufmbGovmU H+YEUlTNatTwagL3dIXuL/SPlA== X-Google-Smtp-Source: AGHT+IGSkATtRyRlc1+vtXS97+qpUqoqfHpa0SjgaJEtkzyIXeCeo8ZRFDkgYw2sOsFik9KUU2KcuQ== X-Received: by 2002:a50:9fad:0:b0:53f:25c4:357f with SMTP id c42-20020a509fad000000b0053f25c4357fmr525378edf.34.1697537759265; Tue, 17 Oct 2023 03:15:59 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------ZLVQ3yYJP0EqtKlsJ8yJvoc1" Message-ID: Date: Tue, 17 Oct 2023 11:15:58 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Andrew Cooper Subject: Re: [PATCH for-4.18] docs/sphinx: Lifecycle of a domid Content-Language: en-GB To: Jan Beulich Cc: George Dunlap , Stefano Stabellini , Wei Liu , Julien Grall , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= , Juergen Gross , Henry Wang , Xen-devel References: <20231016162450.1286178-1-andrew.cooper3@citrix.com> <90e657ad-4109-442e-2b26-52cd2372f582@suse.com> Autocrypt: addr=andrew.cooper3@citrix.com; keydata= xsFNBFLhNn8BEADVhE+Hb8i0GV6mihnnr/uiQQdPF8kUoFzCOPXkf7jQ5sLYeJa0cQi6Penp VtiFYznTairnVsN5J+ujSTIb+OlMSJUWV4opS7WVNnxHbFTPYZVQ3erv7NKc2iVizCRZ2Kxn srM1oPXWRic8BIAdYOKOloF2300SL/bIpeD+x7h3w9B/qez7nOin5NzkxgFoaUeIal12pXSR Q354FKFoy6Vh96gc4VRqte3jw8mPuJQpfws+Pb+swvSf/i1q1+1I4jsRQQh2m6OTADHIqg2E ofTYAEh7R5HfPx0EXoEDMdRjOeKn8+vvkAwhviWXTHlG3R1QkbE5M/oywnZ83udJmi+lxjJ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L9wPmpN/t2IPaEKoAc0FTQZS36wAMOXkBh24PQ9gaLJvfPKpNzGD8XWR5HHF0NLIJhgg 4ZlEXQ2fVp3XrtocHqhu4UZR4koCijgB8sB7Tb0GCpwK+C4UePdFLfhKyRdSXuvY3AHJd4CP 4JzW0Bzq/WXY3XMOzUTYApGQpnUpdOmuQSfpV9MQO+/jo7r6yPbxT7CwRS5dcQPzUiuHLK9i nvjREdh84qycnx0/6dDroYhp0DFv4udxuAvt1h4wGwTPRQZerSm4xaYegEFusyhbZrI0U9tJ B8WrhBLXDiYlyJT6zOV2yZFuW47VrLsjYnHwn27hmxTC/7tvG3euCklmkn9Sl9IAKFu29RSo d5bD8kMSCYsTqtTfT6W4A3qHGvIDta3ptLYpIAOD2sY3GYq2nf3Bbzx81wZK14JdDDHUX2Rs 6+ahAA== In-Reply-To: <90e657ad-4109-442e-2b26-52cd2372f582@suse.com> This is a multi-part message in MIME format. --------------ZLVQ3yYJP0EqtKlsJ8yJvoc1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 17/10/2023 7:34 am, Jan Beulich wrote: > On 16.10.2023 18:24, Andrew Cooper wrote: >> +Termination >> +----------- >> + >> +The VM runs for a period of time, but eventually stops. It can stop for a >> +number of reasons, including: >> + >> + * Directly at the guest kernel's request, via the ``SCHEDOP_shutdown`` >> + hypercall. The hypercall also includes the reason for the shutdown, >> + e.g. ``poweroff``, ``reboot`` or ``crash``. >> + >> + * Indirectly from certain states. E.g. executing a ``HLT`` instruction with >> + interrupts disabled is interpreted as a shutdown request as it is a common >> + code pattern for fatal error handling when no better options are available. > HLT (note btw that this is x86 and HVM specific and hence may want mentioning > as such) is interpreted this way only if all other vCPU-s are also "down" > already. > >> + * Indirectly from fatal exceptions. In some states, execution is unable to >> + continue, e.g. Triple Fault on x86. > Nit: This again is HVM specific. Triple fault, maybe.  fatal exceptions terminating the VM, no. For both, these details are not important for the document.  This is an list of examples, not an exhaustive list. >> +Destruction >> +----------- >> + >> +The domain object in Xen is reference counted, and survives until all >> +references are dropped. >> + >> +The ``@releaseDomain`` watch is to inform all entities that hold a reference >> +on the domain to clean up. This may include: >> + >> + * Paravirtual driver backends having a grant map of the shared ring with the >> + frontend. > Beyond the shared ring(s), other (data) pages may also still have mappings. Yes, but again, this is just a examples.  Other data pages should only be mapped while data is in flight. ~Andrew --------------ZLVQ3yYJP0EqtKlsJ8yJvoc1 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 17/10/2023 7:34 am, Jan Beulich wrote:
On 16.10.2023 18:24, Andrew Cooper wrote:
+Termination
+-----------
+
+The VM runs for a period of time, but eventually stops.  It can stop for a
+number of reasons, including:
+
+ * Directly at the guest kernel's request, via the ``SCHEDOP_shutdown``
+   hypercall.  The hypercall also includes the reason for the shutdown,
+   e.g. ``poweroff``, ``reboot`` or ``crash``.
+
+ * Indirectly from certain states.  E.g. executing a ``HLT`` instruction with
+   interrupts disabled is interpreted as a shutdown request as it is a common
+   code pattern for fatal error handling when no better options are available.
HLT (note btw that this is x86 and HVM specific and hence may want mentioning
as such) is interpreted this way only if all other vCPU-s are also "down"
already.

+ * Indirectly from fatal exceptions.  In some states, execution is unable to
+   continue, e.g. Triple Fault on x86.
Nit: This again is HVM specific.

Triple fault, maybe.  fatal exceptions terminating the VM, no.

For both, these details are not important for the document.  This is an list of examples, not an exhaustive list.
+Destruction
+-----------
+
+The domain object in Xen is reference counted, and survives until all
+references are dropped.
+
+The ``@releaseDomain`` watch is to inform all entities that hold a reference
+on the domain to clean up.  This may include:
+
+ * Paravirtual driver backends having a grant map of the shared ring with the
+   frontend.
Beyond the shared ring(s), other (data) pages may also still have mappings.

Yes, but again, this is just a examples.  Other data pages should only be mapped while data is in flight.

~Andrew
--------------ZLVQ3yYJP0EqtKlsJ8yJvoc1--