Skip to content

Conversation

@djs55
Copy link
Collaborator

@djs55 djs55 commented May 20, 2020

There have been some observed initialisation failures on new hypervisors / hardware, caused by us not recognising a new hypervisor feature. Previously the code would print an error and exit if it encountered an unknown feature.

However the hypervisor is able to provide a safe default, so we should use that instead. Setting the features we want is a VMCS write and querying the default fields is a VMCS read.

Therefore this patch

  • moves the capability probing into the vCPU setup where a VMCS read is possible
  • initialises the feature bits with a VMCS read (previously these were all 0)
  • removes the failure case when we encounter an unknown feature bit (since the default will be safe)

Signed-off-by: David Scott <dave@recoil.org>
@djs55 djs55 force-pushed the vmx-inherit-defaults branch from 26d3561 to 0f95d67 Compare May 21, 2020 17:57
@djs55 djs55 changed the title WIP: vmx: inherit defaults from hypervisor vmx: inherit defaults from hypervisor May 21, 2020
There have been some observed initialisation failures on new hypervisors
/ hardware, caused by us not recognising a new hypervisor feature.
Previously the code would print an error and exit if it encountered an
unknown feature.

However the hypervisor is able to provide a safe default, so we should
use that instead. Setting the features we want is a VMCS write and
querying the default fields is a VMCS read.

Therefore this patch

- moves the capability probing into the vCPU setup where a VMCS read is possible
- initialises the feature bits with a VMCS read (previously these were all 0)
- removes the failure case when we encounter an unknown feature bit (since the default will be safe)

Signed-off-by: David Scott <dave@recoil.org>
@djs55 djs55 force-pushed the vmx-inherit-defaults branch from 0f95d67 to 2ed4867 Compare May 21, 2020 18:06
@samoht
Copy link
Member

samoht commented May 26, 2020

A bit hard to test but for a quick glance of that patch this LTGM

@djs55 djs55 merged commit b1bffee into moby:master May 26, 2020
@djs55 djs55 deleted the vmx-inherit-defaults branch May 26, 2020 12:23
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.

2 participants