Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
747c801f51 | ||
|
|
76326210e4 | ||
|
|
f52121827c | ||
|
|
134a1a3320 | ||
|
|
ac7f07ebc8 | ||
|
|
3ed99d232c | ||
|
|
6f7b9f7b6f |
@@ -214,15 +214,17 @@ void hmp_commit(Monitor *mon, const QDict *qdict)
|
||||
error_report("Device '%s' not found", device);
|
||||
return;
|
||||
}
|
||||
if (!blk_is_available(blk)) {
|
||||
error_report("Device '%s' has no medium", device);
|
||||
return;
|
||||
}
|
||||
|
||||
bs = bdrv_skip_implicit_filters(blk_bs(blk));
|
||||
aio_context = bdrv_get_aio_context(bs);
|
||||
aio_context_acquire(aio_context);
|
||||
|
||||
if (!blk_is_available(blk)) {
|
||||
error_report("Device '%s' has no medium", device);
|
||||
aio_context_release(aio_context);
|
||||
return;
|
||||
}
|
||||
|
||||
ret = bdrv_commit(bs);
|
||||
|
||||
aio_context_release(aio_context);
|
||||
|
||||
@@ -357,6 +357,16 @@ void acpi_pcihp_device_unplug_request_cb(HotplugHandler *hotplug_dev,
|
||||
* acpi_pcihp_eject_slot() when the operation is completed.
|
||||
*/
|
||||
pdev->qdev.pending_deleted_event = true;
|
||||
/* if unplug was requested before OSPM is initialized,
|
||||
* linux kernel will clear GPE0.sts[] bits during boot, which effectively
|
||||
* hides unplug event. And than followup qmp_device_del() calls remain
|
||||
* blocked by above flag permanently.
|
||||
* Unblock qmp_device_del() by setting expire limit, so user can
|
||||
* repeat unplug request later when OSPM has been booted.
|
||||
*/
|
||||
pdev->qdev.pending_deleted_expires_ms =
|
||||
qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL); /* 1 msec */
|
||||
|
||||
s->acpi_pcihp_pci_status[bsel].down |= (1U << slot);
|
||||
acpi_send_event(DEVICE(hotplug_dev), ACPI_PCI_HOTPLUG_STATUS);
|
||||
}
|
||||
|
||||
@@ -237,6 +237,7 @@ static int virtio_ccw_set_vqs(SubchDev *sch, VqInfoBlock *info,
|
||||
return -EINVAL;
|
||||
}
|
||||
virtio_queue_set_num(vdev, index, num);
|
||||
virtio_init_region_cache(vdev, index);
|
||||
} else if (virtio_queue_get_num(vdev, index) > num) {
|
||||
/* Fail if we don't have a big enough queue. */
|
||||
return -EINVAL;
|
||||
|
||||
+1
-1
@@ -179,7 +179,7 @@ static void imx_epit_update_compare_timer(IMXEPITState *s)
|
||||
* the compare value. Otherwise it may fire at most once in the
|
||||
* current round.
|
||||
*/
|
||||
bool is_oneshot = (limit >= s->cmp);
|
||||
is_oneshot = (limit < s->cmp);
|
||||
if (counter >= s->cmp) {
|
||||
/* The compare timer fires in the current round. */
|
||||
counter -= s->cmp;
|
||||
|
||||
@@ -354,6 +354,7 @@ static void virtio_mmio_write(void *opaque, hwaddr offset, uint64_t value,
|
||||
if (proxy->legacy) {
|
||||
virtio_queue_update_rings(vdev, vdev->queue_sel);
|
||||
} else {
|
||||
virtio_init_region_cache(vdev, vdev->queue_sel);
|
||||
proxy->vqs[vdev->queue_sel].num = value;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1554,6 +1554,7 @@ static void virtio_pci_common_write(void *opaque, hwaddr addr,
|
||||
proxy->vqs[vdev->queue_sel].num = val;
|
||||
virtio_queue_set_num(vdev, vdev->queue_sel,
|
||||
proxy->vqs[vdev->queue_sel].num);
|
||||
virtio_init_region_cache(vdev, vdev->queue_sel);
|
||||
break;
|
||||
case VIRTIO_PCI_COMMON_Q_MSIX:
|
||||
vector = virtio_queue_vector(vdev, vdev->queue_sel);
|
||||
|
||||
+1
-1
@@ -226,7 +226,7 @@ static void virtio_virtqueue_reset_region_cache(struct VirtQueue *vq)
|
||||
}
|
||||
}
|
||||
|
||||
static void virtio_init_region_cache(VirtIODevice *vdev, int n)
|
||||
void virtio_init_region_cache(VirtIODevice *vdev, int n)
|
||||
{
|
||||
VirtQueue *vq = &vdev->vq[n];
|
||||
VRingMemoryRegionCaches *old = vq->vring.caches;
|
||||
|
||||
@@ -309,6 +309,7 @@ int virtio_get_num_queues(VirtIODevice *vdev);
|
||||
void virtio_queue_set_rings(VirtIODevice *vdev, int n, hwaddr desc,
|
||||
hwaddr avail, hwaddr used);
|
||||
void virtio_queue_update_rings(VirtIODevice *vdev, int n);
|
||||
void virtio_init_region_cache(VirtIODevice *vdev, int n);
|
||||
void virtio_queue_set_align(VirtIODevice *vdev, int n, int align);
|
||||
void virtio_queue_notify(VirtIODevice *vdev, int n);
|
||||
uint16_t virtio_queue_vector(VirtIODevice *vdev, int n);
|
||||
|
||||
+2
-2
@@ -5718,8 +5718,8 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||
} else {
|
||||
*eax &= env->features[FEAT_SGX_12_1_EAX];
|
||||
*ebx &= 0; /* ebx reserve */
|
||||
*ecx &= env->features[FEAT_XSAVE_XSS_LO];
|
||||
*edx &= env->features[FEAT_XSAVE_XSS_HI];
|
||||
*ecx &= env->features[FEAT_XSAVE_XCR0_LO];
|
||||
*edx &= env->features[FEAT_XSAVE_XCR0_HI];
|
||||
|
||||
/* FP and SSE are always allowed regardless of XSAVE/XCR0. */
|
||||
*ecx |= XSTATE_FP_MASK | XSTATE_SSE_MASK;
|
||||
|
||||
@@ -3751,7 +3751,7 @@ static int vnc_display_get_address(const char *addrstr,
|
||||
|
||||
addr->type = SOCKET_ADDRESS_TYPE_INET;
|
||||
inet = &addr->u.inet;
|
||||
if (addrstr[0] == '[' && addrstr[hostlen - 1] == ']') {
|
||||
if (hostlen && addrstr[0] == '[' && addrstr[hostlen - 1] == ']') {
|
||||
inet->host = g_strndup(addrstr + 1, hostlen - 2);
|
||||
} else {
|
||||
inet->host = g_strndup(addrstr, hostlen);
|
||||
|
||||
Reference in New Issue
Block a user