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

virtual/openstack: configure VFIO with NIOMMU by default #257

Merged
merged 1 commit into from
Mar 13, 2022
Merged

virtual/openstack: configure VFIO with NIOMMU by default #257

merged 1 commit into from
Mar 13, 2022

Conversation

EmilienM
Copy link
Contributor

@EmilienM EmilienM commented Feb 23, 2022

As well known and well documented, in virtual deployments of Kubernetes such as running on top
of OpenStack where the underlying virtualization platform is KVM, it does not support a virtualized iommu,
the VFIO PCI driver needs to be loaded with a special flag.

This patch aims to do it by default in the virtual_plugin, since this
plugin is only used by OpenStack for now.

Note: it also changes utils.LoadKernelModule function to support
kernel module arguments. It also adds a note in load-kmod.sh about the
fact that a module won't be reloaded with potential new options if the
module is already loaded on the system.

@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@EmilienM
Copy link
Contributor Author

testing it via our CI in OpenShift: #257

@EmilienM
Copy link
Contributor Author

@atyronesmith @SchSeba would you be open to such a change?

@atyronesmith
Copy link
Contributor

Yes!

@EmilienM EmilienM changed the title virtual/openstack: configure VFIO-PCI with NIOMMU by default virtual/openstack: configure VFIO-PCI with NOIMMU by default Feb 24, 2022
pkg/utils/utils.go Outdated Show resolved Hide resolved
@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@EmilienM
Copy link
Contributor Author

EmilienM commented Mar 1, 2022

/hold

@github-actions github-actions bot added the hold label Mar 1, 2022
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

1 similar comment
@github-actions
Copy link

github-actions bot commented Mar 1, 2022

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@EmilienM EmilienM changed the title virtual/openstack: configure VFIO-PCI with NOIMMU by default virtual/openstack: configure VFIO with NIOMMU by default Mar 1, 2022
@EmilienM
Copy link
Contributor Author

EmilienM commented Mar 1, 2022

/hold cancel

@EmilienM
Copy link
Contributor Author

EmilienM commented Mar 1, 2022

/test-all

@github-actions github-actions bot removed the hold label Mar 1, 2022
@zshi-redhat
Copy link
Collaborator

/cc @bn222

bindata/scripts/load-kmod.sh Show resolved Hide resolved
pkg/plugins/virtual/virtual_plugin.go Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Mar 4, 2022

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@bn222
Copy link
Collaborator

bn222 commented Mar 7, 2022

/lgtm

@zshi-redhat
Copy link
Collaborator

/cc @adrianchiris

@github-actions github-actions bot requested a review from adrianchiris March 8, 2022 00:47
@pliurh
Copy link
Collaborator

pliurh commented Mar 8, 2022

/lgtm

@github-actions github-actions bot added the lgtm label Mar 8, 2022
@EmilienM
Copy link
Contributor Author

EmilienM commented Mar 8, 2022

@adrianchiris when time permits, please merge this one, it was tested, and got several reviews & lgtm.
Thanks

pkg/daemon/daemon.go Outdated Show resolved Hide resolved
pkg/plugins/generic/generic_plugin.go Outdated Show resolved Hide resolved
pkg/plugins/virtual/virtual_plugin.go Outdated Show resolved Hide resolved
pkg/plugins/virtual/virtual_plugin.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
pkg/utils/utils.go Outdated Show resolved Hide resolved
bindata/scripts/load-kmod.sh Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

minor nit otherwise lgtm !

pkg/utils/utils.go Outdated Show resolved Hide resolved
bindata/scripts/load-kmod.sh Show resolved Hide resolved
As well known and well documented, in virtual deployments of Kubernetes such as running on top
of OpenStack where the underlying virtualization platform is KVM, it does not support a virtualized iommu,
the VFIO PCI driver needs to be loaded with a special flag.

This patch aims to do it by default in the virtual_plugin, since this
plugin is only used by OpenStack for now.

Note: it also changes `utils.LoadKernelModule` function to support
kernel module arguments. It also adds a note in `load-kmod.sh` about the
fact that a module won't be reloaded with potential new options if the
module is already loaded on the system.
@github-actions
Copy link

Thanks for your PR,
To run vendors CIs use one of:

  • /test-all: To run all tests for all vendors.
  • /test-e2e-all: To run all E2E tests for all vendors.
  • /test-e2e-nvidia-all: To run all E2E tests for NVIDIA vendor.

To skip the vendors CIs use one of:

  • /skip-all: To skip all tests for all vendors.
  • /skip-e2e-all: To skip all E2E tests for all vendors.
  • /skip-e2e-nvidia-all: To skip all E2E tests for NVIDIA vendor.
    Best regards.

@EmilienM
Copy link
Contributor Author

@adrianchiris thanks for the review, all done. Let me know if there is anything.

@adrianchiris
Copy link
Collaborator

/test-all

Copy link
Collaborator

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants