File tree Expand file tree Collapse file tree 16 files changed +14
-73
lines changed
Expand file tree Collapse file tree 16 files changed +14
-73
lines changed Original file line number Diff line number Diff line change @@ -160,8 +160,6 @@ pub struct Name {
160160
161161impl Aml for Name {
162162 fn append_aml_bytes ( & self , bytes : & mut Vec < u8 > ) -> Result < ( ) , AmlError > {
163- // TODO: Refactor this to make more efficient but there are
164- // lifetime/ownership challenges.
165163 bytes. extend_from_slice ( & self . bytes ) ;
166164 Ok ( ( ) )
167165 }
Original file line number Diff line number Diff line change @@ -60,22 +60,19 @@ impl MutEventSubscriber for PeriodicMetrics {
6060 let source = event. fd ( ) ;
6161 let event_set = event. event_set ( ) ;
6262
63- // TODO: also check for errors. Pending high level discussions on how we want
64- // to handle errors in devices.
6563 let supported_events = EventSet :: IN ;
66- if !supported_events. contains ( event_set) {
64+ if supported_events. contains ( event_set) {
65+ if source == self . write_metrics_event_fd . as_raw_fd ( ) {
66+ self . write_metrics_event_fd . read ( ) ;
67+ self . write_metrics ( ) ;
68+ } else {
69+ error ! ( "Spurious METRICS event!" ) ;
70+ }
71+ } else {
6772 warn ! (
6873 "Received unknown event: {:?} from source: {:?}" ,
6974 event_set, source
7075 ) ;
71- return ;
72- }
73-
74- if source == self . write_metrics_event_fd . as_raw_fd ( ) {
75- self . write_metrics_event_fd . read ( ) ;
76- self . write_metrics ( ) ;
77- } else {
78- error ! ( "Spurious METRICS event!" ) ;
7976 }
8077 }
8178
Original file line number Diff line number Diff line change @@ -489,8 +489,6 @@ impl Peripherals {
489489 /// Returns error or enum specifying whether emulation was handled or interrupted.
490490 pub fn run_arch_emulation ( & self , exit : VcpuExit ) -> Result < VcpuEmulation , VcpuError > {
491491 METRICS . vcpu . failures . inc ( ) ;
492- // TODO: Are we sure we want to finish running a vcpu upon
493- // receiving a vm exit that is not necessarily an error?
494492 error ! ( "Unexpected exit reason on vcpu run: {:?}" , exit) ;
495493 Err ( VcpuError :: UnhandledKvmExit ( format ! ( "{:?}" , exit) ) )
496494 }
Original file line number Diff line number Diff line change @@ -361,9 +361,8 @@ mod tests {
361361 ..Default :: default ( )
362362 } ;
363363 let actual_fpu: kvm_fpu = vcpu. get_fpu ( ) . unwrap ( ) ;
364- // TODO: auto-generate kvm related structures with PartialEq on.
365364 assert_eq ! ( expected_fpu. fcw, actual_fpu. fcw) ;
366- // Setting the mxcsr register from kvm_fpu inside setup_fpu does not influence anything.
365+ // TODO: Setting the mxcsr register from kvm_fpu inside setup_fpu does not influence anything.
367366 // See 'kvm_arch_vcpu_ioctl_set_fpu' from arch/x86/kvm/x86.c.
368367 // The mxcsr will stay 0 and the assert below fails. Decide whether or not we should
369368 // remove it at all.
Original file line number Diff line number Diff line change @@ -243,7 +243,7 @@ impl KvmVcpu {
243243 let extra_msrs = cpuid:: common:: msrs_to_save_by_cpuid ( & kvm_cpuid) ;
244244 self . msrs_to_save . extend ( extra_msrs) ;
245245
246- // TODO : Some MSRs depend on values of other MSRs. This dependency will need to
246+ // NOTE : Some MSRs depend on values of other MSRs. This dependency will need to
247247 // be implemented.
248248
249249 // By this point we know that at snapshot, the list of MSRs we need to
@@ -586,9 +586,6 @@ impl KvmVcpu {
586586 . map_err ( KvmVcpuError :: VcpuGetDebugRegs ) ?;
587587 let lapic = self . fd . get_lapic ( ) . map_err ( KvmVcpuError :: VcpuGetLapic ) ?;
588588 let tsc_khz = self . get_tsc_khz ( ) . ok ( ) . or_else ( || {
589- // v0.25 and newer snapshots without TSC will only work on
590- // the same CPU model as the host on which they were taken.
591- // TODO: Add negative test for this warning failure.
592589 warn ! ( "TSC freq not available. Snapshot cannot be loaded on a different CPU model." ) ;
593590 None
594591 } ) ;
Original file line number Diff line number Diff line change @@ -226,9 +226,7 @@ pub struct VmState {
226226 pub resource_allocator : ResourceAllocator ,
227227 pitstate : kvm_pit_state2 ,
228228 clock : kvm_clock_data ,
229- // TODO: rename this field to adopt inclusive language once Linux updates it, too.
230229 pic_master : kvm_irqchip ,
231- // TODO: rename this field to adopt inclusive language once Linux updates it, too.
232230 pic_slave : kvm_irqchip ,
233231 ioapic : kvm_irqchip ,
234232}
Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ impl GetCpuTemplate for Option<CpuTemplateType> {
2222 Some ( template_type) => match template_type {
2323 CpuTemplateType :: Custom ( template) => Ok ( Cow :: Borrowed ( template) ) ,
2424 CpuTemplateType :: Static ( template) => match template {
25- // TODO: Check if the CPU model is Neoverse-V1.
2625 StaticCpuTemplate :: V1N1 => Ok ( Cow :: Owned ( v1n1:: v1n1 ( ) ) ) ,
2726 other => Err ( GetCpuTemplateError :: InvalidStaticCpuTemplate ( * other) ) ,
2827 } ,
Original file line number Diff line number Diff line change @@ -312,8 +312,6 @@ pub enum DefaultBrandStringError {
312312///
313313/// Never.
314314// As we pass through host frequency, we require CPUID and thus `cfg(cpuid)`.
315- // TODO: Use `split_array_ref`
316- // (https://github.com/firecracker-microvm/firecracker/issues/3347)
317315#[ allow( clippy:: indexing_slicing, clippy:: arithmetic_side_effects) ]
318316#[ inline]
319317fn default_brand_string (
Original file line number Diff line number Diff line change @@ -15,8 +15,6 @@ const SRC_MAC_OFFSET: usize = 6;
1515const ETHERTYPE_OFFSET : usize = 12 ;
1616
1717// We don't support 802.1Q tags.
18- // TODO: support 802.1Q tags?! If so, don't forget to change the speculative_test_* functions
19- // for ARP and IPv4.
2018/// Payload offset in an ethernet frame
2119pub const PAYLOAD_OFFSET : usize = 14 ;
2220
Original file line number Diff line number Diff line change @@ -88,9 +88,6 @@ pub enum TcpError {
8888 SliceTooShort ,
8989}
9090
91- // TODO: The implementation of TcpSegment is IPv4 specific in regard to checksum computation. Maybe
92- // make it more generic at some point.
93-
9491/// Interprets the inner bytes as a TCP segment.
9592#[ derive( Debug ) ]
9693pub struct TcpSegment < ' a , T : ' a > {
You can’t perform that action at this time.
0 commit comments