[Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64

2014-06-09 Thread Chaos Shu
Hi all I've noticed that Qemu maintained the target arch register in memory for capacity, but the load/store really cost a bit much, is there any way map the register directly. For example, in x86 to aarch64, x86 uses 8 registers mostly such eax ebx ecx and so on, and aarch64 arch got 31

Re: [Qemu-devel] [PATCH v3.2 01/31] NUMA: move numa related code to new file numa.c

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 10:22:35AM +0800, Hu Tao wrote: On Sun, Jun 08, 2014 at 01:09:03PM +0300, Michael S. Tsirkin wrote: On Wed, May 14, 2014 at 05:43:05PM +0800, Hu Tao wrote: From: Wanlong Gao gaowanl...@cn.fujitsu.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com

Re: [Qemu-devel] [PATCH] scsi-disk: fix bug in scsi_block_new_request() introduced by commit 137745c

2014-06-09 Thread Paolo Bonzini
Il 08/06/2014 19:22, Ulrich Obergfell ha scritto: This patch fixes a bug in scsi_block_new_request() that was introduced by commit 137745c5c60f083ec982fe9e861e8c16ebca1ba8. If the host cache is used - i.e. if BDRV_O_NOCACHE is _not_ set - the 'break' statement needs to be executed to 'fall back'

Re: [Qemu-devel] [Question] Qemu Register Mapping Directly in AARCH64

2014-06-09 Thread Peter Maydell
On 9 June 2014 06:59, Chaos Shu chaos.s...@live.com wrote: I’ve noticed that Qemu maintained the target arch register in memory for capacity, but the load/store really cost a bit much, is there any way map the register directly. Our JIT's register allocator will avoid storing the guest

Re: [Qemu-devel] Use-after-free during unrealize in system_reset

2014-06-09 Thread Paolo Bonzini
Il 08/06/2014 16:52, Michael S. Tsirkin ha scritto: On Sun, Jun 08, 2014 at 04:40:56PM +0200, Paolo Bonzini wrote: Il 08/06/2014 12:46, Michael S. Tsirkin ha scritto: Tested-by: Michael S. Tsirkin m...@redhat.com You probably tested the reversal, actually. :) Actually, there is a reason for

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-06-09 Thread Hu Tao
On Mon, Jun 09, 2014 at 10:44:02AM +0800, Hu Tao wrote: On Fri, Jun 06, 2014 at 02:48:15PM +0200, Igor Mammedov wrote: On Fri, 6 Jun 2014 17:29:38 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Fri, May 30, 2014 at 09:59:55AM +0200, Igor Mammedov wrote: On Fri, 30 May 2014 00:05:51

Re: [Qemu-devel] Question about how to distinguish a usb device in usb pass-through feature

2014-06-09 Thread Gonglei (Arei)
Hi, Qemu has supported 3rd method for USB passthrough except two ways that you have pointed: hostbus+hostport -- match for a specific physical port in the host, any device which is plugged in there gets passed to the guest. The method can resolve your all problems. AFAICT, libvirt do not

Re: [Qemu-devel] [PATCH] hw/virtio: enable common virtio feature for mmio device

2014-06-09 Thread Ming Lei
On Wed, Jun 4, 2014 at 10:05 AM, Ming Lei ming@canonical.com wrote: Both 'indirect_desc' and 'event_idx' are bus independent features, and they should be enabled for mmio devices too. On arm64 quad core VM(qemu-kvm), the patch can increase block I/O performance a lot with latest linux

Re: [Qemu-devel] Use-after-free during unrealize in system_reset

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 09:51:56AM +0200, Paolo Bonzini wrote: Il 08/06/2014 16:52, Michael S. Tsirkin ha scritto: On Sun, Jun 08, 2014 at 04:40:56PM +0200, Paolo Bonzini wrote: Il 08/06/2014 12:46, Michael S. Tsirkin ha scritto: Tested-by: Michael S. Tsirkin m...@redhat.com You probably

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-06-09 Thread Peter Crosthwaite
On Mon, Jun 9, 2014 at 12:44 PM, Hu Tao hu...@cn.fujitsu.com wrote: On Fri, Jun 06, 2014 at 02:48:15PM +0200, Igor Mammedov wrote: On Fri, 6 Jun 2014 17:29:38 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Fri, May 30, 2014 at 09:59:55AM +0200, Igor Mammedov wrote: On Fri, 30 May 2014

[Qemu-devel] [PATCH 0/3] Add PIIX4 SMBus to qtest and related changes

2014-06-09 Thread Marc Marí
Add PIIX4 SMBus to testing libraries, add a test case for those libraries, and solve problems in SMBus and PIIX4 codes. Marc Marí (2): x86 piix4: Correct SMBus base address qtest: Add PIIX4 SMBus support for libqos Paolo Bonzini (1): smbus: fix writes hw/acpi/piix4.c|2 +-

[Qemu-devel] [PATCH 1/3] smbus: fix writes

2014-06-09 Thread Marc Marí
From: Paolo Bonzini pbonz...@redhat.com SMBus protocol sends offset and length before the actual data that is transferred. So we need to skip two bytes rather than one. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/i2c/smbus.c |7 +-- 1 file changed, 5 insertions(+), 2

[Qemu-devel] [PATCH 2/3] x86 piix4: Correct SMBus base address

2014-06-09 Thread Marc Marí
As defined in the PIIX4 datasheet in page 135, the base address is set on bits [15:4]. The mask was changed to match those bits. Datasheet: http://www.intel.com/assets/pdf/datasheet/290562.pdf Found by Stefan Hajnoczi Signed-off-by: Marc Marí marc.mari.barc...@gmail.com --- hw/acpi/piix4.c |

[Qemu-devel] [PATCH 3/3] qtest: Add PIIX4 SMBus support for libqos

2014-06-09 Thread Marc Marí
Add support for the SMBus protocol on the PIIX4 chipset. Add a test for EEPROMs using this interface. Signed-off-by: Marc Marí marc.mari.barc...@gmail.com --- tests/Makefile |5 + tests/eeprom-test.c| 58 tests/libqos/i2c.h |5 +-

Re: [Qemu-devel] [PATCH 0/2] nbd: Add exports listing support

2014-06-09 Thread Paolo Bonzini
Il 07/06/2014 02:32, Hani Benhabiles ha scritto: Compared to v2: * 1/2: Handle options in loop. Handle NBD_OPT_ABORT. Add link to documentation. Improve commit message. * 2/2: Fix return value in NBD_OPT_LIST case. Rename nbd_send_list() function to nbd_handle_list(). * Remove patch 3/3 from

Re: [Qemu-devel] [PATCH v3 05/34] add memdev backend infrastructure

2014-06-09 Thread Hu Tao
On Mon, Jun 09, 2014 at 06:54:54PM +1000, Peter Crosthwaite wrote: On Mon, Jun 9, 2014 at 12:44 PM, Hu Tao hu...@cn.fujitsu.com wrote: On Fri, Jun 06, 2014 at 02:48:15PM +0200, Igor Mammedov wrote: On Fri, 6 Jun 2014 17:29:38 +0800 Hu Tao hu...@cn.fujitsu.com wrote: On Fri, May 30,

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 00/18] Vhost and vhost-net support for userspace based backends

2014-06-09 Thread Nikolay Nikolaev
Hello Michael, On Sun, Jun 8, 2014 at 6:12 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, May 27, 2014 at 03:03:21PM +0300, Nikolay Nikolaev wrote: In this patch series we would like to introduce our approach for putting a virtio-net backend in an external userspace process. Our

[Qemu-devel] [PATCH v4 02/29] NUMA: check if the total numa memory size is equal to ram_size

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com If the total number of the assigned numa nodes memory is not equal to the assigned ram size, it will write the wrong data to ACPI table, then the guest will ignore the wrong ACPI table and recognize all memory to one node. It's buggy, we should check it

[Qemu-devel] [PATCH v4 03/29] NUMA: Add numa_info structure to contain numa nodes info

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by:

[Qemu-devel] [PATCH v4 04/29] NUMA: convert -numa option to use OptsVisitor

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Signed-off-by: Igor Mammedov imamm...@redhat.com Tested-by: Eduardo Habkost ehabk...@redhat.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PATCH v4 01/29] NUMA: move numa related code to new file numa.c

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com Signed-off-by: Blue Swirl blauwir...@gmail.com Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

[Qemu-devel] [PATCH v4 07/29] vl: redo -object parsing

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Follow the lines of the HMP implementation, using OptsVisitor to parse the options. This gives access to OptsVisitor's rich parsing of integer lists. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- vl.c |

[Qemu-devel] [PATCH v4 00/29] NUMA series and hostmem improvements

2014-06-09 Thread Hu Tao
note: this series is based on MST's pci tree. changes to v3.2: - rebase to latest git tree since there are several conflicts - no error_is_set() now - no QEMUMachineInitArgs now - use mbind flag MPOL_MF_STRICT to catch memory allocations that don't follow policy - some document error message

[Qemu-devel] [PATCH v4 06/29] man: improve -numa doc

2014-06-09 Thread Hu Tao
From: Luiz Capitulino lcapitul...@redhat.com The -numa option documentation in qemu's manpage lacks the command-line options and some information regarding how it relates to options -m and -smp. This commit fills in the missing text. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com

[Qemu-devel] [PATCH v4 10/29] numa: introduce memory_region_allocate_system_memory

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/i386/pc.c| 4 ++-- include/hw/boards.h | 6 +- include/sysemu/sysemu.h | 1 + numa.c | 9 + 4 files changed, 17

[Qemu-devel] [PATCH v4 12/29] numa: add -numa node,memdev= option

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com This option provides the infrastructure for binding guest NUMA nodes to host NUMA nodes. For example: -object memory-ram,size=1024M,policy=bind,host-nodes=0,id=ram-node0 \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ -object

[Qemu-devel] [PATCH v4 11/29] hostmem: separate allocation from UserCreatable complete method

2014-06-09 Thread Hu Tao
This allows the superclass to set various policies on the memory region that the subclass creates. Drops hostmem-ram's complete method accordingly. While at file hostmem.c, s/hostmemory/host_memory/ to keep names consistant. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao

[Qemu-devel] [PATCH v4 05/29] NUMA: expand MAX_NODES from 64 to 128

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com libnuma choosed 128 for MAX_NODES, so we follow libnuma here. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao

[Qemu-devel] [PATCH v4 14/29] memory: move mem_path handling to memory_region_allocate_system_memory

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Like the previous patch did in exec.c, split memory_region_init_ram and memory_region_init_ram_from_file, and push mem_path one step further up. Other RAM regions than system memory will now be backed by regular RAM. Also, boards that do not use

[Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/Makefile.objs | 1 + backends/hostmem-file.c | 107 2 files changed, 108 insertions(+) create mode

[Qemu-devel] [PATCH v4 23/29] hostmem: add properties for NUMA memory policy

2014-06-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com [Raise errors on setting properties if !CONFIG_NUMA. Add BUILD_BUG_ON checks. - Paolo] Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/hostmem.c

[Qemu-devel] [PATCH v4 24/29] Introduce signed range.

2014-06-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/qemu/range.h | 124 +++ 1 file changed, 124 insertions(+) diff --git a/include/qemu/range.h b/include/qemu/range.h index aae9720..8879f8a 100644 --- a/include/qemu/range.h +++

[Qemu-devel] [PATCH v4 20/29] hostmem: allow preallocation of any memory region

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com And allow preallocation of file-based memory even without -mem-prealloc. Some care is necessary because -mem-prealloc does not allow disabling preallocation for hostmem-file. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao

Re: [Qemu-devel] [PATCH 3/3] qtest: Add PIIX4 SMBus support for libqos

2014-06-09 Thread Paolo Bonzini
Il 09/06/2014 10:55, Marc Marí ha scritto: +static void send_and_receive(void) +{ +uint8_t i; +uint8_t buf = 0; +uint64_t big_buf = 0; Probably uint32_t since you only read 4 bytes. +for (i = EEPROM_TEST_ADDR; i EEPROM_TEST_ADDR+8; ++i) { +i2c_recv(i2c, i, buf, 1);

[Qemu-devel] [PATCH v4 26/29] qapi: make string output visitor parse int list

2014-06-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- qapi/string-output-visitor.c | 230 +++-- tests/test-string-output-visitor.c | 34 ++ 2 files changed, 254 insertions(+), 10 deletions(-) diff --git a/qapi/string-output-visitor.c

Re: [Qemu-devel] [PATCH v4 00/29] NUMA series and hostmem improvements

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 06:25:05PM +0800, Hu Tao wrote: note: this series is based on MST's pci tree. No, please rebase on top of numa branch in my tree, not on pci branch. I applied a bunch of your there and don't want spend time going over them again. changes to v3.2: - rebase to latest

[Qemu-devel] [PATCH v4 21/29] hostmem: add property to map memory with MAP_SHARED

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com A new share property can be used with the memory-file backend to map memory with MAP_SHARED instead of MAP_PRIVATE. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/hostmem-file.c | 26

Re: [Qemu-devel] [PATCH v4 24/29] Introduce signed range.

2014-06-09 Thread Peter Maydell
On 9 June 2014 11:25, Hu Tao hu...@cn.fujitsu.com wrote: Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/qemu/range.h | 124 +++ 1 file changed, 124 insertions(+) diff --git a/include/qemu/range.h b/include/qemu/range.h index

[Qemu-devel] [PATCH v4 22/29] configure: add Linux libnuma detection

2014-06-09 Thread Hu Tao
From: Wanlong Gao gaowanl...@cn.fujitsu.com Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Wanlong Gao

[Qemu-devel] [PATCH v4 25/29] qapi: make string input visitor parse int list

2014-06-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- qapi/string-input-visitor.c | 181 -- tests/test-string-input-visitor.c | 39 2 files changed, 212 insertions(+), 8 deletions(-) diff --git a/qapi/string-input-visitor.c

[Qemu-devel] [PATCH v4 08/29] qmp: improve error reporting for -object and object-add

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Use QERR_INVALID_PARAMETER_VALUE for consistency. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com Reviewed-by: Eduardo Habkost ehabk...@redhat.com --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [Qemu-devel] [PATCH v4 11/29] hostmem: separate allocation from UserCreatable complete method

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:16 +0800 Hu Tao hu...@cn.fujitsu.com wrote: This allows the superclass to set various policies on the memory region that the subclass creates. Drops hostmem-ram's complete method accordingly. While at file hostmem.c, s/hostmemory/host_memory/ to keep names

Re: [Qemu-devel] [PATCH v4 24/29] Introduce signed range.

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 11:42:14AM +0100, Peter Maydell wrote: On 9 June 2014 11:25, Hu Tao hu...@cn.fujitsu.com wrote: Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/qemu/range.h | 124 +++ 1 file changed, 124 insertions(+)

[Qemu-devel] [PATCH v4 27/29] qom: introduce object_property_get_enum and object_property_get_uint16List

2014-06-09 Thread Hu Tao
Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- include/qom/object.h | 28 qom/object.c | 35 +++ 2 files changed, 63 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index a641dcd..b882ccc 100644 ---

[Qemu-devel] [PATCH v4 15/29] memory: add error propagation to file-based RAM allocation

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Right now, -mem-path will fall back to RAM-based allocation in some cases. This should never happen with -object memory-file, prepare the code by adding correct error propagation. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao

Re: [Qemu-devel] [PATCH v2] target-arm: Prepare cpreg writefns/readfns for EL3/SecExt

2014-06-09 Thread Peter Maydell
On 5 June 2014 11:00, Fabian Aggeler aggel...@ethz.ch wrote: This patch changes some readfns/writefns to use raw_write and raw_read functions, which use the fieldoffset specified in ARMCPRegInfo instead of directly accessing the field. This will simplify patches for EL3 Security Extensions.

Re: [Qemu-devel] [PATCH v2] target-arm: implement PD0/PD1 bits for TTBCR

2014-06-09 Thread Peter Maydell
On 5 June 2014 11:39, Fabian Aggeler aggel...@ethz.ch wrote: Corrected handling of writes to TTBCR for ARMv8 (previously UNK/SBZP bits are not RES0) and ARMv7 (new bits PD0/PD1 for CPUs with Security Extensions). Bits PD0/PD1 are now respected in get_phys_addr_v6/v5() and

[Qemu-devel] [PATCH v4 17/29] memory: move RAM_PREALLOC_MASK to exec.c, rename

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Prepare for adding more flags. The _MASK suffix is unique, kill it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- exec.c | 9 ++--- include/exec/cpu-all.h | 3 --- 2 files changed, 6

[Qemu-devel] [PATCH v4 19/29] hostmem: add merge and dump properties

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/hostmem.c | 84 +++- include/qemu/osdep.h | 10 ++ include/sysemu/hostmem.h | 1 + 3 files

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:23 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- backends/Makefile.objs | 1 + backends/hostmem-file.c | 107

[Qemu-devel] [PATCH v4 16/29] memory: move preallocation code out of exec.c

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com So that backends can use it. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- exec.c | 44 +-- include/qemu/osdep.h | 2 ++ util/oslib-posix.c | 73

[Qemu-devel] [PATCH v4 09/29] pc: pass MachineState to pc_memory_init

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/i386/pc.c | 23 +++ hw/i386/pc_piix.c| 8 +++- hw/i386/pc_q35.c | 4 +--- include/hw/i386/pc.h | 7 +++ 4

[Qemu-devel] [PATCH v4 29/29] hmp: add info memdev

2014-06-09 Thread Hu Tao
This is the hmp counterpart of qmp query-memdev. Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hmp.c | 36 hmp.h | 1 + monitor.c | 7 +++ 3 files changed, 44 insertions(+) diff --git a/hmp.c b/hmp.c index ccc35d4..4e80e24 100644 --- a/hmp.c

[Qemu-devel] [PATCH v4 13/29] memory: reorganize file-based allocation

2014-06-09 Thread Hu Tao
From: Paolo Bonzini pbonz...@redhat.com Split the internal interface in exec.c to a separate function, and push the check on mem_path up to memory_region_init_ram. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- exec.c | 105

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 01:32:46PM +0200, Igor Mammedov wrote: On Mon, 9 Jun 2014 18:25:23 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com ---

Re: [Qemu-devel] [PATCH v4 00/29] NUMA series and hostmem improvements

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 01:30:05PM +0300, Michael S. Tsirkin wrote: On Mon, Jun 09, 2014 at 06:25:05PM +0800, Hu Tao wrote: note: this series is based on MST's pci tree. No, please rebase on top of numa branch in my tree, not on pci branch. I applied a bunch of your there and don't want

[Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Hu Tao
Add qmp command query-memdev to query for information of memory devices Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- numa.c | 72 qapi-schema.json | 34 ++ qmp-commands.hx | 32 +

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

2014-06-09 Thread Peter Maydell
On 6 June 2014 17:13, Stefan Hajnoczi stefa...@redhat.com wrote: The following changes since commit e00fcfeab3d452cba3d0a08991a39ab15df66424: Merge remote-tracking branch 'remotes/awilliam/tags/vfio-pci-for-qemu-20140602.0' into staging (2014-06-03 14:37:43 +0100) are available in the

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 14:35:53 +0300 Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jun 09, 2014 at 01:32:46PM +0200, Igor Mammedov wrote: On Mon, 9 Jun 2014 18:25:23 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH v3] signal/all: remove return value from restore_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version,

[Qemu-devel] [PATCH v3] signal/all/do_sigreturn - remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

Re: [Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global

2014-06-09 Thread Peter Maydell
On 5 June 2014 18:17, Michael S. Tsirkin m...@redhat.com wrote: From: Don Slutz dsl...@verizon.com This will generate a warning from make check: ... GTESTER tests/test-qdev-global-props Warning: -global dynamic-prop-type-bad.prop3=103 not used GTESTER tests/check-qom-interface ... If

Re: [Qemu-devel] [PATCH v2 00/13] linux-user: __{get, put}_user return value cleanup

2014-06-09 Thread Riku Voipio
On 8 June 2014 00:40, Peter Maydell peter.mayd...@linaro.org wrote: On 6 June 2014 10:46, riku.voi...@linaro.org wrote: From: Riku Voipio riku.voi...@linaro.org This series is a cleanup and gcc-4.9 buildfix: linux-user/syscall.c: In function ‘host_to_target_stat64’:

Re: [Qemu-devel] [PATCH v4 20/29] hostmem: allow preallocation of any memory region

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:25 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com And allow preallocation of file-based memory even without -mem-prealloc. Some care is necessary because -mem-prealloc does not allow disabling preallocation for hostmem-file. maybe

Re: [Qemu-devel] [PATCH v4 20/29] hostmem: allow preallocation of any memory region

2014-06-09 Thread Paolo Bonzini
Il 09/06/2014 14:28, Igor Mammedov ha scritto: On Mon, 9 Jun 2014 18:25:25 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com And allow preallocation of file-based memory even without -mem-prealloc. Some care is necessary because -mem-prealloc does not allow

Re: [Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:33 +0800 Hu Tao hu...@cn.fujitsu.com wrote: Add qmp command query-memdev to query for information of memory devices Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- numa.c | 72 qapi-schema.json |

[Qemu-devel] [PULL 13/18] linux-user: fix gcc-4.9 compiler error on __{get, put]}_user

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org gcc-4.9 finds unused operand: linux-user/syscall.c: In function ‘host_to_target_stat64’: linux-user/qemu.h:301:19: error: right-hand operand of comma expression has no effect [-Werror=unused-value] ((hptr), (x)), 0) Just removing the rh operand is

[Qemu-devel] [PULL 17/18] linux-user: Return correct errno for unsupported netlink socket

2014-06-09 Thread riku . voipio
From: Ed Swierk eswi...@skyportsystems.com This fixes Cannot open audit interface - aborting. when the EAFNOSUPPORT errno differs between the target and host architectures (e.g. mips target and x86_64 host). Signed-off-by: Ed Swierk eswi...@skyportsystems.com Signed-off-by: Riku Voipio

[Qemu-devel] [PULL 02/18] signal/x86/setup_frame: __put_user cleanup

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove the remaining check for __put_user return value, and all the checks for err variable which isn't set anywhere anymore. No we can only end up in give_sigsegv due to failed lock_user_struct - thus we remove the unlock_user_struct to avoid unlocking a

[Qemu-devel] [PULL 10/18] signal/ppc/{save, restore}_user_regs remove __put/get error checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org As __get_user and __put_user do not return errors, remove the if checks from around them. This allows making the save/restore functions void. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc:

[Qemu-devel] [PULL 00/18] linux-user fixes

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Mostly fixes, but a bigger rework in signal.c to allow compiling with gcc-4.9 The following changes since commit 959e41473f2179850578482052fb73b913bc4e42: slirp/arp: do not special-case bogus IP addresses (2014-06-09 01:49:28 +0200) are available in

[Qemu-devel] [PULL 18/18] User mode support for Linux ELF files with no section header

2014-06-09 Thread riku . voipio
From: Craig Heffner cheff...@tacnetsol.com In user mode Linux, Qemu currently refuses to load ELF files that do not contain section headers (ehdr-e_shentsize == 0). Since section headers are not required in order to load an ELF file, simply removing the e_shentsize check in elf_check_ehdr()

[Qemu-devel] [PULL 12/18] signal/ppc/do_setcontext remove __get_user return check

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org The last remaining check for return value of __get_user. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org Cc: Alexander Graf ag...@suse.de --- linux-user/signal.c | 3 +-- 1 file changed, 1

[Qemu-devel] [PULL 05/18] signal/all: remove return value from restore_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org make most implementations of restore_sigcontext void and remove checking it's return value from functions calling restore_sigcontext. The exception is the X86 version of the function that is too different from others to deal in this way, and arm version,

[Qemu-devel] [PULL 06/18] signal/sparc/restore_fpu_state: remove

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org A function never called from anywhere, obviously half-complete. Remove function and if someone wants to complete this, please check the old version out of git history. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell

[Qemu-devel] [PULL 08/18] signal/all/do_sigreturn - remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__get_user checks and their related error paths for all architecture's do_sigreturn. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. v3: remove unneccesary sigsegv label as suggested by Peter

[Qemu-devel] [PULL 15/18] linux-user: Don't overrun guest buffer in sched_getaffinity

2014-06-09 Thread riku . voipio
From: Peter Maydell peter.mayd...@linaro.org If the guest's long type is smaller than the host's, then our sched_getaffinity wrapper needs to round the buffer size up to a multiple of the host sizeof(long). This means that when we copy the data back from the host buffer to the guest's buffer

[Qemu-devel] [PULL 03/18] signal/all: remove return value from copy_siginfo_to_user

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Since copy_siginfo_to_user always returns 0, make it void and remove any checks for return value from calling functions. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 28

[Qemu-devel] [PULL 04/18] signal/all: remove return value from setup_sigcontext

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Make all implementations of setup_sigcontext void and remove checking it's return value from functions calling setup_sigcontext. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c

[Qemu-devel] [PULL 14/18] linux-user/uname: Return correct uname string for x86_64

2014-06-09 Thread riku . voipio
From: Peter Maydell peter.mayd...@linaro.org We were returning the incorrect uname string (with a hyphen, not an underscore) for x86_64. Fix this by removing the x86_64 special case, since the default just use UNAME_MACHINE behaviour suffices. This leaves cpu_to_uname_machine() special cases for

[Qemu-devel] [PULL 16/18] linux-user: Tell guest about big host page sizes

2014-06-09 Thread riku . voipio
From: Alexander Graf ag...@suse.de We tell the guest its page size via AUX vectors. The guest process then uses this page size as information on which boundaries it can mmap() things. However, if the host has a bigger page size granularity than the guest, it can not fulfill these mmap() requests

[Qemu-devel] [PULL 09/18] signal/all/setup_frame remove __put_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove if(__put_user checks and their related error paths for all architecture's setup_frame, setup_rt_frame and similar. Remove the unlock_user_struct when the only way to end up there is from failed lock_user_struct. Remove err variable if there are no

Re: [Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Paolo Bonzini
Il 09/06/2014 14:36, Igor Mammedov ha scritto: +{ 'type': 'Memdev', + 'data': { +'size': 'size', +'merge': 'bool', +'dump': 'bool', +'prealloc': 'bool', +'host-nodes': ['uint16'], +'policy': 'HostMemPolicy' }} + +## +# @query-memdev: +#

[Qemu-devel] [PULL 01/18] signal/all: remove __get/__put_user return value reading

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove all the simple cases of reading the return value of __get_user and __put_user. We set err = 0 in sparc versions of do_sigreturn and sparc64_set_context to avoid compile error, but else this patch is just general removal of err |= __get_user ...

Re: [Qemu-devel] [PATCH] qdev: Don't abort() in case globals can't be set

2014-06-09 Thread Igor Mammedov
On Fri, 6 Jun 2014 22:26:15 -0300 Eduardo Habkost ehabk...@redhat.com wrote: It would be much better if we didn't terminate QEMU inside device_post_init(), but at least exiting cleanly is better than aborting and dumping core. Signed-off-by: Eduardo Habkost ehabk...@redhat.com ---

[Qemu-devel] [PULL 11/18] signal/sparc64_set_context: remove __get_user checks

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Remove checks of __get_user and the err variable used to control flow with it. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 12 +++- 1 file changed, 3

Re: [Qemu-devel] [PULL 10/10] qdev: Add test of qdev_prop_check_global

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 01:19:18PM +0100, Peter Maydell wrote: On 5 June 2014 18:17, Michael S. Tsirkin m...@redhat.com wrote: From: Don Slutz dsl...@verizon.com This will generate a warning from make check: ... GTESTER tests/test-qdev-global-props Warning: -global

Re: [Qemu-devel] [PATCH v4 09/29] pc: pass MachineState to pc_memory_init

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:14 +0800 Hu Tao hu...@cn.fujitsu.com wrote: From: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Hu Tao hu...@cn.fujitsu.com --- hw/i386/pc.c | 23 +++ hw/i386/pc_piix.c| 8

Re: [Qemu-devel] [PATCH] block: Drop superfluous conditionals around g_free()

2014-06-09 Thread Stefan Hajnoczi
On Fri, Jun 06, 2014 at 06:25:12PM +0200, Markus Armbruster wrote: Signed-off-by: Markus Armbruster arm...@redhat.com --- block/curl.c | 9 +++-- block/iscsi.c | 4 +--- hw/block/onenand.c | 4 +--- 3 files changed, 5 insertions(+), 12 deletions(-) Reviewed-by: Stefan

Re: [Qemu-devel] [PATCH v6 0/3] Quorum maintainance operations

2014-06-09 Thread Stefan Hajnoczi
On Fri, Jun 06, 2014 at 05:20:25PM +0200, Benoît Canet wrote: in V6: rebased on latest Stefanha's block branch Benoît Canet (3): quorum: Add the rewrite-corrupted parameter to quorum. block: Add drive-mirror-replace command qemu-iotests: Add 096 new test for

[Qemu-devel] [PULL 07/18] signal/all/do_sigaltstack remove __get_user value check

2014-06-09 Thread riku . voipio
From: Riku Voipio riku.voi...@linaro.org Access is already checked in the lock_user_struct call before. Signed-off-by: Riku Voipio riku.voi...@linaro.org Reviewed-by: Peter Maydell peter.mayd...@linaro.org --- linux-user/signal.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

Re: [Qemu-devel] [PATCH v4 0/4] test virtio-blk hotplug

2014-06-09 Thread Stefan Hajnoczi
On Fri, Jun 06, 2014 at 10:33:49PM +0800, Amos Kong wrote: It's worth to add a hotplug test to qtest, but without cooperation of guest OS, new devices can't be initialized by guest, and hot-unplug doesn't work. However, the new test can cover some part of code of hotplug/unplug. I will

Re: [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path

2014-06-09 Thread Stefan Hajnoczi
On Thu, Jun 05, 2014 at 04:19:26PM +0200, Kevin Wolf wrote: Signed-off-by: Kevin Wolf kw...@redhat.com --- block/rbd.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) (It seems I forgot to reply last week when I merged this.) Thanks, applied to my block tree:

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Nikolay Nikolaev
Hello, On Thu, Jun 5, 2014 at 5:37 PM, Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 27 May 2014 15:06:43 +0300 Nikolay Nikolaev n.nikol...@virtualopensystems.com wrote: The supplied chardev id will be inspected for supported options. Only a socket backend, with a set path (i.e.

Re: [Qemu-devel] [PATCH v28 00/33] replace QEMUOptionParameter with QemuOpts

2014-06-09 Thread Stefan Hajnoczi
On Sun, Jun 08, 2014 at 09:08:57PM -0600, Chun Yan Liu wrote: On 6/5/2014 at 09:28 PM, in message 20140605132857.ga8...@stefanha-thinkpad.redhat.com, Stefan Hajnoczi stefa...@gmail.com wrote: On Thu, Jun 05, 2014 at 05:20:39PM +0800, Chunyan Liu wrote: This patch series is to replace

Re: [Qemu-devel] [snabb-devel] Re: [PATCH v10 15/18] Add the vhost-user netdev backend to the command line

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 04:28:23PM +0300, Nikolay Nikolaev wrote: Hello, On Thu, Jun 5, 2014 at 5:37 PM, Luiz Capitulino lcapitul...@redhat.com wrote: On Tue, 27 May 2014 15:06:43 +0300 Nikolay Nikolaev n.nikol...@virtualopensystems.com wrote: The supplied chardev id

Re: [Qemu-devel] [PATCH v28 00/33] replace QEMUOptionParameter with QemuOpts

2014-06-09 Thread Stefan Hajnoczi
On Thu, Jun 05, 2014 at 05:20:39PM +0800, Chunyan Liu wrote: This patch series is to replace QEMUOptionParameter with QemuOpts, so that only one Qemu Option structure is kept in QEMU code. --- Changes to v27: * rebase to git master (code has been updated in this part since v27 sent

Re: [Qemu-devel] [PATCH v4 28/29] qmp: add query-memdev

2014-06-09 Thread Igor Mammedov
On Mon, 09 Jun 2014 14:58:39 +0200 Paolo Bonzini pbonz...@redhat.com wrote: Il 09/06/2014 14:36, Igor Mammedov ha scritto: +{ 'type': 'Memdev', + 'data': { +'size': 'size', +'merge': 'bool', +'dump': 'bool', +'prealloc': 'bool', +

Re: [Qemu-devel] [RFC 3/5] nbd: Use aio_set_fd_handler2()

2014-06-09 Thread Stefan Hajnoczi
On Sat, Jun 07, 2014 at 09:27:26PM +0200, Max Reitz wrote: On 06.06.2014 09:44, Paolo Bonzini wrote: Il 05/06/2014 20:18, Max Reitz ha scritto: Why is this design cleaner? Because NBD code doesn't have to worry about fd handlers. It uses straightforward coroutine send/recv for socket I/O

Re: [Qemu-devel] [PULL 00/18] linux-user fixes

2014-06-09 Thread Peter Maydell
On 9 June 2014 13:46, riku.voi...@linaro.org wrote: From: Riku Voipio riku.voi...@linaro.org Mostly fixes, but a bigger rework in signal.c to allow compiling with gcc-4.9 The following changes since commit 959e41473f2179850578482052fb73b913bc4e42: slirp/arp: do not special-case bogus IP

  1   2   3   >