mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, pc: fixes and features more guest error handling for virtio devices virtio migration rework pc fixes Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Mon 10 Oct 2016 00:39:11 BST # gpg: using RSA key 0x281F0DB8D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: (33 commits) intel-iommu: Check IOAPIC's Trigger Mode against the one in IRTE virtio: cleanup VMSTATE_VIRTIO_DEVICE vhost-vsock: convert VMSTATE_VIRTIO_DEVICE virtio-rng: convert VMSTATE_VIRTIO_DEVICE virtio-balloon: convert VMSTATE_VIRTIO_DEVICE virtio-scsi: convert VMSTATE_VIRTIO_DEVICE virtio-input: convert VMSTATE_VIRTIO_DEVICE virtio-gpu: convert VMSTATE_VIRTIO_DEVICE virtio-serial: convert VMSTATE_VIRTIO_DEVICE virtio-9p: convert VMSTATE_VIRTIO_DEVICE virtio-net: convert VMSTATE_VIRTIO_DEVICE virtio-blk: convert VMSTATE_VIRTIO_DEVICE virtio: prepare change VMSTATE_VIRTIO_DEVICE macro net: don't poke at chardev internal QemuOpts virtio-scsi: handle virtio_scsi_set_config() error virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error() virtio-net: handle virtio_net_flush_tx() errors virtio-net: handle virtio_net_receive() errors virtio-net: handle virtio_net_handle_ctrl() error virtio-blk: handle virtio_blk_handle_request() errors ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
22
qemu-char.c
22
qemu-char.c
@@ -4005,7 +4005,6 @@ CharDriverState *qemu_chr_new_from_opts(QemuOpts *opts,
|
||||
}
|
||||
|
||||
chr = qemu_chr_find(id);
|
||||
chr->opts = opts;
|
||||
|
||||
qapi_out:
|
||||
qapi_free_ChardevBackend(backend);
|
||||
@@ -4014,7 +4013,6 @@ qapi_out:
|
||||
return chr;
|
||||
|
||||
err:
|
||||
qemu_opts_del(opts);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -4042,6 +4040,7 @@ CharDriverState *qemu_chr_new_noreplay(const char *label, const char *filename,
|
||||
qemu_chr_fe_claim_no_fail(chr);
|
||||
monitor_init(chr, MONITOR_USE_READLINE);
|
||||
}
|
||||
qemu_opts_del(opts);
|
||||
return chr;
|
||||
}
|
||||
|
||||
@@ -4141,7 +4140,6 @@ static void qemu_chr_free_common(CharDriverState *chr)
|
||||
{
|
||||
g_free(chr->filename);
|
||||
g_free(chr->label);
|
||||
qemu_opts_del(chr->opts);
|
||||
if (chr->logfd != -1) {
|
||||
close(chr->logfd);
|
||||
}
|
||||
@@ -4522,6 +4520,11 @@ static CharDriverState *qmp_chardev_open_socket(const char *id,
|
||||
|
||||
s->addr = QAPI_CLONE(SocketAddress, sock->addr);
|
||||
|
||||
qemu_chr_set_feature(chr, QEMU_CHAR_FEATURE_RECONNECTABLE);
|
||||
if (s->is_unix) {
|
||||
qemu_chr_set_feature(chr, QEMU_CHAR_FEATURE_FD_PASS);
|
||||
}
|
||||
|
||||
chr->opaque = s;
|
||||
chr->chr_wait_connected = tcp_chr_wait_connected;
|
||||
chr->chr_write = tcp_chr_write;
|
||||
@@ -4605,6 +4608,19 @@ static CharDriverState *qmp_chardev_open_udp(const char *id,
|
||||
return qemu_chr_open_udp(sioc, common, errp);
|
||||
}
|
||||
|
||||
|
||||
bool qemu_chr_has_feature(CharDriverState *chr,
|
||||
CharDriverFeature feature)
|
||||
{
|
||||
return test_bit(feature, chr->features);
|
||||
}
|
||||
|
||||
void qemu_chr_set_feature(CharDriverState *chr,
|
||||
CharDriverFeature feature)
|
||||
{
|
||||
return set_bit(feature, chr->features);
|
||||
}
|
||||
|
||||
ChardevReturn *qmp_chardev_add(const char *id, ChardevBackend *backend,
|
||||
Error **errp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user