mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
4db6ceb0b5
The current API allows us to report a single status, which we've defined as: Frozen: has a successor, treated as qmp_locked, may or may not be enabled. Locked: no successor, qmp_locked. may or may not be enabled. Disabled: Not frozen or locked, disabled. Active: Not frozen, locked, or disabled. The problem is that both "Frozen" and "Locked" mean nearly the same thing, and that both of them do not intuit whether they are recording guest writes or not. This patch deprecates that status field and introduces two orthogonal properties instead to replace it. Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-id: 20190223000614.13894-2-jsnow@redhat.com Signed-off-by: John Snow <jsnow@redhat.com>
394 lines
7.4 KiB
Plaintext
394 lines
7.4 KiB
Plaintext
--- Preparing image & VM ---
|
|
|
|
|
|
--- Adding preliminary bitmaps A & B ---
|
|
|
|
{"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmapA", "node": "drive0"}}
|
|
{"return": {}}
|
|
{"execute": "block-dirty-bitmap-add", "arguments": {"granularity": 65536, "name": "bitmapB", "node": "drive0"}}
|
|
{"return": {}}
|
|
|
|
--- Emulating writes ---
|
|
|
|
write -P0x5d 0 64k
|
|
{"return": ""}
|
|
write -P0xd5 1M 64k
|
|
{"return": ""}
|
|
write -P0xdc 32M 64k
|
|
{"return": ""}
|
|
write -P0xcd 0x3ff0000 64k
|
|
{"return": ""}
|
|
{
|
|
"bitmaps": {
|
|
"drive0": [
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapB",
|
|
"persistent": false,
|
|
"recording": true,
|
|
"status": "active"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapA",
|
|
"persistent": false,
|
|
"recording": true,
|
|
"status": "active"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
--- Submitting & Aborting Transaction ---
|
|
|
|
{
|
|
"execute": "transaction",
|
|
"arguments": {
|
|
"actions": [
|
|
{
|
|
"data": {
|
|
"name": "bitmapB",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-disable"
|
|
},
|
|
{
|
|
"data": {
|
|
"granularity": 65536,
|
|
"name": "bitmapC",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-add"
|
|
},
|
|
{
|
|
"data": {
|
|
"name": "bitmapA",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-clear"
|
|
},
|
|
{
|
|
"data": {},
|
|
"type": "abort"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
"error": {
|
|
"class": "GenericError",
|
|
"desc": "Transaction aborted using Abort action"
|
|
}
|
|
}
|
|
{
|
|
"bitmaps": {
|
|
"drive0": [
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapB",
|
|
"persistent": false,
|
|
"recording": true,
|
|
"status": "active"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapA",
|
|
"persistent": false,
|
|
"recording": true,
|
|
"status": "active"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
--- Disabling B & Adding C ---
|
|
|
|
{
|
|
"execute": "transaction",
|
|
"arguments": {
|
|
"actions": [
|
|
{
|
|
"data": {
|
|
"name": "bitmapB",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-disable"
|
|
},
|
|
{
|
|
"data": {
|
|
"granularity": 65536,
|
|
"name": "bitmapC",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-add"
|
|
},
|
|
{
|
|
"data": {
|
|
"name": "bitmapC",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-disable"
|
|
},
|
|
{
|
|
"data": {
|
|
"name": "bitmapC",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-enable"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
"return": {}
|
|
}
|
|
|
|
--- Emulating further writes ---
|
|
|
|
write -P0xab 0 64k
|
|
{"return": ""}
|
|
write -P0xad 0x00f8000 64k
|
|
{"return": ""}
|
|
write -P0x1d 0x2008000 64k
|
|
{"return": ""}
|
|
write -P0xea 0x3fe0000 64k
|
|
{"return": ""}
|
|
|
|
--- Disabling A & C ---
|
|
|
|
{
|
|
"execute": "transaction",
|
|
"arguments": {
|
|
"actions": [
|
|
{
|
|
"data": {
|
|
"name": "bitmapA",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-disable"
|
|
},
|
|
{
|
|
"data": {
|
|
"name": "bitmapC",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-disable"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
"return": {}
|
|
}
|
|
{
|
|
"bitmaps": {
|
|
"drive0": [
|
|
{
|
|
"busy": false,
|
|
"count": 393216,
|
|
"granularity": 65536,
|
|
"name": "bitmapC",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapB",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 458752,
|
|
"granularity": 65536,
|
|
"name": "bitmapA",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
--- Submitting & Aborting Merge Transaction ---
|
|
|
|
{
|
|
"execute": "transaction",
|
|
"arguments": {
|
|
"actions": [
|
|
{
|
|
"data": {
|
|
"disabled": true,
|
|
"granularity": 65536,
|
|
"name": "bitmapD",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-add"
|
|
},
|
|
{
|
|
"data": {
|
|
"bitmaps": [
|
|
"bitmapB",
|
|
"bitmapC"
|
|
],
|
|
"node": "drive0",
|
|
"target": "bitmapD"
|
|
},
|
|
"type": "block-dirty-bitmap-merge"
|
|
},
|
|
{
|
|
"data": {},
|
|
"type": "abort"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
"error": {
|
|
"class": "GenericError",
|
|
"desc": "Transaction aborted using Abort action"
|
|
}
|
|
}
|
|
{
|
|
"bitmaps": {
|
|
"drive0": [
|
|
{
|
|
"busy": false,
|
|
"count": 393216,
|
|
"granularity": 65536,
|
|
"name": "bitmapC",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapB",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 458752,
|
|
"granularity": 65536,
|
|
"name": "bitmapA",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
--- Creating D as a merge of B & C ---
|
|
|
|
{
|
|
"execute": "transaction",
|
|
"arguments": {
|
|
"actions": [
|
|
{
|
|
"data": {
|
|
"disabled": true,
|
|
"granularity": 65536,
|
|
"name": "bitmapD",
|
|
"node": "drive0"
|
|
},
|
|
"type": "block-dirty-bitmap-add"
|
|
},
|
|
{
|
|
"data": {
|
|
"bitmaps": [
|
|
"bitmapB",
|
|
"bitmapC"
|
|
],
|
|
"node": "drive0",
|
|
"target": "bitmapD"
|
|
},
|
|
"type": "block-dirty-bitmap-merge"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
{
|
|
"return": {}
|
|
}
|
|
{
|
|
"bitmaps": {
|
|
"drive0": [
|
|
{
|
|
"busy": false,
|
|
"count": 458752,
|
|
"granularity": 65536,
|
|
"name": "bitmapD",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 393216,
|
|
"granularity": 65536,
|
|
"name": "bitmapC",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 262144,
|
|
"granularity": 65536,
|
|
"name": "bitmapB",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
},
|
|
{
|
|
"busy": false,
|
|
"count": 458752,
|
|
"granularity": 65536,
|
|
"name": "bitmapA",
|
|
"persistent": false,
|
|
"recording": false,
|
|
"status": "disabled"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
--- Removing bitmaps A, B, C, and D ---
|
|
|
|
{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmapA", "node": "drive0"}}
|
|
{"return": {}}
|
|
{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmapB", "node": "drive0"}}
|
|
{"return": {}}
|
|
{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmapC", "node": "drive0"}}
|
|
{"return": {}}
|
|
{"execute": "block-dirty-bitmap-remove", "arguments": {"name": "bitmapD", "node": "drive0"}}
|
|
{"return": {}}
|
|
|
|
--- Final Query ---
|
|
|
|
{
|
|
"bitmaps": {
|
|
"drive0": []
|
|
}
|
|
}
|
|
|
|
--- Done ---
|
|
|