|
From: | Richard Henderson |
Subject: | Re: [PATCH v5 2/3] arm/kvm: add support for MTE |
Date: | Mon, 6 Feb 2023 08:27:13 -1000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
On 2/6/23 03:32, Eric Auger wrote:
+void kvm_arm_enable_mte(Error **errp) +{ + static bool tried_to_enable = false; + Error *mte_migration_blocker = NULL;can't you make the mte_migration_blocker static instead?+ int ret; + + if (tried_to_enable) { + /* + * MTE on KVM is enabled on a per-VM basis (and retrying doesn't make + * sense), and we only want a single migration blocker as well. + */ + return; + } + tried_to_enable = true; + + if ((ret = kvm_vm_enable_cap(kvm_state, KVM_CAP_ARM_MTE, 0))) { + error_setg_errno(errp, -ret, "Failed to enable KVM_CAP_ARM_MTE"); + return; + } + + /* TODO: add proper migration support with MTE enabled */ + error_setg(&mte_migration_blocker, + "Live migration disabled due to MTE enabled");
Making the blocker static wouldn't stop multiple errors from kvm_vm_enable_cap. r~
[Prev in Thread] | Current Thread | [Next in Thread] |