From patchwork Mon Jun 10 17:58:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 803023 Delivered-To: patch@linaro.org Received: by 2002:adf:f147:0:b0:35b:5a80:51b4 with SMTP id y7csp2066700wro; Mon, 10 Jun 2024 10:59:54 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0EIwV49PMKKFsbdrwW2yQstOaUYdhhts8HeubpwrqSuDJlmr6+fSzPb4EDNWZRWFXFlKuJme0fIKHGtyjBpsy X-Google-Smtp-Source: AGHT+IEqhwvQhR6Plq9DMhymcn78LM9Z7ZYKEOV6OOQjIBhivb9aA6gVwqc6KEltu+105uyds9Jy X-Received: by 2002:a05:6214:448d:b0:6b0:72c7:88d8 with SMTP id 6a1803df08f44-6b072c78912mr66932106d6.35.1718042394181; Mon, 10 Jun 2024 10:59:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1718042394; cv=none; d=google.com; s=arc-20160816; b=ImHkdgPjJzY04fW5J3kwb/DDBRtZHN+z+FkFciYenBCaGrSsocjED0KTmZw0eGdFyE QQm2d8p8t/r/mXERqiyEuGa+dQ46bJVZ2Yrkj88hOo92bZCBc4c3zG8uNXHUNK3J9BMg aSNW8UVwka9MkBpKI3o/DQGU00FDGI+JhrUFfHOEL8/ktPa6XHy38Y1dAS8ua/Iekd5B P+Y5XARHMbyNbjEsxcFyB3IubKB+IwE4/1klOqrcYVFYuL3+n3fCe2nP4ssN2gYBTU2n 3IszIK1FDYSrlRkUK2JNVbXQqDO43drOqykRfDulaZCFEjJdQWPuz0eczdDciLge2X6b 0SIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=/MMfDTHbOeqWhvwxfA43olAt6Wf8BeX3AAZr81nVQes=; fh=uIPp+8m0LaiGdHi2F2BGq7z/tn2dYhkmY7/I3wMiyHE=; b=xlZVC+Vet94e5SCSvsmq7DOEf7WNdvhLDx+ym+ILRyighvHvA8tks26rKjdBhQvBgh Oe46ok7I1bZQ8xumTFV/7tUGrRPF7rf6zm9KWBvdG3/2beCD2E4J+ph5NlYOhB+zhAF5 wVJ5lkEO7BF21QN3Ir8tSETyiNv5kFkMJNpqvDCIie/08IpeEdTOhI+bicOLsu9zbOXu I1qGjm7EXG/6wUZGNC0Qv+FeptbFvJDfX3yLDiQ5Is52wF2egKgRH5GzRGQ1/LgkDLMl fl2UKem1Hsfj/sABb731SLeXdKcHUaMQiBruHYvToxsuSgCOLHqfw/A913o9bE5cPukL rQTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xPHdeFJ1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6b07dee9e04si29204666d6.277.2024.06.10.10.59.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 10 Jun 2024 10:59:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xPHdeFJ1; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sGjIM-0005GN-H0; Mon, 10 Jun 2024 13:59:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sGjIK-0005Fo-N6 for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:59:00 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sGjII-0001Zp-3l for qemu-devel@nongnu.org; Mon, 10 Jun 2024 13:59:00 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-4217926991fso22680755e9.3 for ; Mon, 10 Jun 2024 10:58:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1718042336; x=1718647136; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=/MMfDTHbOeqWhvwxfA43olAt6Wf8BeX3AAZr81nVQes=; b=xPHdeFJ1Foc2fan3BIQ78EKmMyeNf4X03EVjbr0Nt2lx6Y/QqfjCoqPluoSB+Qc/vn Tr9gj/MSR0zBN0Y8oWivIJzXjfUi1z3epCt5KVJjNxfILEF7lYzVr+ZLBoBdSMpeCAty qUBxQNPPle/BEY/sEnoSCG+t+t9ajFjMEhXNwDGJgls6rpvKXGljWnVsdUYKdtFij5ET pckq9OKUSQNTY4HKqqS8KDjn8e7yPpE+hiooct70kgZp2UMCJQrDsUhrlPG3BapRK5Dw /ENajMPwCuIU/UEzwSOh1P07+uCD8vjH0osjCAce8PqXBpaaUNtCCSiW5eHLNbqQXMIg 4s8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718042336; x=1718647136; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=/MMfDTHbOeqWhvwxfA43olAt6Wf8BeX3AAZr81nVQes=; b=ST0b8MW7d/zhm1Q12gg2VsOMeYRLAI4DmESekoesNs0X2Y0CNdYOm2OTFafHRflWwO Bvx61WmsIkDeNTBqiJEvJ+XkKlPiPt6vciPj66EoWxQcZlVIwmdB6Rsz9m2uChXZ178K H7us5+jLQdwYFHLDVE8ZtwszgZnG8TqJDzX/nhBz3m7qRLvuXElEvbIqlJMoRYaa5Ij7 cqJMXcxRzHIE+9+YMEqtYHO6qS6fNUM4ib96mFEE6H0x8hUW7cWadtHwnOWyYdPcLggV ySUi/KhqMJlBM4Y9F8OWfpjZg1N/MXqZ+mWTGwfbk90JtfflB2Uz4MxVfF6tzAXjum2K FHzg== X-Forwarded-Encrypted: i=1; AJvYcCU7W0w574NmRtb4vqRGTrtI0BSkCKZrosYJfaZMvUI8F73P4Dqp3qYgt7U8BnENtxK0MvlgoJW60zqJy2buA87OpHzPDHM= X-Gm-Message-State: AOJu0YzL38mEku46GqQu89mdpZtrewVCEKcUi5fmy1Eeb1uU8WewfRGW Y9KT8NzjO9I0Qh90cn4JT+nJuf3lfTFwSUMupE2gCCJEYMMK64M/03tGtwNx+r8= X-Received: by 2002:a05:600c:4f96:b0:421:80e3:dc8d with SMTP id 5b1f17b1804b1-42180e3dd32mr41601985e9.24.1718042335802; Mon, 10 Jun 2024 10:58:55 -0700 (PDT) Received: from m1x-phil.lan ([176.176.129.242]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158102af1sm183741885e9.16.2024.06.10.10.58.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Jun 2024 10:58:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , =?utf-8?q?Daniel_P_=2E_Berrang?= =?utf-8?q?=C3=A9?= , "Dr. David Alan Gilbert" , qemu-devel@nongnu.org Cc: Yanan Wang , Richard Henderson , Eric Farman , Thomas Huth , Eric Blake , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Christian Borntraeger , qemu-s390x@nongnu.org, Eduardo Habkost , Ilya Leoshkevich , Halil Pasic , Marcel Apfelbaum , David Hildenbrand , Paolo Bonzini Subject: [RFC PATCH 0/3] monitor: Pass HMP arguments to QMP HumanReadableText API as JSON Date: Mon, 10 Jun 2024 19:58:49 +0200 Message-ID: <20240610175852.21215-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Current HMPCommand::cmd_info_hrt() handlers don't allow passing arguments from the monitor. This series pass them to the underlying QMP commands as a JSON dictionary, easily deserialized as QDict, similarly to how current HMP commands receive their arguments. Thus very few changes are required to port to the new API. As an example, the @x-query-s390x-cmma command is ported. Based-on: <20240610063518.50680-1-philmd@linaro.org> Philippe Mathieu-Daudé (3): hw/s390x: Declare target specific monitor commands in hmp-target.h monitor: Allow passing HMP arguments to QMP HumanReadableText API hw/s390x: Introduce x-query-s390x-cmma QMP command docs/devel/writing-monitor-commands.rst | 15 ++++++++- qapi/machine.json | 44 +++++++++++++++++++++++++ include/hw/s390x/storage-attributes.h | 4 --- include/hw/s390x/storage-keys.h | 4 --- include/monitor/hmp-target.h | 5 +++ include/monitor/monitor.h | 3 +- monitor/monitor-internal.h | 2 +- accel/tcg/monitor.c | 4 +-- hw/core/loader.c | 2 +- hw/core/machine-qmp-cmds.c | 9 ++--- hw/s390x/s390-skeys.c | 2 ++ hw/s390x/s390-stattrib.c | 30 +++++++++++------ hw/usb/bus.c | 2 +- monitor/hmp-target.c | 8 ++--- monitor/hmp.c | 11 ++++--- hmp-commands-info.hx | 2 +- 16 files changed, 107 insertions(+), 40 deletions(-)