|
From: | Richard Henderson |
Subject: | Re: [PATCH v6 04/26] plugins: Drop tcg_flags from struct qemu_plugin_dyn_cb |
Date: | Mon, 17 May 2021 11:13:56 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 |
On 5/16/21 7:53 AM, Philippe Mathieu-Daudé wrote:
- op->args[*cb_idx + 1] = tcg_flags; + op->args[*cb_idx + 1] = (*begin_op)->args[*cb_idx + 1];I don't understand this change, can you explain?
This patch drops a mostly-unimplemented feature from plugins, where in theory the registration of the plugin would specify the TCG_CALL_* flags.
Instead, take the flags from the plugin template function -- i.e. copy them across from the original begin_op.
-static inline uint32_t cb_to_tcg_flags(enum qemu_plugin_cb_flags flags) -{ - uint32_t ret; - - switch (flags) { - case QEMU_PLUGIN_CB_RW_REGS: - ret = 0; - break; - case QEMU_PLUGIN_CB_R_REGS: - ret = TCG_CALL_NO_WG; - break; - case QEMU_PLUGIN_CB_NO_REGS: - default: - ret = TCG_CALL_NO_RWG; - } - return ret; -}
This is where the plugin interface was supposed to convert flags from one form to another. This got stored in a structure and then passed along as an argument to the function containing that first hunk above.
r~
[Prev in Thread] | Current Thread | [Next in Thread] |