Re: [Qemu-devel] [PATCH v19 00/10] Block replication for continuous checkpoints

2016-05-27 Thread Fam Zheng
On Fri, 05/27 09:59, Changlong Xie wrote: > Hi fam, do you have time to help reviewing this patchset? Consider of we are > in the same time zone what will speed up code reviewing process, > any feedback will be appreciated. Today I don't, but I will take a look at this series on next Monday. Fam

[Qemu-devel] [Bug 1577841] Re: target-mips/helper.c:542: bad sizeof ?

2016-05-27 Thread T. Huth
Fix has been included here: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=9d989c732b153fe15 ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1577

[Qemu-devel] [Bug 1550503] Re: target-arm/helper.c:5493: bad test ?

2016-05-27 Thread T. Huth
Fix should be part of QEMU v2.6.0: http://git.qemu.org/?p=qemu.git;a=commit;h=8c4f0eb94cc65ee32a ... so I think this ticket can now be closed. ** Changed in: qemu Status: In Progress => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [PATCH v5 06/27] block: Make bdrv_reopen_{commit, abort} private functions

2016-05-27 Thread Fam Zheng
On Tue, 05/24 18:09, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > As parts of the transactional reopen, they are not necessary outside > > block.c. Make them static. > > > > Signed-off-by: Fam Zheng > > --- > > block.c | 6 -- > > include/block/block.h | 2 -- >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target-ppc/fpu_helper: Fix efscmp* instructions handling

2016-05-27 Thread Imran, Talha
On 05/27/2016 06:37 AM, David Gibson wrote: > On Thu, May 19, 2016 at 05:11:35PM +0500, Talha Imran wrote: >> With specification at hand from the reference manual from Freescale >> http://cache.nxp.com/files/32bit/doc/ref_manual/SPEPEM.pdf , I have found a >> fix >> to efscmp* instructions handli

[Qemu-devel] [Bug 1525682] Re: configure: fix POSIX compatibility issue

2016-05-27 Thread T. Huth
The patch has been included here: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=18f49881cf8359e89396aac ... which should be part of QEMU 2.6.0, so let's mark this bug report as fixed. ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a

Re: [Qemu-devel] [PATCH v5 07/27] block: Handle image locking during reopen

2016-05-27 Thread Fam Zheng
On Tue, 05/24 18:28, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > Stash the locking state into BDRVReopenState. If it was locked, unlock > > in prepare, and lock it again when commit or abort. > > > > Signed-off-by: Fam Zheng > > --- > > block.c | 11 +++ > >

Re: [Qemu-devel] [PATCH v5 11/27] raw-posix: Implement .bdrv_lockf

2016-05-27 Thread Fam Zheng
On Tue, 05/24 19:09, Max Reitz wrote: > On 17.05.2016 09:35, Fam Zheng wrote: > > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > > the intervene. > > > > Both file and host device protocols are covered. > > Is there a reason you didn't cover host_cdrom other than it generall

Re: [Qemu-devel] [PATCH qemu v16 04/19] vmstate: Define VARRAY with VMS_ALLOC

2016-05-27 Thread Alexey Kardashevskiy
On 04/05/16 16:52, Alexey Kardashevskiy wrote: > This allows dynamic allocation for migrating arrays. > > Already existing VMSTATE_VARRAY_UINT32 requires an array to be > pre-allocated, however there are cases when the size is not known in > advance and there is no real need to enforce it. > > Th

Re: [Qemu-devel] [Qemu-ppc] [PATCH 07/12] ppc: Better figure out if processor has HV mode

2016-05-27 Thread Cédric Le Goater
On 05/27/2016 05:38 AM, David Gibson wrote: > On Tue, May 03, 2016 at 06:03:29PM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> We use an env. flag which is set to the initial value of MSR_HVB in >> the msr_mask. We also adjust the POWER8 mask to set SHV. >> >> Also use this

Re: [Qemu-devel] [PATCH qemu v16 08/19] spapr_iommu: Introduce "enabled" state for TCE table

2016-05-27 Thread Alexey Kardashevskiy
On 26/05/16 13:39, David Gibson wrote: > On Wed, May 04, 2016 at 04:52:20PM +1000, Alexey Kardashevskiy wrote: >> Currently TCE tables are created once at start and their sizes never >> change. We are going to change that by introducing a Dynamic DMA windows >> support where DMA configuration may c

Re: [Qemu-devel] [Qemu-ppc] [PATCH 07/12] ppc: Better figure out if processor has HV mode

2016-05-27 Thread Cédric Le Goater
On 05/27/2016 06:41 AM, Thomas Huth wrote: > On 27.05.2016 05:38, David Gibson wrote: >> On Tue, May 03, 2016 at 06:03:29PM +0200, Cédric Le Goater wrote: >>> From: Benjamin Herrenschmidt >>> >>> We use an env. flag which is set to the initial value of MSR_HVB in >>> the msr_mask. We also adjust t

[Qemu-devel] [PATCH] qcow2 resize with snapshot

2016-05-27 Thread zhangzhiming
Hi, i modified my code for qcow2 resize, and delete some code related to qemu monitor. and thanks for the review. zhangzhiming zhangzhimin...@meituan.com --- block.c | 19 +++ block/qcow2-cluster.c| 29 +++

[Qemu-devel] [PATCH 0/2] macio: switch over to new byte-aligned DMA helpers

2016-05-27 Thread Mark Cave-Ayland
Here is a tidied up version of my patch to convert the macio controller over to using the new byte-aligned DMA helpers. The first patch is just a hack and temporarily disables unaligned iovec truncation in the DMA helper (as discussed in the recent thread) until Paolo or someone else can devise a

[Qemu-devel] [PATCH 1/2] dma-helpers.c: [HACK] disable iovec truncation to nearest sector size

2016-05-27 Thread Mark Cave-Ayland
This is not a production fix but is included to allow the following patch to work until a proper solution is found. Otherwise iovecs which are not an exact multiple of 0x200 are artificially truncated causing corruption to the unaligned accesses required by Darwin PPC on the macio controller. Sign

[Qemu-devel] [PATCH 2/2] macio: switch over to new byte-aligned DMA helpers

2016-05-27 Thread Mark Cave-Ayland
Now that the DMA helpers are byte-aligned they can be called directly from the macio routines rather than emulating byte-aligned accesses via multiple block-level accesses. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c | 213 1 file

Re: [Qemu-devel] [PATCH V2] block/io: optimize bdrv_co_pwritev for small requests

2016-05-27 Thread Kevin Wolf
Am 27.05.2016 um 02:36 hat Fam Zheng geschrieben: > On Thu, 05/26 11:20, Paolo Bonzini wrote: > > On 26/05/2016 10:30, Fam Zheng wrote: > > >> > > > >> > This doesn't look too wrong... Should the right sequence of events be > > >> > head/after_head or head/after_tail? It's probably simplest to j

Re: [Qemu-devel] [RFC PATCH v4 1/3] Mediated device Core driver

2016-05-27 Thread Tian, Kevin
> From: Kirti Wankhede > Sent: Wednesday, May 25, 2016 10:47 PM > > > >> +static struct devices_list { > >> + struct list_headdev_list; > >> + struct mutexlist_lock; > >> +} mdevices, phy_devices; > > > > phy_devices -> pdevices? and similarly we can use pdev/mdev > > pair in other

Re: [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 03:06, xiaoqiang zhao wrote: > 在 2016年05月25日 21:08, Peter Maydell 写道: >>> >>> - >>> > /* AUX / UART1 */ >>> >-/* TODO: don't call qemu_char_get_next_serial() here, instead set >>> >- * chardev properties for each uart at the board level, once pl011 >>> >- * (uart

Re: [Qemu-devel] [PULL V3 00/20] Net patches

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 04:35, Jason Wang wrote: > Sorry for the trouble again. Wonder the correct way to enable sanitizer, > after I add "-fsanitizer=address", it produces tons of warnings and errors > but don't find the above outputs. I pass configure '--extra-cflags=-fsanitize=undefined' . thanks -

Re: [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 04:13, xiaoqiang zhao wrote: > > > 在 2016年05月25日 21:15, Paolo Bonzini 写道: > @@ -310,8 +312,7 @@ static void pl011_class_init(ObjectClass *oc, > void *data) > >> > > >> > dc->realize = pl011_realize; > >> > dc->vmsd = &vmstate_pl011; > >> >-/*

Re: [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 11:01, Peter Maydell wrote: >> > I found bcm2835-peripherals is only used by bcm2836 code, you mean >> > this(bcm2836) is the 'board level' and I should set chardev properties >> > here? > Device models subclass DeviceClass (possibly indirectly). > Boards subclass MachineClass. Onl

Re: [Qemu-devel] [for-2.7 PATCH v3 01/15] exec: Remove cpu from cpus list during cpu_exec_exit()

2016-05-27 Thread Paolo Bonzini
On 27/05/2016 05:07, David Gibson wrote: > On Thu, May 26, 2016 at 12:12:41PM +0200, Paolo Bonzini wrote: >> >> >> On 12/05/2016 05:48, Bharata B Rao wrote: >>> CPUState *cpu gets added to the cpus list during cpu_exec_init(). It >>> should be removed from cpu_exec_exit(). >>> >>> cpu_exec_exit()

Re: [Qemu-devel] [PULL 00/13] ppc-for-2.7 queue 20160527

2016-05-27 Thread Peter Maydell
ble in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.7-20160527 > > for you to fetch changes up to b4daafbd13826dfa9d2596fb0f31f1453611189f: > > MAINTAINERS: Add David Gibson as ppc maintainer (2016-05-27 12:59:41 +1000) > > --

Re: [Qemu-devel] [PATCH v5 07/27] block: Handle image locking during reopen

2016-05-27 Thread Max Reitz
On 27.05.2016 09:48, Fam Zheng wrote: > On Tue, 05/24 18:28, Max Reitz wrote: [...] >> Also: Should bdrv_reopen_prepare() check that the locking flags are not >> changed? > > Read only flag also matters in fcntl locks, so practically we almost always > need some change on the lock. Hm, but as f

Re: [Qemu-devel] [PULL 25/28] migration: define 'tls-creds' and 'tls-hostname' migration parameters

2016-05-27 Thread Amit Shah
On (Thu) 26 May 2016 [09:05:37], Eric Blake wrote: > > @@ -667,6 +702,21 @@ > > # auto-converge detects that migration is not > > making > > # progress. The default value is 10. (Since 2.7) > > # > > +# @tls-creds: ID of the 'tls-creds' object

Re: [Qemu-devel] [RFC PATCH v4 2/3] VFIO driver for mediated PCI device

2016-05-27 Thread Tian, Kevin
> From: Kirti Wankhede > Sent: Wednesday, May 25, 2016 9:05 PM > > > >> +{ > >> + int ret = -EINVAL; > >> + struct phy_device *phy_dev = mdevice->phy_dev; > >> + > >> + if (dev_is_pci(phy_dev->dev) && phy_dev->ops->get_region_info) { > >> + mutex_lock(&mdevice->ops_lock); > >> +

[Qemu-devel] [PULL 03/31] hw/char: QOM'ify escc.c

2016-05-27 Thread Paolo Bonzini
From: xiaoqiang zhao * Drop the old SysBus init function and use instance_init * Call qemu_chr_add_handlers in the realize callback Signed-off-by: xiaoqiang zhao Message-Id: <1464158344-12266-2-git-send-email-zxq_yx_...@163.com> Signed-off-by: Paolo Bonzini --- hw/char/escc.c | 30 +++

[Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Paolo Bonzini
The following changes since commit b75536c9fa742f887304769d0608557bb8e3a27f: blockjob: Remove BlockJob.bs (2016-05-25 19:04:21 +0200) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to 7052033834d4c2d7ade147cf5b045be6ea

[Qemu-devel] [PULL 04/31] hw/char: QOM'ify etraxfs_ser.c

2016-05-27 Thread Paolo Bonzini
From: xiaoqiang zhao * Drop the old SysBus init function and use instance_init * Call qemu_chr_add_handlers in the realize callback * Use qdev chardev prop instead of qemu_char_get_next_serial * Add etraxfs_ser_create function to create etraxfs serial device Signed-off-by: xiaoqiang zhao Messag

[Qemu-devel] [PULL 15/31] block/iscsi: avoid potential overflow of acb->task->cdb

2016-05-27 Thread Paolo Bonzini
From: Peter Lieven at least in the path via virtio-blk the maximum size is not restricted. Cc: qemu-sta...@nongnu.org Signed-off-by: Peter Lieven Message-Id: <1464080368-29584-1-git-send-email...@kamp.de> Signed-off-by: Paolo Bonzini --- block/iscsi.c | 7 +++ 1 file changed, 7 insertions

[Qemu-devel] [PULL 17/31] docs/atomics: update atomic_read/set comparison with Linux

2016-05-27 Thread Paolo Bonzini
From: "Emilio G. Cota" Recently Linux did a mass conversion of its atomic_read/set calls so that they at least are READ/WRITE_ONCE. See Linux's commit 62e8a325 ("atomic, arch: Audit atomic_{read,set}()"). It seems though that their documentation hasn't been updated to reflect this. The appended

[Qemu-devel] [PULL 06/31] hw/char: QOM'ify lm32_uart.c

2016-05-27 Thread Paolo Bonzini
From: xiaoqiang zhao * Drop the old SysBus init function and use instance_init * Call qemu_chr_add_handlers in the realize callback * Use qdev chardev prop instead of qemu_char_get_next_serial * Add lm32_uart_create function to create lm32 uart device Signed-off-by: xiaoqiang zhao Message-Id: <

[Qemu-devel] [PULL 01/31] Add optionrom compatible with fw_cfg DMA version

2016-05-27 Thread Paolo Bonzini
From: Marc Marí This optionrom is based on linuxboot.S. Signed-off-by: Marc Marí Signed-off-by: Richard W.M. Jones Message-Id: <1464027093-24073-2-git-send-email-rjo...@redhat.com> [Add -fno-toplevel-reorder. - Paolo] Signed-off-by: Paolo Bonzini --- .gitignore| 4 +

[Qemu-devel] [PULL 10/31] scsi: pvscsi: check command descriptor ring buffer size (CVE-2016-4952)

2016-05-27 Thread Paolo Bonzini
From: Prasad J Pandit Vmware Paravirtual SCSI emulation uses command descriptors to process SCSI commands. These descriptors come with their ring buffers. A guest could set the ring buffer size to an arbitrary value leading to OOB access issue. Add check to avoid it. Reported-by: Li Qiang Signe

[Qemu-devel] [PULL 02/31] Revert "memory: Drop FlatRange.romd_mode"

2016-05-27 Thread Paolo Bonzini
This reverts commit 5b5660adf1fdb61db14ec681b10463b8cba633f1, as it breaks the UEFI guest firmware (known as ArmVirtPkg or AAVMF) running in the "virt" machine type of "qemu-system-aarch64": Contrary to the commit message, (a->mr == b->mr) does *not* imply that (a->romd_mode == b->romd_mode): the

[Qemu-devel] [PULL 11/31] scsi: mptsas: infinite loop while fetching requests

2016-05-27 Thread Paolo Bonzini
From: Prasad J Pandit The LSI SAS1068 Host Bus Adapter emulator in Qemu, periodically looks for requests and fetches them. A loop doing that in mptsas_fetch_requests() could run infinitely if 's->state' was not operational. Move check to avoid such a loop. Reported-by: Li Qiang Signed-off-by: P

[Qemu-devel] [PULL 05/31] hw/char: QOM'ify lm32_juart.c

2016-05-27 Thread Paolo Bonzini
From: xiaoqiang zhao * Drop the old SysBus init function * Call qemu_chr_add_handlers in the realize callback * Use qdev chardev prop instead of qemu_char_get_next_serial Signed-off-by: xiaoqiang zhao Message-Id: <1464158344-12266-4-git-send-email-zxq_yx_...@163.com> Tested-by: Michael Walle A

[Qemu-devel] [PULL 19/31] atomics: do not emit consume barrier for atomic_rcu_read

2016-05-27 Thread Paolo Bonzini
From: "Emilio G. Cota" Currently we emit a consume-load in atomic_rcu_read. Because of limitations in current compilers, this is overkill for non-Alpha hosts and it is only useful to make Thread Sanitizer work. This patch leaves the consume-load in atomic_rcu_read when compiling with Thread San

[Qemu-devel] [PULL 08/31] nbd: Don't trim unrequested bytes

2016-05-27 Thread Paolo Bonzini
From: Eric Blake Similar to commit df7b97ff, we are mishandling clients that give an unaligned NBD_CMD_TRIM request, and potentially trimming bytes that occur before their request; which in turn can cause potential unintended data loss (unlikely in practice, since most clients are sane and issue

[Qemu-devel] [PULL 09/31] kvm_stat: Remove

2016-05-27 Thread Paolo Bonzini
The source has moved to the Linux kernel tree. Signed-off-by: Paolo Bonzini --- Makefile | 9 - scripts/kvm/kvm_stat | 825 -- scripts/kvm/kvm_stat.texi | 55 3 files changed, 889 deletions(-) delete mode 100755 scripts/k

[Qemu-devel] [PULL 21/31] xen-hvm: ignore background I/O sections

2016-05-27 Thread Paolo Bonzini
From: Paul Durrant Since Xen will correctly handle accesses to unimplemented I/O ports (by returning all 1's for reads and ignoring writes) there is no need for QEMU to register backgroud I/O sections. This patch therefore adds checks to xen_io_add/del so that sections with memory-region ops poi

[Qemu-devel] [PULL 16/31] bt: rewrite csrhci_write to avoid out-of-bounds writes

2016-05-27 Thread Paolo Bonzini
The usage of INT_MAX in this function confuses Coverity. I think the defect is bogus, however there is no protection against getting more than sizeof(s->inpkt) bytes from the character device backend. Rewrite the function to only fill in as much data as needed from buf into s->inpkt. The plen va

[Qemu-devel] [PULL 07/31] hw/char: QOM'ify milkymist-uart.c

2016-05-27 Thread Paolo Bonzini
From: xiaoqiang zhao drop the qemu_char_get_next_serial and use chardev prop instead Signed-off-by: xiaoqiang zhao Message-Id: <1464158344-12266-6-git-send-email-zxq_yx_...@163.com> Tested-by: Michael Walle Acked-by: Michael Walle Signed-off-by: Paolo Bonzini --- hw/char/milkymist-uart.c |

[Qemu-devel] [PULL 26/31] scsi-block: always use SG_IO

2016-05-27 Thread Paolo Bonzini
Using pread/pwrite or io_submit has the advantage of eliminating the bounce buffer, but drops the SCSI status. This keeps the guest from seeing unit attention codes, as well as statuses such as RESERVATION CONFLICT. Because we know scsi-block operates on an SBC device we can still use the DMA hel

[Qemu-devel] [PULL 24/31] scsi-disk: add need_fua_emulation to SCSIDiskClass

2016-05-27 Thread Paolo Bonzini
scsi-block will be able to do FUA just by passing the request through to the LUN (which is also more efficient); there is no need to emulate it like we do for scsi-disk. Add a new method to distinguish this. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 9 +++-- 1 file changed, 7 i

[Qemu-devel] [PULL 18/31] atomics: emit an smp_read_barrier_depends() barrier only for Alpha and Thread Sanitizer

2016-05-27 Thread Paolo Bonzini
From: "Emilio G. Cota" For correctness, smp_read_barrier_depends() is only required to emit a barrier on Alpha hosts. However, we are currently emitting a consume fence unconditionally, and most compilers currently treat consume and acquire fences as equivalent. Fix it by keeping the consume fen

[Qemu-devel] [PULL 13/31] scsi: megasas: initialise local configuration data buffer

2016-05-27 Thread Paolo Bonzini
From: Prasad J Pandit When reading MegaRAID SAS controller configuration via MegaRAID Firmware Interface(MFI) commands, routine megasas_dcmd_cfg_read uses an uninitialised local data buffer. Initialise this buffer to avoid stack information leakage. Reported-by: Li Qiang Signed-off-by: Prasad J

[Qemu-devel] [PULL 27/31] scsi-generic: Merge block max xfer len in INQUIRY response

2016-05-27 Thread Paolo Bonzini
From: Fam Zheng The rationale is similar to the above mode sense response interception: this is practically the only channel to communicate restraints from elsewhere such as host and block driver. The scsi bus we attach onto can have a larger max xfer len than what is accepted by the host file s

[Qemu-devel] [PULL 22/31] scsi-disk: introduce a common base class

2016-05-27 Thread Paolo Bonzini
This will be the place to add DMAIOFuncs in the next patch. There are also a couple DeviceClass members that can be moved to the abstract class's initialization function. Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 36 ++-- 1 file changed, 22 insertion

[Qemu-devel] [PULL 23/31] scsi-disk: introduce dma_readv and dma_writev

2016-05-27 Thread Paolo Bonzini
These are replacements for blk_aio_readv and blk_aio_writev that allow customization of the data path. They reuse the DMA helpers' DMAIOFunc callback type, so that the same function can be used in either the QEMUSGList or the bounce-buffered case. This customization will be needed in the next pat

[Qemu-devel] [PULL 14/31] scsi: megasas: check 'read_queue_head' index value

2016-05-27 Thread Paolo Bonzini
From: Prasad J Pandit While doing MegaRAID SAS controller command frame lookup, routine 'megasas_lookup_frame' uses 'read_queue_head' value as an index into 'frames[MEGASAS_MAX_FRAMES=2048]' array. Limit its value within array bounds to avoid any OOB access. Reported-by: Li Qiang Signed-off-by:

[Qemu-devel] [PULL 28/31] memory: remove qemu_get_ram_fd, qemu_set_ram_fd, qemu_ram_block_host_ptr

2016-05-27 Thread Paolo Bonzini
Remove direct uses of ram_addr_t and optimize memory_region_{get,set}_fd now that a MemoryRegion knows its RAMBlock directly. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- exec.c | 34 -- hw/misc/ivshmem.c | 5 ++--- hw/v

[Qemu-devel] [PULL 25/31] scsi-disk: introduce scsi_disk_req_check_error

2016-05-27 Thread Paolo Bonzini
Commonize all the checks for canceled requests and errors. The next patch will add another case to check for, in order to handle passthrough commands. There is no semantic change here; the only nontrivial modification is in scsi_write_do_fua, where cancellation has been checked earlier by both ca

[Qemu-devel] [PULL 12/31] scsi: megasas: use appropriate property buffer size

2016-05-27 Thread Paolo Bonzini
From: Prasad J Pandit When setting MegaRAID SAS controller properties via MegaRAID Firmware Interface(MFI) commands, a user supplied size parameter is used to set property value. Use appropriate size value to avoid OOB access issues. Reported-by: Li Qiang Signed-off-by: Prasad J Pandit Message

[Qemu-devel] [PULL 30/31] memory: split memory_region_from_host from qemu_ram_addr_from_host

2016-05-27 Thread Paolo Bonzini
Move the old qemu_ram_addr_from_host to memory_region_from_host and make it return an offset within the region. For qemu_ram_addr_from_host return the ram_addr_t directly, similar to what it was before commit 1b5ec23 ("memory: return MemoryRegion from qemu_ram_addr_from_host", 2013-07-04). Review

[Qemu-devel] [PULL 31/31] exec: hide mr->ram_addr from qemu_get_ram_ptr users

2016-05-27 Thread Paolo Bonzini
Let users of qemu_get_ram_ptr and qemu_ram_ptr_length pass in an address that is relative to the MemoryRegion. This basically means what address_space_translate returns. Because the semantics of the second parameter change, rename the function to qemu_map_ram_ptr. Reviewed-by: Fam Zheng Signed-

[Qemu-devel] [PULL 20/31] docs/atomics: update comparison with Linux

2016-05-27 Thread Paolo Bonzini
Over time, some differences between QEMU and Linux atomics are getting smoothed. In particular, Linux grew atomic_fetch_or (and in general the differences regarding RMW operations were not described accurately) and smp_load_acquire/smp_store_release. Also, set_mb was renamed to smp_store_mb(). I

[Qemu-devel] [PULL 29/31] exec: remove ram_addr argument from qemu_ram_block_from_host

2016-05-27 Thread Paolo Bonzini
Of the two callers, one does not use it, and the other can compute it itself based on the other output argument (offset) and the RAMBlock. Reviewed-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- exec.c| 13 ++--- include/exec/cpu-common.h | 2 +- migration/p

Re: [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction

2016-05-27 Thread Sergey Fedorov
On 27/05/16 04:00, Richard Henderson wrote: > diff --git a/tcg/tcg-opc.h b/tcg/tcg-opc.h > index 6d0410c..b772d90 100644 > --- a/tcg/tcg-opc.h > +++ b/tcg/tcg-opc.h > @@ -42,6 +42,8 @@ DEF(br, 0, 0, 1, TCG_OPF_BB_END) > # define IMPL64 TCG_OPF_64BIT > #endif > > +DEF(fence, 0, 0, 0, TCG_OPF_SI

[Qemu-devel] [PATCH RFC v2 kernel] balloon: speed up inflating/deflating process

2016-05-27 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, Bellow is test result of time spends on inflating the balloon to 3GB of a 4GB idle guest: a. allocating pages (6.5%, 103ms) b. sending PFNs to host (68.3%, 787ms) c. address translation (6.1%, 96ms) d. madvise (19%, 300ms) It

[Qemu-devel] [PATCH RFC v2 QEMU] balloon: speed up inflating & deflating process

2016-05-27 Thread Liang Li
The implementation of the current virtio-balloon is not very efficient, Bellow is test result of time spends on inflating the balloon to 3GB of a 4GB idle guest: a. allocating pages (6.5%, 103ms) b. sending PFNs to host (68.3%, 787ms) c. address translation (6.1%, 96ms) d. madvise (19%, 300ms) It

Re: [Qemu-devel] [PATCH v2 10/12] tcg/tci: Add support for fence

2016-05-27 Thread Sergey Fedorov
On 27/05/16 04:00, Richard Henderson wrote: > diff --git a/tci.c b/tci.c > index b488c0d..53b3f71 100644 > --- a/tci.c > +++ b/tci.c > @@ -1236,6 +1236,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t > *tb_ptr) > tcg_abort(); > } > break; > +

Re: [Qemu-devel] [PULL 02/31] Revert "memory: Drop FlatRange.romd_mode"

2016-05-27 Thread Laszlo Ersek
On 05/27/16 12:06, Paolo Bonzini wrote: > This reverts commit 5b5660adf1fdb61db14ec681b10463b8cba633f1, > as it breaks the UEFI guest firmware (known as ArmVirtPkg or AAVMF) > running in the "virt" machine type of "qemu-system-aarch64": > > Contrary to the commit message, (a->mr == b->mr) does *no

[Qemu-devel] [PATCH 3/4] block: Prevent sleeping jobs from resuming if they have been paused

2016-05-27 Thread Alberto Garcia
If we pause a block job and drain its BlockDriverState we want that the job remains inactive until we call block_job_resume() again. However if we pause the job while it is sleeping then it will resume when the sleep timer fires. This patch prevents that from happening by checking if the job has

[Qemu-devel] [PATCH 1/4] block: use the block job list in bdrv_drain_all()

2016-05-27 Thread Alberto Garcia
bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate over all top-level BlockDriverStates. Therefore the code is unable to find block jobs in other nodes. This patch uses block_job_next() to iterate over all block jobs. Signed-off-by: Alberto Garcia --- block/io.c | 24 +++

[Qemu-devel] [PATCH 0/4] Misc block job patches

2016-05-27 Thread Alberto Garcia
Hi, here's a few patches from my block-stream series that I think are ready to be merged now. I don't think there's anything controversial here: - Patches 1 and 2 simply use block_job_next() in places where bdrv_next() was being used to look for block jobs. - Patch 3 is a fix that was a

[Qemu-devel] [PATCH 2/4] block: use the block job list in qmp_query_block_jobs()

2016-05-27 Thread Alberto Garcia
qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but this function can only find those in top-level BlockDriverStates. This patch uses block_job_next() instead. Signed-off-by: Alberto Garcia --- blockdev.c | 20 1 file changed, 8 insertions(+), 12 deletions(-

[Qemu-devel] [PATCH 4/4] block: Create the commit block job before reopening any image

2016-05-27 Thread Alberto Garcia
If the base or overlay images need to be reopened in read-write mode but the block_job_create() call fails then no one will put those images back in read-only mode. We can solve this problem easily by calling block_job_create() first. Signed-off-by: Alberto Garcia --- block/commit.c | 11 ++

Re: [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction

2016-05-27 Thread Lluís Vilanova
Richard Henderson writes: > This commit introduces the TCGOpcode for fence instruction. [...] I think this patch sould also document the opcpde in "tcg/README". Cheers, Lluis

Re: [Qemu-devel] [PATCH 1/4] block: use the block job list in bdrv_drain_all()

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > bdrv_drain_all() pauses all block jobs by using bdrv_next() to iterate > over all top-level BlockDriverStates. Therefore the code is unable to > find block jobs in other nodes. > > This patch uses block_job_next() to iterate over all block jobs. > > Si

Re: [Qemu-devel] [PATCH 2/4] block: use the block job list in qmp_query_block_jobs()

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > qmp_query_block_jobs() uses bdrv_next() to look for block jobs, but > this function can only find those in top-level BlockDriverStates. > > This patch uses block_job_next() instead. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 20 --

Re: [Qemu-devel] [RFC PATCH v4 0/3] Add Mediated device support[was: Add vGPU support]

2016-05-27 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, May 25, 2016 9:44 PM > > On Wed, 25 May 2016 07:13:58 + > "Tian, Kevin" wrote: > > > > From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > > > Sent: Wednesday, May 25, 2016 3:58 AM > > > > > > This series adds Me

Re: [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 11:56, Lluís Vilanova wrote: > Richard Henderson writes: > >> This commit introduces the TCGOpcode for fence instruction. > [...] > > I think this patch sould also document the opcpde in "tcg/README". Yes, please. I have no idea what this thing is for, and neither this patch nor

Re: [Qemu-devel] [PATCH 3/4] block: Prevent sleeping jobs from resuming if they have been paused

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > If we pause a block job and drain its BlockDriverState we want that > the job remains inactive until we call block_job_resume() again. > > However if we pause the job while it is sleeping then it will resume > when the sleep timer fires. > > This patch

Re: [Qemu-devel] [PATCH 4/4] block: Create the commit block job before reopening any image

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > If the base or overlay images need to be reopened in read-write mode > but the block_job_create() call fails then no one will put those > images back in read-only mode. > > We can solve this problem easily by calling block_job_create() first. > > Signe

Re: [Qemu-devel] [PATCH 0/4] Misc block job patches

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > Hi, > > here's a few patches from my block-stream series that I think are > ready to be merged now. > > I don't think there's anything controversial here: > > - Patches 1 and 2 simply use block_job_next() in places where > bdrv_next() was being

Re: [Qemu-devel] [PULL 00/14] docker queue

2016-05-27 Thread Peter Maydell
ble in the git repository at: > > git://github.com/famz/qemu tags/pull-docker-20160527-1 > > for you to fetch changes up to 860acf2a7a7d123a32388debbb005bf3a42077b2: > > MAINTAINERS: Add tests/docker (2016-05-27 13:58:08 +0800) > > ---

Re: [Qemu-devel] [PATCH 3/3] KVM: use KVM_CAP_MAX_VCPU_ID

2016-05-27 Thread Greg Kurz
On Fri, 27 May 2016 13:58:28 +1000 David Gibson wrote: > On Thu, May 26, 2016 at 10:02:23AM +0200, Greg Kurz wrote: > > As stated in linux/Documentation/virtual/kvm/api.txt: > > > > The maximum possible value for max_vcpu_id can be retrieved using the > > KVM_CAP_MAX_VCPU_ID of the KVM_CHECK_EXT

Re: [Qemu-devel] [PATCH v4 1/1] Introduce "xen-load-devices-state"

2016-05-27 Thread Anthony PERARD
On Mon, Apr 11, 2016 at 11:56:02AM +0800, Changlong Xie wrote: > From: Wen Congyang > > Introduce a "xen-load-devices-state" QAPI command that can be used to > load the state of all devices, but not the RAM or the block devices of > the VM. > > We only have hmp commands savevm/loadvm, and qmp co

Re: [Qemu-devel] [RFC PATCH 1/2] tests/docker/docker.py: support --qemu option

2016-05-27 Thread Fam Zheng
On Thu, 05/26 15:27, Alex Bennée wrote: > When passed the name of a qemu-$arch binary we copy it and any linked > libraries into the docker build context. These can then be included by a > dockerfile with the line: > > # Copy all of context into container > ADD . / > > Signed-off-by: Alex Ben

Re: [Qemu-devel] [PATCH 1/6] hw/char: QOM'ify pl011 model

2016-05-27 Thread xiaoqiang zhao
> 在 2016年5月27日,17:42,Paolo Bonzini 写道: > > > > On 27/05/2016 11:01, Peter Maydell wrote: I found bcm2835-peripherals is only used by bcm2836 code, you mean this(bcm2836) is the 'board level' and I should set chardev properties here? >> Device models subclass DeviceClass (possi

Re: [Qemu-devel] [RFC PATCH 2/2] add debian-bootstrap.docker target

2016-05-27 Thread Fam Zheng
On Thu, 05/26 15:27, Alex Bennée wrote: > Together with some changes to the docker script you can now build an > arbitrary architecture of Debian using debootstrap. To achieve this I > introduce the concept of a HOST_CMD in the docker config file. While > copying the file into workspace the HOST_CM

Re: [Qemu-devel] [RFC PATCH 0/2] Support building qemu-user powered docker test images

2016-05-27 Thread Fam Zheng
On Thu, 05/26 15:27, Alex Bennée wrote: > $ docker run -t -i --rm debian:armhf /bin/bash > root@e659ddf8232c:/# uname -a > Linux e659ddf8232c 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 > UTC 2016 armv7l GNU/Linux > > Obviously this requires Fam's stuff to go in and needs some clean-up > b

Re: [Qemu-devel] [PATCH v5 07/27] block: Handle image locking during reopen

2016-05-27 Thread Fam Zheng
On Fri, 05/27 11:57, Max Reitz wrote: > On 27.05.2016 09:48, Fam Zheng wrote: > > On Tue, 05/24 18:28, Max Reitz wrote: > > [...] > > >> Also: Should bdrv_reopen_prepare() check that the locking flags are not > >> changed? > > > > Read only flag also matters in fcntl locks, so practically we alm

Re: [Qemu-devel] [PULL 00/31] Misc changes for 2016-05-27

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 11:06, Paolo Bonzini wrote: > The following changes since commit b75536c9fa742f887304769d0608557bb8e3a27f: > > blockjob: Remove BlockJob.bs (2016-05-25 19:04:21 +0200) > > are available in the git repository at: > > git://github.com/bonzini/qemu.git tags/for-upstream > > for

Re: [Qemu-devel] [PULL 00/14] docker queue

2016-05-27 Thread Fam Zheng
nto staging (2016-05-26 > > 19:18:08 +0100) > > > > are available in the git repository at: > > > > git://github.com/famz/qemu tags/pull-docker-20160527-1 > > > > for you to fetch changes up to 860acf2a7a7d123a32388debbb005

[Qemu-devel] [virtio-net] migration

2016-05-27 Thread Catalin Vasile
Hi, What is the workflow for virtio-net devices when migrating the VM it belongs to? >From what I understand so far the stop() primitives in qemu are called for >virtio_net and vhost_net which makes the virtqueue reset such that it seems >the queues are completely empty. How does the guest know

[Qemu-devel] [PULL v2 04/38] linux-user: Define TARGET_ERESTART* errno values

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Define TARGET_ERESTARTSYS; like the kernel, we will use this to indicate that a guest system call should be restarted. We use the same value the kernel does for this, 512. Signed-off-by: Timothy Edward Baldwin [PMM: split out from the patch which moves and renumbers TAR

[Qemu-devel] [PULL v2 01/38] linux-user: Check array bounds in errno conversion

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Check array bounds in host_to_target_errno() and target_to_host_errno(). Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-2-git-send-email-t.e.baldwi...@members.leeds.ac.uk [PMM: Add a lower-bound check, use braces on if(), tweak commit message] Signed-

[Qemu-devel] [PULL v2 00/38] linux-user pull request

2016-05-27 Thread riku . voipio
iku.voipio/qemu.git tags/pull-linux-user-20160527 for you to fetch changes up to 49e55cbacf4ad08f831b9f3f9cb0f3082883a3a1: linux-user,target-ppc: fix use of MSR_LE (2016-05-27 14:50:40 +0300) linux-user pull request v2 fo

Re: [Qemu-devel] [PULL 00/14] docker queue

2016-05-27 Thread Peter Maydell
On 27 May 2016 at 13:56, Fam Zheng wrote: > On Fri, 05/27 12:15, Peter Maydell wrote: >> Something seems to be causing make on Linux to warn: >> /home/pm215/qemu/rules.mak:180: warning: overriding recipe for target >> `clean-timestamp' >> /home/pm215/qemu/rules.mak:180: warning: ignoring old recip

[Qemu-devel] [PULL v2 06/38] linux-user: Support for restarting system calls for x86 targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the x86 main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code rather than passing it back out as the "return code" from do_sigreturn() * handle TARGET_QEMU_ESIGRETUR

[Qemu-devel] [PULL v2 08/38] linux-user: Support for restarting system calls for MIPS targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the MIPS main loop code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn (We already handle TARGET_QEMU_ESIGRETURN.) Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-7-git-send-email-t.e.baldwi...@members.leeds.ac.uk Rev

[Qemu-devel] [PULL v2 02/38] linux-user: Consistently return host errnos from do_openat()

2016-05-27 Thread riku . voipio
From: Peter Maydell The function do_openat() is not consistent about whether it is returning a host errno or a guest errno in case of failure. Standardise on returning -1 with errno set (ie caller has to call get_errno()). Signed-off-by: Peter Maydell Reported-by: Timothy Edward Baldwin Signed

[Qemu-devel] [PULL v2 07/38] linux-user: Support for restarting system calls for ARM targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the 32-bit and 64-bit ARM main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that

[Qemu-devel] [PULL v2 12/38] linux-user: Support for restarting system calls for Alpha targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the Alpha main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop should not touch any guest CPU state Signed-off-by: Timothy Ed

[Qemu-devel] [PULL v2 16/38] linux-user: Support for restarting system calls for S390 targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the S390 main loop and sigreturn code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn * set all guest CPU state within signal.c code on sigreturn * handle TARGET_QEMU_ESIGRETURN in the main loop as the indication that the main loop sho

[Qemu-devel] [PULL v2 09/38] linux-user: Support for restarting system calls for PPC targets

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Update the PPC main loop code: * on TARGET_ERESTARTSYS, wind guest PC backwards to repeat syscall insn (We already handle TARGET_QEMU_ESIGRETURN.) Signed-off-by: Timothy Edward Baldwin Message-id: 1441497448-32489-8-git-send-email-t.e.baldwi...@members.leeds.ac.uk Revi

[Qemu-devel] [PULL v2 05/38] linux-user: Renumber TARGET_QEMU_ESIGRETURN, make it not arch-specific

2016-05-27 Thread riku . voipio
From: Timothy E Baldwin Currently we define a QEMU-internal errno TARGET_QEMU_ESIGRETURN only on the MIPS and PPC targets; move this to errno_defs.h so it is available for all architectures, and renumber it to 513. We pick 513 because this is safe from future use as a system call return value: Li

  1   2   3   >