From 9995c0b706a2270a49c5bebbcda0b62263a31aa3 Mon Sep 17 00:00:00 2001 From: Lei Li Date: Mon, 19 Nov 2012 17:15:08 +0800 Subject: [PATCH 1/2] Fix the inconsistency in x509-dh-key-file parameter Commit c448e8552b0f6135dabddf944a7110f929c08320 (spice: tls support) added options to the -spice command line. But there is an inconsistency between the declaration of the option 'x509-dh-key-file' to -spice command line and its parameter parsing 'x509-dh-file' in function qemu_spice_init. https://bugs.launchpad.net/qemu/+bug/1035042 Reported-by: Alon Bar-Lev Signed-off-by: Lei Li Signed-off-by: Gerd Hoffmann --- ui/spice-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/spice-core.c b/ui/spice-core.c index 51473650c0..261c6f2c11 100644 --- a/ui/spice-core.c +++ b/ui/spice-core.c @@ -610,7 +610,7 @@ void qemu_spice_init(void) } x509_key_password = qemu_opt_get(opts, "x509-key-password"); - x509_dh_file = qemu_opt_get(opts, "x509-dh-file"); + x509_dh_file = qemu_opt_get(opts, "x509-dh-key-file"); tls_ciphers = qemu_opt_get(opts, "tls-ciphers"); } From 21a50d0b1a0745e485eff3e5aa393cdc4a1980b6 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 21 Nov 2012 14:41:48 +0100 Subject: [PATCH 2/2] spice: add new spice-server callbacks to ui/spice-display.c Otherwise qemu crashes with non-qxl graphics cards. Signed-off-by: Gerd Hoffmann --- ui/spice-display.c | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ui/spice-display.c b/ui/spice-display.c index 0cc0116a5d..6aff3368ca 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -525,6 +525,37 @@ static int interface_flush_resources(QXLInstance *sin) return 0; } +static void interface_update_area_complete(QXLInstance *sin, + uint32_t surface_id, + QXLRect *dirty, uint32_t num_updated_rects) +{ + /* should never be called, used in qxl native mode only */ + fprintf(stderr, "%s: abort()\n", __func__); + abort(); +} + +/* called from spice server thread context only */ +static void interface_async_complete(QXLInstance *sin, uint64_t cookie_token) +{ + /* should never be called, used in qxl native mode only */ + fprintf(stderr, "%s: abort()\n", __func__); + abort(); +} + +static void interface_set_client_capabilities(QXLInstance *sin, + uint8_t client_present, + uint8_t caps[58]) +{ + dprint(3, "%s:\n", __func__); +} + +static int interface_client_monitors_config(QXLInstance *sin, + VDAgentMonitorsConfig *monitors_config) +{ + dprint(3, "%s:\n", __func__); + return 0; /* == not supported by guest */ +} + static const QXLInterface dpy_interface = { .base.type = SPICE_INTERFACE_QXL, .base.description = "qemu simple display", @@ -544,6 +575,10 @@ static const QXLInterface dpy_interface = { .req_cursor_notification = interface_req_cursor_notification, .notify_update = interface_notify_update, .flush_resources = interface_flush_resources, + .async_complete = interface_async_complete, + .update_area_complete = interface_update_area_complete, + .set_client_capabilities = interface_set_client_capabilities, + .client_monitors_config = interface_client_monitors_config, }; static SimpleSpiceDisplay sdpy;