[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file
From: |
Anthony Liguori |
Subject: |
Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file |
Date: |
Fri, 26 Jun 2009 08:21:56 -0500 |
User-agent: |
Thunderbird 2.0.0.21 (X11/20090320) |
Avi Kivity wrote:
Merging is a meaningless milestone since the protocol will not be
enabled. Since we'll miss 0.11 in reality we have 7-8 months before
the protocol can be used in production. IMO you're optimizing for the
short term, disregarding long-term maintenance, and disregarding ease
of implementation for users of the qemu monitor.
QMP is:
__skip__: [ \t]+
symbol: [A-Za-z_\-]+
decimalinteger: [1-9][0-9]+
hexinteger: 0x[0-9]+
float: [0-9]+\.[0-9]+
string: \"([^\"\\]|(\\[0-9][0-9][0-9]))*\" | symbol
number: float | decimalinteger | hexinteger
value: string | number
arg_list: value arg_list?
command: symbol arg_list? '\n'
response_status: ('+' | '-') number arg_list? '\n'
response_data: '=' arg_list '\n'
async_msg: '*' arg_list '\n'
response: async_msg | response_data* response_status
Client sends 'command's, server responses with 'response'. Responses of
response type '*' are server initiated messages. Otherwise, a server
always responses to a command with a response type of '+' or '-'. A
client sits in a 'response' parsing loop. Each sent 'command' is queued
in a FIFO and responses are associated with the commands based on the
FIFO order. 'async_msg's do not have associated commands. All strings
are UTF-8. Human readable messages depend on the locale used by QEMU.
N.B. there are some subtle changes to Luiz's original proposal to make
QMP more well-formed. In particular, more things have to be encoded as
strings than previously.
This is a very well formed RPC now. It can be trivially implemented in
something like Python. We can add higher level types. For instance, we
could:
-value: string | number
+value: (string | number | list | dictionary)
+comma_arg_list: value (',' comma_arg_list)?
+list: '[' comma_arg_list? ']'
+
+dict_list: string ':' value (',' dict_list)?
+dictionary: '{' dict_list? '}'
And then we basically have JSON. The changes on top of Luiz's current
patchset would be introducing an error code and adding more structure to
monitor_printf() which I asked for anyway.
Regards,
Anthony Liguori
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, (continued)
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/25
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Vincent Hanquez, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/25
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/25
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/25
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file,
Anthony Liguori <=
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Filip Navara, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Filip Navara, 2009/06/26
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/28
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/28
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/28
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Stefano Stabellini, 2009/06/29
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/29
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Stefano Stabellini, 2009/06/29