-
Notifications
You must be signed in to change notification settings - Fork 128
build: Bump rust-vmm-ci to c41370c
#354
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
Conversation
|
seems like no_run tests are still compiled. I guess this one needs some imports behind |
I'm in the middle of addressing this, it looks like this snippet is outdated, it looks like |
admittedly, this snippet was never meant to actually compile or anything, it was just some pseudo code to illuminate the calculation |
80fb106 to
aaa4072
Compare
| /// ```no_run | ||
| /// # use kvm_bindings::{__u32, kvm_xsave, KVM_CAP_XSAVE2}; | ||
| /// # use libc::{c_char, open, O_RDWR}; | ||
| /// # use std::fs::File; | ||
| /// # use std::os::unix::io::FromRawFd; | ||
| /// # use vmm_sys_util::{ioctl::ioctl_with_val, ioctl_io_nr}; | ||
| /// # const KVM_PATH: &str = "/dev/kvm\0"; | ||
| /// # const KVMIO: u32 = 0x03; | ||
| /// # let kvm_fd = unsafe { open(KVM_PATH.as_ptr() as *const c_char, O_RDWR) }; | ||
| /// # assert!(kvm_fd >= 0); | ||
| /// # ioctl_io_nr!(KVM_CHECK_EXTENSION, KVMIO, 0x03); | ||
| /// | ||
| /// ((unsafe { | ||
| /// ioctl_with_val( | ||
| /// &File::from_raw_fd(kvm_fd), | ||
| /// KVM_CHECK_EXTENSION(), | ||
| /// KVM_CAP_XSAVE2.into(), | ||
| /// ) | ||
| /// }) as usize | ||
| /// - size_of::<kvm_xsave>()) | ||
| /// .div_ceil(size_of::<__u32>()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really do think this is clearer as just the pseudo code it was before :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I just remove this code snippet (the surrounding ```), and perhaps use (KVM_CHECK_EXTENSION(KVM_CAP_XSAVE2) - sizeof::<kvm_xsave>()).div_ceil(sizeof::<__u32>()) instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, that'd be my preference
Test cases introduced by SBI related changes require SBI_V01 to be enabled during kernel compilation. At the point of `042b206` already incorporates `c41370c`, which is capable of covering this case. Signed-off-by: Ruoqing He <[email protected]>
aaa4072 to
7c8cc06
Compare
Summary of the PR
Test cases introduced by SBI related changes require SBI_V01 to be enabled during kernel compilation.
c41370cis capable of covering this case.Unblocks #352.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commit message has max 60 characters for thesummary and max 75 characters for each description line.
test.
Release" section of CHANGELOG.md (if no such section exists, please create one).
unsafecode is properly documented.