diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2018-01-19 10:11:42 -0600 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@redhat.com> | 2018-02-07 10:44:33 -0600 |
commit | f94be159d9104ba614b654d1242663c496708cb3 (patch) | |
tree | a633a1af91adc804923df39f98a232caac2778ef | |
parent | 3dabde1128b671f36ac6cb36b97b273139964420 (diff) |
HACK: add guest-cid option to spicevsock
this option should be set to the same value passed to the
vhost-vsock-pci device. For example:
-device vhost-vsock-pci,guest-cid=$CID -spice port=0,guest-cid=$CID
This is a temporary workaround because it's not obvious yet how to pass
this value to the spice server. This allows us to start developing the
feature in spice server and then come back to figure out how to do it
properly in qemu.
m--------- | dtc | 0 | ||||
-rw-r--r-- | ui/spice-core.c | 9 |
2 files changed, 8 insertions, 1 deletions
diff --git a/dtc b/dtc -Subproject 558cd81bdd432769b59bff01240c44f82cfb1a9 +Subproject bc895d6d09695d05ceb8b52486ffe861d6cfbdd diff --git a/ui/spice-core.c b/ui/spice-core.c index ea04dc69b5..007b6e3c31 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -420,6 +420,9 @@ static QemuOptsList qemu_spice_opts = { .name = "tls-port", .type = QEMU_OPT_NUMBER, },{ + .name = "guest-cid", + .type = QEMU_OPT_NUMBER, + },{ .name = "addr", .type = QEMU_OPT_STRING, },{ @@ -655,7 +658,7 @@ void qemu_spice_init(void) char *x509_key_file = NULL, *x509_cert_file = NULL, *x509_cacert_file = NULL; - int port, tls_port, addr_flags; + int port, tls_port, guest_cid, addr_flags; spice_image_compression_t compression; spice_wan_compression_t wan_compr; bool seamless_migration; @@ -667,6 +670,7 @@ void qemu_spice_init(void) } port = qemu_opt_get_number(opts, "port", 0); tls_port = qemu_opt_get_number(opts, "tls-port", 0); + guest_cid = qemu_opt_get_number(opts, "guest-cid", 0); if (port < 0 || port > 65535) { error_report("spice port is out of range"); exit(1); @@ -738,6 +742,9 @@ void qemu_spice_init(void) x509_dh_file, tls_ciphers); } + if (guest_cid) { + spice_server_set_guest_cid(spice_server, guest_cid); + } if (password) { qemu_spice_set_passwd(password, false, false); } |