Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Wei Wang <wei.w.wang@intel.com>
Cc: virtio-dev@lists.oasis-open.org
Subject: [virtio-dev] Re: [PATCH v1 2/2] content/virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON
Date: Mon, 14 Jan 2019 14:01:41 -0500	[thread overview]
Message-ID: <20190114135837-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <1542104867-11143-3-git-send-email-wei.w.wang@intel.com>

On Tue, Nov 13, 2018 at 06:27:47PM +0800, Wei Wang wrote:
> The VIRTIO_BALLOON_F_PAGE_POISON feature supports guest to report the
> memory poison value to host.
> 
> Suggested-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Wei Wang <wei.w.wang@intel.com>
> ---
>  content.tex | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
> 
> diff --git a/content.tex b/content.tex
> index 673c891..df3c6c2 100644
> --- a/content.tex
> +++ b/content.tex
> @@ -4397,6 +4397,8 @@ memory pages to the host when the related features are negotiated.
>      guest out of memory condition.
>  \item[VIRTIO_BALLOON_F_FREE_PAGE_HINT(3) ] Guest reports free pages
>      to host.
> +\item[VIRTIO_BALLOON_F_PAGE_POISON(4) ] Indicate if guest is using
> +    page poisoning.
>  
>  \end{description}
>

So "Guest uses page poisoning and reports the page poisoning value to
host" ?
  
> @@ -4404,6 +4406,10 @@ memory pages to the host when the related features are negotiated.
>  The driver SHOULD accept the VIRTIO_BALLOON_F_MUST_TELL_HOST
>  feature if offered by the device.
>  
> +The driver SHOULD accept the VIRTIO_BALLOON_F_PAGE_POISON feature
> +only when the guest is using page poison and the feature is offered
> +by the device.
> +

So if device offers VIRTIO_BALLOON_F_PAGE_POISON then
1. driver MUST NOT accept if guest is not using page poisoning?
2.  If guest is using page poisoning it SHOULD accept
?



>  \devicenormative{\subsubsection}{Feature bits}{Device Types / Memory Balloon Device / Feature bits}
>  If the device offers the VIRTIO_BALLOON_F_MUST_TELL_HOST feature
>  bit, and if the driver did not accept this feature bit, the
> @@ -4432,6 +4438,7 @@ struct virtio_balloon_config {
>          le32 num_pages;
>          le32 actual;
>          le32 free_page_report_cmd_id;
> +        le32 poison_val;
>  };
>  \end{lstlisting}
>  
> @@ -4440,12 +4447,20 @@ struct virtio_balloon_config {
>  \field{free_page_report_cmd_id} is available if
>  VIRTIO_BALLON_F_FREE_PAGE_HINT negotiated.
>  
> +\field{poison_val} is available if VIRTIO_BALLOON_F_PAGE_POISON
> +negotiated.
> +
>  \devicenormative{\subsubsection}{Device configuration layout}{Device Types / Traditional Memory Balloon Device / Device configuration layout}
>  
>  The device MUST NOT set \field{free_page_report_cmd_id} to a value
>  between \field{VIRTIO_BALLOON_CMD_ID_DONE} and
>  \field{VIRTIO_BALLOON_CMD_ID_MIN} exclusive.
>  
> +\drivernormative{\subsubsection}{Device configuration layout}{Device Types / Traditional Memory Balloon Device / Device configuration layout}
> +
> +The driver SHOULD write the guest used poison value to
> +\field{poison_val} if VIRTIO_BALLOON_F_PAGE_POISON negotiated.
> +

Not MUST?

>  \subparagraph{Legacy Interface: Device configuration layout}\label{sec:Device Types / Memory Balloon Device / Device
>  configuration layout / Legacy Interface: Device configuration layout}
>  When using the legacy interface, transitional devices and drivers
> @@ -4480,6 +4495,9 @@ The device initialization process is outlined below:
>          migration agent) who will request for the free page reporting
>          from the driver.
>    \end{enumerate}
> +
> +\item If the VIRTIO_BALLOON_F_PAGE_POISON feature bit is negotiated,
> +  write the guest used poison value to \field{poison_val}.
>  \end{enumerate}
>  
>  
> -- 
> 2.7.4

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


  reply	other threads:[~2019-01-14 19:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-13 10:27 [virtio-dev] [PATCH v1 0/2] Virtio-balloon Updates Wei Wang
2018-11-13 10:27 ` [virtio-dev] [PATCH v1 1/2] content/virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT Wei Wang
2019-01-14 18:58   ` [virtio-dev] " Michael S. Tsirkin
2019-01-15  8:37     ` Wei Wang
2018-11-13 10:27 ` [virtio-dev] [PATCH v1 2/2] content/virtio-balloon: VIRTIO_BALLOON_F_PAGE_POISON Wei Wang
2019-01-14 19:01   ` Michael S. Tsirkin [this message]
2019-01-14 18:41 ` [virtio-dev] Re: [PATCH v1 0/2] Virtio-balloon Updates Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190114135837-mutt-send-email-mst@kernel.org \
    --to=mst@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    --cc=wei.w.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox