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

2016-01-08 Thread P J P
Hello, +-- On Fri, 8 Jan 2016, Wolfgang Bumiller wrote --+ | > if (!strncmp(keyname_buf, "<", 1) && keyname_len == 1) { | > pstrcpy(keyname_buf, sizeof(keyname_buf), "less"); | > -keyname_len = 4; | | keyname_buf is a char[16] so 4 will not overflow it. | | >

Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init

2016-01-08 Thread Stefano Stabellini
On Fri, 8 Jan 2016, Stefano Stabellini wrote: > > > > xen_pt_initfn checks that igd-passthru=on is set in case it finds a igd > > > > device is assigned, that will make sure the igd-isa-bridge is present. > > > > > > > > But, yes, you can create a igd-isa-bridge now even when not assigning a > > >

Re: [Qemu-devel] [PATCH 2/2] migration/virtio: Remove simple .get/.put use

2016-01-08 Thread Amit Shah
On (Wed) 06 Jan 2016 [12:23:39], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The 'virtqueue_state' and 'ringsize' can be saved using VMSTATE > macros rather than hand coded .get/.put > > Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah

Re: [Qemu-devel] [PATCH 1/2] Add VMSTATE_STRUCT_VARRAY_KNOWN

2016-01-08 Thread Amit Shah
On (Wed) 06 Jan 2016 [12:23:38], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > At the moment we have VMSTATE_STRUCT_ARRAY that requires > the field is declared as an array of fixed size. > We also have VMSTATE_STRUCT_VARRAY_UINT* that allows > a field declared as a poin

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

2016-01-08 Thread Dr. David Alan Gilbert
* 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 > >

[Qemu-devel] [PATCH] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread P J P
From: Prasad J Pandit When processing NCQ commands, ACHI device emulation prepares a NCQ transfer object; To which an aio control block(aiocb) object is assigned in 'execute_ncq_command'. In case, when the NCQ command is invalid, the 'aiocb' object is not assigned, and NCQ transfer object is left

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

2016-01-08 Thread Stefano Stabellini
Since you are at it, could you please let me know how well igd passthrough works without this bugfix: http://marc.info/?l=qemu-devel&m=145172165010604 which is about to land in QEMU. I guess it doesn't work at all? I am asking because I would like to know the level of support we need to provide

Re: [Qemu-devel] [PATCH 1/5] migration: split hmp_savevm to do_savevm and hmp_savevm wrapper

2016-01-08 Thread Denis V. Lunev
On 12/24/2015 12:27 AM, Eric Blake wrote: On 12/04/2015 07:44 AM, Denis V. Lunev wrote: This would be useful in the next step when QMP version of this call will be introduced. Signed-off-by: Denis V. Lunev Reviewed-by: Juan Quintela CC: Amit Shah CC: Markus Armbruster CC: Eric Blake ---

Re: [Qemu-devel] [PULL 00/21] Block layer patches

2016-01-08 Thread Peter Maydell
On 7 January 2016 at 22:57, Max Reitz wrote: > Kevin is on PTO this week, so I am filling in for him. > > > The following changes since commit a7e00e2536941a6e570b45b7ab4afec4505ff67e: > > petalogix-ml605: Set the MicroBlaze CPU version to 8.10.a (2016-01-07 > 14:57:26 +0100) > > are available

Re: [Qemu-devel] [PATCH v3 11/11] igd: move igd-passthrough-isa-bridge creation to machine init

2016-01-08 Thread Stefano Stabellini
On Thu, 7 Jan 2016, Gerd Hoffmann wrote: > On Do, 2016-01-07 at 13:10 +, Stefano Stabellini wrote: > > CC'ing the Xen x86 maintainers > > > > On Thu, 7 Jan 2016, Gerd Hoffmann wrote: > > > Hi, > > > > > > > One thing I don't like about this is that it is going to skip the checks > > > > don

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

2016-01-08 Thread Dr. David Alan Gilbert
* 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 connect normal to Primary VM and compare packet

Re: [Qemu-devel] [RFC v6 10/14] softmmu: Simplify helper_*_st_name, wrap unaligned code

2016-01-08 Thread Alex Bennée
Alvise Rigo writes: > Attempting to simplify the helper_*_st_name, wrap the > do_unaligned_access code into an inline function. > Remove also the goto statement. > > Suggested-by: Jani Kokkonen > Suggested-by: Claudio Fontana > Signed-off-by: Alvise Rigo > --- > softmmu_template.h | 96 > ++

Re: [Qemu-devel] [PATCH 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-08 Thread Cornelia Huck
On Fri, 8 Jan 2016 11:26:05 +0100 Greg Kurz wrote: > On Fri, 8 Jan 2016 11:11:20 +0100 > Cornelia Huck wrote: > > > On Thu, 07 Jan 2016 12:32:08 +0100 > > Greg Kurz wrote: > > > + "falling back on userspace virtio", > > > > s/on/to/ > > > > ? > > > > I thought the

Re: [Qemu-devel] [PATCH v1 00/15] data-driven device registers

2016-01-08 Thread Edgar E. Iglesias
On Fri, Jan 08, 2016 at 10:40:28AM +, Peter Maydell wrote: > On 8 January 2016 at 00:39, Alistair Francis > wrote: > > On Wed, Dec 16, 2015 at 8:33 AM, Alistair Francis > > wrote: > >> On Tue, Dec 15, 2015 at 1:56 PM, Peter Maydell > >> wrote: > >>> On 15 December 2015 at 20:52, Peter Crost

Re: [Qemu-devel] [PULL v4 4/9] io: add QIOChannelSocket class

2016-01-08 Thread Daniel P. Berrange
On Fri, Jan 08, 2016 at 10:04:23AM +0100, Paolo Bonzini wrote: > > > On 18/12/2015 13:21, Daniel P. Berrange wrote: > > + > > +if (nfds > SOCKET_MAX_FDS) { > > +error_setg_errno(errp, -EINVAL, > > + "Only %d FDs can be sent, got %zu", > > +

Re: [Qemu-devel] [PATCH v2 00/27] 9pfs: disentangling virtio and generic code

2016-01-08 Thread Aneesh Kumar K.V
Wei Liu writes: > Hi all > > Version 2 of this series is even longer. :-) > > Back in 2015 summer one of our OPW interns Linda Jacobson explored the > possibility of making 9pfs work on Xen. It turned out lots of code in QEMU can > be reused. > > This patch series can be found at: > > git://xen

[Qemu-devel] [PULL 3/7] ohci: fix command HostControllerReset

2016-01-08 Thread Gerd Hoffmann
From: Hervé Poussineau Specification says that: "This bit is set by HCD to initiate a software reset of HC." Signed-off-by: Hervé Poussineau Tested-by: Mark Cave-Ayland Message-id: 1450567431-31795-4-git-send-email-hpous...@reactos.org Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci.c | 2

[Qemu-devel] [PULL 1/7] ohci: split reset method in 3 parts

2016-01-08 Thread Gerd Hoffmann
From: Hervé Poussineau The three parts are: - root hub reset (ohci_roothub_reset) - host controller soft reset (ohci_soft_reset) - host controller hard reset (ohci_hard_reset) Signed-off-by: Hervé Poussineau Tested-by: Mark Cave-Ayland Message-id: 1450567431-31795-2-git-send-email-hpous...@rea

[Qemu-devel] [PULL 2/7] ohci: fix Host Controller USBRESET

2016-01-08 Thread Gerd Hoffmann
From: Hervé Poussineau Specification says that, when entering this state, "the contents of the registers (except Root Hub registers) are preserved by the HC. [...] The Root Hub is being reset, which causes the Root Hub's downstream ports to be reset and possibly powered off." Signed-off-by: H

[Qemu-devel] [PULL 5/7] usb-mtp: fix call to trace function

2016-01-08 Thread Gerd Hoffmann
From: Bandan Das trace_usb_mtp_inotify_event() was being called after the object was being freed. Signed-off-by: Bandan Das Message-id: 1450861787-16213-3-git-send-email-...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) dif

[Qemu-devel] [PULL 4/7] usb-mtp: use safe variant when cleaning events list

2016-01-08 Thread Gerd Hoffmann
From: Bandan Das usb_mtp_inotify_cleanup uses QLIST_FOREACH to pick events from a list and free them which is incorrect. Use QLIST_FOREACH_SAFE instead. Signed-off-by: Bandan Das Message-id: 1450861787-16213-2-git-send-email-...@redhat.com Signed-off-by: Gerd Hoffmann --- hw/usb/dev-mtp.c | 4

Re: [Qemu-devel] [PATCH v1 00/15] data-driven device registers

2016-01-08 Thread Peter Maydell
On 8 January 2016 at 00:39, Alistair Francis wrote: > On Wed, Dec 16, 2015 at 8:33 AM, Alistair Francis > wrote: >> On Tue, Dec 15, 2015 at 1:56 PM, Peter Maydell >> wrote: >>> On 15 December 2015 at 20:52, Peter Crosthwaite >>> wrote: It needs to exist before it can be used so there is a

[Qemu-devel] [PULL 6/7] ohci: delay first SOF interrupt

2016-01-08 Thread Gerd Hoffmann
From: Laurent Vivier On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. This does not happen on real hardware because real hardware never send interrupt immediately afte

[Qemu-devel] [PULL 7/7] ohci: clear pending SOF on suspend

2016-01-08 Thread Gerd Hoffmann
From: Laurent Vivier On overcommitted CPU, kernel can be so slow that an interrupt can be triggered by the device whereas the driver is not ready to receive it. This drives us into an infinite loop. On suspend, if a SOF interrupt is raised between the stop of the device processing and the change

[Qemu-devel] [PULL 0/7] usb patch queue

2016-01-08 Thread Gerd Hoffmann
repository at: git://git.kraxel.org/qemu tags/pull-usb-20160108-1 for you to fetch changes up to 087462c7739869e9b888c06c06c8f1bbfd99779c: ohci: clear pending SOF on suspend (2016-01-08 09:29:24 +0100) usb: mtp and ohci fixes

Re: [Qemu-devel] [PULL v2 10/40] blockdev: Implement change with basic operations

2016-01-08 Thread Peter Maydell
On 7 January 2016 at 22:43, Max Reitz wrote: > I hope that the above explanation helped you understand why it bled into > tray-less devices, from a technical perspective. Yes, thanks, that was definitely a helpful explanation for why the design is the way it is. I'm still not sure how useful it i

Re: [Qemu-devel] [PATCH 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-08 Thread Greg Kurz
On Fri, 8 Jan 2016 11:11:20 +0100 Cornelia Huck wrote: > On Thu, 07 Jan 2016 12:32:08 +0100 > Greg Kurz wrote: > > > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > > > Cross-endian is now configured by the core virtio-net code. We simply > > fall back on full emulation if th

Re: [Qemu-devel] [PATCH 5/6] vhost: move virtio 1.0 check to cross-endian helper

2016-01-08 Thread Laurent Vivier
On 08/01/2016 11:07, Cornelia Huck wrote: > On Fri, 8 Jan 2016 10:21:40 +0100 > Greg Kurz wrote: > >> On Thu, 7 Jan 2016 21:07:26 +0100 >> Laurent Vivier wrote: > >>> IMHO, I think 4/6 and 5/6 can be merged as there is no change in the >>> behavior and they are only consolidating code. >>> >>

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

2016-01-08 Thread Chen Gang
On 2016年01月08日 17:57, Laurent Vivier wrote: > +return get_errno(setsockopt(sockfd, SOL_SOCKET, optname, + &lg, sizeof(lg))); >>> >>> Why do you use "SOL_SOCKET" instead of "level" ? >>> >> >> At present, level is TARGET_SOL_SOCKET, but we need SOL

Re: [Qemu-devel] [PATCH 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-08 Thread Cornelia Huck
On Thu, 07 Jan 2016 12:32:08 +0100 Greg Kurz wrote: > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > Cross-endian is now configured by the core virtio-net code. We simply > fall back on full emulation if the net backend cannot support the > requested endianness for vnet header

Re: [Qemu-devel] [PATCH 5/6] vhost: move virtio 1.0 check to cross-endian helper

2016-01-08 Thread Cornelia Huck
On Fri, 8 Jan 2016 10:21:40 +0100 Greg Kurz wrote: > On Thu, 7 Jan 2016 21:07:26 +0100 > Laurent Vivier wrote: > > IMHO, I think 4/6 and 5/6 can be merged as there is no change in the > > behavior and they are only consolidating code. > > > > Maybe but I'm not sure it is really needed to help

[Qemu-devel] [PATCH] virtio: fix error message for number of queues

2016-01-08 Thread Cornelia Huck
There's no such thing as "PCI queues" in the virtio core. Signed-off-by: Cornelia Huck --- This just bugged me when I was looking at the code :) --- hw/virtio/virtio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 1edef59..77b4f

Re: [Qemu-devel] [PATCH v2 21/27] 9pfs: factor out virtio_9p_push_and_notify

2016-01-08 Thread Aneesh Kumar K.V
Wei Liu writes: > The new function resides in virtio specific file. > > Signed-off-by: Wei Liu > --- > v2: new, part of original "9pfs: break out generic code from > virtio-9p.{c,h}" > --- > hw/9pfs/virtio-9p-device.c | 11 +++ > hw/9pfs/virtio-9p.c| 8 +--- > hw/9pfs/v

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

2016-01-08 Thread Laurent Vivier
Le 08/01/2016 10:45, Chen Gang a écrit : > > On 2016年01月08日 16:38, Laurent Vivier wrote: >> >>> +if (!lock_user_struct(VERIFY_READ, tlg, optval_addr, 1)) { >>> +return -TARGET_EFAULT; >>> +} >>> +__get_user(lg.l_onoff, &tlg->l_onoff); >>> +

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

2016-01-08 Thread Chen Gang
On 2016年01月08日 16:38, Laurent Vivier wrote: > >> +if (!lock_user_struct(VERIFY_READ, tlg, optval_addr, 1)) { >> +return -TARGET_EFAULT; >> +} >> +__get_user(lg.l_onoff, &tlg->l_onoff); >> +__get_user(lg.l_linger, &tlg->l_linger); >>

Re: [Qemu-devel] How guest physical RAM works

2016-01-08 Thread Paolo Bonzini
On 08/01/2016 10:29, Stefan Hajnoczi wrote: > As a side-note, the initial RAM that the guest started with might not > be modelled with a "pc-dimm" device and it can't be unplugged. > > The guest RAM itself isn't contained inside the "pc-dimm" object. > Instead the "pc-dimm" must be associated wi

Re: [Qemu-devel] How to reserve guest physical region for ACPI

2016-01-08 Thread Laszlo Ersek
On 01/08/16 05:21, Xiao Guangrong wrote: > > > On 01/07/2016 05:21 PM, Igor Mammedov wrote: >> On Wed, 6 Jan 2016 01:07:45 +0800 >> Xiao Guangrong wrote: >> >>> On 01/06/2016 12:43 AM, Michael S. Tsirkin wrote: >>> >> Yes - if address is static, you need to put it outside >> the table. C

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

2016-01-08 Thread Chen Gang
Firstly, thank you very much for your careful work. On 2016年01月08日 16:25, Laurent Vivier wrote: > > > Le 08/01/2016 02:59, cheng...@emindsoft.com.cn a écrit : [...] >> @@ -1692,10 +1693,30 @@ static abi_long do_getsockopt(int sockfd, int level, >> int optname, >> switch (optname) { >>

Re: [Qemu-devel] [PULL 2/2] hw/misc: Add support for ADC controller in Xilinx Zynq 7000

2016-01-08 Thread Paolo Bonzini
On 13/11/2015 18:54, Peter Crosthwaite wrote: > On Fri, Nov 13, 2015 at 9:08 AM, Paolo Bonzini wrote: >> >> >> On 12/11/2015 16:23, Peter Maydell wrote: >>> From: Guenter Roeck >>> >>> Add support for the Xilinx XADC core used in Zynq 7000. >>> >>> References: >>> - Zynq-7000 All Programmable S

[Qemu-devel] [PATCH v4 7/8] hw/arm/sysbus-fdt: enable amd-xgbe dynamic instantiation

2016-01-08 Thread Eric Auger
This patch allows the instantiation of the vfio-amd-xgbe device from the QEMU command line (-device vfio-amd-xgbe,host=""). The guest is exposed with a device tree node that combines the description of both XGBE and PHY (representation supported from 4.2 onwards kernel): Documentation/devicetree/b

[Qemu-devel] [PATCH v4 6/8] hw/arm/sysbus-fdt: helpers for clock node generation

2016-01-08 Thread Eric Auger
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_properties copies properties from a host device tree node to a guest devi

[Qemu-devel] [PATCH v4 8/8] hw/arm/sysbus-fdt: remove qemu_fdt_setprop returned value check

2016-01-08 Thread Eric Auger
qemu_fdt_setprop self-asserts in case of error hence no need to check the returned value. Signed-off-by: Eric Auger --- v3 -> v4: fix returned value --- hw/arm/sysbus-fdt.c | 19 +-- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sys

[Qemu-devel] [PATCH v4 5/8] device_tree: qemu_fdt_getprop_cell converted to use the error API

2016-01-08 Thread Eric Auger
This patch aligns the prototype with qemu_fdt_getprop. The caller can choose whether the function self-asserts on error (passing &error_fatal as Error ** argument, corresponding to the legacy behavior), or behaves differently such as simply output a message. In this later case the caller can use t

[Qemu-devel] [PATCH v4 3/8] device_tree: introduce qemu_fdt_node_path

2016-01-08 Thread Eric Auger
This new helper routine returns the node path of a device referred to by its node name and compat string. Signed-off-by: Eric Auger --- v1 -> v2: - move doc comment in header file - do not use a fixed size buffer - break on errors in while loop - use strcmp instead of strncmp RFC -> v1: - impr

[Qemu-devel] [PATCH v4 4/8] device_tree: qemu_fdt_getprop converted to use the error API

2016-01-08 Thread Eric Auger
Current qemu_fdt_getprop exits if the property is not found. It is sometimes needed to read an optional property, in which case we do not wish to exit but simply returns a null value. This patch converts qemu_fdt_getprop to accept an Error **, and existing users are converted to pass &error_fatal.

[Qemu-devel] [PATCH v4 1/8] hw/vfio/platform: amd-xgbe device

2016-01-08 Thread Eric Auger
This patch introduces the amd-xgbe VFIO platform device. It allows the guest to do passthrough on a device exposing an "amd,xgbe-seattle-v1a" compat string. Signed-off-by: Eric Auger Reviewed-by: Alex Bennée --- RFC -> v1: - add Alex' R-b --- hw/vfio/Makefile.objs | 1 + hw/vfio/amd

[Qemu-devel] [PATCH v4 2/8] device_tree: introduce load_device_tree_from_sysfs

2016-01-08 Thread Eric Auger
This function returns the host device tree blob from sysfs (/proc/device-tree). It uses a recursive function inspired from dtc read_fstree. Signed-off-by: Eric Auger --- v1 -> v2: - do not implement/expose read_fstree and load_device_tree_from_sysfs if CONFIG_LINUX is not defined (lstat is not

[Qemu-devel] [PATCH v4 0/8] AMD XGBE KVM platform passthrough

2016-01-08 Thread Eric Auger
This series allows to set up AMD XGBE passthrough. This was tested on AMD Seattle. The first upstreamed device supporting KVM platform passthrough was the Calxeda Midway XGMAC. Compared to this latter, the XGBE XGMAC exposes a much more complex device tree node. - First There are 2 device tree no

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

2016-01-08 Thread Wolfgang Bumiller
On Thu, Dec 17, 2015 at 06:10:59PM +0530, P J P wrote: > Hello, > > An OOB write issue was reported by Mr Ling Liu, CC'd here. It occurs while > processing the 'sendkey' command, if the command argument was longer than > the 'keyname_buf[16]' buffer. > > === > From b0363f4c0e91671064dd7ffece8a6

[Qemu-devel] How guest physical RAM works

2016-01-08 Thread Stefan Hajnoczi
I posted a summary of how pc-dimm, memory-backend, MemoryRegion, and RAMBlock play together to represent guest RAM: http://blog.vmsplice.net/2016/01/qemu-internals-how-guest-physical-ram.html Hope this is useful to anyone trying to understand the internals of QEMU. I've copied the full text belo

Re: [Qemu-devel] [PATCH 6/6] virtio: optimize virtio_access_is_big_endian() for little-endian targets

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 21:25:19 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > When adding cross-endian support, we introduced the TARGET_IS_BIENDIAN macro > > and the virtio_access_is_big_endian() helper to have a branchless fast path > > in the virtio memory accessors

Re: [Qemu-devel] [PATCH 5/6] vhost: move virtio 1.0 check to cross-endian helper

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 21:07:26 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > Indeed vhost doesn't need to ask for vring endian fixing if the device is > > virtio 1.0, since it is already handled by the in-kernel vhost driver. This > > patch simply consolidates the log

Re: [Qemu-devel] [PATCH v2 13/21] block: Introduce bs->explicit_options

2016-01-08 Thread Paolo Bonzini
On 23/11/2015 16:59, Kevin Wolf wrote: > +bs->explicit_options = qdict_clone_shallow(options); qdict_clone_shallow dereferences options, and other parts of bdrv_open_inherit assume options != NULL. You can remove the first part of this condition, some 50 lines below: /* Check if any un

Re: [Qemu-devel] [PATCH 3/6] virtio: drop the virtio_needs_swap() helper

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 20:55:50 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > It is not used anymore. > > > > Signed-off-by: Greg Kurz > > --- > > include/hw/virtio/virtio-access.h |9 - > > 1 file changed, 9 deletions(-) > > > > diff --git a/include/hw

Re: [Qemu-devel] [PULL v4 8/9] io: add QIOChannelCommand class

2016-01-08 Thread Paolo Bonzini
> > +static void qio_channel_command_finalize(Object *obj) > +{ > +QIOChannelCommand *ioc = QIO_CHANNEL_COMMAND(obj); > +if (ioc->readfd != -1) { > +close(ioc->readfd); > +ioc->readfd = -1; > +} > +if (ioc->writefd != -1) { > +close(ioc->writefd); > +

Re: [Qemu-devel] [PATCH 2/6] Revert "vhost-net: tell tap backend about the vnet endianness"

2016-01-08 Thread Greg Kurz
On Thu, 7 Jan 2016 20:52:04 +0100 Laurent Vivier wrote: > > > On 07/01/2016 12:32, Greg Kurz wrote: > > This reverts commit 5be7d9f1b1452613b95c6ba70b8d7ad3d0797991. > > > > Cross-endian is now configured by the core virtio-net code. We simply > > fall back on full emulation if the net backend

Re: [Qemu-devel] [PULL 14/55] ipmi: Add a local BMC simulation

2016-01-08 Thread Paolo Bonzini
On 22/12/2015 17:53, Michael S. Tsirkin wrote: > +{ > +if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) { Off by one. The check should be >=, not >. Paolo > +return -1; > +}

Re: [Qemu-devel] [PULL v4 4/9] io: add QIOChannelSocket class

2016-01-08 Thread Paolo Bonzini
On 18/12/2015 13:21, Daniel P. Berrange wrote: > + > +if (nfds > SOCKET_MAX_FDS) { > +error_setg_errno(errp, -EINVAL, > + "Only %d FDs can be sent, got %zu", > + SOCKET_MAX_FDS, nfds); > +return -1; > +

Re: [Qemu-devel] [PULL 14/55] ipmi: Add a local BMC simulation

2016-01-08 Thread Paolo Bonzini
On 22/12/2015 17:53, Michael S. Tsirkin wrote: > +case IPMI_BMC_WATCHDOG_PRE_NMI: > +if (!k->do_hw_op(s, IPMI_SEND_NMI, 1)) { > +/* NMI not supported. */ > +rsp[2] = IPMI_CC_INVALID_DATA_FIELD; > +goto out; > +} > +default: > +/*

Re: [Qemu-devel] [PULL v4 8/9] io: add QIOChannelCommand class

2016-01-08 Thread Paolo Bonzini
On 18/12/2015 13:21, Daniel P. Berrange wrote: > +#ifndef WIN32 > +static int qio_channel_command_abort(QIOChannelCommand *ioc, > + Error **errp) > +{ > +pid_t ret; > +int status; > +int step = 0; > + > +/* See if intermediate process has exited

Re: [Qemu-devel] [PATCH v3 3/4] Add Error **errp for xen_pt_config_init()

2016-01-08 Thread Cao jin
On 01/08/2016 12:51 AM, Eric Blake wrote: On 01/07/2016 01:12 AM, Cao jin wrote: if (rc < 0) { -XEN_PT_LOG(&s->dev, "Failed to initialize %d/%ld, type=0x%x, rc:%d\n", - i, ARRAY_SIZE(xen_pt_emu_reg_grps), +error_setg(&lo

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

2016-01-08 Thread Laurent Vivier
Le 08/01/2016 03:03, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Just implement it according to the other features implementations. > > Signed-off-by: Chen Gang > --- > linux-user/syscall.c | 16 +++- > linux-user/syscall_defs.h | 5 + > 2 files changed, 2

[Qemu-devel] [PATCH v4 4/5] Add Error **errp for xen_pt_config_init()

2016-01-08 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen_pt.c | 8 --- hw/xen/xen_pt.h | 2 +- hw/xen/xen_pt_config_init.c | 51 - 3 files changed, 33 insertions(+), 28 deletions(-) diff --git

[Qemu-devel] [PATCH v4 2/5] Add Error **errp for xen_host_pci_device_get()

2016-01-08 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 134 ++- hw/xen/xen-host-pci-device.h | 5 +- hw/xen/xen_pt.c | 13 +++-- 3 files changed, 81 insertions(+), 71 deletions(-) diff --gi

[Qemu-devel] [PATCH v4 0/5] Xen PCI passthru: Convert to realize()

2016-01-08 Thread Cao jin
v4 changelog: 1. patch 1/5 is new, according to Eric`s comment, using qemu_strtoul(). 2. change xen_host_pci_sysfs_path() to void, use assert inside. 3. fix all Error object memory leak risk, via error_report_err() 4. change 'local_err' to 'err'. 5. fix to all the format-related issue. Cao jin (5)

[Qemu-devel] [PATCH v4 3/5] Add Error **errp for xen_pt_setup_vga()

2016-01-08 Thread Cao jin
To catch the error msg. Also modify the caller Signed-off-by: Cao jin --- hw/xen/xen_pt.c | 7 +-- hw/xen/xen_pt.h | 3 ++- hw/xen/xen_pt_graphics.c | 11 ++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 5

[Qemu-devel] [PATCH v4 5/5] Xen PCI passthru: convert to realize()

2016-01-08 Thread Cao jin
Signed-off-by: Cao jin --- hw/xen/xen_pt.c | 53 - 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c index 9eef3df..d33221b 100644 --- a/hw/xen/xen_pt.c +++ b/hw/xen/xen_pt.c @@ -760,10 +760,10 @@

[Qemu-devel] [PATCH v4 1/5] Use qemu_strtoul instead of strtol

2016-01-08 Thread Cao jin
strtol() don`t guarantee errno to be ERANGE on overflow. This wrapper returns either -EINVAL or the errno set by strtol() function (e.g -ERANGE). Signed-off-by: Cao jin --- hw/xen/xen-host-pci-device.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/xen/xen-hos

Re: [Qemu-devel] [PATCH v2 12/27] 9pfs: use V9fsBlob to transmit xattr

2016-01-08 Thread Aneesh Kumar K.V
Wei Liu writes: > And make v9fs_pack static function. Now we only need to export > v9fs_{,un}marshal to device. > > Signed-off-by: Wei Liu > --- > fsdev/virtio-9p-marshal.c | 4 ++-- > fsdev/virtio-9p-marshal.h | 3 --- > hw/9pfs/virtio-9p.c | 21 + > 3 files changed

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

2016-01-08 Thread Laurent Vivier
Le 08/01/2016 02:59, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Just implement them according to the other features implementations. > > Signed-off-by: Chen Gang > --- > linux-user/syscall.c | 25 +++-- > 1 file changed, 23 insertions(+), 2 deletions(-) >

<    1   2   3