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
runtime-rs: Separate init_config() from new() for struct VsockDevice #8672
runtime-rs: Separate init_config() from new() for struct VsockDevice #8672
Conversation
30090ed
to
47a8205
Compare
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.
LGTM, but a little question
}) | ||
} | ||
|
||
pub async fn init_config(&mut self) -> Result<File> { |
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.
seems like this function is not used anywhere, will the actual usage of this will be introduced later?
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, coming soon from #8185 😉 For the details could you find the last 4 commits at https://github.com/BbolroC/kata-containers/pull/1/commits, for which I got a good feedback from @Apokleos
CC: @pmores
src/runtime-rs/crates/hypervisor/src/device/driver/virtio_vsock.rs
Outdated
Show resolved
Hide resolved
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.
Thx @BbolroC for your work! one comment!
47a8205
to
dae754d
Compare
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.
Thx @BbolroC for your work. LGTM!
/test |
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.
LGTM. Thanks @BbolroC !
As a follow-up for kata-containers#8516, guest_cid and vhost_fd are not necessarily initialised via new(). Instead, the fields should be initialised later when they are really used to construct hypervisor's parameters. This commit is to separate init_config() from new() to initialise guest_cid and vhost_fd and leave only the assignment of id for the existing function. Fixes: kata-containers#8671 Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
dae754d
to
3cd0cc1
Compare
/test |
This is to call VsockDevice::init_config() implemented by kata-containers#8672 when vhost_fd and guest_cid should be instantiated. They are immediately passed to a VM instead of staying and being managed by the runtime. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This is to call VsockDevice::init_config() implemented by kata-containers#8672 when vhost_fd and guest_cid should be instantiated. They are immediately passed to a VM instead of staying and being managed by the runtime. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
As a follow-up for #8516, guest_cid and vhost_fd are not necessarily initialised via new(). Instead, the fields should be initialised later when they are really used to construct hypervisor's parameters.
This commit is to separate init_config() from new() to initialise guest_cid and vhost_fd and leave only the assignment of id for the existing function.
Fixes: #8671
Signed-off-by: Hyounggyu Choi Hyounggyu.Choi@ibm.com