diff options
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/mips_fulong2e.c | 1 | ||||
| -rw-r--r-- | hw/pc_piix.c | 4 | ||||
| -rw-r--r-- | hw/qdev-monitor.c | 6 | ||||
| -rw-r--r-- | hw/qdev.c | 5 | ||||
| -rw-r--r-- | hw/qxl.c | 8 | ||||
| -rw-r--r-- | hw/usb/hcd-ehci.c | 4 | ||||
| -rw-r--r-- | hw/usb/host-linux.c | 9 |
7 files changed, 25 insertions, 12 deletions
diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c index 37dc711e08..1a8df10429 100644 --- a/hw/mips_fulong2e.c +++ b/hw/mips_fulong2e.c @@ -284,7 +284,6 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device, exit(1); } - register_savevm(NULL, "cpu", 0, 3, cpu_save, cpu_load, env); qemu_register_reset(main_cpu_reset, env); /* fulong 2e has 256M ram. */ diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 6a75718fbb..a7aad4b022 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -522,6 +522,10 @@ static QEMUMachine pc_machine_v0_12 = { .driver = "virtio-blk-pci",\ .property = "vectors",\ .value = stringify(0),\ + },{\ + .driver = "PCI",\ + .property = "rombar",\ + .value = stringify(0),\ } static QEMUMachine pc_machine_v0_11 = { diff --git a/hw/qdev-monitor.c b/hw/qdev-monitor.c index dc4e4e1b84..eed781d2f0 100644 --- a/hw/qdev-monitor.c +++ b/hw/qdev-monitor.c @@ -158,7 +158,7 @@ int qdev_device_help(QemuOpts *opts) * for removal. This conditional should be removed along with * it. */ - if (!prop->info->parse) { + if (!prop->info->set) { continue; /* no way to set it, don't show */ } error_printf("%s.%s=%s\n", driver, prop->name, @@ -166,7 +166,7 @@ int qdev_device_help(QemuOpts *opts) } if (info->bus_info) { for (prop = info->bus_info->props; prop && prop->name; prop++) { - if (!prop->info->parse) { + if (!prop->info->set) { continue; /* no way to set it, don't show */ } error_printf("%s.%s=%s\n", driver, prop->name, @@ -493,7 +493,7 @@ static void qdev_print_props(Monitor *mon, DeviceState *dev, Property *props, if (object_property_get_type(OBJECT(dev), legacy_name, NULL)) { value = object_property_get_str(OBJECT(dev), legacy_name, &err); } else { - value = object_property_get_str(OBJECT(dev), props->name, &err); + value = object_property_print(OBJECT(dev), props->name, &err); } g_free(legacy_name); diff --git a/hw/qdev.c b/hw/qdev.c index 0bcde20c92..6a8f6bda2b 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -576,9 +576,12 @@ void qdev_property_add_legacy(DeviceState *dev, Property *prop, { gchar *name, *type; - if (!prop->info->print && !prop->info->parse) { + /* Register pointer properties as legacy properties */ + if (!prop->info->print && !prop->info->parse && + (prop->info->set || prop->info->get)) { return; } + name = g_strdup_printf("legacy-%s", prop->name); type = g_strdup_printf("legacy<%s>", prop->info->legacy_name ?: prop->info->name); diff --git a/hw/qxl.c b/hw/qxl.c index 6c11e70049..3da3399934 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -1746,13 +1746,16 @@ static int qxl_init_common(PCIQXLDevice *qxl) switch (qxl->revision) { case 1: /* spice 0.4 -- qxl-1 */ pci_device_rev = QXL_REVISION_STABLE_V04; + io_size = 8; break; case 2: /* spice 0.6 -- qxl-2 */ pci_device_rev = QXL_REVISION_STABLE_V06; + io_size = 16; break; case 3: /* qxl-3 */ default: pci_device_rev = QXL_DEFAULT_REVISION; + io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1); break; } @@ -1770,11 +1773,6 @@ static int qxl_init_common(PCIQXLDevice *qxl) memory_region_init_alias(&qxl->vram32_bar, "qxl.vram32", &qxl->vram_bar, 0, qxl->vram32_size); - io_size = msb_mask(QXL_IO_RANGE_SIZE * 2 - 1); - if (qxl->revision == 1) { - io_size = 8; - } - memory_region_init_io(&qxl->io_bar, &qxl_io_ops, qxl, "qxl-ioports", io_size); if (qxl->id == 0) { diff --git a/hw/usb/hcd-ehci.c b/hw/usb/hcd-ehci.c index 4ff4d40a8c..e759c996ce 100644 --- a/hw/usb/hcd-ehci.c +++ b/hw/usb/hcd-ehci.c @@ -1091,8 +1091,8 @@ static void ehci_mem_writel(void *ptr, target_phys_addr_t addr, uint32_t val) break; case USBSTS: - val &= USBSTS_RO_MASK; // bits 6 thru 31 are RO - ehci_clear_usbsts(s, val); // bits 0 thru 5 are R/WC + val &= USBSTS_RO_MASK; // bits 6 through 31 are RO + ehci_clear_usbsts(s, val); // bits 0 through 5 are R/WC val = s->usbsts; ehci_set_interrupt(s, 0); break; diff --git a/hw/usb/host-linux.c b/hw/usb/host-linux.c index 048f8ffa8b..a95b0eda55 100644 --- a/hw/usb/host-linux.c +++ b/hw/usb/host-linux.c @@ -1058,6 +1058,15 @@ static int usb_host_handle_control(USBDevice *dev, USBPacket *p, ret = usb_host_set_interface(s, index, value); trace_usb_host_req_emulated(s->bus_num, s->addr, p, ret); return ret; + + case EndpointOutRequest | USB_REQ_CLEAR_FEATURE: + if (value == 0) { /* clear halt */ + int pid = (index & USB_DIR_IN) ? USB_TOKEN_IN : USB_TOKEN_OUT; + ioctl(s->fd, USBDEVFS_CLEAR_HALT, &index); + clear_halt(s, pid, index & 0x0f); + trace_usb_host_req_emulated(s->bus_num, s->addr, p, 0); + return 0; + } } /* The rest are asynchronous */ |