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 +++-- >

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 +++- >

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(>dev, "Failed to initialize %d/%ld, type=0x%x, rc:%d\n", - i, ARRAY_SIZE(xen_pt_emu_reg_grps), +error_setg(_err,

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: > +{ > +if ((netfn & 1) || (netfn > MAX_NETFNS) || (s->netfns[netfn / 2])) { Off by one. The check should be >=, not >. Paolo > +return -1; > +}

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

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,

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

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

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

[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 ---

[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

[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

[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):

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. >>> >>>

[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

[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

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 |

[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

[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 +++

[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

[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(-)

[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(+),

[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(+),

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

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
> > +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] 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

[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

[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 _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 the

[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

[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 _fatal. This

Re: [Qemu-devel] [PATCH] qdev: free qemu-opts when the QOM path goes away

2016-01-08 Thread Paolo Bonzini
On 05/11/2015 13:06, Andreas Färber wrote: > Am 04.11.2015 um 19:34 schrieb Markus Armbruster: >> Paolo Bonzini writes: >> >>> Otherwise there is a race where the DEVICE_DELETED event has been sent but >>> attempts to reuse the ID will fail. >>> >>> Reported-by: Michael S.

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

2016-01-08 Thread Wei Liu
On Sat, Jan 09, 2016 at 12:18:40AM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: > >> Wei Liu writes: > >> > >> > And make v9fs_pack static function. Now we only need to export

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

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 04:19:42PM +0530, Aneesh Kumar K.V wrote: > 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

[Qemu-devel] [PATCH v1 1/1] arm_gic: Include the GIC ArchRev in the ICPIDR2 register

2016-01-08 Thread Alistair Francis
The ARM GIC documentation (page 4-119) describes that bits 7 to 4 of the ICPIDR2 register should include the GIC architecture version. This patche ORs the version into the existing return value. Signed-off-by: Alistair Francis Tested-by: Sören Brinkmann

Re: [Qemu-devel] [PATCH v2 27/27] 9pfs: disentangle V9fsState

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 11:39:37AM +0530, Aneesh Kumar K.V wrote: > Wei Liu writes: > > > V9fsState now only contains generic fields. Introduce V9fsVirtioState > > for virtio transport. Change virtio-pci and virtio-ccw to use > > V9fsVirtioState. Handle transport

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

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: > 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 > > --- > >

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

2016-01-08 Thread Aneesh Kumar K.V
Wei Liu writes: > On Fri, Jan 08, 2016 at 02:00:31PM +0530, Aneesh Kumar K.V wrote: >> 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

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

2016-01-08 Thread Eric Blake
On 01/08/2016 09:40 AM, Denis V. Lunev wrote: Markus' series to add a prefixing notation would be better to use here (although I didn't check if he caught this one in that series already): https://lists.gnu.org/archive/html/qemu-devel/2015-12/msg03495.html >>> this series is not

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-08 Thread Igor Mammedov
On Fri, 8 Jan 2016 13:58:03 +0100 Gerd Hoffmann wrote: > This patch extends the functionality of the max-ram-below-4g option > to also allow increasing lowmem. Use case: Give as much memory as > possible to legacy non-PAE guests. > > While being at it also rework the lowmem

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

2016-01-08 Thread P J P
+-- On Fri, 8 Jan 2016, John Snow wrote --+ | In both of these error pathways, AIOCB is actually never assigned to | begin with. True, it's mentioned in the commit message. | So it's not necessarily a use-after-free. Yes, right. | I think it should be safe to put ncq_tfs->used = 0

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

2016-01-08 Thread Wei Liu
On Fri, Jan 08, 2016 at 03:27:49PM +0530, Aneesh Kumar K.V wrote: [...] > > How is this different from pdu_push_notify added by [PATCH 18/27] > #18 is encapsulating functionality into pdu_* function family. This patch is encapsulating virtio specific code into virtio specific function. The two

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

2016-01-08 Thread Paolo Bonzini
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; >> > +goto out; > If you simply make this failure code

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 01/08/2016 08:54 PM, Eric Blake wrote: On 01/08/2016 09:40 AM, Denis V. Lunev wrote: Markus' series to add a prefixing notation would be better to use here (although I didn't check if he caught this one in that series already):

[Qemu-devel] [PATCH v2 0/9] ahci: atapi qtests

2016-01-08 Thread John Snow
Add ATAPI support into libqos/ahci, and write a few tests for it. This is the last "batch" of planned qtests for s/ata -- basic i/o testing of HDDs and CDROMs on both PCI and AHCI should be complete after this series. v2: Rebase and resend for 2.6.

[Qemu-devel] [PATCH v2 6/9] libqos/ahci: allow nondata commands for ahci_io variants

2016-01-08 Thread John Snow
These variants try to set a data offset, even if you don't specify one. In the cases where the offset is zero and it's a nondata command, just ignore the instruction. Signed-off-by: John Snow --- tests/ahci-test.c | 14 ++ tests/libqos/ahci.c | 3 +++ 2 files

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

2016-01-08 Thread John Snow
On 01/08/2016 02:48 PM, P J P wrote: > 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

Re: [Qemu-devel] [PATCH v2 0/9] ahci: atapi qtests

2016-01-08 Thread John Snow
On 01/08/2016 02:55 PM, John Snow wrote: > Add ATAPI support into libqos/ahci, and write a few tests for it. > > This is the last "batch" of planned qtests for s/ata -- basic i/o > testing of HDDs and CDROMs on both PCI and AHCI should be complete > after this series. > > v2: Rebase and resend

Re: [Qemu-devel] [PATCH 2/4] macio: add dma_active to VMStateDescription

2016-01-08 Thread John Snow
On 01/06/2016 04:17 PM, Mark Cave-Ayland wrote: > On 06/01/16 20:57, John Snow wrote: > >> On 01/06/2016 03:37 PM, Mark Cave-Ayland wrote: >>> Make sure that we include the value of dma_active in the migration stream. >>> >>> Signed-off-by: Mark Cave-Ayland >>>

[Qemu-devel] [PATCH v2 1/9] ahci-test: fix memory leak

2016-01-08 Thread John Snow
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow --- tests/ahci-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 0888506..f4945dc 100644 --- a/tests/ahci-test.c +++

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

2016-01-08 Thread John Snow
On 01/08/2016 02:48 PM, P J P wrote: > 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

[Qemu-devel] [PATCH v2 8/9] qtest/ahci: ATAPI data tests

2016-01-08 Thread John Snow
Simple I/O tests for DMA and PIO pathways in the AHCI HBA. I believe at this point in time all of the common, major IO pathways in BMDMA and AHCI are covered by qtests now. Signed-off-by: John Snow --- tests/ahci-test.c | 97

[Qemu-devel] [PATCH v2 9/9] libqos/ahci: organize header

2016-01-08 Thread John Snow
Organize the prototypes into nice little sections. Signed-off-by: John Snow --- tests/libqos/ahci.h | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/tests/libqos/ahci.h b/tests/libqos/ahci.h index 2c2d2fc..69dc4d7

[Qemu-devel] [PATCH v2 4/9] libqos/ahci: Switch to mutable properties

2016-01-08 Thread John Snow
ATAPI commands are, unfortunately, weird in that they can be either DMA or PIO depending on a header bit. In order to accommodate them, I'll need to make AHCI command properties mutable so we can toggle between which "flavor" of ATAPI command we want to test. The default ATAPI transfer mechanism

Re: [Qemu-devel] [PATCH 2/8] ipmi: add get and set SENSOR_TYPE commands

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard I agree with Greg's comments, too. -corey On 01/05/2016 11:29 AM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 51 -- 1 file changed, 49

[Qemu-devel] [PATCH v2] 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

[Qemu-devel] [PATCH v2 7/9] libqos/ahci: add ahci_exec

2016-01-08 Thread John Snow
add ahci_exec, which is a standard purpose flexible command dispatcher and tester for the AHCI device. The intent is to eventually cut down on the absurd amount of boilerplate inside of the AHCI qtest. Signed-off-by: John Snow --- tests/libqos/ahci.c | 76

Re: [Qemu-devel] [PATCH 1/8] ipmi: fix SDR length value

2016-01-08 Thread Corey Minyard
On 01/06/2016 02:14 AM, Cédric Le Goater wrote: On 01/05/2016 08:59 PM, Eric Blake wrote: On 01/05/2016 10:29 AM, Cédric Le Goater wrote: [meta-comment] Your messages were not marked in-reply-to: the 0/8 cover letter, but came through as separate threads. This makes it harder to follow,

Re: [Qemu-devel] [PATCH 3/8] ipmi: add GET_SYS_RESTART_CAUSE chassis command

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard On 01/05/2016 11:29 AM, Cédric Le Goater wrote: This is a simulator. Just return an unknown cause (0). Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 20 ++-- 1 file changed, 18 insertions(+), 2

Re: [Qemu-devel] [PATCH 4/8] ipmi: add FRU support

2016-01-08 Thread Corey Minyard
On 01/05/2016 11:29 AM, Cédric Le Goater wrote: This patch provides a simplistic FRU support for the IPMI BMC simulator. The FRU area contains 32 entries * 256 bytes which should be enough to start some simulation. Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c

Re: [Qemu-devel] [PATCH 6/8] ipmi: add SET_SENSOR_READING command (tentative try)

2016-01-08 Thread Corey Minyard
Acked-by: Corey Minyard This looks good. Though this file is getting uncomfortably large, I may have to look at splitting it up. -corey On 01/05/2016 11:30 AM, Cédric Le Goater wrote: SET_SENSOR_READING is a complex IPMI command (IPMI spec : "35.17 Set Sensor Reading

[Qemu-devel] [PATCH v2 5/9] libqos: allow zero-size allocations

2016-01-08 Thread John Snow
As part of streamlining the AHCI tests interface, it'd be nice if specying a size of zero could be handled without special branches and the allocator could handle this special case gracefully. This lets me use the "ahci_io" macros for non-data commands, too, which moves me forward towards

[Qemu-devel] [PATCH v2 2/9] libqos/ahci: ATAPI support

2016-01-08 Thread John Snow
Add pathways to tolerate ATAPI commands. Notably, unlike ATA, each SCSI command's layout is a little different, so support will have to be patched in for each command as we want to test them in e.g. ahci_command_set_sizes and ahci_command_set_offset. For now, I'm adding support for 0x28, READ

Re: [Qemu-devel] [PATCH 5/8] ipmi: add ACPI power and GUID commands

2016-01-08 Thread Corey Minyard
On 01/05/2016 11:29 AM, Cédric Le Goater wrote: Signed-off-by: Cédric Le Goater --- hw/ipmi/ipmi_bmc_sim.c | 55 ++ 1 file changed, 55 insertions(+) diff --git a/hw/ipmi/ipmi_bmc_sim.c b/hw/ipmi/ipmi_bmc_sim.c index

[Qemu-devel] [PATCH v2 3/9] libqos/ahci: ATAPI identify

2016-01-08 Thread John Snow
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow --- tests/ahci-test.c | 8 +++- tests/libqos/ahci.c | 5 + tests/libqos/ahci.h | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH 7/8] ipmi: introduce an ipmi_bmc_init_sensor() API

2016-01-08 Thread Corey Minyard
The way the SDR and sensors are handled currently in the code I wrote is far from ideal, it's not scalable. In my mind, the BMC in qemu would never be a very elaborate one, you would use an external BMC for that. There are a couple of issues to deal with here: We need support for SDRs

[Qemu-devel] [PULL 03/11] ahci-test: fix memory leak

2016-01-08 Thread John Snow
Use the proper free command to detroy an AHCICommand. Signed-off-by: John Snow Message-id: 1452282920-21550-2-git-send-email-js...@redhat.com --- tests/ahci-test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c

[Qemu-devel] [PULL 04/11] libqos/ahci: ATAPI support

2016-01-08 Thread John Snow
Add pathways to tolerate ATAPI commands. Notably, unlike ATA, each SCSI command's layout is a little different, so support will have to be patched in for each command as we want to test them in e.g. ahci_command_set_sizes and ahci_command_set_offset. For now, I'm adding support for 0x28, READ

[Qemu-devel] [PULL 05/11] libqos/ahci: ATAPI identify

2016-01-08 Thread John Snow
We need to say "hello!" to our ATAPI friends in a slightly different manner. Signed-off-by: John Snow Message-id: 1452282920-21550-4-git-send-email-js...@redhat.com --- tests/ahci-test.c | 8 +++- tests/libqos/ahci.c | 5 + tests/libqos/ahci.h | 1 + 3 files changed,

[Qemu-devel] [PULL 01/11] macio: fix overflow in lba to offset conversion for ATAPI devices

2016-01-08 Thread John Snow
From: Mark Cave-Ayland As the IDEState lba field is an int32_t, make sure we cast to int64_t before shifting to calculate the offset. Otherwise we end up with an overflow when trying to access sectors beyond 2GB as can occur when using DVD images. [Maintainer

[Qemu-devel] [PULL 00/11] Ide patches

2016-01-08 Thread John Snow
The following changes since commit 38a762fec63fd5c035aae29ba9a77d357e21e4a7: Merge remote-tracking branch 'remotes/berrange/tags/pull-crypto-fixes-2015-12-23-1' into staging (2015-12-23 13:53:32 +) are available in the git repository at: https://github.com/jnsnow/qemu.git

[Qemu-devel] [PULL 06/11] libqos/ahci: Switch to mutable properties

2016-01-08 Thread John Snow
ATAPI commands are, unfortunately, weird in that they can be either DMA or PIO depending on a header bit. In order to accommodate them, I'll need to make AHCI command properties mutable so we can toggle between which "flavor" of ATAPI command we want to test. The default ATAPI transfer mechanism

[Qemu-devel] [PULL 02/11] ide: ahci: reset ncq object to unused on error

2016-01-08 Thread John Snow
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

[Qemu-devel] [PULL 09/11] libqos/ahci: add ahci_exec

2016-01-08 Thread John Snow
add ahci_exec, which is a standard purpose flexible command dispatcher and tester for the AHCI device. The intent is to eventually cut down on the absurd amount of boilerplate inside of the AHCI qtest. Signed-off-by: John Snow Message-id:

[Qemu-devel] [PULL 07/11] libqos: allow zero-size allocations

2016-01-08 Thread John Snow
As part of streamlining the AHCI tests interface, it'd be nice if specying a size of zero could be handled without special branches and the allocator could handle this special case gracefully. This lets me use the "ahci_io" macros for non-data commands, too, which moves me forward towards

[Qemu-devel] [PULL 08/11] libqos/ahci: allow nondata commands for ahci_io variants

2016-01-08 Thread John Snow
These variants try to set a data offset, even if you don't specify one. In the cases where the offset is zero and it's a nondata command, just ignore the instruction. Signed-off-by: John Snow Message-id: 1452282920-21550-7-git-send-email-js...@redhat.com --- tests/ahci-test.c

[Qemu-devel] [PULL 10/11] qtest/ahci: ATAPI data tests

2016-01-08 Thread John Snow
Simple I/O tests for DMA and PIO pathways in the AHCI HBA. I believe at this point in time all of the common, major IO pathways in BMDMA and AHCI are covered by qtests now. Signed-off-by: John Snow Message-id: 1452282920-21550-9-git-send-email-js...@redhat.com ---

[Qemu-devel] [PULL 11/11] libqos/ahci: organize header

2016-01-08 Thread John Snow
Organize the prototypes into nice little sections. Signed-off-by: John Snow Message-id: 1452282920-21550-10-git-send-email-js...@redhat.com --- tests/libqos/ahci.h | 36 1 file changed, 24 insertions(+), 12 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v2] pc: allow raising low memory via max-ram-below-4g option

2016-01-08 Thread Laszlo Ersek
On 01/08/16 18:45, Igor Mammedov wrote: > On Fri, 8 Jan 2016 13:58:03 +0100 > Gerd Hoffmann wrote: > >> This patch extends the functionality of the max-ram-below-4g option >> to also allow increasing lowmem. Use case: Give as much memory as >> possible to legacy non-PAE

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

2016-01-08 Thread John Snow
On 01/08/2016 07:08 AM, P J P wrote: > 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

[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:

[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

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

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 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

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

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

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

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 > > > >

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

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

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

2016-01-08 Thread Eric Blake
On 01/08/2016 01:37 AM, Cao jin wrote: > 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

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

2016-01-08 Thread P J P
+-- On Fri, 8 Jan 2016, John Snow wrote --+ | > ide_state->status = READY_STAT | ERR_STAT; | > ncq_tfs->drive->port_regs.scr_err |= (1 << ncq_tfs->tag); | > +ncq_tfs->used = 0; | > } | | Thanks, applied to my IDE tree: | | https://github.com/jnsnow/qemu/commits/ide |

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] 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

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, >l_onoff); >>> +

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 +++ >

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. > > > >

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, + , sizeof(lg))); >>> >>> Why do you use "SOL_SOCKET" instead of "level" ? >>> >> >> At present, level is TARGET_SOL_SOCKET, but we need

  1   2   3   >