base.cc (10602:3499de20ab3a) | base.cc (10905:a6ca6831e775) |
---|---|
1/* 2 * Copyright (c) 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 219 unchanged lines hidden (view full) --- 228 _last_avail(0) 229{ 230 descriptors.reserve(_size); 231 for (int i = 0; i < _size; ++i) 232 descriptors.emplace_back(proxy, *this, i); 233} 234 235void | 1/* 2 * Copyright (c) 2014 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 219 unchanged lines hidden (view full) --- 228 _last_avail(0) 229{ 230 descriptors.reserve(_size); 231 for (int i = 0; i < _size; ++i) 232 descriptors.emplace_back(proxy, *this, i); 233} 234 235void |
236VirtQueue::serialize(std::ostream &os) | 236VirtQueue::serialize(CheckpointOut &cp) const |
237{ 238 SERIALIZE_SCALAR(_address); 239 SERIALIZE_SCALAR(_last_avail); 240} 241 242void | 237{ 238 SERIALIZE_SCALAR(_address); 239 SERIALIZE_SCALAR(_last_avail); 240} 241 242void |
243VirtQueue::unserialize(Checkpoint *cp, const std::string §ion) | 243VirtQueue::unserialize(CheckpointIn &cp) |
244{ 245 Addr addr_in; 246 | 244{ 245 Addr addr_in; 246 |
247 paramIn(cp, section, "_address", addr_in); | 247 paramIn(cp, "_address", addr_in); |
248 UNSERIALIZE_SCALAR(_last_avail); 249 250 // Use the address setter to ensure that the ring buffer addresses 251 // are updated as well. 252 setAddress(addr_in); 253} 254 255void --- 75 unchanged lines hidden (view full) --- 331} 332 333 334VirtIODeviceBase::~VirtIODeviceBase() 335{ 336} 337 338void | 248 UNSERIALIZE_SCALAR(_last_avail); 249 250 // Use the address setter to ensure that the ring buffer addresses 251 // are updated as well. 252 setAddress(addr_in); 253} 254 255void --- 75 unchanged lines hidden (view full) --- 331} 332 333 334VirtIODeviceBase::~VirtIODeviceBase() 335{ 336} 337 338void |
339VirtIODeviceBase::serialize(std::ostream &os) | 339VirtIODeviceBase::serialize(CheckpointOut &cp) const |
340{ 341 SERIALIZE_SCALAR(guestFeatures); | 340{ 341 SERIALIZE_SCALAR(guestFeatures); |
342 paramOut(os, "_deviceStatus", (uint8_t)_deviceStatus); | 342 SERIALIZE_SCALAR(_deviceStatus); |
343 SERIALIZE_SCALAR(_queueSelect); | 343 SERIALIZE_SCALAR(_queueSelect); |
344 for (QueueID i = 0; i < _queues.size(); ++i) { 345 nameOut(os, csprintf("%s._queues.%i", name(), i)); 346 _queues[i]->serialize(os); 347 } | 344 for (QueueID i = 0; i < _queues.size(); ++i) 345 _queues[i]->serializeSection(cp, csprintf("_queues.%i", i)); |
348} 349 350void | 346} 347 348void |
351VirtIODeviceBase::unserialize(Checkpoint *cp, const std::string §ion) | 349VirtIODeviceBase::unserialize(CheckpointIn &cp) |
352{ 353 UNSERIALIZE_SCALAR(guestFeatures); | 350{ 351 UNSERIALIZE_SCALAR(guestFeatures); |
354 uint8_t status; 355 paramIn(cp, section, "_deviceStatus", status); 356 _deviceStatus = status; | 352 UNSERIALIZE_SCALAR(_deviceStatus); |
357 UNSERIALIZE_SCALAR(_queueSelect); 358 for (QueueID i = 0; i < _queues.size(); ++i) | 353 UNSERIALIZE_SCALAR(_queueSelect); 354 for (QueueID i = 0; i < _queues.size(); ++i) |
359 _queues[i]->unserialize(cp, csprintf("%s._queues.%i", section, i)); | 355 _queues[i]->unserializeSection(cp, csprintf("_queues.%i", i)); |
360} 361 362void 363VirtIODeviceBase::reset() 364{ 365 _queueSelect = 0; 366 guestFeatures = 0; 367 _deviceStatus = 0; --- 115 unchanged lines hidden --- | 356} 357 358void 359VirtIODeviceBase::reset() 360{ 361 _queueSelect = 0; 362 guestFeatures = 0; 363 _deviceStatus = 0; --- 115 unchanged lines hidden --- |