summaryrefslogtreecommitdiff
path: root/src/dev/virtio/fs9p.hh
diff options
context:
space:
mode:
authorSascha Bischoff <sascha.bischoff@ARM.com>2015-11-05 09:40:12 +0000
committerSascha Bischoff <sascha.bischoff@ARM.com>2015-11-05 09:40:12 +0000
commit9d23e6d3234f7565aba2087b3b88f246b016cdc3 (patch)
tree03a3452bbe700688ab881c4513e45937eb07c9ca /src/dev/virtio/fs9p.hh
parent9719b261a13e83ec0dd8354defad5f6615a17ac2 (diff)
downloadgem5-9d23e6d3234f7565aba2087b3b88f246b016cdc3.tar.xz
dev: Add basic checkpoint support to VirtIO9PProxy device
This patch adds very basic checkpoint support for the VirtIO9PProxy device. Previously, attempts to checkpoint gem5 with a present 9P device caused gem5 to fatal as none of the state is tracked. We still do not track any state, but we replace the fatal with a warning which is triggered if the device has been used by the guest system. In the event that it has not been used, we assume that no state is lost during checkpointing. The warning is triggered on both a serialize and an unserialize to ensure maximum visibility for the user.
Diffstat (limited to 'src/dev/virtio/fs9p.hh')
-rw-r--r--src/dev/virtio/fs9p.hh13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/dev/virtio/fs9p.hh b/src/dev/virtio/fs9p.hh
index ebff9fef7..786f58464 100644
--- a/src/dev/virtio/fs9p.hh
+++ b/src/dev/virtio/fs9p.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 ARM Limited
+ * Copyright (c) 2014-2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -269,6 +269,17 @@ class VirtIO9PProxy : public VirtIO9PBase
* @param len Number of bytes to write.
*/
void writeAll(const uint8_t *data, size_t len);
+
+ /**
+ * Bool to track if the device has been used or not.
+ *
+ * We need to keep track of if the device has been used as we are
+ * unable to checkpoint the device in the event that the device
+ * has been mounted in the guest system. This is due to the fact
+ * that we do not, and cannot, track the complete state across
+ * host and guest.
+ */
+ bool deviceUsed;
};
struct VirtIO9PDiodParams;