Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge patches from meta-xt-vhost #165

Merged
merged 5 commits into from
Apr 29, 2024

Conversation

rshym
Copy link
Collaborator

@rshym rshym commented Apr 24, 2024

Patches are added in the same order they appear in https://github.com/xen-troops/meta-xt-vhost/blob/main/recipes-kernel/linux/linux-renesas_%25.bbappend

  • vhost_xen: Implement Xen grant mappings module for vhost
  • vhost_xen: Get the guest domid from Xenstore
  • vhost_xen: Implement Xen foreign mappings along with grant mappings
  • vhost_xen: Adapt net for Xen specific mappings
  • vhost_xen: Change a logic to get the guest domid

@rshym rshym changed the title [UNDER TEST] Merge patches from meta-xt-vhost Merge patches from meta-xt-vhost Apr 29, 2024
@rshym
Copy link
Collaborator Author

rshym commented Apr 29, 2024

Tested on h3ulcb-4x2g with the following commands
On DomD

lisot --server --family=AF_VSOCK --address=2 --port=5400 --trace_level=5

On DomU

lisot --client --family=AF_VSOCK --address=2 --port=5400 --mode=random --timeout=500 --length=0 --trace_level=5

Logs of successful communications were observed.

After restarting the DomU the new instance of the client restored successful communication with the server in DomD.

@rshym rshym marked this pull request as ready for review April 29, 2024 07:44
@rshym rshym requested review from lorc and otyshchenko1 April 29, 2024 07:44
Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>

@lorc
Copy link
Collaborator

lorc commented Apr 29, 2024

It will be good to get @otyshchenko1 blessing

@otyshchenko1
Copy link
Collaborator

It will be good to get @otyshchenko1 blessing

I guess my R-b/A-b tag does not need to be applied to the patches, so lgtm

Oleksandr Tyshchenko added 5 commits April 29, 2024 22:31
A specific module for accessing descriptors in virtio rings which contain
guest grant based addresses instead of pseudo-physical addresses.
Please see Xen grant DMA-mapping layer at drivers/xen/grant-dma-ops.c
which is the origin of such mapping scheme.
The descriptors are mapped in core vhost's translate_desc(), the target
vhost device is responsible for unmapping them as soon as they are
not used anymore. Wire it to vsock device for now.

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Setup watch to specific Xenstore entry "drivers/dom0-qemu-command-monitor/..."
which represents Qemu command line. Hopefully it contains "-xen-domid"
property which is used to configure pass guest domid for Qemu, parse it
to get the required info.

The proper solution would be to pass guest domid from Qemu directly by
extending some of VHOST ioctls (for example, VHOST_SET_MEM_TABLE).

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
As a prereq for foreign mapping scheme, refactor the module heavily
to be able to reuse common stuff between mapping schemes and perform
some renamings accordingly. Also reduce the mapping context which
needs to be stored in struct vhost_xen_map. Move mapping specific
details into struct vhost_xen_ops. Introduce "nogrant" param to be
able to choose the target mappings.

The proper solution would be to pass the grant_usage from Qemu directly
by extending some of VHOST ioctls (for example, VHOST_SET_MEM_TABLE).

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
Please note, the following configs should be enabled in defconfig:
 CONFIG_VHOST_NET=y
 CONFIG_TAP=y
 CONFIG_MACVLAN=y
 CONFIG_MACVTAP=y

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
The Xenstore entry "drivers/dom0-qemu-command-monitor/..." which
represents Qemu command line is not present anymore since we
changed a way to configure and spawn Qemu. So get the guest domid
from "device-model" directory once it gets state "running".

Again, the proper solution would be to pass guest domid from Qemu directly
by extending some of VHOST ioctls (for example, VHOST_SET_MEM_TABLE).

Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com>
Acked-by: Volodymyr Babchuk <volodymyr_babchuk@epam.com>
@rshym
Copy link
Collaborator Author

rshym commented Apr 29, 2024

Acks are added to all commits.
Tested.
Ready to be merged together with xen-troops/meta-xt-prod-devel-rcar#133

@lorc lorc merged commit 38093f1 into xen-troops:v5.10.41/rcar-5.1.4.1-xt0.2 Apr 29, 2024
@rshym rshym deleted the mr_vhost branch April 29, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants