MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / write

Method write

devices/src/ioapic.rs:169–187  ·  view source on GitHub ↗
(&mut self, _base: u64, offset: u64, data: &[u8])

Source from the content-addressed store, hash-verified

167 }
168
169 fn write(&mut self, _base: u64, offset: u64, data: &[u8]) -> Option<Arc<Barrier>> {
170 if data.len() != std::mem::size_of::<u32>() {
171 warn!("Invalid write size on IOAPIC: {}", data.len());
172 return None;
173 }
174
175 debug!("IOAPIC_W @ offset 0x{offset:x}");
176
177 let value = LittleEndian::read_u32(data);
178
179 match offset as u8 {
180 IOREGSEL_OFF => self.reg_sel = value,
181 IOWIN_OFF => self.ioapic_write(value),
182 _ => {
183 error!("IOAPIC: failed writing at offset {offset}");
184 }
185 }
186 None
187 }
188}
189
190impl Ioapic {

Callers

nothing calls this directly

Calls 2

ioapic_writeMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected