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

add virt-host-validate-ch for cloud-hypervisor #13

Merged
merged 3 commits into from
Sep 25, 2020

Conversation

zarcen
Copy link

@zarcen zarcen commented Sep 14, 2020

Fixes #12
Add initial support of virt-host-validate for cloud-hypervisor

  1. CH runs on top of KVM. So, it does the same check for KVM as QEMU
  2. Check minimum cloud-hypervisor version to meet >= 0.10.0

Output example:

$ virt-host-validate ch
    CH: Checking for hardware virtualization                                 : PASS
    CH: Checking if device /dev/kvm exists                                   : PASS
    CH: Checking if device /dev/kvm is accessible                            : PASS

@zarcen zarcen closed this Sep 14, 2020
@zarcen zarcen reopened this Sep 14, 2020
@sameo sameo requested a review from bryteise September 15, 2020 08:09
}

char verResult[256];
virHostMsgCheck("CH", "Cloud-Hypvervisor >= 0.9.0");
Copy link
Member

Choose a reason for hiding this comment

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

0.10.0 will be released on 09/17, so you may want to check for 0.10.0 already.

Copy link
Author

Choose a reason for hiding this comment

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

Changed to check for 0.10.0

while(ptr != NULL)
{
last_tok = ptr;
ptr = strtok(NULL, " ");
Copy link
Member

Choose a reason for hiding this comment

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

There seems to be a few coding style issues with that PR. Have you run ninja -C build test against it?

Copy link
Author

Choose a reason for hiding this comment

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

Addressed all test defects in ninja -C build test

return -1;

switch ((int)arch) {
case VIR_ARCH_I686:

Choose a reason for hiding this comment

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

I'm not sure about this arch check given the supported arch list. It probably should just be checks on VIR_ARCH_X86_64 and VIR_ARCH_AARCH64.

Choose a reason for hiding this comment

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

Ah I see the style issues also fixed up most of the arch checks sorry. Still I think the I686 test should be removed.

Copy link
Author

Choose a reason for hiding this comment

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

Removed I686.

{
return -1;
}
}

Choose a reason for hiding this comment

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

Is there a reason this is being done differently than chExtractVersionInto? I did get a little feedback for simplifying that even in the RFC review here.

Copy link
Author

@zarcen zarcen Sep 23, 2020

Choose a reason for hiding this comment

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

After reviewing it again, I'd decide to remove this check as it is already covered by driver already. Instead, this place should only do prerequisite environment check.

@bryteise
Copy link

LGTM

@sameo sameo merged commit faccded into cloud-hypervisor:ch Sep 25, 2020
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