Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt()

2016-01-10 Thread Laurent Vivier
Le 11/01/2016 06:58, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for > setsockopt(). > > Signed-off-by: Chen Gang > --- > linux-user/syscall.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --

Re: [Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration

2016-01-10 Thread Mark Cave-Ayland
On 11/01/16 04:55, David Gibson wrote: > On Mon, Jan 11, 2016 at 12:18:31PM +1100, Alexey Kardashevskiy wrote: >> On 01/09/2016 01:21 AM, Mark Cave-Ayland wrote: >>> On 08/01/16 02:47, Alexey Kardashevskiy wrote: >>> On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: > During local testing w

Re: [Qemu-devel] [PATCH v2 for v2.3.0] fw_cfg: add check to validate current entry value

2016-01-10 Thread P J P
Hello, +-- On Wed, 6 Jan 2016, P J P wrote --+ | When processing firmware configurations, an OOB r/w access occurs | if 's->cur_entry' is set to be invalid(FW_CFG_INVALID=0x). | Add a check to validate 's->cur_entry' to avoid such access. | | Reported-by: Donghai Zdh | Signed-off-by: Prasa

Re: [Qemu-devel] [PATCH] hmp: avoid redundant null termination of buffer

2016-01-10 Thread P J P
Hello, +-- On Sun, 10 Jan 2016, Michael Tokarev wrote --+ | So, what's the status of this issue now? | (it is CVE-2015-8619 btw, maybe worth to mention this in the commit message) Yes, if the patch is not yet merged upstream, it'd be good to include this CVE in the commit message. -- Prasad

[Qemu-devel] [PATCH v2] linux-user: syscall: Add SO_LINGER for setsockopt

2016-01-10 Thread chengang
From: Chen Gang Just implement it according to the other features implementations. Signed-off-by: Chen Gang --- linux-user/syscall.c | 18 +- linux-user/syscall_defs.h | 5 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-u

Re: [Qemu-devel] [PATCH] linux-user/syscall.c: Add SO_RCVTIMEO and SO_SNDTIMEO for getsockopt

2016-01-10 Thread Chen Gang
Oh, sorry, after check again, I guess, we need continue to discuss. On 2016年01月08日 17:40, Chen Gang wrote: > > On 2016年01月08日 16:25, Laurent Vivier wrote: >> >>> +if (optlen < sizeof(struct target_timeval)) { >>> +return -TARGET_EINVAL; >>> +} >> >> You do

[Qemu-devel] [PATCH] linux-user/syscall.c: Use SOL_SOCKET instead of level for setsockopt()

2016-01-10 Thread chengang
From: Chen Gang In this case, level is TARGET_SOL_SOCKET, but we need SOL_SOCKET for setsockopt(). Signed-off-by: Chen Gang --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 95b1762..44485f2 100644 -

[Qemu-devel] [PATCH 1/2] blockdev: Error out on negative throttling option values

2016-01-10 Thread Fam Zheng
The implicit casting from unsigned int to double changes negative values into large positive numbers, whereas explicitly casting to signed integer first will let us catch the invalid value and report error correctly: $ qemu-system-x86_64 -drive file=null-co://,iops=-1 qemu-system-x86_64: -

[Qemu-devel] [PULL 21/24] net: rocker: fix an incorrect array bounds check

2016-01-10 Thread Jason Wang
From: Prasad J Pandit While processing transmit(tx) descriptors in 'tx_consume' routine the switch emulator suffers from an off-by-one error, if a descriptor was to have more than allowed(ROCKER_TX_FRAGS_MAX=16) fragments. Fix an incorrect bounds check to avoid it. Reported-by: Qinghao Tang Cc:

[Qemu-devel] [PULL 18/24] vmxnet3: The vmxnet3 device is a PCIE endpoint

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Report the 'express endpoint' capability if on a PCIE bus. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 53 - 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/hw/net/vmxne

[Qemu-devel] [PATCH 2/2] iotests: Test that negative throttle values are rejected

2016-01-10 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/051| 11 +++ tests/qemu-iotests/051.out| 21 + tests/qemu-iotests/051.pc.out | 21 + 3 files changed, 53 insertions(+) diff --git a/tests/qemu-iotests/051 b/tests/qemu-iotests/051 index d9

[Qemu-devel] [PATCH 0/2] block: Reject negative values for throttling options

2016-01-10 Thread Fam Zheng
Now the negative values are silently converted to a huge positive number because we are doing implicit casting from uint64_t to double. Fix it and add a test case (this was once fixed in 7d81c1413c9 but regressed when the block device option parsing code was changed). Fam Zheng (2): blockdev:

[Qemu-devel] [PULL 17/24] vmxnet3: coding: Introduce VMXNET3Class

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Introduce a class type for vmxnet3, and the usual DEVICE_CLASS/DEVICE_GET_CLASS macros. No semantic change. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/net/vmxnet3.c b/h

[Qemu-devel] [PULL 24/24] ether/slirp: Avoid redefinition of the same constants

2016-01-10 Thread Jason Wang
From: "Dr. David Alan Gilbert" eth.h and slirp.h both define ETH_ALEN and ETH_P_IP rtl8139.c and eth.h both define ETH_HLEN Move the related constant (ETH_P_ARP) from slirp.h to eth.h, and remove the duplicates; make slirp.h include eth.h Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Alex

[Qemu-devel] [PULL 16/24] vmxnet3: Introduce 'x-old-msi-offsets' back-compat property

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Following the previous patches, where vmxnet3's pci's msi/msix capability offsets and msix's PBA table offsets have been changed, this patch introduces a boolean property 'x-old-msi-offsets' to vmxnet3, whose default is false. Setting 'x-old-msi-offsets' to 'on' preserves t

[Qemu-devel] [PULL 23/24] l2tpv3: fix cookie decoding

2016-01-10 Thread Jason Wang
From: Alexis Dambricourt If a 32 bits l2tpv3 frame cookie MSB if set to 1, the cast to uint64_t cookie will spread 1 to the four most significant bytes. Then the condition (cookie != s->rx_cookie) becomes false. Signed-off-by: Alexis Dambricourt Signed-off-by: Jason Wang --- net/l2tpv3.c | 2

[Qemu-devel] [PULL 20/24] vmxnet3: Introduce 'x-disable-pcie' back-compat property

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Following the previous patch which changed vmxnet3 to be a pci express device, this patch introduces a boolean property 'x-disable-pcie' whose default is false. Setting 'x-disable-pcie' to 'on' preserves the old 'pci device' (non express) behavior. This allows migration to

[Qemu-devel] [PULL 14/24] vmxnet3: Change offsets of msi/msix pci capabilities

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Place device reported PCI capabilities at the same offsets as placed by the VMware virtual hardware: MSI at [84], MSI-X at [9c]. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 18 +++--- 1 file changed, 15 insertions(+), 3 del

[Qemu-devel] [PULL 15/24] vmxnet3: Change the offset of the MSIX PBA table

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Place the PBA table at 0x1000, as placed by VMware virtual hardware. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index 0097f4b..

[Qemu-devel] [PULL 13/24] net/filter: fix nf->netdev_id leak

2016-01-10 Thread Jason Wang
From: Li Zhijian Cc: Jason Wang Cc: qemu-sta...@nongnu.org Signed-off-by: Li Zhijian Signed-off-by: Jason Wang --- net/filter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/filter.c b/net/filter.c index 1365bad..f777ba2 100644 --- a/net/filter.c +++ b/net/filter.c @@ -204,6 +204,7

[Qemu-devel] [PULL 22/24] net: ne2000: fix bounds check in ioport operations

2016-01-10 Thread Jason Wang
From: Prasad J Pandit While doing ioport r/w operations, ne2000 device emulation suffers from OOB r/w errors. Update respective array bounds check to avoid OOB access. Reported-by: Ling Liu Cc: qemu-sta...@nongnu.org Signed-off-by: Prasad J Pandit Signed-off-by: Jason Wang --- hw/net/ne2000.

[Qemu-devel] [PULL 09/24] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DEV_EXTRA_INFO

2016-01-10 Thread Jason Wang
From: Miao Yan VMXNET3_CMD_GET_DEV_EXTRA_INFO should return 0 for emulation mode This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.x+) 2) modify vmxnet3 Linux driver to read the register: VMXNET3_WRITE_BAR1_REG(adapter, VMXNET3_REG_CMD, VMXNET3_CM

[Qemu-devel] [PULL 11/24] net/vmxnet3: rename VMXNET3_DEVICE_VERSION to VMXNET3_UPT_REVISION

2016-01-10 Thread Jason Wang
From: Miao Yan VMXNET3_DEVICE_VERSION is used as return value for accessing UPT Revision Report and Selection register. So rename it to VMXNET3_UPT_REVISION. Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 4 ++-- 1 file changed, 2 insert

[Qemu-devel] [PULL 12/24] net/dump: fix nfds->filename leak

2016-01-10 Thread Jason Wang
From: Li Zhijian Cc: Jason Wang Signed-off-by: Li Zhijian Cc: qemu-sta...@nongnu.org Signed-off-by: Jason Wang --- net/dump.c | 8 1 file changed, 8 insertions(+) diff --git a/net/dump.c b/net/dump.c index ce16a4b..347b5ca 100644 --- a/net/dump.c +++ b/net/dump.c @@ -329,6 +329,13 @

[Qemu-devel] [PULL 08/24] net/vmxnet3: return correct value for VMXNET3_CMD_GET_DID_* command

2016-01-10 Thread Jason Wang
From: Miao Yan VMXNET3_CMD_GET_DID_LO should return PCI ID of the device and VMXNET3_CMD_GET_DID_HI should return vmxnet3 revision ID. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.x+) 2) modify vmxnet3 Linux driver to read DID_HI and DID_LO: V

[Qemu-devel] [PULL 05/24] net: vmxnet3: avoid memory leakage in activate_device

2016-01-10 Thread Jason Wang
From: P J P Vmxnet3 device emulator does not check if the device is active before activating it, also it did not free the transmit & receive buffers while deactivating the device, thus resulting in memory leakage on the host. This patch fixes both these issues to avoid host memory leakage. Repor

[Qemu-devel] [PULL 10/24] net/vmxnet3: return 0 on unknown command

2016-01-10 Thread Jason Wang
From: Miao Yan Return 0 on unknown command, this is what esxi (5.x+) behaves. Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c index da59

[Qemu-devel] [PULL 19/24] vmxnet3: Report the Device Serial Number capability

2016-01-10 Thread Jason Wang
From: Shmulik Ladkani Report the DSN extended PCI capability at 0x100. DSN value is a transformation of device MAC address, as calculated by VMware virtual hardware. DSN is reported only if device is pcie. Signed-off-by: Shmulik Ladkani Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 28 +++

[Qemu-devel] [PULL 04/24] net/vmxnet3: remove redundant VMW_SHPRN(...) definition

2016-01-10 Thread Jason Wang
From: Miao Yan Macro VMW_SHPRN(...) is already defined vmxnet3_debug.h, so remove the duplication Signed-off-by: Miao Yan Reviewed-by: Eric Blake Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmware_utils.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[Qemu-devel] [PULL 07/24] net/vmxnet3: return 1 on device activation failure

2016-01-10 Thread Jason Wang
From: Miao Yan When reading device status, 0 means device is successfully activated and 1 means error. This behavior can be observed by the following steps: 1) run a Linux distro on esxi server (5.5+) 2) modify vmxnet3 Linux driver to give it an invalid address to 'adapter->shared_pa' which

[Qemu-devel] [PULL 01/24] net/vmxnet3: fix a build error when enabling debug output

2016-01-10 Thread Jason Wang
From: Miao Yan Macro MAC_FMT and MAC_ARG are not defined, but used in vmxnet3_net_init(). This will cause build error when debug level is raised in vmxnet3_debug.h (enable all VMXNET3_DEBUG_xxx). Use VMXNET_MF and VXMNET_MA instead. Signed-off-by: Miao Yan Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PULL 06/24] MAINTAINERS: Add an entry for the net/slirp.c file

2016-01-10 Thread Jason Wang
From: Thomas Huth The file net/slirp.c should be listed in the SLIRP section, too. Signed-off-by: Thomas Huth Signed-off-by: Jason Wang --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5a62ecd..ccfa34b 100644 --- a/MAINTAINERS +++ b/MAINTAINE

[Qemu-devel] [PULL 03/24] net/vmxnet3: fix debug macro pattern for vmxnet3

2016-01-10 Thread Jason Wang
From: Miao Yan Vmxnet3 uses the following debug macro style: #ifdef SOME_DEBUG # define debug(...) do{ printf(...); } while (0) # else # define debug(...) do{ } while (0) #endif If SOME_DEBUG is undefined, then format string inside the debug macro will never be checked by compiler. Code

[Qemu-devel] [PULL 02/24] net/vmxnet3: use %zu for size_t in printf

2016-01-10 Thread Jason Wang
From: Miao Yan Use %zu specifier for size_t in printf, otherwise build would fail on platforms where size_t is not unsigned long Signed-off-by: Miao Yan Reviewed-by: Dmitry Fleytman Signed-off-by: Jason Wang --- hw/net/vmxnet3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[Qemu-devel] [PULL 00/24] Net patches

2016-01-10 Thread Jason Wang
The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +) are available in the git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request for

Re: [Qemu-devel] [PATCH] ether/slirp: Avoid redefinition of the same constants

2016-01-10 Thread Jason Wang
On 01/09/2016 12:25 AM, Alex Bennée wrote: > Dr. David Alan Gilbert (git) writes: > >> From: "Dr. David Alan Gilbert" >> >> eth.h and slirp.h both define ETH_ALEN and ETH_P_IP >> rtl8139.c and eth.h both define ETH_HLEN >> >> Move the related constant (ETH_P_ARP) from slirp.h to eth.h, and >> r

Re: [Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration

2016-01-10 Thread David Gibson
On Mon, Jan 11, 2016 at 12:18:31PM +1100, Alexey Kardashevskiy wrote: > On 01/09/2016 01:21 AM, Mark Cave-Ayland wrote: > >On 08/01/16 02:47, Alexey Kardashevskiy wrote: > > > >>On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: > >>>During local testing with TCG, intermittent errors were found when >

[Qemu-devel] [PULL 05/16] pseries: Rearrange versioned machine type code

2016-01-10 Thread David Gibson
hw/ppc/spapr.c has a number of definitions related to the various versioned machine types ("pseries-2.1" .. "pseries-2.5") it defines. These are mostly arranged by type of function first, then machine version second, and it's not consistent about whether it goes in increasing or decreasing version

[Qemu-devel] [PULL 09/16] pseries: Use SET_MACHINE_COMPAT

2016-01-10 Thread David Gibson
To make the spapr_machine_*_class_init() functions a little less bulky. Signed-off-by: David Gibson Reviewed-by: Thomas Huth Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 24 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/pp

[Qemu-devel] [PULL 16/16] hw/ppc/spapr: fix spapr->kvm_type leak

2016-01-10 Thread David Gibson
Cc: David Gibson Cc: Alexander Graf Cc: qemu-...@nongnu.org Signed-off-by: Li Zhijian [fixed return type of spapr_machine_finalizefn()] Signed-off-by: David Gibson --- hw/ppc/spapr.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 580b75d..414e

[Qemu-devel] [PULL 03/16] spapr: Add /system-id

2016-01-10 Thread David Gibson
From: Alexey Kardashevskiy Section B.6.2.1 Root Node Properties of PAPR specification defines a set of properties which shall be present in the device tree root, one of these properties is "system-id" which "should be unique across all systems and all manufacturers". Since UUID is meant to be uni

[Qemu-devel] [PULL 12/16] pseries: Improve setting of default machine version

2016-01-10 Thread David Gibson
This tweaks the way the default machine version is controlled, so that there will be a bit less churn when each new version is introduced. Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-

[Qemu-devel] [PULL 08/16] Move SET_MACHINE_COMPAT macro to boards.h

2016-01-10 Thread David Gibson
pc.h defines a SET_MACHINE_COMPAT macro to make setting up compat_props for the various PC machine versions less verbose. There's nothing inherently PC specific about it, though, so move it to boards.h where other versioned machine types (like pseries-*) can use it. While we're doing that, change

[Qemu-devel] [PULL 01/16] hw/ppc/spapr_rtc: Remove bad class_size value

2016-01-10 Thread David Gibson
From: Thomas Huth class_size = sizeof(XICSStateClass) does not make much sense in the RTC code and likely was just a copy-n-paste error. Let's simply remove it. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr_rtc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/

[Qemu-devel] [PULL 06/16] pseries: Remove redundant calls to spapr_machine_initfn()

2016-01-10 Thread David Gibson
The instance_init() functions for several of the pseries-x.y versioned machine types explicitly call spapr_machine_initfn(). But that's the instance_init function for the common parent of all those machine types, so will already have been called beforehand by the QOM infrastructure. Remove the re

[Qemu-devel] [PULL 13/16] pseries: Add pseries-2.6 machine type

2016-01-10 Thread David Gibson
Signed-off-by: David Gibson Reviewed-by: Alexey Kardashevskiy --- hw/ppc/spapr.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 8b8eb18..7f6b118 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -2337,18 +2337,3

[Qemu-devel] [PULL 00/16] ppc-for-2.6 queue 20160111

2016-01-10 Thread David Gibson
The following changes since commit 6bb9ead762bf749af11ea225fc2a74db1b93c105: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160108-1' into staging (2016-01-08 12:50:19 +) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.6-20160111 fo

[Qemu-devel] [PULL 07/16] pseries: Remove versions from mc->desc

2016-01-10 Thread David Gibson
Currently, the versioned spapr machine types put the machine type version into the description string. PC does not do this, using just the name itself to distinguish. Doing the same lets us move setting the description into the common base class, simplifying the code slightly. Signed-off-by: Dav

[Qemu-devel] [PULL 10/16] pseries: DEFINE_SPAPR_MACHINE

2016-01-10 Thread David Gibson
At the moment all the class_init functions and TypeInfo structures for the various versioned pseries machine types are open-coded. As more versions are created this is getting increasingly clumsy. This patch borrows the approach used in PC, using a DEFINE_SPAPR_MACHINE() macro to construct most o

Re: [Qemu-devel] [PATCH v2 5/7] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-10 Thread David Gibson
On Wed, Jan 06, 2016 at 03:13:23PM +, Eric Auger wrote: > Some passthrough'ed devices depend on clock nodes. Those need to be > generated in the guest device tree. This patch introduces some helpers > to build a clock node from information retrieved in the host device tree. > > - inherit_prope

[Qemu-devel] [PULL 15/16] spapr vio: fix to incomplete QOMify

2016-01-10 Thread David Gibson
From: Cao jin Signed-off-by: Cao jin Signed-off-by: David Gibson --- hw/ppc/spapr_vio.c | 12 +--- include/hw/ppc/spapr_vio.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c index c51eb8e..46f3b8d 100644 --- a/hw/p

[Qemu-devel] [PULL 02/16] target-ppc: Define kvmppc_read_int_dt()

2016-01-10 Thread David Gibson
From: Sukadev Bhattiprolu Extract code from the function kvmppc_read_int_cpu_dt() that actually reads the file into a separate function, so it can be called from other places. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: David Gibson --- target-ppc/kvm.c | 36 ++--

Re: [Qemu-devel] [PATCH v2 3/7] device_tree: introduce qemu_fdt_node_path

2016-01-10 Thread David Gibson
On Wed, Jan 06, 2016 at 03:13:21PM +, Eric Auger wrote: > This new helper routine returns the node path of a device > referred to by its node name and compat string. What if there are multiple nodes matching the name and compat? > > Signed-off-by: Eric Auger > > --- > > v1 -> v2: > - move

[Qemu-devel] [PULL 11/16] pseries: Restructure class_options functions

2016-01-10 Thread David Gibson
Currently each of the *_class_options() functions for the pseries-2.1 .. pseries-2.5 machine types are standalone. This will become harder to maintain as new versions are added. This patch restructures them similarly to x86 where each function calls the one from the next version, then overrides a

[Qemu-devel] [PULL 04/16] pseries: Remove redundant setting of mc->name for pseries-2.5 machine

2016-01-10 Thread David Gibson
98cec76 "machine: Set MachineClass::name automatically" removed the setting of mc->name for the pseries machine types, since it can be derived automatically from the type names constructed with MACHINE_TYPE_NAME(). Unfortunately fb0fc8f "spapr: Create pseries-2.5 machine" went in later and brought

[Qemu-devel] [PULL 14/16] hw/ppc/spapr: Use XHCI as host controller for new spapr machines

2016-01-10 Thread David Gibson
From: Thomas Huth The OHCI has some bugs and performance issues, so for newer machines it's preferable to use XHCI instead. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- hw/ppc/spapr.c | 9 - include/hw/ppc/spapr.h | 3 ++- 2 files changed, 10 insertions(+), 2 del

Re: [Qemu-devel] [PATCH v2 7/7] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-10 Thread David Gibson
On Wed, Jan 06, 2016 at 03:13:25PM +, Eric Auger wrote: > qemu_fdt_setprop self-exists in case of error hence no need to check > the returned value. > > Signed-off-by: Eric Auger This change is fine, but in general I'm disinclined to invest too much in the qemu interfaces for manipulating fl

[Qemu-devel] [PATCH v2 2/2] nbd: Coroutine based nbd_send_negotiate

2016-01-10 Thread Fam Zheng
Create a coroutine in nbd_client_new, so that nbd_send_negotiate doesn't need qemu_set_block(). A handler is needed for csock fd in case the coroutine yields during I/O. With this, if the other end disappears in the middle of the negotiation, we don't block the whole event loop. Signed-off-by: F

[Qemu-devel] [PATCH v2 1/2] nbd: Always call "close_fn" in nbd_client_new

2016-01-10 Thread Fam Zheng
Rename the parameter "close" to "close_fn" to disambiguous with close(2). This unifies error handling paths of NBDClient allocation: nbd_client_new will shutdown the socket and call the "close_fn" callback if negotiation failed, so the caller don't need a different path than the normal close. The

[Qemu-devel] [PATCH v2 0/2] nbd: Async built-in server negotiation

2016-01-10 Thread Fam Zheng
v2: Adopt Daniel and Paolo's idea: always call close_fn. During nbd_send_negotiate, if the client simply doesn't respond, the function will not return, and the whole event loop is blocked. Make the I/O effectively asynchronous by using coroutine read/write, so that a malicious or disappeared clie

Re: [Qemu-devel] [PATCH 1/2] nbd: Interface tweak of nbd_client_new

2016-01-10 Thread Fam Zheng
On Fri, 01/08 19:24, Paolo Bonzini wrote: > > > On 08/01/2016 17:24, Daniel P. Berrange wrote: > >> > if (nbd_send_negotiate(client)) { > >> > +shutdown(csock, 2); > >> > +close(csock); > >> > g_free(client); > >> > -return NULL; > >> > +ret = -1; > >

Re: [Qemu-devel] [PATCH] hw/arm/virt: Initialize NICs configured in PCI bus

2016-01-10 Thread Jason Wang
On 01/07/2016 11:21 PM, Paolo Bonzini wrote: > > On 07/01/2016 15:47, Peter Maydell wrote: >> I think my current inclination is to say that virt should >> support -net, because I would prefer to avoid having yet >> another speedbump in the path of people trying to move to >> using KVM-on-ARM base

Re: [Qemu-devel] [RFC PATCH v2 02/10] Jhash: add linux kernel jhashtable in qemu

2016-01-10 Thread Zhang Chen
On 01/08/2016 08:08 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen Jhash used by colo-proxy to save and lookup net connection info Signed-off-by: zhangchen Signed-off-by: zhanghailiang --- include/qemu/jhash.h | 61 +

Re: [Qemu-devel] [Xen-devel] [PATCH v4] igd-passthrough-i440FX: convert to realize()

2016-01-10 Thread Hao, Xudong
Qemu with the patch can't boot VM with IGD pass-through, I'm checking if it works w/o this patch to eliminate the environment influence. Thanks, -Xudong > -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Friday, January 8, 2016 7:57 PM > To

Re: [Qemu-devel] [RFC PATCH v2 00/10] Add colo-proxy based on netfilter

2016-01-10 Thread Zhang Chen
On 01/08/2016 07:19 PM, Dr. David Alan Gilbert wrote: * Zhang Chen (zhangchen.f...@cn.fujitsu.com) wrote: From: zhangchen Hi,all This patch add an colo-proxy object, COLO-Proxy is a part of COLO, based on qemu netfilter and it's a plugin for qemu netfilter. the function keep Secondary VM co

Re: [Qemu-devel] [PATCH COLO-Frame v13 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2016-01-10 Thread Hailiang Zhang
Hi Jason, Could you please help reviewing the filter part of this series ? Thanks, Hailiang On 2015/12/29 15:09, zhanghailiang wrote: We add each netdev (except vhost-net) a default filter-buffer, which will be used for COLO or Micro-checkpoint to buffer VM's packets. The name of default filte

Re: [Qemu-devel] [PATCH 4/4] target-ppc: ensure we include the decrementer value during migration

2016-01-10 Thread Alexey Kardashevskiy
On 01/09/2016 01:21 AM, Mark Cave-Ayland wrote: On 08/01/16 02:47, Alexey Kardashevskiy wrote: On 01/07/2016 05:22 AM, Mark Cave-Ayland wrote: During local testing with TCG, intermittent errors were found when trying to migrate Darwin OS images. The underlying cause was that Darwin resets the

Re: [Qemu-devel] [PATCH] Convert to realize()

2016-01-10 Thread Cao jin
Thanks for your work:) On 01/11/2016 02:04 AM, Michael Tokarev wrote: 18.12.2015 11:55, Cao jin wrote: for educational PCI device Applied to -trivial, adding "hw/misc/edu:" prefix to the subject line, thanks! 10.01.2016 13:14, Cao jin wrote: Hi mjt, seems the patch is still pending in

Re: [Qemu-devel] [PATCH COLO-Frame v13 17/39] COLO: Load VMState into qsb before restore it

2016-01-10 Thread Hailiang Zhang
On 2016/1/5 3:00, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: We should not destroy the state of SVM (Secondary VM) until we receive the whole state from the PVM (Primary VM), in case the primary fails in the middle of sending the state, so, here we cac

[Qemu-devel] Crash on virtual host startup

2016-01-10 Thread John Morrison
Seen a few of these now, any pointers ? [243732.348662] INFO: task qemu-system-x86:3546 blocked for more than 120 seconds. [243732.362227] Not tainted 4.4.0-rc6 #1 [243732.375979] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [243732.389977] qemu-system-x86 D

Re: [Qemu-devel] [PATCH v10 7/7] arm_mptimer: Convert to use ptimer

2016-01-10 Thread Dmitry Osipenko
10.01.2016 21:05, Dmitry Osipenko пишет: I missed case where periodic timer should stop in the following case: load = 0, counter != 0 -> run -> set counter = 0 -> should stop Test added. Will fix it in V11. Forgot to mention that prescaler must be 0 in that case. Prescaler != 0 would result

Re: [Qemu-devel] [PATCH 1/5] SH PCI Host: convert to realize()

2016-01-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH 4/5] gt64120: convert to realize()

2016-01-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] Add missing syscall nrs. This updates the QEMU syscall tables to more recent Linux kernels.

2016-01-10 Thread Michael Tokarev
25.12.2015 01:31, Johan Ouwerkerk wrote: > This change covers arm, aarch64, mips. Others to follow? > > The change was prompted by QEMU warning about a syscall 384 (get_random()) > with Debian armhf binaries (ARMv7). Applied to -trivial after word-wrapping the commit message and trimming subject

Re: [Qemu-devel] [PATCH v10 7/7] arm_mptimer: Convert to use ptimer

2016-01-10 Thread Dmitry Osipenko
I missed case where periodic timer should stop in the following case: load = 0, counter != 0 -> run -> set counter = 0 -> should stop Test added. Will fix it in V11. -- Dmitry

Re: [Qemu-devel] [PATCH] Convert to realize()

2016-01-10 Thread Michael Tokarev
18.12.2015 11:55, Cao jin wrote: > for educational PCI device Applied to -trivial, adding "hw/misc/edu:" prefix to the subject line, thanks! 10.01.2016 13:14, Cao jin wrote: > Hi mjt, > seems the patch is still pending in qemu-trivial, and besides, I have > several others also pending in the

Re: [Qemu-devel] [PATCH 2/2] configure: fix trace backend check

2016-01-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH 1/2] configure: remove unused or undefined variables

2016-01-10 Thread Michael Tokarev
10.12.2015 03:47, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Found thanks to shellcheck! > > Signed-off-by: Marc-André Lureau > --- > configure | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/configure b/configure > index b55dcdd..6a971a2 100755 > --- a/con

Re: [Qemu-devel] [PATCH trivial v2] xen/Makefile.objs: simplify

2016-01-10 Thread Michael Tokarev
29.12.2015 15:39, Cao jin wrote: > merge last two lines, keep alphabetic order. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH] crypto: Fix typo in example

2016-01-10 Thread Michael Tokarev
21.12.2015 18:54, Eric Blake wrote: > The example code wouldn't even compile, since it did not use > a consistent spelling for the Error ** parameter. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] misc: spelling

2016-01-10 Thread Michael Tokarev
18.12.2015 13:06, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau This patch does not have a required Signed-off-By tag, sorry. Thanks, /mjt > --- > monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/monitor.c b/monitor.c > index e7e7ae2..51ec4c3

Re: [Qemu-devel] [PATCH] iscsi: fix readcapacity error message

2016-01-10 Thread Michael Tokarev
16.12.2015 07:40, Zhu Lingshan wrote: > fix:The error message for readcapacity 16 incorrectly mentioned > a readcapacity 10 failure, fixed the error message. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH] MAINTAINERS: Add the correct device_tree.h file

2016-01-10 Thread Michael Tokarev
17.12.2015 17:25, Thomas Huth wrote: > device_tree.h is not in the main directory, but under > include/sysemu/ nowadays. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [PATCH v2] net: convert qemu_log to error_report, fix message

2016-01-10 Thread Michael Tokarev
04.12.2015 15:38, Paolo Bonzini wrote: > Ensure that the error is printed with the proper timestamp. Applied to -trivial, thank you! /mjt

[Qemu-devel] [PATCH v2 15/19] fdc: use IsaDma interface instead of global DMA_* functions

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 63 ++ 1 file changed, 46 insertions(+), 17 deletions(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 4069c46..e3ba751 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -534,6 +53

[Qemu-devel] [PATCH v2 16/19] cs4231a: use IsaDma interface instead of global DMA_* functions

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/audio/cs4231a.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/audio/cs4231a.c index f96f561..d84f83f 100644 --- a/hw/audio/cs4231a.c +++ b/hw/audio/cs4231a.c @@ -69,6 +69,7 @@ typedef str

[Qemu-devel] [PATCH v2 13/19] sparc: disable floppy DMA

2016-01-10 Thread Hervé Poussineau
All functions relative to DMA (DMA_*() functions) are stubs on sparc platform. Disable the DMA in the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index

[Qemu-devel] [PATCH v2 18/19] sb16: use IsaDma interface instead of global DMA_* functions

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/audio/sb16.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 995435f..9973e77 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -55,6 +55,8 @@ typedef struct SB16State {

[Qemu-devel] [PATCH v2 17/19] gus: use IsaDma interface instead of global DMA_* functions

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/audio/gus.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index e0c8a4e..b027eb5 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -57,6 +57,7 @@ typedef struct GUSState { SWV

[Qemu-devel] [PATCH v2 19/19] dma: remove now useless DMA_* functions

2016-01-10 Thread Hervé Poussineau
Keep only DMA_init function as a wrapper around DMA controllers creation. Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 65 hw/sparc/sun4m.c | 22 -- hw/sparc64/sun4u.c | 22 -- include/hw/isa

[Qemu-devel] [PATCH v2 14/19] sparc64: disable floppy DMA

2016-01-10 Thread Hervé Poussineau
All functions relative to DMA (DMA_*() functions) are stubs on sparc64 platform. Disable the DMA of the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau --- hw/sparc64/sun4u.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/s

[Qemu-devel] [PATCH v2 08/19] i8257: QOM'ify

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 160 ++--- 1 file changed, 107 insertions(+), 53 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index 186a48a..2eb6d42 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -26,6 +26

[Qemu-devel] [PATCH v2 05/19] i8257: rename functions to start with i8257_ prefix

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 91 +- 1 file changed, 46 insertions(+), 45 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index e0713a5..b525063 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -80,11 +80

[Qemu-devel] [PATCH v2 10/19] isa: add an ISA DMA interface, and store it within the ISA bus

2016-01-10 Thread Hervé Poussineau
This will permit to deprecate global DMA_*() functions. Signed-off-by: Hervé Poussineau --- hw/isa/isa-bus.c| 21 + include/hw/isa/isa.h| 38 ++ include/qemu/typedefs.h | 1 + 3 files changed, 60 insertions(+) diff --git a/hw/

[Qemu-devel] [PATCH v2 11/19] i8257: implement the IsaDma interface

2016-01-10 Thread Hervé Poussineau
Rewrite the global DMA_*() functions to use the IsaDma interface. Note that these functions will be deleted in a few commits. Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 148 --- include/hw/isa/isa.h | 2 +- 2 files changed, 118 in

[Qemu-devel] [PATCH v2 06/19] i8257: make the DMA running method per controller

2016-01-10 Thread Hervé Poussineau
This removes some static/global variables, and we're now running only the required controller (master or slave) Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 75 ++ 1 file changed, 34 insertions(+), 41 deletions(-) diff --git a/hw/d

[Qemu-devel] [PATCH v2 12/19] magnum: disable floppy DMA for now

2016-01-10 Thread Hervé Poussineau
Floppy uses the DMA controller in rc4030 chipset, and not the i8259 from the ISA bus. It's better to disable DMA than to call the wrong DMA controller. Signed-off-by: Hervé Poussineau --- hw/mips/mips_jazz.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mips/mips_jazz

[Qemu-devel] [PATCH v2 09/19] i8257: move state definition to new independent header

2016-01-10 Thread Hervé Poussineau
We will now be able to embed the i8257 interrupt controller in another object. Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 35 +-- include/hw/isa/i8257.h | 42 ++ 2 files changed, 43 insertions(+), 34 deleti

[Qemu-devel] [PATCH v2 01/19] i82374: device only existed as ISA device, so simplify device

2016-01-10 Thread Hervé Poussineau
Merge ISAi82374State fields into parent structure I82374State. Signed-off-by: Hervé Poussineau --- hw/dma/i82374.c | 58 +++-- 1 file changed, 19 insertions(+), 39 deletions(-) diff --git a/hw/dma/i82374.c b/hw/dma/i82374.c index f630971..daa8

[Qemu-devel] [PATCH v2 04/19] i8257: rename struct dma_regs to I8257Regs

2016-01-10 Thread Hervé Poussineau
Signed-off-by: Hervé Poussineau --- hw/dma/i8257.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/dma/i8257.c b/hw/dma/i8257.c index f4fcf39..e0713a5 100644 --- a/hw/dma/i8257.c +++ b/hw/dma/i8257.c @@ -37,7 +37,7 @@ #define ldeb

  1   2   >