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

ARM coverage test case test_create_device failure on some machines with gnu toolchain #89

Closed
MrXinWang opened this issue Mar 4, 2020 · 3 comments

Comments

@MrXinWang
Copy link
Contributor

MrXinWang commented Mar 4, 2020

Referencing discussion in PR #87, ARM coverage test case test_create_device will fail on some machines with gnu toolchain. This failure is caused by the assertion in arm test_create_device case:
assert_eq(errno::Error::last().errno(), 25);
as ioctl device_fd.set_device_attr(&dist_attr) returns EINVAL instead of ENOTTY.

Note that this bug is only reproducible in only some of the arm64 machines, and using musl toolchain also will not lead to this problem. Root cause of this bug needs to be investigated and fixed.

@aw
Copy link
Contributor

aw commented Dec 8, 2020

Hello,

I believe VGIC_V3 requires an online vCPU prior to setting device attributes, see here.

Add this before set_device_attr assert in src/ioctls/device.rs#L290:

vm.create_vcpu(0).unwrap();

Tested successfully on an arm64 device, with musl and libc. Hope this helps.

/cc @andreeaflorescu

@andreeaflorescu
Copy link
Member

Thanks for looking into this @aw! Do you want to contribute the required change as well? Or should we open a PR with it?

@aw
Copy link
Contributor

aw commented Dec 10, 2020

Sure I can make a PR.

jiangliu pushed a commit that referenced this issue Dec 11, 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

No branches or pull requests

3 participants