OSDN Git Service
(root)
/
qmiga
/
qemu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stream: Fix AioContext locking during bdrv_graph_wrlock()
[qmiga/qemu.git]
/
backends
/
cryptodev-vhost.c
diff --git
a/backends/cryptodev-vhost.c
b/backends/cryptodev-vhost.c
index
8231e7f
..
9352373
100644
(file)
--- a/
backends/cryptodev-vhost.c
+++ b/
backends/cryptodev-vhost.c
@@
-28,7
+28,6
@@
#ifdef CONFIG_VHOST_CRYPTO
#include "qapi/error.h"
#ifdef CONFIG_VHOST_CRYPTO
#include "qapi/error.h"
-#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
#include "hw/virtio/virtio-crypto.h"
#include "sysemu/cryptodev-vhost-user.h"
#include "qemu/error-report.h"
#include "hw/virtio/virtio-crypto.h"
#include "sysemu/cryptodev-vhost-user.h"
@@
-52,6
+51,7
@@
cryptodev_vhost_init(
{
int r;
CryptoDevBackendVhost *crypto;
{
int r;
CryptoDevBackendVhost *crypto;
+ Error *local_err = NULL;
crypto = g_new(CryptoDevBackendVhost, 1);
crypto->dev.max_queues = 1;
crypto = g_new(CryptoDevBackendVhost, 1);
crypto->dev.max_queues = 1;
@@
-66,8
+66,10
@@
cryptodev_vhost_init(
/* vhost-user needs vq_index to initiate a specific queue pair */
crypto->dev.vq_index = crypto->cc->queue_index * crypto->dev.nvqs;
/* vhost-user needs vq_index to initiate a specific queue pair */
crypto->dev.vq_index = crypto->cc->queue_index * crypto->dev.nvqs;
- r = vhost_dev_init(&crypto->dev, options->opaque, options->backend_type, 0);
+ r = vhost_dev_init(&crypto->dev, options->opaque, options->backend_type, 0,
+ &local_err);
if (r < 0) {
if (r < 0) {
+ error_report_err(local_err);
goto fail;
}
goto fail;
}
@@
-91,7
+93,7
@@
cryptodev_vhost_start_one(CryptoDevBackendVhost *crypto,
goto fail_notifiers;
}
goto fail_notifiers;
}
- r = vhost_dev_start(&crypto->dev, dev);
+ r = vhost_dev_start(&crypto->dev, dev
, false
);
if (r < 0) {
goto fail_start;
}
if (r < 0) {
goto fail_start;
}
@@
-108,7
+110,7
@@
static void
cryptodev_vhost_stop_one(CryptoDevBackendVhost *crypto,
VirtIODevice *dev)
{
cryptodev_vhost_stop_one(CryptoDevBackendVhost *crypto,
VirtIODevice *dev)
{
- vhost_dev_stop(&crypto->dev, dev);
+ vhost_dev_stop(&crypto->dev, dev
, false
);
vhost_dev_disable_notifiers(&crypto->dev, dev);
}
vhost_dev_disable_notifiers(&crypto->dev, dev);
}
@@
-125,7
+127,7
@@
cryptodev_get_vhost(CryptoDevBackendClient *cc,
switch (cc->type) {
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
switch (cc->type) {
#if defined(CONFIG_VHOST_USER) && defined(CONFIG_LINUX)
- case CRYPTODEV_BACKEND_TYPE_VHOST_USER:
+ case
Q
CRYPTODEV_BACKEND_TYPE_VHOST_USER:
vhost_crypto = cryptodev_vhost_user_get_vhost(cc, b, queue);
break;
#endif
vhost_crypto = cryptodev_vhost_user_get_vhost(cc, b, queue);
break;
#endif
@@
-193,7
+195,7
@@
int cryptodev_vhost_start(VirtIODevice *dev, int total_queues)
* because vhost user doesn't interrupt masking/unmasking
* properly.
*/
* because vhost user doesn't interrupt masking/unmasking
* properly.
*/
- if (cc->type == CRYPTODEV_BACKEND_TYPE_VHOST_USER) {
+ if (cc->type ==
Q
CRYPTODEV_BACKEND_TYPE_VHOST_USER) {
dev->use_guest_notifier_mask = false;
}
}
dev->use_guest_notifier_mask = false;
}
}