[Qemu-devel] [PATCH v2 14/14] pc: q35: bump max_cpus to 288

2016-09-22 Thread Igor Mammedov
along with it for machine versions 2.7 and older keep it at 255. Signed-off-by: Igor Mammedov --- v2: - make 288 cpus available only since q35-2.8 machine type --- hw/i386/pc_q35.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c

Re: [Qemu-devel] [PATCH 00/30] Move qapi documentation to schema (part 2/5)

2016-09-22 Thread Eric Blake
On 09/22/2016 04:22 AM, Marc-André Lureau wrote: > Hi, > > The QAPI documentation is currently done in two places, the json > schema and a more human-friendly text file. The goal is to avoid > duplication and to generate friendly versions from the schema (pdf, > man etc). Thus, all documentation

Re: [Qemu-devel] [PATCH 15/30] qmp-commands: move 'query-migrate-parameters' doc to schema

2016-09-22 Thread Eric Blake
On 09/22/2016 06:54 AM, Marc-André Lureau wrote: >> 3. Merge qmp-commands.txt into QAPI schema comments, step by step >> >>(a) If you only update the QAPI schema comments, qmp-commands.txt >>stays intact throughout this work. >> >>(b) If you delete qmp-commands.txt section as you

Re: [Qemu-devel] [PATCH] qapi: make the json schema files more regular.

2016-09-22 Thread Eric Blake
On 09/21/2016 11:00 PM, David Anderson wrote: > This makes it easier to parse the schema file for tool generation: > each paragraph is either a non-docstring comment, or a docstring > immediately followed by a Python dict describing an API item. > > Signed-off-by: David Anderson

[Qemu-devel] [PATCH v2 10/14] pc: kvm_apic: pass APIC ID depending on xAPIC/x2APIC mode

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/kvm_i386.h | 1 + hw/i386/kvm/apic.c | 13 +++-- target-i386/kvm.c | 14 ++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm_i386.h b/target-i386/kvm_i386.h index

[Qemu-devel] [PATCH v2 13/14] pc: add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs

2016-09-22 Thread Igor Mammedov
Currently firmware uses 1 byte at 0x5F offset in RTC CMOS to get number of CPUs present at boot. However 1 byte is not enough to handle more than 255 CPUs. So add a new fw_cfg file that would allow QEMU to tell it. For compat reasons add file only for machine types that support more than 255

[Qemu-devel] [PATCH v2 1/3] qmp: fix object-add assert() without props

2016-09-22 Thread Marc-André Lureau
Since commit ad739706bbadee49, user_creatable_add_type() expects to be given a qdict. However, if object-add is called without props, you reach the assert: "qemu/qom/object_interfaces.c:115: user_creatable_add_type: Assertion `qdict' failed.", because the qdict isn't created in this case (it's

[Qemu-devel] [PATCH v2 04/14] acpi: cphp: support x2APIC entry in cpu._MAT

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index c13b65c..4bdb8f0 100644 --- a/hw/acpi/cpu.c +++ b/hw/acpi/cpu.c @@ -529,6 +529,11 @@ void build_cpus_aml(Aml *table, MachineState

[Qemu-devel] [PATCH v2 01/14] numa: reduce code duplication by adding helper numa_get_node_for_cpu()

2016-09-22 Thread Igor Mammedov
Replace repeated pattern for (i = 0; i < nb_numa_nodes; i++) { if (test_bit(idx, numa_info[i].node_cpu)) { ... break; with a helper function to lookup numa node index for cpu. Suggested-by: Michael S. Tsirkin Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v2 05/14] acpi: cphp: force switch to modern cpu hotplug if APIC ID > 254

2016-09-22 Thread Igor Mammedov
Switch to modern cpu hotplug at machine startup time if a cpu present at boot has apic-id in range unsupported by legacy cpu hotplug interface (i.e. > 254), to avoid killing QEMU from legacy cpu hotplug code with error: "acpi: invalid cpu id: #apic-id#" Signed-off-by: Igor Mammedov

[Qemu-devel] [PATCH v2 08/14] pc: apic_common: restore APIC ID to initial ID on reset

2016-09-22 Thread Igor Mammedov
APIC ID should be restored to initial APIC ID state after Reset and Power-On. Signed-off-by: Igor Mammedov --- hw/intc/apic_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 125af9d..e246cf3 100644 ---

Re: [Qemu-devel] [PULL 00/26] linux-user update

2016-09-22 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Message-id: cover.1474546244.git.riku.voi...@linaro.org Subject: [Qemu-devel] [PULL 00/26] linux-user update === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1 total=$(git log

[Qemu-devel] [PATCH v2 12/14] increase MAX_CPUMASK_BITS from 255 to 288

2016-09-22 Thread Igor Mammedov
so that it would be possible to increase maxcpus limit for x86 target. Keep spapr/virt_arm at limit they used to have 255. Signed-off-by: Igor Mammedov --- include/sysemu/sysemu.h | 2 +- hw/arm/virt.c | 2 +- hw/ppc/spapr.c | 2 +- 3 files changed, 3

[Qemu-devel] [PATCH v2 11/14] pc: clarify FW_CFG_MAX_CPUS usage comment

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index f1c1013..f807932 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -746,17 +746,15 @@ static FWCfgState

Re: [Qemu-devel] [PATCH v4 17/17] trace: pass trace-events to tracetool as a positional param

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Instead of reading the contents of 'trace-events' from stdin, > accept the filename as a positional parameter. This also > allows for reading from multiple files, though this facility > is not used at this time. > Signed-off-by: Daniel P. Berrange

Re: [Qemu-devel] [PATCH 15/30] qmp-commands: move 'query-migrate-parameters' doc to schema

2016-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Marc-André Lureau writes: >> >> > Hi >> > >> > - Original Message - >> >> Marc-André Lureau writes: >> >> >> >> > Hi >> >> > >> >> > - Original Message

[Qemu-devel] [PATCH v2 07/14] pc: apic_common: extend APIC ID property to 32bit

2016-09-22 Thread Igor Mammedov
ACPI ID is 32 bit wide on CPUs with x2APIC support. Extend 'id' property to support it. Signed-off-by: Igor Mammedov --- include/hw/i386/apic_internal.h | 3 ++- target-i386/cpu.h | 1 + hw/intc/apic_common.c | 40

[Qemu-devel] [PATCH v2 03/14] pc: acpi: x2APIC support for SRAT table

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- rebase on top in 2.7 + updated cpu PXM patches --- include/hw/acpi/acpi-defs.h | 11 +++ hw/i386/acpi-build.c| 34 -- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v4 11/17] trace: provide mechanism for registering trace events

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 02:44:11PM +0200, Lluís Vilanova wrote: > Daniel P Berrange writes: > > > Remove the notion of there being a single global array > > of trace events, by introducing a method for registering > > groups of events. > > > Signed-off-by: Daniel P. Berrange

[Qemu-devel] [PATCH v2 02/14] pc: acpi: x2APIC support for MADT table

2016-09-22 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/hw/acpi/acpi-defs.h | 18 +++ hw/i386/acpi-build.c| 78 +++-- 2 files changed, 72 insertions(+), 24 deletions(-) diff --git a/include/hw/acpi/acpi-defs.h

Re: [Qemu-devel] [PATCH] docs: Belatedly update for move of qmp-commands.txt.

2016-09-22 Thread Marc-André Lureau
- Original Message - > Missed in commit d076a2a and commit bd6092e. > > Signed-off-by: Markus Armbruster > --- Reviewed-by: Marc-André Lureau > docs/xen-save-devices-state.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Qemu-devel] [PATCH v4 11/17] trace: provide mechanism for registering trace events

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Remove the notion of there being a single global array > of trace events, by introducing a method for registering > groups of events. > Signed-off-by: Daniel P. Berrange Except for the calls to module_call_init() (I did not check if they're all

Re: [Qemu-devel] [PATCH v5 1/8] linux-user: Add support for adjtimex() syscall

2016-09-22 Thread Aleksandar Markovic
Hi, Riku, I really appreciate your clarification. I am going to address your concern in the next version of this series, which is planned to be posted in a short time. Thank, Aleksandar From: Riku Voipio [riku.voi...@iki.fi] Sent: Thursday, September

Re: [Qemu-devel] [PULL v4 0/8] Block layer patches

2016-09-22 Thread Peter Maydell
On 20 September 2016 at 21:43, Max Reitz wrote: > The following changes since commit a008535b9fa396226ff9cf78b8ac5f3584bda58e: > > build-sys: fix make install regression (2016-09-20 11:32:43 +0100) > > are available in the git repository at: > >

[Qemu-devel] [PATCH v2 06/14] pc: leave max apic_id_limit only in legacy cpu hotplug code

2016-09-22 Thread Igor Mammedov
that's enough to make old code that depends on it to prevent QEMU starting with more than 255 CPUs. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug.c | 7 ++- hw/i386/pc.c | 7 --- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 15/30] qmp-commands: move 'query-migrate-parameters' doc to schema

2016-09-22 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > Hi > > > > - Original Message - > >> Marc-André Lureau writes: > >> > >> > Hi > >> > > >> > - Original Message - > >> >> Marc-André Lureau writes: >

Re: [Qemu-devel] [PATCH v4 06/17] trace: break circular dependency in event-internal.h

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Currently event-internal.h includes generated-events.h, > while generated-events.h includes event-internal.h > causing a circular dependency. > event-internal.h requires that the content of > generated-events.h comes first, so that it can see > the typedefs for

Re: [Qemu-devel] [PATCH v4 08/17] trace: remove the TraceEventID and TraceEventVCPUID enums

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > The TraceEventID and TraceEventVCPUID enums constants are > no longer actually used for anything critical. > The TRACE_EVENT_COUNT limit is used to determine the size > of the TraceEvents array, and can be removed if we just > NULL terminate the array instead. > The

Re: [Qemu-devel] [PATCH v4 13/17] trace: dynamically allocate event IDs at runtime

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Instead of having the code generator assign event IDs and > event VCPU IDs, assign them when the events are registered > at runtime. This will allow us allow code to be generated allow us allow -> allow > from individual trace-events without having to figure out >

Re: [Qemu-devel] [PATCH 2/3] qemu: Implement virtio-pstore device

2016-09-22 Thread Stefan Hajnoczi
On Sun, Sep 04, 2016 at 11:38:59PM +0900, Namhyung Kim wrote: > +static void virtio_pstore_handle_io(VirtIODevice *vdev, VirtQueue *vq) > +{ > +VirtIOPstore *s = VIRTIO_PSTORE(vdev); > +VirtQueueElement *elem; > +struct virtio_pstore_req req; > +struct virtio_pstore_res res; > +

Re: [Qemu-devel] [PATCH v4 07/17] trace: give each trace event a named TraceEvent struct

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > Currently we only expose a TraceEvent array, which must > be indexed via the TraceEventID enum constants. This > changes the generator to expose a named TraceEvent > instance for each event, with an _EV suffix. > Signed-off-by: Daniel P. Berrange

Re: [Qemu-devel] [PATCH] dma: xlnx-zynq-devcfg: Fix up XLNX_ZYNQ_DEVCFG_R_MAX

2016-09-22 Thread Nathan Rossi
On Thu, Sep 22, 2016 at 6:40 AM, Alistair Francis wrote: > On Wed, Sep 21, 2016 at 11:09 AM, Nathan Rossi wrote: >> Whilst according to the Zynq TRM this device covers a register region of >> 0x000 - 0x120. The register region is also shared

[Qemu-devel] [PULL 26/26] linux-user: fix TARGET_NR_select

2016-09-22 Thread riku . voipio
From: Laurent Vivier TARGET_NR_select can have three different implementations: 1- to always return -ENOSYS microblaze, ppc, ppc64 -> TARGET_WANT_NI_OLD_SELECT 2- to take parameters from a structure pointed by arg1 (kernel sys_old_select) i386, arm,

[Qemu-devel] [PULL 25/26] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2

2016-09-22 Thread riku . voipio
From: Timothy E Baldwin struct target_ucontext_v2 is not at the begining of the signal frame, therefore do_sigaltstack was being passed bogus arguments. As the offset depends on the type of signal frame fixed by passing in the beginning of the context from

[Qemu-devel] [PULL 22/26] linux-user: Implement force_sigsegv() via force_sig()

2016-09-22 Thread riku . voipio
From: Peter Maydell Now that we have a force_sig() with the semantics we need, we can implement force_sigsegv() to call it rather than open-coding the call to queue_signal(). Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 23/26] linux-user: Remove unnecessary nptl_flags variable from do_fork()

2016-09-22 Thread riku . voipio
From: Peter Maydell The 'nptl_flags' variable in do_fork() is set to a copy of 'flags', and then the CLONE_NPTL_FLAGS are cleared out of 'flags'. However the only effect of this is that the later check on "if (flags & CLONE_PARENT_SETTID)" is never true. Since we will

[Qemu-devel] [PULL 24/26] linux-user: Sanity check clone flags

2016-09-22 Thread riku . voipio
From: Peter Maydell We currently make no checks on the flags passed to the clone syscall, which means we will not fail clone attempts which ask for features that we can't implement. Add sanity checking of the flags to clone (which we were already doing in the "this is a

Re: [Qemu-devel] [PATCH v4 02/17] trace: convert code to use event iterators

2016-09-22 Thread Lluís Vilanova
Daniel P Berrange writes: > This converts the HMP/QMP monitor API implementations > and some internal trace control methods to use the new > trace event iterator APIs. > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Daniel P. Berrange > --- >

[Qemu-devel] [PULL 18/26] linux-user: Pass si_type information to queue_signal() explicitly

2016-09-22 Thread riku . voipio
From: Peter Maydell Instead of assuming in queue_signal() that all callers are passing a siginfo structure which uses the _sifields._sigfault part of the union (and thus a si_type of QEMU_SI_FAULT), make callers pass the si_type they require in as an argument. [RV

[Qemu-devel] [PULL 14/26] linux-user: Use glib malloc functions in load_symbols()

2016-09-22 Thread riku . voipio
From: Peter Maydell Switch to using the glib malloc functions in load_symbols(); this deals with a Coverity complaint about possible integer overflow calculating the allocation size with 'nsyms * sizeof(*syms)'. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 21/26] linux-user: SIGSEGV from sigreturn need not be fatal

2016-09-22 Thread riku . voipio
From: Peter Maydell If the sigreturn syscall fails to read memory then this causes a SIGSEGV, but this is not necessarily a fatal signal -- the guest process can catch it. We don't implement this correctly because the behaviour of QEMU's force_sig() function has

[Qemu-devel] [PULL 19/26] linux-user: SIGSEGV on signal entry need not be fatal

2016-09-22 Thread riku . voipio
From: Peter Maydell A failed write to memory trying to set up the signal frame should trigger a SIGSEGV, but this need not be fatal: the guest has a chance to catch it. Implement this via a force_sigsegv() function with the same behaviour as the kernel function of that

[Qemu-devel] [PULL 12/26] linux-user: Fix error handling in flatload.c target_pread()

2016-09-22 Thread riku . voipio
From: Peter Maydell The flatload.c target_pread() function is supposed to return 0 on success or negative host errnos; however it wasn't checking lock_user() for failure or returning the errno from the pread() call. Fix these problems (the first of which is noted by

[Qemu-devel] [PULL 13/26] linux-user: Check dump_write() return in elf_core_dump()

2016-09-22 Thread riku . voipio
From: Peter Maydell One of the calls to dump_write() in elf_core_dump() was missing a check for failure (spotted by Coverity). Add the check to bring it into line with the other calls from this function. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 20/26] linux-user: ARM: Give SIGSEGV if signal frame setup fails

2016-09-22 Thread riku . voipio
From: Peter Maydell The 32-bit ARM signal frame setup code was just bailing out on error returns from lock_user_struct calls, without generating the SIGSEGV that should happen here. Wire up error return codes to call force_sigsegv(). Reviewed-by: Richard Henderson

[Qemu-devel] [PULL 07/26] linux-user: Range check the nfds argument to ppoll syscall

2016-09-22 Thread riku . voipio
From: Peter Maydell Do an initial range check on the ppoll syscall's nfds argument, to avoid possible overflow in the calculation of the lock_user() size argument. The host kernel will later apply the rather lower limit based on RLIMIT_NOFILE as appropriate.

[Qemu-devel] [PULL 16/26] linux-user: ppc64: set MSR_CM bit for BookE 2.06 MMU

2016-09-22 Thread riku . voipio
From: Michael Walle 64 bit user mode doesn't work for the e5500 core because the MSR_CM bit is not set which enables the 64 bit mode for this MMU model. Memory addresses are truncated to 32 bit, which results in "Invalid data memory access" error messages. Fix it by setting the

[Qemu-devel] [PULL 10/26] linux-user: Check lock_user() return value for NULL

2016-09-22 Thread riku . voipio
From: Peter Maydell lock_user() can return NULL, which typically means the syscall should fail with EFAULT. Add checks in various places where Coverity spotted that we were missing them. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio

[Qemu-devel] [PULL 17/26] linux-user: Recheck for pending synchronous signals too

2016-09-22 Thread riku . voipio
From: Peter Maydell In process_pending_signals() we restart the scan of possible pending signals after calling handle_pending_signal() in case some other signal has been generated. This rescan should also include a check for a new synchronous signal since those are in

[Qemu-devel] [PULL 06/26] linux-user: Check for bad event numbers in epoll_wait

2016-09-22 Thread riku . voipio
From: Peter Maydell The kernel checks that the maxevents parameter to epoll_wait is non-negative and not larger than EP_MAX_EVENTS. Add this check to our implementation, so that: * we fail these cases EINVAL rather than EFAULT * we don't pass negative or overflowing

[Qemu-devel] [PULL 09/26] linux-user: Pass missing MAP_ANONYMOUS to target_mmap() call

2016-09-22 Thread riku . voipio
From: Peter Maydell A target_mmap() call in load_elf_binary() was missing the MAP_ANONYMOUS flag. (Spotted by Coverity, because target_mmap() will try to use -1 as the filedescriptor in this case.) This has never been noticed because the code in question is for

[Qemu-devel] [PULL 01/26] linux-user: Fix handling of iovec counts

2016-09-22 Thread riku . voipio
From: Peter Maydell In the kernel the length of an iovec is generally handled as an unsigned long, not an integer; fix the parameter to lock_iovec() accordingly. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio

[Qemu-devel] [PULL 02/26] linux-user: Fix errno for sendrecvmsg with large iovec length

2016-09-22 Thread riku . voipio
From: Peter Maydell The sendmsg and recvmsg syscalls use a different errno to indicate an overlarge iovec length from readv and writev. Handle this special case in do_sendrcvmsg_locked() to avoid getting the default errno returned by lock_iovec(). Signed-off-by: Peter

[Qemu-devel] [PULL 05/26] linux-user: Use direct syscall for utimensat

2016-09-22 Thread riku . voipio
From: Peter Maydell The linux utimensat syscall differs in semantics from the libc function because the syscall combines the features of utimensat() and futimens(). Rather than trying to split these apart in order to call the two libc functions which then call the same

[Qemu-devel] [PULL 11/26] linux-user: Fix incorrect use of host errno in do_ioctl_dm()

2016-09-22 Thread riku . voipio
From: Peter Maydell do_ioctl_dm() should return target errno values, not host ones; correct an accidental use of a host errno in an error path. Signed-off-by: Peter Maydell Signed-off-by: Riku Voipio ---

[Qemu-devel] [PULL 08/26] linux-user: report signals being taken in strace output

2016-09-22 Thread riku . voipio
From: Peter Maydell Native strace reports when the process being traced takes a signal: --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} --- Report something similar when QEMU is doing its internal strace of the guest process and is about to deliver it a

[Qemu-devel] [PULL 15/26] linux-user: Use correct target SHMLBA in shmat()

2016-09-22 Thread riku . voipio
From: Peter Maydell The shmat() handling needs to do target-specific handling of the attach address for shmat(): * if the SHM_RND flag is passed, the address is rounded down to a SHMLBA boundary * if SHM_RND is not passed, then the call is failed EINVAL if the

[Qemu-devel] [PULL 04/26] linux-user: Implement FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls

2016-09-22 Thread riku . voipio
From: Peter Maydell Implement the FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls, as used by chattr. Note that the type information encoded in these ioctl numbers is at odds with the actual type the kernel accesses, as discussed in

[Qemu-devel] [PULL 00/26] linux-user update

2016-09-22 Thread riku . voipio
From: Riku Voipio The following changes since commit a008535b9fa396226ff9cf78b8ac5f3584bda58e: build-sys: fix make install regression (2016-09-20 11:32:43 +0100) are available in the git repository at: git://git.linaro.org/people/riku.voipio/qemu.git

[Qemu-devel] [PULL 03/26] linux-user: Allow bad msg_name for recvfrom on connected socket

2016-09-22 Thread riku . voipio
From: Peter Maydell The POSIX standard mandates that for a connected socket recvfrom() must ignore the msg_name and msg_namelen fields. This is awkward for QEMU because we will attempt to copy them from guest address space. Handle this by not immediately returning a

[Qemu-devel] [PATCH v2] Avoid additional GET_FEATURES call on vhost-user

2016-09-22 Thread Felipe Franciosi
Vhost-user requires an early GET_FEATURES call to determine if the slave supports protocol feature negotiation. An extra GET_FEATURES call is made after vhost_backend_init() to actually set the device features. This patch moves the actual setting of the device features to both implementations

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-22 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Sep 22, 2016 at 01:12:22PM +0200, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >> > On Thu, Sep 22, 2016 at 10:36:45AM +0200, Markus Armbruster wrote: >> >> Don't make up a description in

[Qemu-devel] [PATCH v4] fsdev: add IO throttle support to fsdev devices

2016-09-22 Thread Pradeep Jagadeesh
Uses throttling APIs to limit I/O bandwidth and number of operations on the devices which use 9p-local driver. Signed-off-by: Pradeep Jagadeesh --- fsdev/Makefile.objs | 1 + fsdev/file-op-9p.h | 3 + fsdev/qemu-fsdev-opts.c | 76

Re: [Qemu-devel] [PATCH 1/3] virtio: Basic implementation of virtio pstore driver

2016-09-22 Thread Stefan Hajnoczi
On Sun, Sep 04, 2016 at 11:38:58PM +0900, Namhyung Kim wrote: > The virtio pstore driver provides interface to the pstore subsystem so > that the guest kernel's log/dump message can be saved on the host > machine. Users can access the log file directly on the host, or on the > guest at the next

Re: [Qemu-devel] [PATCH 1/1] qom: fix qdict visit in user_creatable_add_type

2016-09-22 Thread Markus Armbruster
Xiao Long Jiang writes: > This fixes a Qemu crash that introduced by commit ad73970 > ("qom: Wrap prop visit in visit_start_struct"). > > Not all of the callers of user_creatable_add_type always pass qdict, > so we should check qdict against NULL, but not raise an

Re: [Qemu-devel] [PATCH 15/30] qmp-commands: move 'query-migrate-parameters' doc to schema

2016-09-22 Thread Marc-André Lureau
Hi - Original Message - > Marc-André Lureau writes: > > > Hi > > > > - Original Message - > >> Marc-André Lureau writes: > >> > >> > Hi > >> > > >> > - Original Message - > >> >> On 09/13/2016 08:01 AM, Marc-André Lureau wrote: >

Re: [Qemu-devel] [PATCH] checkpatch: downgrade "architecture specific defines should be avoided"

2016-09-22 Thread Markus Armbruster
Paolo Bonzini writes: > On 22/09/2016 09:12, Markus Armbruster wrote: >> Paolo Bonzini writes: >> >>> --- >>> scripts/checkpatch.pl | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/scripts/checkpatch.pl

Re: [Qemu-devel] [PATCH] replay: Fix build with -Werror=unused-result

2016-09-22 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Wed, Sep 21, 2016 at 01:18:58PM -0500, Eric Blake wrote: >> On 09/21/2016 10:28 AM, Markus Armbruster wrote: >> >> >> The compiler.h file has no license header, just a comment >> >> saying "public domain", which is obviously not the case >>

Re: [Qemu-devel] [PATCH v11 0/8] Add a generic loader

2016-09-22 Thread Markus Armbruster
Paolo Bonzini writes: > On 22/09/2016 11:19, Markus Armbruster wrote: >>> > I think -device is okay for something that isn't a "backend" but is >>> > directly guest-visible. >> Well, the contents of a block device is just as guest-visible. We split >> the device in a

Re: [Qemu-devel] [PATCH v3] fsdev: add IO throttle support to fsdev devices

2016-09-22 Thread Pradeep Jagadeesh
Hi Greg, On Wed, 21 Sep 2016 12:22:25 +0200 Pradeep Jagadeesh wrote: Hi Greg, Thanks for having a look at patchset. See the replies below. On Fri, 16 Sep 2016 04:33:36 -0400 Pradeep Jagadeesh wrote: Uses throttling APIs to limit

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Benjamin Herrenschmidt
On Thu, 2016-09-22 at 13:27 +0200, Cédric Le Goater wrote: > > TCG migration succeeds and proceeds ahead. But fails somewhere > > ahead in > > powerpc exception handler: > > > > [qemu]$ ./ppc64-softmmu/qemu-system-ppc64  -machine pseries- > > 2.6,usb=off -vga none -nographic -m 2G   

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Benjamin Herrenschmidt
On Thu, 2016-09-22 at 12:32 +0200, Paolo Bonzini wrote: > *However* a better fix would be to preserve the old flags for > pseries-2.6, and only set the newer flags for pseries-2.7.  I'm not > saying you have to do this, but if it's not hard (no idea) why not learn > how to do it right. > > The

Re: [Qemu-devel] [PATCH v3] fsdev: add IO throttle support to fsdev devices

2016-09-22 Thread Pradeep Jagadeesh
Hi Alberto, On Fri 16 Sep 2016 10:33:36 AM CEST, Pradeep Jagadeesh wrote: Hi, first of all, sorry for the late reply! Here are my comments: --- a/fsdev/qemu-fsdev-opts.c +++ b/fsdev/qemu-fsdev-opts.c @@ -37,6 +37,82 @@ static QemuOptsList qemu_fsdev_opts = { }, { .name

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-22 Thread Daniel P. Berrange
On Thu, Sep 22, 2016 at 01:12:22PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Thu, Sep 22, 2016 at 10:36:45AM +0200, Markus Armbruster wrote: > >> Don't make up a description in user_creatable_help_func(), improve the > >> description

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Cédric Le Goater
On 09/22/2016 01:07 PM, Nikunj A Dadhania wrote: > Benjamin Herrenschmidt writes: > >> On Thu, 2016-09-22 at 14:34 +0530, Nikunj A Dadhania wrote: >>> Something like this works for KVM: >>> >>> diff --git a/target-ppc/machine.c b/target-ppc/machine.c >>> index

Re: [Qemu-devel] [PATCH 15/30] qmp-commands: move 'query-migrate-parameters' doc to schema

2016-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Marc-André Lureau writes: >> >> > Hi >> > >> > - Original Message - >> >> On 09/13/2016 08:01 AM, Marc-André Lureau wrote: >> >> > Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Nikunj A Dadhania
"Dr. David Alan Gilbert" writes: >> > You might find the first two patches in: >> >https://lists.gnu.org/archive/html/qemu-devel/2016-08/msg03681.html >> > useful in debugging this; it prints the values when the _EQUAL macros fail >> > and prints >> > the field name that

Re: [Qemu-devel] [PATCH] pci-testdev: enhance to support new testcases

2016-09-22 Thread Andrew Jones
On Thu, Sep 22, 2016 at 02:15:08PM +0800, Peter Xu wrote: > pci-testdev is used mostly in kvm-unit-test for some eventfd tests. > However I see it a good framework for other tests as well (e.g., the > IOMMU unit test in the future). So enhanced it to support more > testcases. > > The original

Re: [Qemu-devel] [PATCH] tcg update

2016-09-22 Thread Peter Maydell
On 20 September 2016 at 19:57, Richard Henderson wrote: > Annoying that a bug that Peter reported for aarch64 is also > visible on x86_64. Reported for a ppc64 target, it takes > a while to trigger the bug. > > > r~ > > > > The following changes since commit

Re: [Qemu-devel] 答复: Re: [PATCH v2] object: Add 'help' option for all available backends and properties

2016-09-22 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Sep 22, 2016 at 10:36:45AM +0200, Markus Armbruster wrote: >> Don't make up a description in user_creatable_help_func(), improve the >> description infrastructure and its use so you get more useful ones >> there. >> >> The existing

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Benjamin Herrenschmidt
On Thu, 2016-09-22 at 20:34 +1000, Alexey Kardashevskiy wrote: > > diff --git a/target-ppc/machine.c b/target-ppc/machine.c > > index 4820f22..1cf3779 100644 > > --- a/target-ppc/machine.c > > +++ b/target-ppc/machine.c > > @@ -563,8 +563,8 @@ const VMStateDescription vmstate_ppc_cpu = { > >   > > 

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Nikunj A Dadhania
Benjamin Herrenschmidt writes: > On Thu, 2016-09-22 at 14:34 +0530, Nikunj A Dadhania wrote: >> Something like this works for KVM: >> >> diff --git a/target-ppc/machine.c b/target-ppc/machine.c >> index 4820f22..1cf3779 100644 >> --- a/target-ppc/machine.c >> +++

Re: [Qemu-devel] [PATCH 1/3] qapi: return a 'missing parameter' error

2016-09-22 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > - Original Message - >> Aha, we got a different bug fix! The old code fails to fail when the >> parameter doesn't exist. Instead, it sets *obj = NULL, which seems very >> likely to crash QEMU. Let me try... yup: >> >> {

Re: [Qemu-devel] [PATCH v2] net: mcf: limit buffer descriptor count

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 12:32, P J P wrote: > From: Prasad J Pandit > > ColdFire Fast Ethernet Controller uses buffer descriptors to manage > data flow to/fro receive & transmit queues. While transmitting > packets, it could continue to read buffer descriptors if a buffer >

[Qemu-devel] [PATCH v2 4/9] seqlock: use atomic writes for the sequence

2016-09-22 Thread Alex Bennée
From: Paolo Bonzini There is a data race if the sequence is written concurrently to the read. In C11 this has undefined behavior. Use atomic_set; the read side is already using atomic_read. Reported-by: Alex Bennée Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH v2 7/9] util/qht: atomically set b->hashes

2016-09-22 Thread Alex Bennée
ThreadSanitizer detects a possible race between reading/writing the hashes. As ordering semantics are already documented for qht we just need to ensure a race can't tear the hash value so we can use the relaxed atomic_set/read functions. Signed-off-by: Alex Bennée ---

[Qemu-devel] [PATCH v2 5/9] qom/object: update class cache atomically

2016-09-22 Thread Alex Bennée
The idiom CPU_GET_CLASS(cpu) is fairly extensively used in various threads and trips of ThreadSanitizer due to the fact it updates obj->class->object_cast_cache behind the scenes. As this is just a fast-path cache there is no need to lock updates just ensure that we don't get torn-updates from two

[Qemu-devel] [PATCH v2 3/9] new: blacklist.tsan

2016-09-22 Thread Alex Bennée
A list of blacklists for tsan instrumentation. One hopes more can be removed over time as tsan improves. The path needs to be absolute so it doesn't break when directories change during the build: ./configure --with-coroutine=gthread --disable-pie \ --extra-cflags="-g3 -O0

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 12:04, Benjamin Herrenschmidt wrote: > On Thu, 2016-09-22 at 14:34 +0530, Nikunj A Dadhania wrote: >> Something like this works for KVM: >> >> diff --git a/target-ppc/machine.c b/target-ppc/machine.c >> index 4820f22..1cf3779 100644 >> --- a/target-ppc/machine.c >> +++

[Qemu-devel] [PATCH v2] net: mcf: limit buffer descriptor count

2016-09-22 Thread P J P
From: Prasad J Pandit ColdFire Fast Ethernet Controller uses buffer descriptors to manage data flow to/fro receive & transmit queues. While transmitting packets, it could continue to read buffer descriptors if a buffer descriptor has length of zero and has crafted values

[Qemu-devel] [PATCH v2 2/9] tcg/optimize: move default return out of if statement

2016-09-22 Thread Alex Bennée
This is to appease sanitizer builds which complain that: "error: control reaches end of non-void function" Signed-off-by: Alex Bennée Reviewed-by: Marc-André Lureau --- tcg/optimize.c | 3 +-- 1 file changed, 1 insertion(+), 2

Re: [Qemu-devel] [PATCH v2] net: imx: limit buffer descriptor count

2016-09-22 Thread Paolo Bonzini
On 22/09/2016 12:31, P J P wrote: > From: Prasad J Pandit > > i.MX Fast Ethernet Controller uses buffer descriptors to manage > data flow to/fro receive & transmit queues. While transmitting > packets, it could continue to read buffer descriptors if a buffer >

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Alexey Kardashevskiy
On 22/09/16 19:04, Nikunj A Dadhania wrote: > Benjamin Herrenschmidt writes: > >> On Thu, 2016-09-22 at 11:45 +0530, Bharata B Rao wrote: >>> On Thu, Sep 22, 2016 at 04:07:21PM +1000, Benjamin Herrenschmidt wrote: On Thu, 2016-09-22 at 10:51 +0530, Bharata B

[Qemu-devel] [PATCH v2 0/9] A couple of fixes for ThreadSanitizer

2016-09-22 Thread Alex Bennée
Hi, This is v2 of the ThreadSanitizer fixes. Changes from the last version: - added Marc-André's review tags - added qga/command: use QEMU atomic primitives - simplified ui/vnc-enc-tight: remove switch and have single return - fixed the Travis CI build (that was painful) There is

[Qemu-devel] [PATCH v2] net: imx: limit buffer descriptor count

2016-09-22 Thread P J P
From: Prasad J Pandit i.MX Fast Ethernet Controller uses buffer descriptors to manage data flow to/fro receive & transmit queues. While transmitting packets, it could continue to read buffer descriptors if a buffer descriptor has length of zero and has crafted values in

[Qemu-devel] [PATCH v2 6/9] cpu: atomically modify cpu->exit_request

2016-09-22 Thread Alex Bennée
ThreadSanitizer picks up potential races although we already use barriers to ensure things are in the correct order when processing exit requests. For now we just use the relaxed atomic_set/atomic_read semantics to reassure tsan that we can't tear the value. Signed-off-by: Alex Bennée

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Dr. David Alan Gilbert
* Nikunj A Dadhania (nik...@linux.vnet.ibm.com) wrote: > "Dr. David Alan Gilbert" writes: > > > * Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > >> On Thu, Sep 22, 2016 at 03:30:08PM +1000, David Gibson wrote: > >> > On Thu, Sep 22, 2016 at 10:51:05AM +0530, Bharata B

Re: [Qemu-devel] pseries-2.6 migration from QEMU-2.6 to QEMU-2.7 broken

2016-09-22 Thread Nikunj A Dadhania
"Dr. David Alan Gilbert" writes: > * Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: >> On Thu, Sep 22, 2016 at 03:30:08PM +1000, David Gibson wrote: >> > On Thu, Sep 22, 2016 at 10:51:05AM +0530, Bharata B Rao wrote: >> > > Hi, >> > > >> > > Nikunj and I realized that

Re: [Qemu-devel] [PATCH 3/7] block/qapi: Move 'aio' option to file driver

2016-09-22 Thread Kevin Wolf
Am 21.09.2016 um 00:27 hat Eric Blake geschrieben: > On 09/20/2016 04:08 PM, Kevin Wolf wrote: > > The option whether or not to use a native AIO interface really isn't a > > generic option for all drivers, but only applies to the native file > > protocols. This patch moves the option in

Re: [Qemu-devel] [Qemu-ppc] KVM-PR is broken with current QEMU

2016-09-22 Thread Cédric Le Goater
On 09/22/2016 09:18 AM, Thomas Huth wrote: > On Thu, 22 Sep 2016 07:30:52 +0200 > Thomas Huth wrote: > >> On Thu, 22 Sep 2016 11:57:15 +1000 >> David Gibson wrote: >> >>> On Wed, Sep 21, 2016 at 10:22:11AM +0200, Thomas Huth wrote: On

<    1   2   3   4   5   6   7   >