From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NaUeW-0000FP-49 for qemu-devel@nongnu.org; Thu, 28 Jan 2010 08:43:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NaUeR-0000AH-55 for qemu-devel@nongnu.org; Thu, 28 Jan 2010 08:43:19 -0500 Received: from [199.232.76.173] (port=57160 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NaUeR-0000A6-1J for qemu-devel@nongnu.org; Thu, 28 Jan 2010 08:43:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:17709) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NaUeQ-0003vI-75 for qemu-devel@nongnu.org; Thu, 28 Jan 2010 08:43:14 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0SDhCBK019296 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 28 Jan 2010 08:43:12 -0500 Received: from localhost (vpn-10-249.rdu.redhat.com [10.11.10.249]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0SDhAVO028262 for ; Thu, 28 Jan 2010 08:43:11 -0500 From: Luiz Capitulino Date: Thu, 28 Jan 2010 11:42:52 -0200 Message-Id: <1264686180-29845-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 0/8]: QMP feature negotiation support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Feature negotiation allows clients to enable new QMP capabilities they support and thus allows QMP to envolve in a compatible way. A capability is a new QMP feature and/or protocol change which is not part of the core protocol as defined in the QMP spec. Feature negotiation is implemented by, among other changes, adding mode-oriented support to QMP, which comprehends the following: o Two modes: handshake and operational o All QMP Monitors start in handshake mode o In handshake mode only commands to query/enable/disable QMP capabilities are allowed (there are few exceptions) o Clients can switch to the operational mode at any time o In Operational mode most commands are allowed and QMP capabilities changes made in handshake mode take effect Please, note that we don't have any capability yet. So, the most visable change in this series is that now Clients must switch to operational mode to be able to issue 'regular' commands. Session example: """ {"QMP": {"capabilities": []}} { "execute": "query-qmp-mode" } {"return": {"mode": "handshake"}} { "execute": "stop" } {"error": {"class": "CommandNotFound", "desc": "The command stop has not been found", "data": {"name": "stop"}}} { "execute": "qmp_capability_enable", "arguments": { "name": "foobar" } } {"error": {"class": "InvalidParameter", "desc": "Invalid parameter name", "data": {"name": "name"}}} { "execute": "qmp_switch_mode", "arguments": { "mode": "operational" } } {"return": {}} { "execute": "query-qmp-mode" } {"return": {"mode": "operational"}} { "execute": "stop" } {"return": {}} """