-
Notifications
You must be signed in to change notification settings - Fork 31
set-features should be idempotent? #1053
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
base: master
Are you sure you want to change the base?
Conversation
| mac_addr: [u8; ETHERADDRL], | ||
| mtu: Option<u16>, | ||
| hdl: VionaHdl, | ||
| mq_active: AtomicBool, |
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.
would like a comment on this explaining what it means and why it's tracked here?
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.
| use std::num::NonZeroU16; | ||
| use std::os::unix::io::{AsRawFd, RawFd}; | ||
| use std::sync::{Arc, Condvar, Mutex, Weak}; | ||
| use std::sync::atomic::{Ordering, AtomicBool}; |
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.
clippy is kind of obnoxiously mad about alphabetization here :|
|
I think that Windows may be in error here; or, at least, there's some ambiguity in the spec (VirtIO 1.2). Section 2.2 of the spec reads, in part:
(Emphasis added) However, sec. 2.2.2 goes on to say,
(Again, emphasis added) What this says to me is that, once the driver has written the However, I could also imagine that most devices should be able to tolerate a read that doesn't change the value of the register; that is, if I read the register and write it right back, perhaps that should be a tragically complicated no-op. However, if the driver tries to change anything, then that ought to fail, either by clearing (and refusing to set) |
I have barely tested this, but I built a propolis-standalone and threw it + a Windows Server 2022 onto a Cosmo and I'm no longer seeing the results of Windows repeatedly resetting the device. so this gets #1052 and apparently #1048 with it.
this probably should just be a mutex that we take somewhere in managing virtio device configuration but this was simple enough to throw together for a quick PoC/validation..