Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/common/IPC/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,15 @@ namespace IPC {
};

// Version of the protocol for detecting what ABI version the VM has upon startup
constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 4;
constexpr uint32_t ABI_VERSION_DETECTION_ABI_VERSION = 5;

// Version for the syscall signatures between engine and VM. This must change if the syscall
// IDs, argument types, or return types change, or if serialization procedures change.
// Follows Daemon major versions.
// This should be updated only by update-version-number.py when a "major" release is indicated
constexpr const char* SYSCALL_ABI_VERSION = "0.55";

// This should be manually set to true when starting a 'for-X.Y.Z/sync' branch.
// This should be set to false by update-version-number.py when a (major) release is created.
constexpr bool DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES = true;
// For the master branch with a stable ABI, this follows Daemon major versions.
// For next-release branches, the convention is to use "testing/<next release version>" On
// the next-release branch the ABI is unstable so any two commits may be incompatible.
// This is updated by update-version-number.py when a "major" release is indicated.
constexpr const char* SYSCALL_ABI_VERSION = "testing/0.56.0";

/*
* The messages sent between the VM and the engine are defined by a numerical
Expand Down
14 changes: 1 addition & 13 deletions src/engine/framework/VirtualMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

static Cvar::Cvar<std::string> abiVersionCvar(
"version.daemon.abi", "Virtual machine IPC ABI version", Cvar::SERVERINFO | Cvar::ROM,
std::string(IPC::SYSCALL_ABI_VERSION) +
(IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES ? "+compatbreak" : ""));
IPC::SYSCALL_ABI_VERSION);

static Cvar::Cvar<bool> workaround_naclArchitecture_arm64_disableQualification(
"workaround.linux.arm64.naclDisableQualification",
Expand Down Expand Up @@ -533,17 +532,6 @@ void VMBase::Create()
this->name, vmABI, IPC::SYSCALL_ABI_VERSION);
}

bool vmCompatBreaking = reader.Read<bool>();
if (vmCompatBreaking && !IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
Sys::Drop("Couldn't load the %s gamelogic module: it has compatibility-breaking ABI changes but Daemon engine uses the vanilla %s ABI",
this->name, IPC::SYSCALL_ABI_VERSION);
} else if (!vmCompatBreaking && IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
Sys::Drop("Couldn't load the %s gamelogic module: Daemon has compatibility-breaking ABI changes but the VM uses the vanilla %s ABI",
this->name, IPC::SYSCALL_ABI_VERSION);
} else if (IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES) {
Log::Notice("^6Using %s VM with unreleased ABI changes", this->name);
}

Log::Notice("Loaded %s VM module in %d msec", this->name, Sys::Milliseconds() - loadStartTime);
}

Expand Down
1 change: 0 additions & 1 deletion src/shared/VMMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ static void CommonInit(Sys::OSHandle rootSocket)
Util::Writer writer;
writer.Write<uint32_t>(IPC::ABI_VERSION_DETECTION_ABI_VERSION);
writer.Write<std::string>(IPC::SYSCALL_ABI_VERSION);
writer.Write<bool>(IPC::DAEMON_HAS_COMPATIBILITY_BREAKING_SYSCALL_CHANGES);
VM::rootChannel.SendMsg(writer);

// Start the main loop
Expand Down
Loading