early-boot-config: downgrade warning about inability to iopl to debug #2732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: #2727
Closes #2727
Description of changes:
The VMware provider of early-boot-config communicates with the hypervisor via the VMware backdoor, a couple ports in the x86 port IO address space. By default Linux does not allow IO port access to user space processes, and so the used crate optionally invokes the
iopl
system call to change the IO privilege level of the process. The crate calls this "privileged" access.The kernel update in 22a6a58 ("kernel-5.15: update to 5.15.79") changed the configuration to disable the
iopl
system call. This causes the VMware provider to emit a warning about the inability to use the VMware backdoor via "privileged" access. The provider falls back to "unprivileged" access, i.e. proceeds to use the backdoor without changing the IO privilege level first.This fallback works just as well since both VMware and KVM (in its VMware guest data emulation) special-case the two IO ports used for the VMware backdoor. A process trying to access these will only enter into the hypervisor's fault handler which proceeds to serve the requests; the hypervisor does not inject a fault into the guest. Hence, the prior call to
iopl
is redundant, and "unprivileged" access works just as well.Only downgrade the warning about the inability to invoke
iopl
to debug level for now. After some more experience with the behavior on variants with the 5.15 kernel we can then eliminate the "privileged" access for the variants with the 5.10 kernel as well.Testing done:
Booted a vmware-dev build on VMware with and without this change. Without this change, I see repeated messages of the form:
They disappear with the change.
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.