Skip to content

Commit af79188

Browse files
committed
Move two-way disconnection to before remote unlock
1 parent 6c1c6d3 commit af79188

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/tinykvm/remote.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Machine::address_t Machine::remote_disconnect()
130130
return 0;
131131

132132
auto& remote = *this->m_remote;
133+
remote.remote_connect_halfway(remote); // Clear halfway state
133134
if (remote.cpu().remote_serializer != nullptr)
134135
{
135136
// Unlock the remote serializer
@@ -141,7 +142,6 @@ Machine::address_t Machine::remote_disconnect()
141142

142143
// Restore the vCPU machine to the original machine
143144
this->vcpu.set_machine(this->vcpu.original_machine());
144-
remote.remote_connect_halfway(remote); // Clear halfway state
145145

146146
// Unpresent gigabyte entries from remote VM in this VM
147147
const auto remote_vmem = remote.main_memory().vmem();

0 commit comments

Comments
 (0)