diff options
-rw-r--r-- | block/nbd-client.c | 4 | ||||
-rw-r--r-- | hw/scsi/esp.c | 2 | ||||
-rw-r--r-- | include/exec/cpu_ldst.h | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/block/nbd-client.c b/block/nbd-client.c index 2a302de..3779c6c 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -415,6 +415,10 @@ int nbd_client_init(BlockDriverState *bs, } if (client->nbdflags & NBD_FLAG_SEND_FUA) { bs->supported_write_flags = BDRV_REQ_FUA; + bs->supported_zero_flags |= BDRV_REQ_FUA; + } + if (client->nbdflags & NBD_FLAG_SEND_WRITE_ZEROES) { + bs->supported_zero_flags |= BDRV_REQ_MAY_UNMAP; } qemu_co_mutex_init(&client->send_mutex); diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index 1f2f2d3..5a5a4e9 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -406,11 +406,9 @@ uint64_t esp_reg_read(ESPState *s, uint32_t saddr) /* Data out. */ qemu_log_mask(LOG_UNIMP, "esp: PIO data read not implemented\n"); s->rregs[ESP_FIFO] = 0; - esp_raise_irq(s); } else if (s->ti_rptr < s->ti_wptr) { s->ti_size--; s->rregs[ESP_FIFO] = s->ti_buf[s->ti_rptr++]; - esp_raise_irq(s); } if (s->ti_rptr == s->ti_wptr) { s->ti_rptr = 0; diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index b573df5..6eb5fe8 100644 --- a/include/exec/cpu_ldst.h +++ b/include/exec/cpu_ldst.h @@ -401,7 +401,7 @@ static inline void *tlb_vaddr_to_host(CPUArchState *env, target_ulong addr, int access_type, int mmu_idx) { #if defined(CONFIG_USER_ONLY) - return g2h(vaddr); + return g2h(addr); #else int index = (addr >> TARGET_PAGE_BITS) & (CPU_TLB_SIZE - 1); CPUTLBEntry *tlbentry = &env->tlb_table[mmu_idx][index]; |