Commit 0a736f7a authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20180925' into staging



HMP pull 2018-09-25

# gpg: Signature made Tue 25 Sep 2018 15:11:09 BST
# gpg:                using RSA key 0516331EBC5BFDE7
# gpg: Good signature from "Dr. David Alan Gilbert (RH2) <dgilbert@redhat.com>"
# Primary key fingerprint: 45F5 C71B 4A0C B7FB 977A  9FA9 0516 331E BC5B FDE7

* remotes/dgilbert/tags/pull-hmp-20180925:
  qmp, hmp: add PCI subsystem id and vendor id to PCI info
  hmp: fix migrate status timer leak
  monitor: print message when using 'help' with an unknown command

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 71fbecea 5383a705
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -824,6 +824,8 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev)

    monitor_printf(mon, ": PCI device %04" PRIx64 ":%04" PRIx64 "\n",
                   dev->id->vendor, dev->id->device);
    monitor_printf(mon, "      PCI subsystem %04" PRIx64 ":%04" PRIx64 "\n",
                   dev->id->subsystem_vendor, dev->id->subsystem);

    if (dev->has_irq) {
        monitor_printf(mon, "      IRQ %" PRId64 ".\n", dev->irq);
@@ -2001,6 +2003,7 @@ static void hmp_migrate_status_cb(void *opaque)
        }
        monitor_resume(status->mon);
        timer_del(status->timer);
        timer_free(status->timer);
        g_free(status);
    }

+3 −0
Original line number Diff line number Diff line
@@ -1737,6 +1737,9 @@ static PciDeviceInfo *qmp_query_pci_device(PCIDevice *dev, PCIBus *bus,
    info->id = g_new0(PciDeviceId, 1);
    info->id->vendor = pci_get_word(dev->config + PCI_VENDOR_ID);
    info->id->device = pci_get_word(dev->config + PCI_DEVICE_ID);
    info->id->subsystem = pci_get_word(dev->config + PCI_SUBSYSTEM_ID);
    info->id->subsystem_vendor =
        pci_get_word(dev->config + PCI_SUBSYSTEM_VENDOR_ID);
    info->regions = qmp_query_pci_regions(dev);
    info->qdev_id = g_strdup(dev->qdev.id ? dev->qdev.id : "");

+8 −1
Original line number Diff line number Diff line
@@ -952,6 +952,7 @@ static void help_cmd_dump(Monitor *mon, const mon_cmd_t *cmds,
                          char **args, int nb_args, int arg_index)
{
    const mon_cmd_t *cmd;
    size_t i;

    /* No valid arg need to compare with, dump all in *cmds */
    if (arg_index >= nb_args) {
@@ -973,9 +974,15 @@ static void help_cmd_dump(Monitor *mon, const mon_cmd_t *cmds,
            } else {
                help_cmd_dump_one(mon, cmd, args, arg_index);
            }
            break;
            return;
        }
    }

    /* Command not found */
    monitor_printf(mon, "unknown command: '");
    for (i = 0; i <= arg_index; i++) {
        monitor_printf(mon, "%s%s", args[i], i == arg_index ? "'\n" : " ");
    }
}

static void help_cmd(Monitor *mon, const char *name)
+6 −1
Original line number Diff line number Diff line
@@ -832,10 +832,15 @@
#
# @vendor: the PCI vendor id
#
# @subsystem: the PCI subsystem id (since 3.1)
#
# @subsystem-vendor: the PCI subsystem vendor id (since 3.1)
#
# Since: 2.4
##
{ 'struct': 'PciDeviceId',
  'data': {'device': 'int', 'vendor': 'int'} }
  'data': {'device': 'int', 'vendor': 'int', 'subsystem': 'int',
            'subsystem-vendor': 'int'} }

##
# @PciDeviceInfo: