Re: [Qemu-devel] x86 Instruction Testing?

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 01:51, Taylor Edward Heimbichner wrote: > I'm writing to ask if any executable that you use to test QEMU > systematically tests all, or at least a large portion, of the x86 > instruction set? We're working on a project that involves dynamic taint > analysis and would like to use an

[Qemu-devel] [PATCH] 9pfs: fix memory leak in v9fs_link

2016-10-12 Thread Li Qiang
From: Li Qiang In v9fs_link dispatch function, it doesn't put the 'oldfidp' fid object, this will make the 'oldfidp->ref' never reach to 0, thus leading a memory leak issue. This patch fix this. Signed-off-by: Li Qiang --- hw/9pfs/9p.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/9pf

[Qemu-devel] [PATCH] target-i386: fix 32-bit addresses in LEA

2016-10-12 Thread Paolo Bonzini
This was found with test-i386. The issue is that instructions such as addr32 lea (%eax), %rax did not perform a 32-bit extension, because the LEA translation skipped the gen_lea_v_seg step. That step does not just add segments, it also takes care of extending from address size to pointer si

Re: [Qemu-devel] [PATCH] mmap-alloc: check before use for ptr pointer

2016-10-12 Thread Gonglei (Arei)
> -Original Message- > From: Michael Tokarev [mailto:m...@tls.msk.ru] > Sent: Wednesday, October 12, 2016 2:46 PM > Subject: Re: [PATCH] mmap-alloc: check before use for ptr pointer > > 12.10.2016 05:05, Gonglei wrote: > > If ptr mmap failed, we don't need to do a superfluous > > calculati

Re: [Qemu-devel] [PATCH] mmap-alloc: check before use for ptr pointer

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 09:37, Gonglei (Arei) wrote: >> -Original Message- >> From: Michael Tokarev [mailto:m...@tls.msk.ru] >> Sent: Wednesday, October 12, 2016 2:46 PM >> Subject: Re: [PATCH] mmap-alloc: check before use for ptr pointer >> >> 12.10.2016 05:05, Gonglei wrote: >>> If ptr mmap faile

Re: [Qemu-devel] [PATCH v6 21/20] linux-user/bsd-user: initialize trace events subsystem

2016-10-12 Thread Stefan Hajnoczi
On Fri, Oct 07, 2016 at 02:51:17PM +0100, Daniel P. Berrange wrote: > The bsd-user/linux-user programs make use of the CPU emulation > code and this now requires that the trace events subsystem > is enabled, otherwise it'll crash trying to allocate an empty > trace events bitmap for the CPU object.

Re: [Qemu-devel] [PATCH] mmap-alloc: check before use for ptr pointer

2016-10-12 Thread Gonglei (Arei)
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Sent: Wednesday, October 12, 2016 3:41 PM > To: Gonglei (Arei); Michael Tokarev; qemu-devel@nongnu.org > Cc: qemu-triv...@nongnu.org; Herongguang (Stephen) > Subject: Re: [PATCH] mmap

Re: [Qemu-devel] [PATCHv2 1/7] libqos: Isolate knowledge of spapr memory map to qpci_init_spapr()

2016-10-12 Thread Laurent Vivier
On 12/10/2016 06:44, David Gibson wrote: > The libqos code for accessing PCI on the spapr machine type uses IOBASE() > and MMIOBASE() macros to determine the address in the CPU memory map of > the windows to PCI address space. > > This is a detail of the implementation of PCI in the machine type

Re: [Qemu-devel] [PATCHv2 2/7] libqos: Correct error in PCI hole sizing for spapr

2016-10-12 Thread Laurent Vivier
On 12/10/2016 06:44, David Gibson wrote: > In pci-spapr.c (as in pci-pc.c from which it was derived), the > pci_hole_start/pci_hole_size and pci_iohole_start/pci_iohole_size pairs[1] > essentially define the region of PCI (not CPU) addresses in which MMIO > or PIO BARs respectively will be alloca

Re: [Qemu-devel] [PATCH v14 08/21] qapi: allow QObjectInputVisitor to be created with QemuOpts

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > Instead of requiring all callers to go through the mutli-step multi-step > process of turning QemuOpts into a suitable QObject for visiting, > add a new constructor that encapsulates this logic. This will > allow QObjectInputVisitor to be a drop-in replacement for

Re: [Qemu-devel] [PATCH 0/4] Allow blockdev-add for SSH

2016-10-12 Thread Ashijeet Acharya
On Tue, Oct 11, 2016 at 1:07 PM, Ashijeet Acharya wrote: > This series adds blockdev-add support for SSH block driver. > > Patch 1 prepares the code for the addition of a new option prefix, > which is "server.". This is accomplished by adding a > ssh_has_filename_options_conflict() function which

Re: [Qemu-devel] [PATCH v2] char: serial: check divider value against baud base

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 07:58, P J P wrote: > From: Prasad J Pandit > > 16550A UART device uses an oscillator to generate frequencies > (baud base), which decide communication speed. This speed could > be changed by dividing it by a divider. If the divider is > greater than the baud base, speed is set to

Re: [Qemu-devel] [PATCH] mmap-alloc: check before use for ptr pointer

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 09:54, Gonglei (Arei) wrote: > >> -Original Message- >> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo >> Bonzini >> Sent: Wednesday, October 12, 2016 3:41 PM >> To: Gonglei (Arei); Michael Tokarev; qemu-devel@nongnu.org >> Cc: qemu-triv...@nongnu.o

Re: [Qemu-devel] [PATCHv2 3/7] libqos: Limit spapr-pci to 32-bit MMIO for now

2016-10-12 Thread Laurent Vivier
On 12/10/2016 06:44, David Gibson wrote: > Currently the functions in pci-spapr.c (like pci-pc.c on which it's based) > don't distinguish between 32-bit and 64-bit PCI MMIO. At the moment, the > qemu side implementation is a bit weird and has a single MMIO window > straddling 32-bit and 64-bit r

Re: [Qemu-devel] [PATCH 0/4] Allow blockdev-add for SSH

2016-10-12 Thread Kevin Wolf
Am 12.10.2016 um 10:09 hat Ashijeet Acharya geschrieben: > I received a mail saying my series failed the automatic build test but > it builds completely fine (after applying Dan's patch obviously) in my > local environment. The reason why patchew fails to build your series is because it doesn't un

Re: [Qemu-devel] [PATCH 0/7] Improve PCI IO window orgnaization for pseries

2016-10-12 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/7] Improve PCI IO window orgnaization for pseries Message-id: 1476246592-24228-1-git-send-email-da...@gibson.dropbear.id.au Type: series === TEST SCRIPT BEGIN === #!/bi

Re: [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT

2016-10-12 Thread Xiao Guangrong
On 10/11/2016 07:49 PM, Igor Mammedov wrote: On Mon, 10 Oct 2016 21:09:30 +0800 Xiao Guangrong wrote: On 10/10/2016 08:51 PM, Igor Mammedov wrote: On Sat, 8 Oct 2016 15:17:14 +0800 Xiao Guangrong wrote: On 09/30/2016 09:14 PM, Igor Mammedov wrote: On Fri, 12 Aug 2016 14:54:05 +0800 Xiao

Re: [Qemu-devel] [PATCHv2 0/7] Improve PCI IO window orgnaization for pseries

2016-10-12 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Message-id: 1476247497-6976-1-git-send-email-da...@gibson.dropbear.id.au Subject: [Qemu-devel] [PATCHv2 0/7] Improve PCI IO window orgnaization for pseries Type: series === TEST SCRIPT BEGIN === #!/

Re: [Qemu-devel] [PATCH 0/4] Allow blockdev-add for SSH

2016-10-12 Thread Ashijeet Acharya
On Wed, Oct 12, 2016 at 1:52 PM, Kevin Wolf wrote: > Am 12.10.2016 um 10:09 hat Ashijeet Acharya geschrieben: > Of course, we must be able to build qemu correctly both with ssh enabled > and disabled, so if you can indeed see a (different) build error with > disabled libssh2, that needs to be fix

Re: [Qemu-devel] [PATCH v8 1/6] vfio: Mediated device Core driver

2016-10-12 Thread Tian, Kevin
> From: Kirti Wankhede > Sent: Tuesday, October 11, 2016 4:29 AM > [...] > + > +/* > + * mdev_unregister_device : Unregister a parent device > + * @dev: device structure representing parent device. > + * > + * Remove device from list of registered parent devices. Give a chance to > free > + * ex

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-10-12 Thread Kevin Wolf
Am 12.10.2016 um 03:14 hat Fam Zheng geschrieben: > On Wed, 09/28 15:04, Fam Zheng wrote: > > Handling this is similar to what is done to the L2 entry in the case of > > compressed clusters. > > Kevin, Max, is there anything else I need to do before this patch can be > applied? Hm, actually, it l

Re: [Qemu-devel] [PATCH 0/4] Allow blockdev-add for SSH

2016-10-12 Thread Kevin Wolf
Am 12.10.2016 um 10:37 hat Ashijeet Acharya geschrieben: > On Wed, Oct 12, 2016 at 1:52 PM, Kevin Wolf wrote: > > Am 12.10.2016 um 10:09 hat Ashijeet Acharya geschrieben: > > > Of course, we must be able to build qemu correctly both with ssh enabled > > and disabled, so if you can indeed see a (d

Re: [Qemu-devel] [PATCH 0/4] Allow blockdev-add for SSH

2016-10-12 Thread Ashijeet Acharya
> I received a mail saying my series failed the automatic build test but > it builds completely fine (after applying Dan's patch obviously) in my > local environment. > > Going through the config output of the test script, I see that the > supporting library for SSH which is "libssh2" seems to be d

Re: [Qemu-devel] [PATCH 2/5] cpus: use atomic_read to read seqlock-protected variables

2016-10-12 Thread Alex Bennée
Paolo Bonzini writes: > There is a data race if the variable is written concurrently to the > read. In C11 this has undefined behavior. Use atomic_read. The > write side does not need atomic_set, because it is protected by a > mutex. > > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée

Re: [Qemu-devel] [PATCHv2] monitor: deprecate 'default' option

2016-10-12 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Marc-André Lureau writes: > > > This option does nothing since commit 06ac27f. Deprecate it. > > > > Signed-off-by: Marc-André Lureau > > --- > > vl.c | 11 +++ > > include/monitor/monitor.h | 2 +- > > qemu-options

[Qemu-devel] [PULL v2 01/20] trace: move colo trace events to net/ sub-directory

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The colo patch series added various trace events to the top level trace-events file, despite the files using them being in a sub-dir. commit 30656b097e9dd7978d3fe9416cb9f5a421a9e63e Author: Zhang Chen Date: Tue Sep 27 10:22:34 2016 +0800 filter-rewriter:

[Qemu-devel] [PULL v2 11/20] trace: don't abort qemu if ftrace can't be initialized

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" If the ftrace backend is compiled into QEMU, any attempt to start QEMU while non-root will fail due to the inability to open /sys/kernel/debug/tracing/tracing_on. Add a fallback into the code so that it connects up the trace_marker_fd variable to /dev/null when getting

[Qemu-devel] [PULL v2 00/20] Tracing patches

2016-10-12 Thread Stefan Hajnoczi
The following changes since commit 627eae7d729277c84f8e0ac07a8caab39c92c38d: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-10-10 16:23:40 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/tracing-pull-request for you to

[Qemu-devel] [PULL v2 02/20] trace: add trace event iterator APIs

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Currently methods which want to iterate over trace events, do so using the trace_event_count() and trace_event_id() methods. This leaks the concept of a single ID enum to the callers. There is an alternative trace_event_pattern() method which can be used in an iteration

[Qemu-devel] [PULL v2 03/20] trace: convert code to use event iterators

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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 Reviewed-by: Lluís Vilanova Message-id: 1475588159-30598-5-git-send

[Qemu-devel] [PULL v2 13/20] trace: dynamically allocate trace_dstate in CPUState

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The CPUState struct has a bitmap tracking which VCPU events are currently active. This is indexed based on the event ID values, and sized according the maximum TraceEventVCPUID enum value. When we start dynamically assigning IDs at runtime, we can't statically declare

[Qemu-devel] [PULL v2 05/20] trace: remove global 'uint16 dstate[]' array

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Instead of having a global dstate array, declare a single 'uint16 TRACE_${EVENT_NAME}_DSTATE' variable for each trace event. Record a pointer to this variable in the TraceEvent struct too. By turning trace_event_get_state_dynamic_by_id into a macro, this still hits the

[Qemu-devel] [PULL v2 06/20] trace: remove duplicate control.h includes in generated-tracers.h

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The format/h.py file adds an include for control.h to generated-tracers.h. ftrace, log and syslog, then add more duplicate includes for control.h. Reviewed-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova Signed-off-by: Daniel P. Berrange Message-id: 1475588159-30598

[Qemu-devel] [PULL v2 04/20] trace: remove some now unused functions

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The trace_event_count, trace_event_id and trace_event_pattern methods are no longer required now that everything is using the iterator APIs The trace_event_set_state and trace_event_set_vcpu_state macros were also unused. Reviewed-by: Stefan Hajnoczi Reviewed-by: Llu

[Qemu-devel] [PULL v2 14/20] trace: dynamically allocate event IDs at runtime

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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 code to be generated from individual trace-events without having to figure out globally unique numbering at build time. Revi

[Qemu-devel] [PULL v2 10/20] trace: emit name <-> ID mapping in simpletrace header

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Currently simpletrace assumes that events are given IDs starting from 0, based on the order in which they appear in the trace-events file, with no gaps. When the trace-events file is split up, this assumption becomes problematic. To deal with this, extend the simpletra

[Qemu-devel] [PULL v2 08/20] trace: give each trace event a named TraceEvent struct

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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 _EVENT suffix. Reviewed-by: Lluís Vilanova Reviewed-by: Stefan Hajnoczi Si

[Qemu-devel] [PULL v2 07/20] trace: break circular dependency in event-internal.h

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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 TraceEventID and

[Qemu-devel] [PULL v2 20/20] trace: Add missing execution mode of guest events

2016-10-12 Thread Stefan Hajnoczi
From: Lluís Vilanova Add missing execution mode documentation for the 'guest_cpu_enter' and 'guest_cpu_reset' events. Signed-off-by: Lluís Vilanova Message-id: 147566900921.7708.656450813307396468.st...@fimbulvetr.bsc.es Signed-off-by: Stefan Hajnoczi --- trace-events | 2 ++ 1 file changed,

[Qemu-devel] [PULL v2 12/20] trace: provide mechanism for registering trace events

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Remove the notion of there being a single global array of trace events, by introducing a method for registering groups of events. The module_call_init() needs to be invoked at the start of any program that wants to make use of the trace support. Currently this covers s

[Qemu-devel] [PULL v2 09/20] trace: remove the TraceEventID and TraceEventVCPUID enums

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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 TRACE_VCPU_

[Qemu-devel] [PULL v2 18/20] trace: pass trace-events to tracetool as a positional param

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" 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. Reviewed-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova Sign

Re: [Qemu-devel] [PATCH v4 03/20] ppc/pnv: add a core mask to PnvChip

2016-10-12 Thread Cédric Le Goater
On 10/11/2016 12:24 PM, David Gibson wrote: > On Mon, Oct 10, 2016 at 02:56:25PM +0200, Cédric Le Goater wrote: >> @@ -227,11 +227,44 @@ static void ppc_powernv_init(MachineState *machine) snprintf(chip_name, sizeof(chip_name), "chip[%d]", CHIP_HWID(i)); object_prop

[Qemu-devel] [PULL v2 15/20] trace: get rid of generated-events.h/generated-events.c

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Currently the generated-events.[ch] files contain the event dstates, constants and TraceEvent structs, while the generated-tracers.[ch] files contain the actual trace probe logic. With the removal of usage of the event enums from the API there is no longer any compellin

[Qemu-devel] [PULL v2 19/20] trace: introduce a formal group name for trace events

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The declarations in the generated-tracers.h file are assuming there's only ever going to be one instance of this header, as they are not namespaced. When we have one header per event group, if a single source file needs to include multiple sets of trace events, the symb

[Qemu-devel] [PULL v2 16/20] trace: rename _read_events to read_events

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" The _read_events method is used by callers outside of its module, so should be a public method, not private. Reviewed-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova Signed-off-by: Daniel P. Berrange Message-id: 1475588159-30598-18-git-send-email-berra...@redhat.com

[Qemu-devel] [PATCH] net: rocker: set limit to DMA buffer size

2016-10-12 Thread P J P
From: Prasad J Pandit Rocker network switch emulator has test registers to help debug DMA operations. While testing host DMA access, a buffer address is written to register 'TEST_DMA_ADDR' and its size is written to register 'TEST_DMA_SIZE'. When performing TEST_DMA_CTRL_INVERT test, if DMA buffe

[Qemu-devel] [PULL v2 17/20] trace: push reading of events up a level to tracetool main

2016-10-12 Thread Stefan Hajnoczi
From: "Daniel P. Berrange" Move the reading of events out of the 'tracetool.generate' method and into tracetool.main, so that the latter is not tied to generating from a single source of events. Reviewed-by: Stefan Hajnoczi Reviewed-by: Lluís Vilanova Signed-off-by: Daniel P. Berrange Message

Re: [Qemu-devel] [PATCH v1 0/3] POWER9 TCG enablements - part6

2016-10-12 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v1 0/3] POWER9 TCG enablements - part6 Message-id: 1476248933-25562-1-git-send-email-nik...@linux.vnet.ibm.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash BASE=ba

[Qemu-devel] MTTCG memory ordering

2016-10-12 Thread Stefan Hajnoczi
Hi Pranith, I was curious about the status of your MTTCG GSoC work: I saw your fence series which implements the noop memory barrier/fence instructions on various architectures, but I wasn't sure if that also covers the case where a strong target is emulated on a weak host. Did you make TCG autom

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-12 Thread Kevin Wolf
Am 11.10.2016 um 18:50 hat Markus Armbruster geschrieben: > Eric Blake writes: > > > On 10/11/2016 09:57 AM, Kevin Wolf wrote: > >> Should we introduce a new, clean blockdev-stream command that fixes this > >> and matches the common name pattern? Of course, block-stream vs. > >> blockdev-stream c

Re: [Qemu-devel] x86 Instruction Testing?

2016-10-12 Thread Peter Maydell
On 11 October 2016 at 16:51, Taylor Edward Heimbichner wrote: > I'm a student researcher with the University of Arizona's Computer Science > Department. I'm writing to ask if any executable that you use to test QEMU > systematically tests all, or at least a large portion, of the x86 > instruction

Re: [Qemu-devel] [Qemu-block] [PATCH v4 0/3] iotests: Fix test 162

2016-10-12 Thread Hao QingFeng
Max, Just a common question for this case, if sshx block driver wasn't built into qemu-img, this case would fail as below: exec /home/haoqf/KVMonz/qemu/tests/qemu-iotests/../../qemu-img info --image-opts driver=ssh,host=localhost,port=0.42,path=/foo qemu-img: Could not open 'driver=ssh,host=

Re: [Qemu-devel] [PATCH 3/5] qemu-thread: use acquire/release to clarify semantics of QemuEvent

2016-10-12 Thread Alex Bennée
Paolo Bonzini writes: > Do not use the somewhat mysterious atomic_mb_read/atomic_mb_set, > instead make sure that the operations on QemuEvent are annotated > with the desired acquire and release semantics. > > In particular, qemu_event_set wakes up the waiting thread, so it must > be a release f

[Qemu-devel] [Bug 1319100] Re: qemu-arm-static bug in signal handling causes mono and java to hang

2016-10-12 Thread Peter Maydell
Yes it did. ** Changed in: qemu Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1319100 Title: qemu-arm-static bug in signal handling causes mono and ja

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-12 Thread Alberto Garcia
On Tue 11 Oct 2016 06:50:27 PM CEST, Markus Armbruster wrote: > * Is the extended command still a sane interface? If writing clear > documentation for it is hard, it perhaps isn't. Pay special > attention to failure modes. Overloaded arguments are prone to > confusing errors. This is wha

Re: [Qemu-devel] [PATCH 2/2] char: use a fixed idx for child muxed chr

2016-10-12 Thread Marc-André Lureau
Hi On Tue, Oct 11, 2016 at 8:44 PM Daniel P. Berrange wrote: > > Not sure if this is immediately helpful to your scneario or > not, but I'd like to see the qemu_chr_add_handlers method > removed long term, and everything converted to use the > qemu_chr_fe_add_watch function instead. This reverse

Re: [Qemu-devel] [PATCH v10 09/16] block: Add QMP support for streaming to an intermediate layer

2016-10-12 Thread Alberto Garcia
On Tue 11 Oct 2016 06:32:39 PM CEST, Markus Armbruster wrote: >>> 3) QEMU could advertise that feature to the client. This is probably >>> simpler than trying to figure it out from the API. I guess that's >>> the idea of 'qmp_capabilities'? >> >> I think that was the idea, though it was never used

Re: [Qemu-devel] [PATCH v14 09/21] qapi: permit auto-creating single element lists

2016-10-12 Thread Markus Armbruster
"Daniel P. Berrange" writes: > When converting QemuOpts to a QObject, there is no information > about compound types available, Yes, that's a drawback of splitting the conversion into a QemuOpts -> QObject part that is oblivious of types, and a QObject -> QAPI object part that knows the types.

Re: [Qemu-devel] [PATCH 5/5] atomic: base mb_read/mb_set on load-acquire and store-release

2016-10-12 Thread Alex Bennée
Paolo Bonzini writes: > This introduces load-acquire and store-release operations in QEMU. > For now, just use them as an implementation detail of atomic_mb_read > and atomic_mb_set. > > Since docs/atomics.txt documents that atomic_mb_read only synchronizes > with an atomic_mb_set of the same va

Re: [Qemu-devel] [PATCHv2 4/7] spapr_pci: Delegate placement of PCI host bridges to machine type

2016-10-12 Thread Laurent Vivier
On 12/10/2016 06:44, David Gibson wrote: > The 'spapr-pci-host-bridge' represents the virtual PCI host bridge (PHB) > for a PAPR guest. Unlike on x86, it's routine on Power (both bare metal > and PAPR guests) to have numerous independent PHBs, each controlling a > separate PCI domain. > > There

Re: [Qemu-devel] [PATCH 5/5] atomic: base mb_read/mb_set on load-acquire and store-release

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 11:28, Alex Bennée wrote: > > Paolo Bonzini writes: > >> This introduces load-acquire and store-release operations in QEMU. >> For now, just use them as an implementation detail of atomic_mb_read >> and atomic_mb_set. >> >> Since docs/atomics.txt documents that atomic_mb_read onl

Re: [Qemu-devel] [PATCH v3] block: Remove "options" indirection from blockdev-add

2016-10-12 Thread Fam Zheng
On Tue, 10/11 15:27, Kevin Wolf wrote: > Now that QAPI supports boxed types, we can have unions at the top level > of a command, so let's put our real options directly there for > blockdev-add instead of having a single "options" dict that contains the > real arguments. > > blockdev-add is still e

Re: [Qemu-devel] [PATCH 3/5] qemu-thread: use acquire/release to clarify semantics of QemuEvent

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 11:21, Alex Bennée wrote: > > Paolo Bonzini writes: > >> Do not use the somewhat mysterious atomic_mb_read/atomic_mb_set, >> instead make sure that the operations on QemuEvent are annotated >> with the desired acquire and release semantics. >> >> In particular, qemu_event_set wak

Re: [Qemu-devel] [PATCH 1/3] block: add BDS field to count in-flight requests

2016-10-12 Thread Kevin Wolf
Am 11.10.2016 um 18:45 hat Paolo Bonzini geschrieben: > > I think my point was that you don't have to count requests at the BB > > level if you know that there are no requests pending on the BB level > > that haven't reached the BDS level yet. > > I need to count requests at the BB level because t

Re: [Qemu-devel] [PATCH] net: rocker: set limit to DMA buffer size

2016-10-12 Thread Jiri Pirko
Wed, Oct 12, 2016 at 11:10:55AM CEST, ppan...@redhat.com wrote: >From: Prasad J Pandit > >Rocker network switch emulator has test registers to help debug >DMA operations. While testing host DMA access, a buffer address >is written to register 'TEST_DMA_ADDR' and its size is written to >register 'T

[Qemu-devel] [PATCH v2] MAINTAINERS: Add some ARM related files to the corresponding sections

2016-10-12 Thread Thomas Huth
The files w/cpu/a*mpcore.c are already assigned to the ARM CPU section, but the corresponding headers include/hw/cpu/a*mpcore.h are still missing. The file hw/*/imx* are already assigned to the i.MX31 machine, but the corresponding header files include/hw/*/imx* are still missing. The file hw/mis

Re: [Qemu-devel] [PULL 00/15] Migration

2016-10-12 Thread Peter Maydell
On 6 October 2016 at 11:59, Peter Maydell wrote: > On 5 October 2016 at 14:44, Juan Quintela wrote: >> From: Juan Quintela >> >> The following changes since commit bbc4c3f4f3c624e2de64fdcb79f4dd8c1a508e9d: >> >> Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into >> staging (2

Re: [Qemu-devel] [PATCHv2 5/7] spapr: Adjust placement of PCI host bridge to allow > 1TiB RAM

2016-10-12 Thread Laurent Vivier
On 12/10/2016 06:44, David Gibson wrote: > Currently the default PCI host bridge for the 'pseries' machine type is > constructed with its IO windows in the 1TiB..(1TiB + 64GiB) range in > guest memory space. This means that if > 1TiB of guest RAM is specified, > the RAM will collide with the PCI

[Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-12 Thread Changlong Xie
NBD is using the CoMutex in a way that wasn't anticipated. For example, if there are N(N=26, MAX_NBD_REQUESTS=16) nbd write requests, so we will invoke nbd_client_co_pwritev N times. time request Actions 1

Re: [Qemu-devel] [PATCH 1/3] block: add BDS field to count in-flight requests

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 11:50, Kevin Wolf wrote: > > (By the way, I need to repost this series anyway, but let's finish the > > discussion first to understand what you'd like to have in 2.8). > > I'm still not completely sold on the order in which we should do things, > but you've been insisting enough tha

Re: [Qemu-devel] [PATCH 1/2] dma-helpers: explicitly pass alignment into dma-helpers

2016-10-12 Thread Kevin Wolf
Am 11.10.2016 um 17:47 hat John Snow geschrieben: > On 10/10/2016 03:23 PM, Mark Cave-Ayland wrote: > >On 10/10/16 17:34, Eric Blake wrote: > > > >>On 10/09/2016 11:43 AM, Mark Cave-Ayland wrote: > >>>The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not > >>>necessarily the cas

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-12 Thread Changlong Xie
On 10/12/2016 06:18 PM, Changlong Xie wrote: time request Actions 29 15(most case) in_flight=15, Coroutine=C15, free_sema->holder=C17, mutex->locked=false

Re: [Qemu-devel] [PATCH v2 0/8] nvdimm: hotplug support

2016-10-12 Thread Xiao Guangrong
On 10/11/2016 08:32 PM, Igor Mammedov wrote: Of course, @fit and @current_number should be persistent during live migration. you can drop RCU and @current_number, and @fit could be exactly recreated on target side from -device nvdim ... set of options, which must include all currently prese

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-12 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Tuesday, October 11, 2016 4:29 AM > [...] > diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c > index 2ba19424e4a1..ce6d6dcbd9a8 100644 > --- a/drivers/vfio/vfio_iommu_type1.c > +++ b/drivers/vfio/vfio_iommu_

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-12 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Wednesday, October 12, 2016 6:07 AM > > @@ -696,6 +1067,11 @@ static int vfio_iommu_replay(struct vfio_iommu *iommu, > > > > iova += size; > > } > > + > > + if (!dma->iommu_mapped) { > > +

[Qemu-devel] PSA: wiki cleaned up

2016-10-12 Thread Paolo Bonzini
Hi all, I spent some time cleaning up the wiki in order to make it easier to organize information. The pages are now organized in a mostly hierarchical fashion, starting at the following entry points: * http://qemu-project.org/ChangeLog * http://qemu-project.org/Contribute (formerly /Contribute/

Re: [Qemu-devel] [PATCH] Add more APIC state to dump

2016-10-12 Thread Paolo Bonzini
On 23/09/2016 19:43, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Add the rest of the APIC state to the 'info lapic' dump, > since it is of course state that wasn't printed that I'd > messed up. > > You now have output like: > > (qemu) info lapic > dumping local AP

Re: [Qemu-devel] [PATCH] nbd: Use CoQueue for free_sema instead of CoMutex

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 12:18, Changlong Xie wrote: > +if (s->in_flight == MAX_NBD_REQUESTS) { > +qemu_co_queue_wait(&s->free_sema); > assert(s->in_flight < MAX_NBD_REQUESTS); > } I was wondering if this should be a while loop instead, but the assertion protects against that. So

Re: [Qemu-devel] vt-x support for qemu

2016-10-12 Thread Paolo Bonzini
On 11/10/2016 20:41, Anand J wrote: > I want to run KVM on qemu. For this qemu must provide vt-x/amd-v > instruction support in the software mode. > I was planning to try to add this feature in qemu. If somebody is already > working on it please reply. QEMU provides AMD-V support. Paolo

Re: [Qemu-devel] [PATCH 15/15] xen: Rename xen_be_frontend_changed

2016-10-12 Thread Paolo Bonzini
On 09/10/2016 21:50, Emil Condrea wrote: > On Tue, Oct 4, 2016 at 11:06 AM, Paolo Bonzini wrote: >> >> >> On 04/10/2016 08:43, Emil Condrea wrote: >>> xen_be_frontend_changed -> xen_fe_frontend_changed >> >> This is not correct. The front-end is implemented in the guest domain, >> while the bac

Re: [Qemu-devel] [PATCHv2 5/7] spapr: Adjust placement of PCI host bridge to allow > 1TiB RAM

2016-10-12 Thread David Gibson
On Wed, Oct 12, 2016 at 12:07:50PM +0200, Laurent Vivier wrote: > > > On 12/10/2016 06:44, David Gibson wrote: > > Currently the default PCI host bridge for the 'pseries' machine type is > > constructed with its IO windows in the 1TiB..(1TiB + 64GiB) range in > > guest memory space. This means t

Re: [Qemu-devel] [PATCH v2 07/11] blockjob: add .clean property

2016-10-12 Thread Vladimir Sementsov-Ogievskiy
On 01.10.2016 01:00, John Snow wrote: Cleaning up after we have deferred to the main thread but before the transaction has converged can be dangerous and result in deadlocks if the job cleanup invokes any BH polling loops. A job may attempt to begin cleaning up, but may induce another job to ent

Re: [Qemu-devel] [PULL v2 00/20] Tracing patches

2016-10-12 Thread Peter Maydell
On 12 October 2016 at 09:47, Stefan Hajnoczi wrote: > The following changes since commit 627eae7d729277c84f8e0ac07a8caab39c92c38d: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2016-10-10 16:23:40 +0100) > > are available in the git repository at: > > git://

Re: [Qemu-devel] [PATCH 03/29] target-sparc: add UA2005 TTE bit #defines

2016-10-12 Thread Artyom Tarasenko
On Tue, Oct 11, 2016 at 5:08 PM, Richard Henderson wrote: > On 10/11/2016 08:51 AM, Artyom Tarasenko wrote: >> >> On Tue, Oct 11, 2016 at 7:50 AM, Richard Henderson >> wrote: >>> >>> On 10/10/2016 04:45 PM, Artyom Tarasenko wrote: > > > Hmm. Would it make more sense to reorg these as

Re: [Qemu-devel] [PATCH] tests/boot-sector: Use mkstemp() to create a unique file name

2016-10-12 Thread Greg Kurz
On Tue, 11 Oct 2016 16:06:55 +0200 Thomas Huth wrote: > On 11.10.2016 15:55, Greg Kurz wrote: > > On Tue, 11 Oct 2016 15:32:02 +0200 > > Thomas Huth wrote: > > > >> The pxe-test is run for three different targets now (x86_64, i386 > >> and ppc64), and the bios-tables-test is run for two targe

Re: [Qemu-devel] [PATCH v2 11/11] iotests: add transactional failure race test

2016-10-12 Thread Vladimir Sementsov-Ogievskiy
it is almost a duplication of test_transaction_failure, I think it would be better to make separate do_test_transaction_failure with parameter and two wrappers On 01.10.2016 01:00, John Snow wrote: Add a regression test for the case found by Vladimir. Reported-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH 29/29] target-sparc: fix up Niagara machine

2016-10-12 Thread Artyom Tarasenko
On Tue, Oct 11, 2016 at 4:43 PM, Richard Henderson wrote: > On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: >> >> Remove the Niagara stub implementation from sun4u.c and add a machine, >> compatible with Legion simulator from the OpenSPARC T1 project. >> >> The machine uses the firmware supplied w

Re: [Qemu-devel] [PATCH 26/29] target-sparc: store the UA2005 entries in sun4u format

2016-10-12 Thread Artyom Tarasenko
On Tue, Oct 11, 2016 at 4:31 PM, Richard Henderson wrote: > On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: >> >> +sun4u_tte = TTE_PA(sun4v_tte) | (sun4v_tte & TTE_VALID_BIT); >> +sun4u_tte |= (sun4v_tte & 3ULL) << 61; >> +sun4u_tte |= (sun4v_tte & TTE_NFO_BIT_UA2005) >> 2; >> +sun

Re: [Qemu-devel] [PATCH 0/5] More thread sanitizer fixes and atomic.h improvements

2016-10-12 Thread Alex Bennée
Paolo Bonzini writes: > See each patch. My attempt at fixing whatever I did when I obviously > didn't know enough^W about the C11 memory model, and at setting a > better example for future generations... Have you had a chance to check up on any of the errors "make check" throws up with the san

Re: [Qemu-devel] [PATCH 00/18] Dirty bitmaps postcopy migration

2016-10-12 Thread Vladimir Sementsov-Ogievskiy
ping For now there are some notes mostly about accessory patches. What about migration itself? Is it ok? On 16.08.2016 13:25, Vladimir Sementsov-Ogievskiy wrote: v2: some bugs fixed, iotests a bit changed and merged into one test. based on block-next (https://github.com/XanClic/qemu/commits/b

Re: [Qemu-devel] [PATCH 0/5] More thread sanitizer fixes and atomic.h improvements

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 13:32, Alex Bennée wrote: > > See each patch. My attempt at fixing whatever I did when I obviously > > didn't know enough^W about the C11 memory model, and at setting a > > better example for future generations... > > Have you had a chance to check up on any of the errors "make ch

Re: [Qemu-devel] [PATCH 09/29] target-sparc: hypervisor mode takes over nucleus mode

2016-10-12 Thread Artyom Tarasenko
On Mon, Oct 10, 2016 at 11:41 PM, Richard Henderson wrote: > On 10/01/2016 05:05 AM, Artyom Tarasenko wrote: >> >> Signed-off-by: Artyom Tarasenko >> --- >> target-sparc/cpu.h | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/target-sparc/cpu.h b/target-sparc/cpu.

Re: [Qemu-devel] [PATCH 09/22] block: introduce persistent dirty bitmaps

2016-10-12 Thread Vladimir Sementsov-Ogievskiy
On 07.10.2016 22:28, Max Reitz wrote: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy -

Re: [Qemu-devel] vt-x support for qemu

2016-10-12 Thread Anand J
Thanks for replying. Can you please tell me where should I start looking at the code in order to understand the implementation? Thanks, Anand On Wed, Oct 12, 2016 at 4:27 PM, Paolo Bonzini wrote: > > > On 11/10/2016 20:41, Anand J wrote: > > I want to run KVM on qemu. For this qemu must provide

Re: [Qemu-devel] vt-x support for qemu

2016-10-12 Thread Paolo Bonzini
On 12/10/2016 13:34, Anand J wrote: > Thanks for replying. Can you please tell me where should I start looking > at the code in order to understand the implementation? My immediate answer is that if you cannot find it, you'll have a hard time understanding the implementation. But anyway it's in

[Qemu-devel] [PATCH v2 0/5] linux-user: Several Mips-related patches

2016-10-12 Thread Aleksandar Markovic
From: Aleksandar Markovic v1 -> v2: - Added patches 1 and 2. - Omitted patch on sysfs(); this patch will be treated separately, as it is not Mips-specific, and logicaly does not belong to this series; it will be sent at later time. This is just a set of several Qemu Linux us

[Qemu-devel] [PATCH v2 3/5] linux-user: Update ioctls definitions for Mips32

2016-10-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Update linux-user/mips/termbits.h with ioctl definitions from kernel file arch/mips/include/uapi/asm/ioctls.h. Signed-off-by: Aleksandar Markovic --- linux-user/mips/termbits.h | 12 1 file changed, 12 insertions(+) diff --git a/linux-user/mips/termbits.

[Qemu-devel] [PATCH v2 1/5] linux-user: Update syscall numbers tables for Mips

2016-10-12 Thread Aleksandar Markovic
From: Aleksandar Markovic Update from kernel header arch/mips/include/uqapi/asm/unistd.h. Signed-off-by: Aleksandar Markovic --- linux-user/mips/syscall_nr.h | 3 +++ linux-user/mips64/syscall_nr.h | 7 +++ 2 files changed, 10 insertions(+) diff --git a/linux-user/mips/syscall_nr.h b/li

[Qemu-devel] [PATCH v2 5/5] linux-user: Fix fadvise64() syscall support for Mips32

2016-10-12 Thread Aleksandar Markovic
From: Aleksandar Markovic By looking at the file arch/mips/kernel/sys.S in Linux kernel, it can be deduced that, for Mips32 platform, syscall corresponding to number _NR_fadvise64 translates to kernel function sys_fadvise64_64, and that argument layout is as follows: 0 32 0

  1   2   3   4   >