mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00

As of 3.1 spec, background commands can be canceled with a new abort command. Implement the support, which is advertised in the CEL. No ad-hoc context undoing is necessary as all the command logic of the running bg command is done upon completion. Arbitrarily, the on-going background cmd will not be aborted if already at least 85% done; A mutex is introduced to stabilize mbox request cancel command vs the timer callback being fired scenarios (as well as reading the mbox registers). While some operations under critical regions may be unnecessary (irq notifying, cmd callbacks), this is not a path where performance is important, so simplicity is preferred. Tested-by: Ajay Joshi <ajay.opensrc@micron.com> Reviewed-by: Ajay Joshi <ajay.opensrc@micron.com> Signed-off-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20250305092501.191929-2-Jonathan.Cameron@huawei.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
19 lines
547 B
C
19 lines
547 B
C
/*
|
|
* QEMU CXL Mailbox
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2. See the
|
|
* COPYING file in the top-level directory.
|
|
*/
|
|
|
|
#ifndef CXL_MAILBOX_H
|
|
#define CXL_MAILBOX_H
|
|
|
|
#define CXL_MBOX_IMMEDIATE_CONFIG_CHANGE (1 << 1)
|
|
#define CXL_MBOX_IMMEDIATE_DATA_CHANGE (1 << 2)
|
|
#define CXL_MBOX_IMMEDIATE_POLICY_CHANGE (1 << 3)
|
|
#define CXL_MBOX_IMMEDIATE_LOG_CHANGE (1 << 4)
|
|
#define CXL_MBOX_SECURITY_STATE_CHANGE (1 << 5)
|
|
#define CXL_MBOX_BACKGROUND_OPERATION (1 << 6)
|
|
#define CXL_MBOX_BACKGROUND_OPERATION_ABORT (1 << 7)
|
|
|
|
#endif
|