monitor: Add port write command

Useful for testing hardware emulations or manipulating its state to
stress guest drivers.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
diff --git a/qemu-monitor.hx b/qemu-monitor.hx
index 62edbcd..70e2475 100644
--- a/qemu-monitor.hx
+++ b/qemu-monitor.hx
@@ -306,6 +306,11 @@
 Read I/O port.
 ETEXI
 
+    { "o", "/ii", do_ioport_write,
+      "/fmt addr value", "I/O port write" },
+STEXI
+Write to I/O port.
+ETEXI
 
     { "sendkey", "si?", do_sendkey,
       "keys [hold_ms]", "send keys to the VM (e.g. 'sendkey ctrl-alt-f1', default hold time=100 ms)" },