From nobody Mon Feb 9 20:13:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) client-ip=209.85.221.43; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-f43.google.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1615764594; cv=none; d=zohomail.com; s=zohoarc; b=bWQYjqP5kRoSOlxflhEQvDxezeiROXk/0sPfzHniDmUrMhpTfpVQsWxTOz0r2O08r2mGCRelpmIafm40z/MSR05QDnW8Zj0zYjgf75wgO6PQiywJ0xvHnQp3ppqwag05VOy9ApECNz4j/WraC1gmppSRtn2cvVL1ywjT2A/e+1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615764594; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jJdhWW4fK4y5udXyK0NB1puC8z9XRvo9dDPHL5cwnpk=; b=WRnhwBeCRjDvSCbxGaGWPMAjhsQoa6ad4u/ONOwPljC390MJIOZKxAUWT20SmjT98Bw8BH5hO0SjRsQomzolH35DRct5GJo7XCrZU8EiXnJ5EWuJGAo8pOdbUWZAN7Jx4IPpuzR64/q6pJXknGMSbOEzbMAyeIHC16CivbaJIfk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of _spf.google.com designates 209.85.221.43 as permitted sender) smtp.mailfrom=philippe.mathieu.daude@gmail.com Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) by mx.zohomail.com with SMTPS id 1615764594123844.8027936515562; Sun, 14 Mar 2021 16:29:54 -0700 (PDT) Received: by mail-wr1-f43.google.com with SMTP id j2so7775913wrx.9 for ; Sun, 14 Mar 2021 16:29:53 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (17.red-88-21-201.staticip.rima-tde.net. [88.21.201.17]) by smtp.gmail.com with ESMTPSA id o2sm7336952wmc.23.2021.03.14.16.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Mar 2021 16:29:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jJdhWW4fK4y5udXyK0NB1puC8z9XRvo9dDPHL5cwnpk=; b=r23GqKf9+DtJ9Us3Xw4RWewY3fgqXnWHzcUXztmGXO8letFa6EU5fLl4bK+gYVBUYj tEqXSSM+HU67zV+HEz8NAT58Uja0m+AV46WwapNqunaX3j688C0jX8Q+kspzUoBJhBvO yJ3pQ0JhI0u2oF6QUXYkAcH9siR4jLVPMfv5en/9WvimhshaTz10F+oAiT2T9iR2QawV q9PwwPuHTJS26EJn5tO3ht1luBVPFajRnOJEYyqrt94aKKbUhSz8Sj8ODcwuB1FitaPR QURDaEU+vfA3zfZmuPzP3odY8NhKcuxL35OCDB2C1ZtpXgA6hp1TbhtwoUvuQ78iNesz PoaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=jJdhWW4fK4y5udXyK0NB1puC8z9XRvo9dDPHL5cwnpk=; b=mdMyCMqCJwmvMJeuB8QnSUKcf8AzuVJ1qSRS/JbH5XPP1DOPg26xmq2DV3V0hHMRU7 Ihm5T5zZ9tVudCHTCBUEOc/biHwf2+I0Kx3X+stDRl+ZdGgFhKlm1eC6pUqaVy6rmybx klFrJL0KHaDePIpYWsOpLgtupSmgzGTSAmo39q+2H8FImQP1/HZ1awQJy46Nug/dRyP8 MaqTLrWG/X8AbjsaU9clSekpp965BZv7JE+AJo0WE7sKqz7I8/0YMLgm4aEzuemwGAw6 buNfIUaPf2WboIjg3iE6NB9/jpylzaC6KhvwuUq6Af7QH2/luH+mKTXnKjocdOdGfI3Q tpgA== X-Gm-Message-State: AOAM530U3KvlSSBEM1PzueP2hE5P6m9rxxtfM/KqZ8ZBJwOUNK5trCMY 4X9HzfKIHCvEy6R+BNUlnhY= X-Google-Smtp-Source: ABdhPJzKTB63rtSEOGIVWIkzGei/LAwidsPG0NwIli/yvBSG5aam3MaMz0qu0bu7YgHi6TsGinIyHg== X-Received: by 2002:a5d:4903:: with SMTP id x3mr24656623wrq.143.1615764592458; Sun, 14 Mar 2021 16:29:52 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Claudio Fontana , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Dr. David Alan Gilbert" , Markus Armbruster Subject: [RFC PATCH 7/8] monitor: Restrict CPU I/O instructions Date: Mon, 15 Mar 2021 00:29:12 +0100 Message-Id: <20210314232913.2607360-8-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210314232913.2607360-1-f4bug@amsat.org> References: <20210314232913.2607360-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @gmail.com) Restrict CPU I/O instructions to architectures providing I/O bus. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- monitor/misc.c | 4 ++++ hmp-commands.hx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/monitor/misc.c b/monitor/misc.c index d40c7d5afc0..b59f11433eb 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -77,7 +77,9 @@ #include "qapi/qmp-event.h" #include "sysemu/cpus.h" #include "qemu/cutils.h" +#ifdef TARGET_HAS_IOPORT #include "exec/cpu-io.h" +#endif #if defined(TARGET_S390X) #include "hw/s390x/storage-keys.h" #include "hw/s390x/storage-attributes.h" @@ -884,6 +886,7 @@ static void hmp_mouse_button(Monitor *mon, const QDict = *qdict) mouse_button_state =3D button_state; } =20 +#ifdef TARGET_HAS_IOPORT static void hmp_ioport_read(Monitor *mon, const QDict *qdict) { int size =3D qdict_get_int(qdict, "size"); @@ -939,6 +942,7 @@ static void hmp_ioport_write(Monitor *mon, const QDict = *qdict) break; } } +#endif /* TARGET_HAS_IOPORT */ =20 static void hmp_boot_set(Monitor *mon, const QDict *qdict) { diff --git a/hmp-commands.hx b/hmp-commands.hx index d4001f9c5dc..cedcedf7d8d 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -561,6 +561,7 @@ SRST used. ERST =20 +#ifdef TARGET_HAS_IOPORT { .name =3D "i", .args_type =3D "fmt:/,addr:i,index:i.", @@ -586,6 +587,7 @@ SRST ``o/``\ *fmt* *addr* *val* Write to I/O port. ERST +#endif /* TARGET_HAS_IOPORT */ =20 { .name =3D "sendkey", --=20 2.26.2