DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Hao Chen <chenh@yusur.tech>, dev@dpdk.org
Cc: zy@yusur.tech, Chenbo Xia <chenbo.xia@intel.com>
Subject: Re: [PATCH v4] examples/vdpa: support running in nested virtualization environment
Date: Thu, 19 Jan 2023 11:16:32 +0100	[thread overview]
Message-ID: <0fc3de1f-a81a-2896-abdf-1c02ccb23826@redhat.com> (raw)
In-Reply-To: <20221114030426.1363561-1-chenh@yusur.tech>



On 11/14/22 04:04, Hao Chen wrote:
> When we run dpdk vdpa in the nested virtual machine vm-L1 and ping
> test in vm-L2, the ping is not good. The reason for troubleshooting is
> that the virtio net in vm-L2 sends control information to the vring,
> and the qemu back-end device in vm-L1 cannot obtain correct data
> from the vring. This problem is related to the opening of the vIOMMU.
> 
> This patch add flag RTE_VHOST_USER_IOMMU_SUPPORT to use vhost vIOMMU
> , VIRTIO_F_IOMMU_PLATFORM feature will be negotiated successfully if
> virtio iommu is used in a nested virtualization environment.
> 
> The configuration is as follows:
> The host starts iommu, and the kernel parameter is added with
> 'intel_iommu=on iommu=pt'.
> VM-L1's xml add viommu and virtio device adds iommu='on' ats='on'.
> VM-L2's xml enables viommu, and adds  parameters
> 'intel_iommu=on iommu=pt' to kernel.
> 
> Then the ping test in vm-L2 is OK.
> 
> Signed-off-by: Hao Chen <chenh@yusur.tech>
> ---
> v4:
> *Simplify the patch. Set the flags RTE_VHOST_USER_IOMMU_SUPPORT default.
> 
> v3:
> *Modify mail title.
> 
> v2:
> *fprintf all string including the eal one.
> *remove exit(1).
> 
>   examples/vdpa/main.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/examples/vdpa/main.c b/examples/vdpa/main.c
> index 4c7e81d7b6..4d3203f3a7 100644
> --- a/examples/vdpa/main.c
> +++ b/examples/vdpa/main.c
> @@ -214,6 +214,8 @@ start_vdpa(struct vdpa_port *vport)
>   	if (client_mode)
>   		vport->flags |= RTE_VHOST_USER_CLIENT;
>   
> +	vport->flags |= RTE_VHOST_USER_IOMMU_SUPPORT;
> +
>   	if (access(socket_path, F_OK) != -1 && !client_mode) {
>   		RTE_LOG(ERR, VDPA,
>   			"%s exists, please remove it or specify another file and try again.\n",

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


  reply	other threads:[~2023-01-19 10:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11  2:55 [PATCH] example: vdpa: support run " Hao Chen
2022-10-17  7:23 ` Xia, Chenbo
2022-10-25  6:08 ` [PATCH v2] " Hao Chen
2022-10-25  6:19   ` [PATCH v3] examples/vdpa: support running " Hao Chen
2022-10-26  6:10     ` Maxime Coquelin
2022-10-26  6:48       ` Hao Chen
2022-11-14  3:04     ` [PATCH v4] " Hao Chen
2023-01-19 10:16       ` Maxime Coquelin [this message]
2023-02-03 14:47       ` Maxime Coquelin

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=0fc3de1f-a81a-2896-abdf-1c02ccb23826@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=chenbo.xia@intel.com \
    --cc=chenh@yusur.tech \
    --cc=dev@dpdk.org \
    --cc=zy@yusur.tech \
    /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;
as well as URLs for NNTP newsgroup(s).