[Qemu-devel] [PULL 17/18] hmp: Add 'info hotpluggable-cpus' HMP command

2016-06-16 Thread David Gibson
From: Bharata B Rao This is the HMP equivalent for QMP query-hotpluggable-cpus. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson [dwg: Fixed problem with printf formats on 32-bit host] Signed-off-by: David Gibson --- hmp-commands-info.hx | 14 ++ hmp.c| 42 +

[Qemu-devel] [PULL 18/18] spapr: implement query-hotpluggable-cpus callback

2016-06-16 Thread David Gibson
From: Igor Mammedov It returns a list of present/possible to hotplug CPU objects with a list of properties to use with device_add. in spapr case returned list would looks like: -> { "execute": "query-hotpluggable-cpus" } <- {"return": [ { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-co

Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-16 Thread Thomas Huth
On 17.06.2016 08:07, David Gibson wrote: > On Wed, Jun 15, 2016 at 01:10:18PM +1000, David Gibson wrote: >> On Tue, Jun 14, 2016 at 03:57:56PM +0200, Thomas Huth wrote: >>> Since the mac99 and g3beige PowerPC machines recently broke without >>> being noticed, it would be good to have a tester for "

[Qemu-devel] [PULL 09/18] spapr_drc: Prevent detach racing against attach for CPU DR

2016-06-16 Thread David Gibson
From: Bharata B Rao If a CPU is hot removed while hotplug of the same is still in progress, the guest crashes. Prevent this by ensuring that detach is done only after attach has completed. The existing code already prevents such race for PCI hotplug. However given that CPU is a logical DR unlike

[Qemu-devel] [PULL 03/18] target-ppc: Bug in BookE wait instruction

2016-06-16 Thread David Gibson
From: Jakub Horak Fixed bug in code generation for the PowerPC "wait" instruction. It doesn't make sense to store a non-initialized register. Signed-off-by: Jakub Horak [dwg: revised commit message] Signed-off-by: David Gibson --- target-ppc/translate.c | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PULL 14/18] spapr: CPU hotplug support

2016-06-16 Thread David Gibson
From: Bharata B Rao Set up device tree entries for the hotplugged CPU core and use the exising RTAS event logging infrastructure to send CPU hotplug notification to the guest. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/ppc/spapr.c

[Qemu-devel] [PULL 13/18] spapr: convert boot CPUs into CPU core devices

2016-06-16 Thread David Gibson
From: Bharata B Rao Introduce sPAPRMachineClass.dr_cpu_enabled to indicate support for CPU core hotplug. Initialize boot time CPUs as core deivces and prevent topologies that result in partially filled cores. Both of these are done only if CPU core hotplug is supported. Note: An unrelated change

[Qemu-devel] [PULL 11/18] spapr: Abstract CPU core device and type specific core devices

2016-06-16 Thread David Gibson
From: Bharata B Rao Add sPAPR specific abastract CPU core device that is based on generic CPU core device. Use this as base type to create sPAPR CPU specific core devices. TODO: - Add core types for other remaining CPU types - Handle CPU model alias correctly Signed-off-by: Bharata B Rao Signe

[Qemu-devel] [PULL 10/18] qom: API to get instance_size of a type

2016-06-16 Thread David Gibson
From: Bharata B Rao Add an API object_type_get_size(const char *typename) that returns the instance_size of the give typename. Signed-off-by: Bharata B Rao Signed-off-by: David Gibson --- include/qom/object.h | 8 +++- qom/object.c | 8 2 files changed, 15 insertions(+),

[Qemu-devel] [PULL 16/18] QMP: Add query-hotpluggable-cpus

2016-06-16 Thread David Gibson
From: Igor Mammedov It will allow mgmt to query present and hotpluggable CPU objects, it is required from a target platform that wishes to support command to implement and set MachineClass.query_hotpluggable_cpus callback, which will return a list of possible CPU objects with options that would b

[Qemu-devel] [PULL 06/18] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-06-16 Thread David Gibson
From: Igor Mammedov pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandler. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao Reviewed-by: David Gibson Signed-off-by: David Gibson --- hw/core/hotpl

[Qemu-devel] [PULL 00/18] ppc-for-2.7 queue 20160617

2016-06-16 Thread David Gibson
The following changes since commit 585fcd4b11070b3220685fc54ecca1991cdeb161: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-06-16 17:58:45 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.7-20160617 for you

[Qemu-devel] [PULL 15/18] spapr: CPU hot unplug support

2016-06-16 Thread David Gibson
From: Bharata B Rao Remove the CPU core device by removing the underlying CPU thread devices. Hot removal of CPU for sPAPR guests is achieved by sending the hot unplug notification to the guest. Release the vCPU object after CPU hot unplug so that vCPU fd can be parked and reused. Signed-off-by:

[Qemu-devel] [PULL 05/18] target-ppc: Fix rlwimi, rlwinm, rlwnm

2016-06-16 Thread David Gibson
From: Richard Henderson In 63ae0915f8ec, I arranged to use a 32-bit rotate, without considering the effect of a mask value that wraps around to the high bits of the word. Signed-off-by: Richard Henderson Signed-off-by: David Gibson --- target-ppc/translate.c | 73 +

[Qemu-devel] [PULL 02/18] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-16 Thread David Gibson
From: Thomas Huth Since the mac99 and g3beige PowerPC machines recently broke without being noticed, it would be good to have a tester for "make check" that detects such issues immediately. A simple way to test the firmware of these machines is to use the "-prom-env" parameter of QEMU. This param

[Qemu-devel] [PULL 08/18] xics, xics_kvm: Handle CPU unplug correctly

2016-06-16 Thread David Gibson
From: Bharata B Rao XICS is setup for each CPU during initialization. Provide a routine to undo the same when CPU is unplugged. While here, move ss->cs management into xics from xics_kvm since there is nothing KVM specific in it. Also ensure xics reset doesn't set irq for CPUs that are already un

[Qemu-devel] [PULL 07/18] cpu: Abstract CPU core type

2016-06-16 Thread David Gibson
From: Bharata B Rao Add an abstract CPU core type that could be used by machines that want to define and hotplug CPUs in core granularity. Signed-off-by: Bharata B Rao Signed-off-by: Igor Mammedov [Integer core property] Reviewed-by: David Gibson Reviewed-by: Igor Mammedov [dw

[Qemu-devel] [PULL 12/18] spapr: Move spapr_cpu_init() to spapr_cpu_core.c

2016-06-16 Thread David Gibson
From: Bharata B Rao Start consolidating CPU init related routines in spapr_cpu_core.c. As part of this, move spapr_cpu_init() and its dependencies from spapr.c to spapr_cpu_core.c No functionality change in this patch. Signed-off-by: Bharata B Rao [dwg: Rename TIMEBASE_FREQ to SPAPR_TIMEBASE_F

[Qemu-devel] [PULL 01/18] hw/ppc/spapr: Silence deprecation message in qtest mode

2016-06-16 Thread David Gibson
From: Thomas Huth When running "make check", there is currently always an error message saying "spapr-pci-vfio-host-bridge is deprecated". This happens because the QOM tests are instantiating all possible devices, and the error message is currently located in the instance_init() function of the d

[Qemu-devel] [PULL 04/18] vfio: Fix broken EEH

2016-06-16 Thread David Gibson
From: Gavin Shan vfio_eeh_container_op() is the backend that communicates with host kernel to support EEH functionality in QEMU. However, the functon should return the value from host kernel instead of 0 unconditionally. dwg: Specifically the problem occurs for the handful of EEH sub-operations

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread David Gibson
On Fri, Jun 17, 2016 at 08:03:29AM +0200, Cédric Le Goater wrote: > On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > > On 06/17/2016 04:27 AM, David Gibson wrote: > >> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > >>> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wro

Re: [Qemu-devel] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread Cédric Le Goater
On 06/16/2016 03:07 AM, David Gibson wrote: > On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> This reworks emulation of the various "rfi" variants. I removed >> some masking bits that I couldn't make sense of, the only bit that >> I am aware

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

2016-06-16 Thread Changlong Xie
For v19, Stefan said he had reviewed most part of this patchsets. So, this series need more comments from block and block job maintainers. @Jeff and/or Kevin, ping... On 06/14/2016 03:53 PM, Changlong Xie wrote: Block replication is a very important feature which is used for continuous checkpoi

Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-16 Thread David Gibson
On Wed, Jun 15, 2016 at 01:10:18PM +1000, David Gibson wrote: > On Tue, Jun 14, 2016 at 03:57:56PM +0200, Thomas Huth wrote: > > Since the mac99 and g3beige PowerPC machines recently broke without > > being noticed, it would be good to have a tester for "make check" > > that detects such issues imm

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread Cédric Le Goater
On 06/17/2016 07:54 AM, Cédric Le Goater wrote: > On 06/17/2016 04:27 AM, David Gibson wrote: >> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: >>> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: From: Benjamin Herrenschmidt This reworks emulation of

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread Cédric Le Goater
On 06/17/2016 04:27 AM, David Gibson wrote: > On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: >> On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: >>> From: Benjamin Herrenschmidt >>> >>> This reworks emulation of the various "rfi" variants. I removed >>> some masking

Re: [Qemu-devel] [PATCH] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL

2016-06-16 Thread Paolo Bonzini
> > > diff --git a/src/fw/msr_feature_control.c b/src/fw/msr_feature_control.c > > > new file mode 100644 > > > index 000..35d4ab8 > > > --- /dev/null > > > +++ b/src/fw/msr_feature_control.c > > > @@ -0,0 +1,16 @@ > > > +#include "util.h" // msr_feature_control_setup > > > +#include "x86.h" /

Re: [Qemu-devel] [PATCH v4] scsi: esp: check length before dma read

2016-06-16 Thread Amit Shah
Hi, On (Wed) 15 Jun 2016 [23:06:19], P J P wrote: > From: Prasad J Pandit > > While doing DMA read into ESP command buffer 's->cmdbuf', it could > write past the 's->cmdbuf' area, if it was partially filled; > ie. 's->cmdlen' wasn't set at the start of the buffer. > Check 'len' to avoid OOB acce

[Qemu-devel] [RFC] target-arm: fix semihosting ram base issue

2016-06-16 Thread Tsung-Han Lin
Hi, I made some changes to TRY TO fix the ARM semihosting issue in SYS_HEAPINFO handling. This problem has been bothering me for quite a while. A new global variable 'main_ram_base' is added while a new memory API, memory_region_add_subregion_main, is also provided to let SoC/board creator to init

Re: [Qemu-devel] [PATCH 7/7] sheepdog: remove useless casts

2016-06-16 Thread Hitoshi Mitake
At Wed, 15 Jun 2016 18:14:37 +0200, Laurent Vivier wrote: > > This patch is the result of coccinelle script > scripts/coccinelle/typecast.cocci > > CC: Hitoshi Mitake > CC: qemu-bl...@nongnu.org > Signed-off-by: Laurent Vivier > --- > block/sheepdog.c | 4 ++-- > 1 file changed, 2 insertions(+

Re: [Qemu-devel] [PATCH 4/4] qobject: Output valid JSON for non-finite numbers

2016-06-16 Thread Eric Blake
On 06/16/2016 10:17 AM, Markus Armbruster wrote: > Eric Blake writes: > >> It's better to give downstream clients a valid JSON string, >> even if they are semantically expecting a number, than it is >> to give them a bare keyword extension that can cause a >> lexical error. > > Incompatible chan

Re: [Qemu-devel] [PATCH 3/4] qobject: Parse non-finite numbers, as an extension

2016-06-16 Thread Eric Blake
On 06/16/2016 10:25 AM, Markus Armbruster wrote: > I think this commit mixes up parsing of non-finite numbers, which we may > or may not want, with general test improvements, which we'll want > regardless. Please split the patch. > > On the parsing of non-finite numbers: the code looks good to me

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-16 Thread Eric Blake
On 06/16/2016 04:10 AM, Stefan Hajnoczi wrote: > > io_sectors currently only accounts for bytes written, not bytes read. > > Therefore, I think we need: > > /* Don't charge for efficient zero writes */ > if (drv->bdrv_co_pwrite_zeroes) { > io_sectors = 0; > } That's not sufficient. NBD wi

Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation

2016-06-16 Thread David Gibson
On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: > On Mon, Jun 13, 2016 at 07:24:47AM +0200, Cédric Le Goater wrote: > > From: Benjamin Herrenschmidt > > > > This reworks emulation of the various "rfi" variants. I removed > > some masking bits that I couldn't make sense of, the only

Re: [Qemu-devel] [PATCH v2 15/17] block: Switch discard length bounds to byte-based

2016-06-16 Thread Fam Zheng
On Thu, 06/16 08:21, Eric Blake wrote: > On 06/15/2016 11:46 PM, Fam Zheng wrote: > > On Tue, 06/14 15:30, Eric Blake wrote: > >> Sector-based limits are awkward to think about; in our on-going > >> quest to move to byte-based interfaces, convert max_discard and > >> discard_alignment. Rename them

Re: [Qemu-devel] [RFC PATCH V4 0/4] Introduce COLO-compare

2016-06-16 Thread Zhang Chen
On 05/31/2016 07:06 PM, Jason Wang wrote: On 2016年05月31日 16:28, Zhang Chen wrote: On 05/31/2016 02:16 PM, Jason Wang wrote: On 2016年05月31日 11:54, Zhang Chen wrote: On 05/30/2016 11:19 AM, Jason Wang wrote: On 2016年05月25日 20:50, Zhang Chen wrote: COLO-compare is a part of COLO pro

Re: [Qemu-devel] [PATCH v4 2/3] target-i386: add migration support for Intel LMCE

2016-06-16 Thread Haozhong Zhang
On 06/16/16 14:58, Eduardo Habkost wrote: > On Thu, Jun 16, 2016 at 07:40:20PM +0200, Paolo Bonzini wrote: > > > > > > On 16/06/2016 19:36, Eduardo Habkost wrote: > > >> > > > >> > Eduardo said nice for this part in previous version [1], so we may wait > > >> > for his comments? > > >> > > > >>

Re: [Qemu-devel] [QEMU 3/7] Add the hmp and qmp interface for dropping cache

2016-06-16 Thread Li, Liang Z
> > > > +{ 'command': 'balloon_drop_cache', 'data': {'value': > > > > +'DropCacheType'} } > > > > > > Also, as noted in the man page quote above, it is recommended to > > > call > > > sync() to minimise dirty pages. Should we have a way to request a > > > sync as part of this monitor command. > > >

Re: [Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support

2016-06-16 Thread Haozhong Zhang
On 06/16/16 16:37, Eduardo Habkost wrote: > On Thu, Jun 16, 2016 at 02:06:19PM +0800, Haozhong Zhang wrote: > > From: Ashok Raj > > > > This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they > > are injected to only one VCPU rather than broadcast to all VCPUs. As KVM > > reports L

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Timothy Pearson
On closer inspection maybe it's not that odd...the parent and child tid pointers are in abi, not target, space. I'm going to assume direct assignment is correct (using __put_user()) and proceed from there. -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [QEMU 1/7] balloon: speed up inflating & deflating process

2016-06-16 Thread Li, Liang Z
> +chunk = TARGET_PAGE_SIZE; > +} > +} > +} > + > +static void balloon_bulk_pages(ram_addr_t base_pfn, unsigned long > >>> *bitmap, > + unsigned long len, int page_shift, > +bool deflate) { #if defined(__l

Re: [Qemu-devel] [PATCH] fw/msr_feature_control: add support to set MSR_IA32_FEATURE_CONTROL

2016-06-16 Thread Haozhong Zhang
On 06/16/16 14:03, Paolo Bonzini wrote: > > > On 16/06/2016 13:49, Haozhong Zhang wrote: > > diff --git a/src/fw/paravirt.c b/src/fw/paravirt.c > > index 8ed4380..640ee4c 100644 > > --- a/src/fw/paravirt.c > > +++ b/src/fw/paravirt.c > > @@ -153,6 +153,9 @@ qemu_platform_setup(void) > > mtrr

Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user

2016-06-16 Thread Laurent Vivier
Le 16/06/2016 à 21:15, Pranith Kumar a écrit : > On Thu, Jun 16, 2016 at 3:07 PM, Richard Henderson wrote: >> On 06/16/2016 11:56 AM, Pranith Kumar wrote: >>> Using gcc 6.1 for alpha-linux-user target we see the following build >>> error: >>> >>> /mnt/devops/code/qemu/target-alpha/translate.c: I

[Qemu-devel] [PULL v3 14/15] msi_init: change return value to 0 on success

2016-06-16 Thread Michael S. Tsirkin
From: Cao jin No caller use its return value as msi capability offset, also in order to make its return behaviour consistent with msix_init(). cc: Michael S. Tsirkin cc: Paolo Bonzini cc: Hannes Reinecke cc: Markus Armbruster cc: Marcel Apfelbaum Acked-by: Hannes Reinecke Reviewed-by: Mar

Re: [Qemu-devel] [PULL v2 00/32] pc, pci, virtio: new features, cleanups, fixes

2016-06-16 Thread Michael S. Tsirkin
On Wed, Jun 15, 2016 at 04:11:30PM +0100, Peter Maydell wrote: > On 14 June 2016 at 20:59, Michael S. Tsirkin wrote: > > changes from v1: > > - fixed up build on 32 bit > > - fixed up build on old glibc > > > > Peter, I could not reproduce the issue with noipmi that > > you reported. Could

[Qemu-devel] [PULL v3 13/15] fix some coding style problems

2016-06-16 Thread Michael S. Tsirkin
From: Cao jin It has: 1. More newlines make the code block well separated. 2. Add more comments for msi_init. 3. Fix a indentation in vmxnet3.c. 4. ioh3420 & xio3130_downstream: put PCI Express capability init function together, make it more readable. cc: Michael S. Tsirkin cc: Markus Armbru

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Timothy Pearson
OK, the fundamental problem is that do_fork() uses put_user_u32() on child_tidptr, but child_tidptr appears to be a host pointer. Treating it as a host pointer (direct assignment) allows fork to proceed, but this seems a bit odd to say the least. Still investigating. -- You received this bug no

[Qemu-devel] [PULL v3 12/15] pci core: assert ENOSPC when add capability

2016-06-16 Thread Michael S. Tsirkin
From: Cao jin ENOSPC is programming error, assert it for debugging. cc: Michael S. Tsirkin cc: Marcel Apfelbaum cc: Markus Armbruster Reviewed-by: Markus Armbruster Reviewed-by: Marcel Apfelbaum Signed-off-by: Cao jin Reviewed-by: Markus Armbruster Reviewed-by: Michael S. Tsirkin Signed

[Qemu-devel] [PULL v3 08/15] vhost-net: save & restore vhost-user acked features

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau The initial vhost-user connection sets the features to be negotiated with the driver. Renegotiation isn't possible without device reset. To handle reconnection of vhost-user backend, ensure the same set of features are provided, and reuse already acked features. Signed-o

[Qemu-devel] [PULL v3 09/15] vhost-net: save & restore vring enable state

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau A driver may change the vring enable state at run time but vhost-user backend may not be present (a contrived example is when the backend is disconnected and the device is reconfigured after driver rebinding) Restore the vring state when the vhost-user backend is started,

[Qemu-devel] [PULL v3 15/15] MAINTAINERS: add Marcel to PCI

2016-06-16 Thread Michael S. Tsirkin
Marcel is reviewing PCI patches anyway, things will be easier if people remember to Cc him. Cc: Marcel Apfelbaum Signed-off-by: Michael S. Tsirkin --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index df990a8..fe2279e 100644 --- a/MAINTAINERS +++ b/

[Qemu-devel] [PULL v3 07/15] vhost-net: do not crash if backend is not present

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau Do not crash when backend is not present while enabling the ring. A following patch will save the enabled state so it can be restored once the backend is started. Signed-off-by: Marc-André Lureau Tested-by: Yuanhan Liu Reviewed-by: Yuanhan Liu Reviewed-by: Victor Kapla

[Qemu-devel] [PULL v3 06/15] vhost-user: disconnect on start failure

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau If the backend failed to start (for example feature negociation failed), do not exit, but disconnect the char device instead. Slightly more robust for reconnect case. Signed-off-by: Marc-André Lureau Tested-by: Yuanhan Liu Reviewed-by: Yuanhan Liu Reviewed-by: Victor K

[Qemu-devel] [PULL v3 05/15] qemu-char: add qemu_chr_disconnect to close a fd accepted by listen fd

2016-06-16 Thread Michael S. Tsirkin
From: Tetsuya Mukawa The patch introduces qemu_chr_disconnect(). The function is used for closing a fd accepted by listen fd. Though we already have qemu_chr_delete(), but it closes not only accepted fd but also listen fd. This new function is used when we still want to keep listen fd. Signed-of

[Qemu-devel] [PULL v3 11/15] test: start vhost-user reconnect test

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau This is a simple reconnect test, that simply checks if vhost-user reconnection is possible and restore the state. A more complete test would actually manipulate and check the ring contents (such extended testing would benefit from the libvhost-user proposed in QEMU list to

[Qemu-devel] [PULL v3 03/15] tests/vhost-user-bridge: add client mode

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau If -c is specified, vubr will try to connect to the socket instead of listening for connections. Signed-off-by: Marc-André Lureau Tested-by: Yuanhan Liu Reviewed-by: Yuanhan Liu Reviewed-by: Victor Kaplansky Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. T

[Qemu-devel] [PULL v3 04/15] tests/vhost-user-bridge: workaround stale vring base

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau This patch is a similar solution to what Yuanhan Liu/Huawei Xie have suggested for DPDK. When vubr quits (killed or crashed), a restart of vubr would get stale vring base from QEMU. That would break the kernel virtio net completely, making it non-work any more, unless a dr

[Qemu-devel] [PULL v3 01/15] pci: fix pci_requester_id()

2016-06-16 Thread Michael S. Tsirkin
From: Peter Xu This fix SID verification failure when IOMMU IR is enabled with PCI bridges. Existing pci_requester_id() is more like getting BDF info only. Renaming it to pci_get_bdf(). Meanwhile, we provide the correct implementation to get requester ID. VT-d spec 5.1.1 is a good reference to go

[Qemu-devel] [PULL v3 02/15] vhost-user: add ability to know vhost-user backend disconnection

2016-06-16 Thread Michael S. Tsirkin
From: Tetsuya Mukawa Current QEMU cannot detect vhost-user backend disconnection. The patch adds ability to know it. To know disconnection, add watcher to detect G_IO_HUP event. When G_IO_HUP event is detected, the disconnected socket will be read to cause a CHR_EVENT_CLOSED. Signed-off-by: Tets

[Qemu-devel] [PULL v3 10/15] tests: append i386 tests

2016-06-16 Thread Michael S. Tsirkin
From: Marc-André Lureau Do not overwrite x86-64 tests, re-enable vhost-user-test. Signed-off-by: Marc-André Lureau Reviewed-by: Eric Blake Reviewed-by: Victor Kaplansky Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/Makefile.include | 2 +- 1 file changed, 1 in

[Qemu-devel] [PULL v3 00/15] pc, pci, virtio: new features, cleanups, fixes

2016-06-16 Thread Michael S. Tsirkin
changes from v2: drop nvdimm and ipmi patches for now The following changes since commit 49237b856ae58ee7955be0b959c504c51b014f20: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20160614-tag' into staging (2016-06-14 16:32:32 +0100) are available in the git repository at: g

Re: [Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Laurent Vivier
Le 16/06/2016 à 23:09, Peter Maydell a écrit : > On 16 June 2016 at 20:01, Laurent Vivier wrote: >> If the structure pointed by NLMSG_DATA() is bigger >> than the size of NLMSG_DATA(), don't swap its fields >> to avoid memory corruption. >> >> Signed-off-by: Laurent Vivier >> --- > > Reviewed-

Re: [Qemu-devel] [RFC v2 PATCH 03/13] tcg/aarch64: Add support for fence

2016-06-16 Thread Pranith Kumar
Hi Richard, On Tue, May 31, 2016 at 4:34 PM, Richard Henderson wrote: > On 05/31/2016 11:39 AM, Pranith Kumar wrote: >> >> +/* System instructions. */ >> +DMB_ISH = 0xd5033bbf, > > ... >> >> +case INDEX_op_mb: >> +tcg_out32(s, DMB_ISH); >> +break; > > > With t

Re: [Qemu-devel] [PULL 5/8] target-sparc: Use global registers for the register window

2016-06-16 Thread Mark Cave-Ayland
On 16/06/16 21:26, Richard Henderson wrote: > On 06/14/2016 02:52 PM, Mark Cave-Ayland wrote: >> Following up the bug report at >> https://bugs.launchpad.net/qemu/+bug/1588328, I bisected the regression >> down to this particular commit. I can't see anything obvious here, so >> perhaps this is exp

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-16 Thread Stefan Berger
On 06/16/2016 03:24 PM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: On 06/16/2016 01:54 PM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: On 06/16/2016 11:22 AM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@li

Re: [Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Peter Maydell
On 16 June 2016 at 20:01, Laurent Vivier wrote: > If the structure pointed by NLMSG_DATA() is bigger > than the size of NLMSG_DATA(), don't swap its fields > to avoid memory corruption. > > Signed-off-by: Laurent Vivier > --- Reviewed-by: Peter Maydell Can this actually happen in normal operat

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Peter Maydell
If you've got working code for the signal handlers you can submit those as patches now if you like. (http://wiki.qemu.org/Contribute/SubmitAPatch has info on the formatting hoops.) We have a feature freeze for QEMU 2.7 coming up on the 28th June, so before then would be ideal. Judging by the asser

Re: [Qemu-devel] [PATCH 1/2] linux-user: fd_trans_host_to_target_data() must process only received data

2016-06-16 Thread Peter Maydell
On 16 June 2016 at 20:01, Laurent Vivier wrote: > if we process the whole buffer, the netlink helpers can try > to swap invalid data. > > Signed-off-by: Laurent Vivier > --- > linux-user/syscall.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux-user/syscall.c b/lin

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Timothy Pearson
Yes, I saw that -- implementing the signal handlers fixed the hang and a few other problems, but the assertion and subsequent SIGABORT/SIGSEGV are still present. Currently attempting to track down the fork() issues. -- You received this bug notification because you are a member of qemu- devel-ml

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Peter Maydell
By the way there is probably a bug in what we're doing with fork/clone that's causing the initial assertion, as well as the missing signal handling problem. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bu

Re: [Qemu-devel] [PULL 5/8] target-sparc: Use global registers for the register window

2016-06-16 Thread Richard Henderson
On 06/14/2016 02:52 PM, Mark Cave-Ayland wrote: > Following up the bug report at > https://bugs.launchpad.net/qemu/+bug/1588328, I bisected the regression > down to this particular commit. I can't see anything obvious here, so > perhaps this is exposing another bug somewhere else? > Probably. I'

Re: [Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 06:12:12PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Currently QEMU sets the x86 number of physical address bits to the > magic number 40. This is only correct on some small AMD systems; > Intel systems tend to have 36, 39, 46 bits, a

Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 06:12:11PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Fill the bits between 51..number-of-physical-address-bits in the > MTRR_PHYSMASKn variable range mtrr masks so that they're consistent > in the migration stream irrespective of the p

Re: [Qemu-devel] [PATCH 2/5] x86: Mask mtrr mask based on CPU physical address limits

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 06:12:10PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The CPU GPs if we try and set a bit in a variable MTRR mask above > the limit of physical address bits on the host. We hit this > when loading a migration from a host with a larger

Re: [Qemu-devel] [PATCH v4 2/3] target-i386: add migration support for Intel LMCE

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 07:40:20PM +0200, Paolo Bonzini wrote: > > > On 16/06/2016 19:36, Eduardo Habkost wrote: > >> > > >> > Eduardo said nice for this part in previous version [1], so we may wait > >> > for his comments? > >> > > >> > [1] http://lists.nongnu.org/archive/html/qemu-devel/2016-

Re: [Qemu-devel] [RFC PATCH v1 4/4] target-arm: Compute page size based on ARM target cpu type

2016-06-16 Thread Richard Henderson
On 06/14/2016 04:36 AM, Peter Maydell wrote: > It would be better to delay the point at which we allocate > the data structures which care about page size, rather than > moving init of the CPU earlier. It would be *best* if we could re-initialize and re-allocate these data structures so that we ca

Re: [Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 02:06:19PM +0800, Haozhong Zhang wrote: > From: Ashok Raj > > This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they > are injected to only one VCPU rather than broadcast to all VCPUs. As KVM > reports LMCE support on Intel platforms, this features is only

[Qemu-devel] [PATCH v2 3/3] socket: unlink unix socket on remove

2016-06-16 Thread marcandre . lureau
From: Marc-André Lureau qemu leaves unix socket files behind when removing a listening chardev or leaving. qemu could clean that up, even if doing so isn't race-free. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1347077 Signed-off-by: Marc-André Lureau --- include/qemu/sockets.h

[Qemu-devel] [PATCH v2 2/3] socket: add listen feature

2016-06-16 Thread marcandre . lureau
From: Marc-André Lureau Add a flag to tell whether the channel socket is listening. Signed-off-by: Marc-André Lureau --- include/io/channel.h | 1 + io/channel-socket.c | 7 +++ 2 files changed, 8 insertions(+) diff --git a/include/io/channel.h b/include/io/channel.h index d37acd2..e52f0

[Qemu-devel] [PATCH v2 1/3] char: clean up remaining chardevs when leaving

2016-06-16 Thread marcandre . lureau
From: Marc-André Lureau This helps to remove various chardev resources leaks when leaving qemu. Signed-off-by: Marc-André Lureau --- qemu-char.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index c926e9a..98dcd49 100644 --- a/qemu-char.c +++ b/qemu

[Qemu-devel] [PATCH v2 0/3] chardev cleanups

2016-06-16 Thread marcandre . lureau
From: Marc-André Lureau Hi A small series to do some chardev cleanup when removing them and leaving qemu. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1347077 v1->v2: - use atexit() for qemu_chr_cleanup() - add missing braces Marc-André Lureau (3): char: clean up remaining chardevs wh

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-16 Thread Dr. David Alan Gilbert
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > On 06/16/2016 01:54 PM, Dr. David Alan Gilbert wrote: > > * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > > > On 06/16/2016 11:22 AM, Dr. David Alan Gilbert wrote: > > > > * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > > > > > On 06

Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user

2016-06-16 Thread Pranith Kumar
On Thu, Jun 16, 2016 at 3:07 PM, Richard Henderson wrote: > On 06/16/2016 11:56 AM, Pranith Kumar wrote: >> Using gcc 6.1 for alpha-linux-user target we see the following build >> error: >> >> /mnt/devops/code/qemu/target-alpha/translate.c: In function ‘in_superpage’: >> /mnt/devops/code/qemu/targ

Re: [Qemu-devel] [PATCH] alpha: Fix build error for linux-user

2016-06-16 Thread Richard Henderson
On 06/16/2016 11:56 AM, Pranith Kumar wrote: > Using gcc 6.1 for alpha-linux-user target we see the following build > error: > > /mnt/devops/code/qemu/target-alpha/translate.c: In function ‘in_superpage’: > /mnt/devops/code/qemu/target-alpha/translate.c:454:52: error: self-comparison > always eva

Re: [Qemu-devel] [PULL 03/13] target-ppc: Use 32-bit rotate instead of deposit + 64-bit rotate

2016-06-16 Thread Richard Henderson
On 06/15/2016 10:19 PM, David Gibson wrote: > On Wed, Jun 15, 2016 at 10:17:19PM +1000, Anton Blanchard wrote: >> Hi, >> >>> From: Richard Henderson >>> >>> A 32-bit rotate insn is more common on hosts than a deposit insn, >>> and if the host has neither the result is truely horrific. >>> >>> At t

[Qemu-devel] [PATCH 1/2] linux-user: fd_trans_host_to_target_data() must process only received data

2016-06-16 Thread Laurent Vivier
if we process the whole buffer, the netlink helpers can try to swap invalid data. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 0b937ca..3c30437 100644 --- a/linux-user/

[Qemu-devel] [PATCH 2/2] linux-user: don't swap NLMSG_DATA() fields

2016-06-16 Thread Laurent Vivier
If the structure pointed by NLMSG_DATA() is bigger than the size of NLMSG_DATA(), don't swap its fields to avoid memory corruption. Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 72 ++-- 1 file changed, 42 insertions(+), 30 deletions(-)

[Qemu-devel] [PATCH 0/2] linux-user: netlink cleanup

2016-06-16 Thread Laurent Vivier
Some cleanup to avoid memory corruption while netlink helpers are processing data stream. Laurent Vivier (2): linux-user: fd_trans_host_to_target_data() must process only received data linux-user: don't swap NLMSG_DATA() fields linux-user/syscall.c | 74 ++

[Qemu-devel] [PATCH] alpha: Fix build error for linux-user

2016-06-16 Thread Pranith Kumar
Using gcc 6.1 for alpha-linux-user target we see the following build error: /mnt/devops/code/qemu/target-alpha/translate.c: In function ‘in_superpage’: /mnt/devops/code/qemu/target-alpha/translate.c:454:52: error: self-comparison always evaluates to true [-Werror=tautological-compare]

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-16 Thread Stefan Berger
On 06/16/2016 01:54 PM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: On 06/16/2016 11:22 AM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: On 06/16/2016 04:05 AM, Dr. David Alan Gilbert wrote: * Stefan Berger (stef...@li

[Qemu-devel] [Bug 1591611] Re: chroot using qemu-x86_64-static fails on ppc64el

2016-06-16 Thread Timothy Pearson
** Changed in: qemu Assignee: (unassigned) => Timothy Pearson (kb9vqf) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1591611 Title: chroot using qemu-x86_64-static fails on ppc64el Status in

Re: [Qemu-devel] [PATCH 1/5] BIT_RANGE convenience macro

2016-06-16 Thread Paolo Bonzini
On 16/06/2016 20:01, Peter Maydell wrote: >> diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h >> index 755fdd1..e411688 100644 >> --- a/include/qemu/bitops.h >> +++ b/include/qemu/bitops.h >> @@ -23,6 +23,9 @@ >> #define BIT_MASK(nr)(1UL << ((nr) % BITS_PER_LONG)) >> #defi

Re: [Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support

2016-06-16 Thread Paolo Bonzini
On 16/06/2016 20:05, Eduardo Habkost wrote: > On Thu, Jun 16, 2016 at 12:42:19PM +0200, Paolo Bonzini wrote: >> >> >> On 16/06/2016 12:34, Haozhong Zhang wrote: >>> On 06/16/16 12:23, Paolo Bonzini wrote: On 16/06/2016 12:16, Haozhong Zhang wrote: >> >>> +has_msr_mc

[Qemu-devel] [Bug 1589564] Re: qemu/hw/scsi/scsi-disk.c:2741: possible missing break ?

2016-06-16 Thread T. Huth
The issue with the format strings should now be fixed, too: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=142c21455bb2416b37f71b ** 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.

Re: [Qemu-devel] [PATCH v4 2/3] target-i386: add migration support for Intel LMCE

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 07:40:20PM +0200, Paolo Bonzini wrote: > > > On 16/06/2016 19:36, Eduardo Habkost wrote: > >> > > >> > Eduardo said nice for this part in previous version [1], so we may wait > >> > for his comments? > >> > > >> > [1] http://lists.nongnu.org/archive/html/qemu-devel/2016-

Re: [Qemu-devel] [PATCH v4 1/3] target-i386: KVM: add basic Intel LMCE support

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 12:42:19PM +0200, Paolo Bonzini wrote: > > > On 16/06/2016 12:34, Haozhong Zhang wrote: > > On 06/16/16 12:23, Paolo Bonzini wrote: > >> > >> > >> On 16/06/2016 12:16, Haozhong Zhang wrote: > > > +has_msr_mcg_ext_ctl = true; > > } > > >

Re: [Qemu-devel] [PULL v2 00/29] KVM, build, NBD, SCSI patches for 2016-06-16

2016-06-16 Thread Peter Maydell
On 16 June 2016 at 17:55, Paolo Bonzini wrote: > The following changes since commit dc278c58fa02e5fb796dbacf02c8dde32f697015: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-06-16 15:22:56 +0100) > > are available in the git repository at: > > git://git

Re: [Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-16 Thread Eduardo Habkost
On Thu, Jun 16, 2016 at 07:26:01PM +0200, Paolo Bonzini wrote: > > > On 16/06/2016 19:12, Dr. David Alan Gilbert (git) wrote: > > if (env->features[FEAT_8000_0001_EDX] & CPUID_EXT2_LM) { > > -/* 64 bit processor */ > > -/* XXX: The physical address space is limited to 42 bits

Re: [Qemu-devel] [PATCH 1/3] block: fixed BdrvTrackedRequest filling in bdrv_co_discard

2016-06-16 Thread Eric Blake
On 06/16/2016 10:09 AM, Denis V. Lunev wrote: > The request area is specified in bytes, not in sectors. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Fam Zheng > CC: Stefan Hajnoczi > CC: Kevin Wolf > CC: Max Reitz > --- > block/io.c | 4 ++-- >

Re: [Qemu-devel] [PATCH v5 1/4] Provide support for the CUSE TPM

2016-06-16 Thread Dr. David Alan Gilbert
* Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > On 06/16/2016 11:22 AM, Dr. David Alan Gilbert wrote: > > * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > > > On 06/16/2016 04:05 AM, Dr. David Alan Gilbert wrote: > > > > * Stefan Berger (stef...@linux.vnet.ibm.com) wrote: > > > > > On 06

  1   2   3   4   5   >