[Qemu-devel] [PULL 14/22] hw/intc/arm_gicv3: Implement gicv3_set_irq()

2016-06-17 Thread Peter Maydell
Implement the code which updates the GIC state when an interrupt input into the GIC is asserted. Signed-off-by: Peter Maydell Reviewed-by: Shannon Zhao Tested-by: Shannon Zhao Message-id:

Re: [Qemu-devel] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > The isa_bus_irqs function initializes ISA bus IRQ array pointer with specified > value. > > Previously the ICH9 LPC bridge model did not have its own IRQs but > only IRQ pointer cache. And same GSI were used for ISA bus and other sources > behind the

[Qemu-devel] [PATCH] oslib-posix: New qemu_alloc_stack() to allocate stack with correct perms

2016-06-17 Thread Peter Maydell
Some architectures require the stack to be executable; notably this includes MIPS, because the kernel's floating point emulator may try to put trampoline code on the stack to handle some cases. (See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815409 for an example of this causing QEMU to

[Qemu-devel] [PULL 06/22] hw/intc/arm_gicv3: Add state information

2016-06-17 Thread Peter Maydell
From: Pavel Fedin Add state information to GICv3 object structure and implement arm_gicv3_common_reset(). This commit includes accessor functions for the fields which are stored as bitmaps in uint32_t arrays. Signed-off-by: Pavel Fedin Reviewed-by:

Re: [Qemu-devel] [PULL 00/13] migration: many fixes

2016-06-17 Thread Peter Maydell
On 17 June 2016 at 14:06, Amit Shah <amit.s...@redhat.com> wrote: > The following changes since commit 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' > into staging (2016-06-17 12:36:27 +0100) > >

[Qemu-devel] [PATCH 4/7] trace: enable tracing in qemu-io

2016-06-17 Thread Denis V. Lunev
Moving trace_init_backends() into trace_opt_parse() is not possible. This should be called after daemonize() in vl.c. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC:

[Qemu-devel] [PULL 16/22] hw/intc/arm_gicv3: Implement gicv3_cpuif_update()

2016-06-17 Thread Peter Maydell
Implement the gicv3_cpuif_update() function which deals with correctly asserting IRQ and FIQ based on the current running priority of the CPU, the priority of the highest priority pending interrupt and the CPU's current exception level and security state. Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-17 Thread Mark Cave-Ayland
On 17/06/16 13:57, Artyom Tarasenko wrote: > On Fri, Jun 17, 2016 at 2:44 PM, Mark Cave-Ayland > wrote: >> On 17/06/16 12:36, Artyom Tarasenko wrote: >> >>> Hi Mark, >>> >>> On Fri, Jun 17, 2016 at 1:27 PM, Mark Cave-Ayland >>>

Re: [Qemu-devel] [PATCH 6/7] qemu-img: move common options parsing before commands processing

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:11AM +0300, Denis V. Lunev wrote: > This is necessary to enable creation of common qemu-img options which will > be specified before command. > > The patch also enables '-V' alias to '--version' (exactly like in other > block utilities) and documents this change. >

[Qemu-devel] [PATCH 3/7] trace: move qemu_trace_opts to trace/control.c

2016-06-17 Thread Denis V. Lunev
The patch also creates trace_opt_parse() helper in trace/control.c to reuse this code in next patches for qemu-nbd and qemu-io. The patch also makes trace_init_events() static, as this call is not used outside the module anymore. Signed-off-by: Denis V. Lunev Reviewed-by: Eric

[Qemu-devel] [PULL 09/22] hw/intc/arm_gicv3: ARM GICv3 device framework

2016-06-17 Thread Peter Maydell
From: Shlomo Pongratz This patch includes the device class itself, some ID register value functions which will be needed by both distributor and redistributor, and some skeleton functions for handling interrupts coming in and going out, which will be filled in in a

Re: [Qemu-devel] [PATCH 5/9] mirror: improve performance of mirroring of empty disk

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 08:53:12PM -0600, Eric Blake wrote: > On 06/16/2016 04:10 AM, Stefan Hajnoczi wrote: > > > > > io_sectors currently only accounts for bytes written, not bytes read. > > > > Therefore, I think we need: > > > > /* Don't charge for efficient zero writes */ > > if

Re: [Qemu-devel] [PATCH 7/7] trace: enable tracing in qemu-img

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:12AM +0300, Denis V. Lunev wrote: > The command will work this way: > qemu-img --trace qcow2* create -f qcow2 1.img 64G > > Signed-off-by: Denis V. Lunev > Suggested by: Daniel P. Berrange > Reviewed-by: Eric Blake

[Qemu-devel] [PATCH 6/7] qemu-img: move common options parsing before commands processing

2016-06-17 Thread Denis V. Lunev
This is necessary to enable creation of common qemu-img options which will be specified before command. The patch also enables '-V' alias to '--version' (exactly like in other block utilities) and documents this change. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake

[Qemu-devel] [PULL 02/22] bitops.h: Implement half-shuffle and half-unshuffle ops

2016-06-17 Thread Peter Maydell
A half-shuffle operation takes a word with zeros in the high half: ABCD EFGH IJKL MNOP and spreads the bits out so they are in every other bit of the word: 0A0B 0C0D 0E0F 0G0H 0I0J 0K0L 0M0N 0O0P A half-unshuffle performs the reverse operation. Provide functions in bitops.h

Re: [Qemu-devel] [PATCH 4/7] trace: enable tracing in qemu-io

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:09AM +0300, Denis V. Lunev wrote: > Moving trace_init_backends() into trace_opt_parse() is not possible. This > should be called after daemonize() in vl.c. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Eric Blake > CC: Paolo

[Qemu-devel] [PATCH v8 0/7] trace: enable tracing in qemu-io/qemu-nbd/qemu-img

2016-06-17 Thread Denis V. Lunev
Changes from v6: - changed order of patches 1 & 2 Changes from v5: - added missed hunk into patch #7 Changes from v4: - synced help descriprion for --trace with man for qemu.1/qemu-img.1/qemu-nbd.8 - moved @findex from qemu-option-trace.texi Changes from v3: - fixed difference in help/man for

[Qemu-devel] [PULL 07/22] hw/intc/arm_gicv3: Move irq lines into GICv3CPUState structure

2016-06-17 Thread Peter Maydell
Move the GICv3 parent_irq and parent_fiq pointers into the GICv3CPUState structure rather than giving them their own array. This will make it easy to assert the IRQ and FIQ lines for a particular CPU interface without having to know or calculate the CPU index for the GICv3CPUState we are working

Re: [Qemu-devel] [PATCH v2] scsi: esp: remove handling of SATN/STOP

2016-06-17 Thread Mark Cave-Ayland
On 17/06/16 14:35, Paolo Bonzini wrote: > On 17/06/2016 15:13, Mark Cave-Ayland wrote: >> Unforunately this causes regressions on a few of my SPARC32 images: >> NextStep, Solaris 1.1.2, NetBSD and Debian Etch all hang whilst >> enumerating the SCSI bus with this patch applied. > > Ok, I'll

Re: [Qemu-devel] [PATCH 5/7] trace: enable tracing in qemu-nbd

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:10AM +0300, Denis V. Lunev wrote: > Please note, trace_init_backends() must be called in the final process, > i.e. after daemonization. This is necessary to keep tracing thread in > the proper process. > > Signed-off-by: Denis V. Lunev >

Re: [Qemu-devel] [PATCH v2 00/40] Split up the trace-events file

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 09:39:46AM +0100, Daniel P. Berrange wrote: > This is a followup to: > > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg02537.html > > To quote Peter: > > pm215: "trace-events: causing merge conflicts since 2010" > > There's really no good reason why

[Qemu-devel] [PULL 00/22] target-arm queue

2016-06-17 Thread Peter Maydell
/migration-for-2.7-5' into staging (2016-06-17 14:09:46 +0100) are available in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20160617 for you to fetch changes up to f06765a94a31bdd8b65fc83fd91a6c3f8e8a1195: ACPI: ARM: Present GIC version in MADT

[Qemu-devel] [PATCH 2/7] doc: move text describing --trace to specific .texi file

2016-06-17 Thread Denis V. Lunev
This text will be included to qemu-nbd/qemu-img mans in the next patches. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- Makefile

Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-17 Thread Eduardo Habkost
On Fri, Jun 17, 2016 at 03:01:55PM +0200, Paolo Bonzini wrote: > > > On 17/06/2016 14:46, Eduardo Habkost wrote: > >> > > >> > The bits are reserved anyway, so we can do whatever we want with them. > >> > In fact I think it's weird for the architecture to make them > >> > must-be-zero, it might

Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-17 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Note that the failure mode is pretty brutal since KVM reports an > internal error right after restarting on the destination, and who knows > what used to happen before the assertion was introduced. All MSRs after > MTRRs would be ignored by KVM! I

Re: [Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-17 Thread Marcel Apfelbaum
On 06/17/2016 04:18 PM, Eduardo Habkost wrote: On Fri, Jun 17, 2016 at 09:15:06AM +0100, Dr. David Alan Gilbert wrote: * Eduardo Habkost (ehabk...@redhat.com) wrote: On Thu, Jun 16, 2016 at 06:12:12PM +0100, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH 1/7] doc: sync help descriprion for --trace with man for qemu.1

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:06AM +0300, Denis V. Lunev wrote: > Signed-off-by: Denis V. Lunev > Reviewed-by: Eric Blake > CC: Paolo Bonzini > CC: Stefan Hajnoczi > CC: Kevin Wolf > --- >

[Qemu-devel] [PATCH 1/7] doc: sync help descriprion for --trace with man for qemu.1

2016-06-17 Thread Denis V. Lunev
Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi CC: Kevin Wolf --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH 3/7] trace: move qemu_trace_opts to trace/control.c

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:08AM +0300, Denis V. Lunev wrote: > +/** > + * Definition of QEMU options describing trace subsystem configuration > + */ > +extern QemuOptsList qemu_trace_opts; > + > +/** > + * trace_opt_parse: > + * @optarg: A string argument of --trace command line argument > + *

Re: [Qemu-devel] [PULL 0/2] Machine queue, 2016-06-16

2016-06-17 Thread Eduardo Habkost
e know. The following changes since commit 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into staging (2016-06-17 12:36:27 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/machin

Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 10:14, Chao Peng wrote: > Basically: > - it removes old ISA devices and support only PCI devices; I think you need to keep at least the RTC, otherwise where does Linux get the time of day from? > - it removes 8259, instead use MSI as much as possible. IOAPIC and PCI > PIN are

Re: [Qemu-devel] [PATCH 13/13] ICH9 LPC: configure PCI IRQs routing internally

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > ICH9 LPC bridge is used to route PCI IRQs to GSI. The root PCI bus reference > is > required to setup the routing. According to specification, the bridge is > connected to root bus. Hence, there is no reason to setup the routing > externally. > >

Re: [Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > Currently, Q35 instance is configured using direct access to structure fields. > The patch uses property interface to set the fields. > > Signed-off-by: Efimov Vasily > --- > hw/i386/pc_q35.c | 18 -- > 1 file

[Qemu-devel] [PATCH 7/7] trace: enable tracing in qemu-img

2016-06-17 Thread Denis V. Lunev
The command will work this way: qemu-img --trace qcow2* create -f qcow2 1.img 64G Signed-off-by: Denis V. Lunev Suggested by: Daniel P. Berrange Reviewed-by: Eric Blake CC: Paolo Bonzini CC: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v2] scsi: esp: remove handling of SATN/STOP

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:13, Mark Cave-Ayland wrote: > Unforunately this causes regressions on a few of my SPARC32 images: > NextStep, Solaris 1.1.2, NetBSD and Debian Etch all hang whilst > enumerating the SCSI bus with this patch applied. Ok, I'll either fix migration (adding a subsection) or bump

Re: [Qemu-devel] [PATCH 03/13] vmport: identify vmport type by macro TYPE_VMPORT

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:10, Efimov Vasily wrote: > Currently vmport device is identified by the string literal. Using a > preprocessor alias instead is preferable. > > Signed-off-by: Efimov Vasily > --- > hw/misc/vmport.c | 1 - > include/hw/i386/pc.h | 3 ++- > 2 files changed,

[Qemu-devel] [PATCH 5/7] trace: enable tracing in qemu-nbd

2016-06-17 Thread Denis V. Lunev
Please note, trace_init_backends() must be called in the final process, i.e. after daemonization. This is necessary to keep tracing thread in the proper process. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini CC:

Re: [Qemu-devel] [PATCH 09/13] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > ICH9 SMB bridge can be created using qdev API despite existence of helper > function. The type name is needed for such creation. Using a preprocessor > alias instead the string type name itself is preferable. > > The patch makes the alias accessible

Re: [Qemu-devel] [PATCH v2 37/40] trace: split out trace events for target-s390x/ directory

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 11:58:28AM +0200, Cornelia Huck wrote: > On Thu, 16 Jun 2016 09:40:23 +0100 > "Daniel P. Berrange" wrote: > > > Move all trace-events for files in the target-s390x/ directory to > > their own file. > > > > Signed-off-by: Daniel P. Berrange

Re: [Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-17 Thread Eduardo Habkost
On Fri, Jun 17, 2016 at 09:15:06AM +0100, Dr. David Alan Gilbert wrote: > * Eduardo Habkost (ehabk...@redhat.com) wrote: > > On Thu, Jun 16, 2016 at 06:12:12PM +0100, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Currently QEMU

Re: [Qemu-devel] [PATCH 05/13] Q35: implement property interfece to several parameters

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > During creation of Q35 instance several parameters are set using direct > access. > It violates Qemu device model. Correctly, the parameters should be handled as > object properties. > > The patch adds four link type properties for fields: >

Re: [Qemu-devel] [PATCH 2/7] doc: move text describing --trace to specific .texi file

2016-06-17 Thread Denis V. Lunev
On 06/17/2016 04:36 PM, Stefan Hajnoczi wrote: On Thu, Jun 16, 2016 at 10:15:07AM +0300, Denis V. Lunev wrote: This text will be included to qemu-nbd/qemu-img mans in the next patches. Signed-off-by: Denis V. Lunev Reviewed-by: Eric Blake CC: Paolo Bonzini

Re: [Qemu-devel] [PATCH] nbd/client.c: Correct trace format string

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 14:42, Peter Maydell wrote: > The trace format string in nbd_send_request uses PRIu16 for > request->type, but request->type is a uint32_t. This provokes > compiler warnings on the OSX clang. Use PRIu32 instead. > > Signed-off-by: Peter Maydell > --- > I

Re: [Qemu-devel] [PATCH 07/13] pckbd: handle A20 IRQ as GPIO

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > The i8042 device has outgouing IRQ line A20. Currently the IRQ is referenced > by a pointer which normally is set during machine initialization. The pointer > is never changed at runtime. So common GPIO model can be applied to A20 IRQ > line. Note that

[Qemu-devel] [PATCH v14 2/3] hw/ptimer: Fix counter - 1 returned by ptimer_get_count for the active timer

2016-06-17 Thread Dmitry Osipenko
Due to rounding down performed by ptimer_get_count, it returns counter - 1 for the active timer. That's incorrect because counter should decrement only after period been expired, not before. I.e. if running timer has been loaded with value X, then timer counter should stay with X until period

[Qemu-devel] [PATCH 01/13] ide: move headers to include folder

2016-06-17 Thread Efimov Vasily
The patch moves "hw/ide/achi.h", "hw/ide/pci.h" and "hw/ide/internal.h" headers to corresponding folders inside "include" folder alike other Qemu headers. Signed-off-by: Efimov Vasily --- This patch only moves headers (with the exception of include path correction in 'ahci.c').

Re: [Qemu-devel] [PATCH 4/5] x86: Allow physical address bits to be set

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:18, Eduardo Habkost wrote: > On Fri, Jun 17, 2016 at 09:15:06AM +0100, Dr. David Alan Gilbert wrote: >> * Eduardo Habkost (ehabk...@redhat.com) wrote: >>> On Thu, Jun 16, 2016 at 06:12:12PM +0100, Dr. David Alan Gilbert (git) >>> wrote: From: "Dr. David Alan Gilbert"

[Qemu-devel] [PATCH 13/13] ICH9 LPC: configure PCI IRQs routing internally

2016-06-17 Thread Efimov Vasily
ICH9 LPC bridge is used to route PCI IRQs to GSI. The root PCI bus reference is required to setup the routing. According to specification, the bridge is connected to root bus. Hence, there is no reason to setup the routing externally. The patch moves the setup code to 'realize' method. Also

Re: [Qemu-devel] [PATCH 02/13] pcspk: convert "pit" property type from ptr to link

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:10, Efimov Vasily wrote: > The speaker device needs pointer to ISA PIT device to operate. But according > to > qdev-properties.h, properties of pointer type should be avoided. It seems a > link type property is a good substitution. > > Signed-off-by: Efimov Vasily

[Qemu-devel] [PATCH 12/13] MC146818 RTC: add GPIO access to output IRQ

2016-06-17 Thread Efimov Vasily
The MC146818 RTC device has output IRQ line. Currently the corresponding field is only accessible through direct access. Such access violates Qemu model. The patch makes the field accessible through GPIO. It also updates the setting of the IRQ during initialization in case of IRQ intercepting.

Re: [Qemu-devel] [PATCH 2/7] doc: move text describing --trace to specific .texi file

2016-06-17 Thread Stefan Hajnoczi
On Thu, Jun 16, 2016 at 10:15:07AM +0300, Denis V. Lunev wrote: > This text will be included to qemu-nbd/qemu-img mans in the next patches. > > Signed-off-by: Denis V. Lunev > Reviewed-by: Eric Blake > CC: Paolo Bonzini > CC: Stefan

Re: [Qemu-devel] [PATCH 08/13] port92: handle A20 IRQ as GPIO

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > The port92 device has outgouing IRQ line A20. Currently the IRQ is referenced > by a pointer which normally is set during machine initialization. The > pointer is never changed at runtime. Hence, common GPIO model can be applied > to A20 IRQ line. Note

Re: [Qemu-devel] [PATCH 10/13] ICH9 LPC: handle PIC and I/O APIC IRQs as qdev GPIO

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > The ICH9 LPC bridge has 24 output IRQs connected to I/O APIC and 16 output > IRQs > connected through GSI to both PIC and I/O APIC. Currently the IRQs are > referenced by pointers. The pointers are initialized at startup by direct > access to the

[Qemu-devel] [PATCH v14 1/3] hw/ptimer: Support running with counter = 0 by introducing new policy feature

2016-06-17 Thread Dmitry Osipenko
Currently ptimer prints error message and stops the running timer that has delta (counter) = 0, this is an incorrect behaviour for some of the ptimer users. There are different variants of how particular timer could handle that case besides stopping the timer, like immediate or deferred IRQ

Re: [Qemu-devel] [PATCH 01/13] ide: move headers to include folder

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:10, Efimov Vasily wrote: > The patch moves "hw/ide/achi.h", "hw/ide/pci.h" and "hw/ide/internal.h" > headers > to corresponding folders inside "include" folder alike other Qemu headers. > > Signed-off-by: Efimov Vasily > --- > This patch only moves headers

Re: [Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:11, Efimov Vasily wrote: > qdev API can be used to create CFI pflash devices despite existance of helper > functions. The type name is needed in course of such creation. Using the > preprocessor alias instead of the string literal itself is preferable. > > The patch makes the

[Qemu-devel] [PATCH v14 3/3] arm_mptimer: Convert to use ptimer

2016-06-17 Thread Dmitry Osipenko
Current ARM MPTimer implementation uses QEMUTimer for the actual timer, this implementation isn't complete and mostly tries to duplicate of what generic ptimer is already doing fine. Conversion to ptimer brings the following benefits and fixes: - Simple timer pausing implementation

Re: [Qemu-devel] [PATCH 02/13] pcspk: convert "pit" property type from ptr to link

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 15:10, Efimov Vasily wrote: > The speaker device needs pointer to ISA PIT device to operate. But according > to > qdev-properties.h, properties of pointer type should be avoided. It seems a > link type property is a good substitution. > > Signed-off-by: Efimov Vasily

[Qemu-devel] [PATCH v14 0/3] PTimer fixes/features and ARM MPTimer conversion

2016-06-17 Thread Dmitry Osipenko
Hello, Current QEMU ARM MPTimer device model provides only a certain subset of the emulation behavior, so this patch series is supposed to add missing parts by converting the MPTimer to use generic ptimer helper. It fixes some important ptimer bugs and provides new features that are required for

Re: [Qemu-devel] [PULL 02/18] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-17 Thread Thomas Huth
On 17.06.2016 08:36, David Gibson wrote: > From: Thomas Huth > > Since the mac99 and g3beige PowerPC machines recently broke without > being noticed, it would be good to have a tester for "make check" > that detects such issues immediately. A simple way to test the firmware >

[Qemu-devel] [PATCH 05/13] Q35: implement property interfece to several parameters

2016-06-17 Thread Efimov Vasily
During creation of Q35 instance several parameters are set using direct access. It violates Qemu device model. Correctly, the parameters should be handled as object properties. The patch adds four link type properties for fields: mch.ram_memory mch.pci_address_space mch.system_memory

Re: [Qemu-devel] [PATCH v2] scsi: esp: remove handling of SATN/STOP

2016-06-17 Thread Mark Cave-Ayland
On 17/06/16 10:55, Paolo Bonzini wrote: > The implementation of SATN/STOP is completely busted. The idea > would be that the next DMA read is for a SCSI message and after > that the adapter would transition to the command phase. > > The recent fix to SATN/STOP broke migration, which is one more

[Qemu-devel] [PATCH 08/13] port92: handle A20 IRQ as GPIO

2016-06-17 Thread Efimov Vasily
The port92 device has outgouing IRQ line A20. Currently the IRQ is referenced by a pointer which normally is set during machine initialization. The pointer is never changed at runtime. Hence, common GPIO model can be applied to A20 IRQ line. Note that checking for IRQ to be connected as in

[Qemu-devel] [PATCH 03/13] vmport: identify vmport type by macro TYPE_VMPORT

2016-06-17 Thread Efimov Vasily
Currently vmport device is identified by the string literal. Using a preprocessor alias instead is preferable. Signed-off-by: Efimov Vasily --- hw/misc/vmport.c | 1 - include/hw/i386/pc.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH 07/13] pckbd: handle A20 IRQ as GPIO

2016-06-17 Thread Efimov Vasily
The i8042 device has outgouing IRQ line A20. Currently the IRQ is referenced by a pointer which normally is set during machine initialization. The pointer is never changed at runtime. So common GPIO model can be applied to A20 IRQ line. Note that checking for IRQ to be connected as in previous

[Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties

2016-06-17 Thread Efimov Vasily
Currently, Q35 instance is configured using direct access to structure fields. The patch uses property interface to set the fields. Signed-off-by: Efimov Vasily --- hw/i386/pc_q35.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH] tests: Use '+=' to add additional tests, not '='

2016-06-17 Thread Thomas Huth
The recent commit that added the prom-env-test accidentially overwrote the check-qtest-ppc-y, check-qtest-ppc64-y and check-qtest-sparc-y variables instead of extending them. Fixes: fcbf4a3c0c576eec1321f9cff4fa0dd8e0b1a82f Signed-off-by: Thomas Huth --- tests/Makefile.include

[Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public

2016-06-17 Thread Efimov Vasily
qdev API can be used to create CFI pflash devices despite existance of helper functions. The type name is needed in course of such creation. Using the preprocessor alias instead of the string literal itself is preferable. The patch makes the aliases accessible through the header. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 1/5] m25p80: qdev-ify drive property

2016-06-17 Thread Cédric Le Goater
On 06/17/2016 02:32 PM, Paolo Bonzini wrote: > > > On 17/06/2016 14:15, Cédric Le Goater wrote: >> From: Paolo Bonzini >> >> This allows specifying the property via -drive if=none and creating >> the flash device with -device. >> >> Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 11/13] ICH9 LPC: move call of isa_bus_irqs to 'realize' method

2016-06-17 Thread Efimov Vasily
The isa_bus_irqs function initializes ISA bus IRQ array pointer with specified value. Previously the ICH9 LPC bridge model did not have its own IRQs but only IRQ pointer cache. And same GSI were used for ISA bus and other sources behind the bridge (PCI, SCI). Hence, the pc_q35_init was only

[Qemu-devel] [PATCH 10/13] ICH9 LPC: handle PIC and I/O APIC IRQs as qdev GPIO

2016-06-17 Thread Efimov Vasily
The ICH9 LPC bridge has 24 output IRQs connected to I/O APIC and 16 output IRQs connected through GSI to both PIC and I/O APIC. Currently the IRQs are referenced by pointers. The pointers are initialized at startup by direct access to the structure fields. This violates Qemu device model. The

[Qemu-devel] [PATCH 09/13] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public

2016-06-17 Thread Efimov Vasily
ICH9 SMB bridge can be created using qdev API despite existence of helper function. The type name is needed for such creation. Using a preprocessor alias instead the string type name itself is preferable. The patch makes the alias accessible through the header. Signed-off-by: Efimov Vasily

[Qemu-devel] [PATCH 02/13] pcspk: convert "pit" property type from ptr to link

2016-06-17 Thread Efimov Vasily
The speaker device needs pointer to ISA PIT device to operate. But according to qdev-properties.h, properties of pointer type should be avoided. It seems a link type property is a good substitution. Signed-off-by: Efimov Vasily --- hw/audio/pcspk.c | 7 +--

[Qemu-devel] [PULL 12/13] migration: code clean up

2016-06-17 Thread Amit Shah
From: Liang Li Use 'QemuMutex comp_done_lock' and 'QemuCond comp_done_cond' instead of 'QemuMutex *comp_done_lock' and 'QemuCond comp_done_cond'. To keep consistent with 'QemuMutex decomp_done_lock' and 'QemuCond comp_done_cond'. Signed-off-by: Liang Li

Re: [Qemu-devel] [Qemu-block] [PATCH v6 06/22] osdep: Introduce qemu_dup

2016-06-17 Thread Kevin Wolf
Am 17.06.2016 um 14:32 hat Kevin Wolf geschrieben: > Am 03.06.2016 um 10:49 hat Fam Zheng geschrieben: > > This takes care of both the CLOEXEC flag and fd-path mapping for image > > locking. > > > > Signed-off-by: Fam Zheng > > --- > > include/qemu/osdep.h | 3 +++ > >

[Qemu-devel] [PATCH 00/13] Make Q35 devices closer to Qemu object model.

2016-06-17 Thread Efimov Vasily
The patch series makes several devices closer to Qemu object model. I am developing a tool that automatize creation of device and machine models. Recently, I've take part in development of several models. And I noticed that a significant part of code is same. The examples are: - Each device

[Qemu-devel] [PULL 09/13] migration: protect the quit flag by lock

2016-06-17 Thread Amit Shah
From: Liang Li quit_comp_thread and quit_decomp_thread are accessed by several thread, it's better to protect them with locks. We use a per thread flag to replace the global one, and the new flag is protected by a lock. Signed-off-by: Liang Li

[Qemu-devel] [PULL 10/13] migration: refine the compression code

2016-06-17 Thread Amit Shah
From: Liang Li The current code for multi-thread compression is not clear, especially in the aspect of using lock. Refine the code to make it clear. Signed-off-by: Liang Li Message-Id: <1462433579-13691-8-git-send-email-liang.z...@intel.com>

Re: [Qemu-devel] [PATCH v6 08/22] raw-posix: Add image locking support

2016-06-17 Thread Kevin Wolf
Am 03.06.2016 um 10:49 hat Fam Zheng geschrieben: > virtlockd in libvirt locks the first byte, we lock byte 1 to avoid > the intervene. > > Both file and host device protocols are covered. > > The complication is with reopen. We have three different locking states, > namely "unlocked", "shared

[Qemu-devel] [PULL 05/13] migration: Fix a potential issue

2016-06-17 Thread Amit Shah
From: Liang Li At the end of live migration and before vm_start() on the destination side, we should make sure all the decompression tasks are finished, if this can not be guaranteed, the VM may get the incorrect memory data, or the updated memory may be overwritten by the

[Qemu-devel] [PULL 08/13] migration: refine ram_save_compressed_page

2016-06-17 Thread Amit Shah
From: Liang Li Use qemu_put_compression_data to do the compression directly instead of using do_compress_ram_page, avoid some data copy. very small improvement, at the same time, add code to check if the compression is successful. Signed-off-by: Liang Li

[Qemu-devel] [PULL 07/13] qemu-file: Fix qemu_put_compression_data flaw

2016-06-17 Thread Amit Shah
From: Liang Li Current qemu_put_compression_data can only work with no writable QEMUFile, and can't work with the writable QEMUFile. But it does not provide any measure to prevent users from using it with a writable QEMUFile. We should fix this flaw to make it works with

[Qemu-devel] [PULL 02/13] migration: Trace improvements

2016-06-17 Thread Amit Shah
From: "Dr. David Alan Gilbert" A couple of improvements to tracing that have come out of helping people with migration problems: * vmstate_n_elems trace the count/name - for when you have problems getting array counts right * vmstate_subsection_load_bad - add the

[Qemu-devel] [PULL 13/13] vmstate-static-checker: fix size mismatch detection in unused fields

2016-06-17 Thread Amit Shah
If a field changed from something to unused, the checker wasn't flagging if the field size mismatched. This was noticed in: http://thread.gmane.org/gmane.comp.emulators.qemu/419802 where the 4->1 size change along with field name change to 'unused' wasn't being flagged. Fix this.

[Qemu-devel] [PULL 06/13] migration: remove useless code

2016-06-17 Thread Amit Shah
From: Liang Li page_buffer is set twice repeatedly, remove the previous set. Signed-off-by: Liang Li Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Message-Id:

[Qemu-devel] [PULL 03/13] migration: fix inability to save VM after snapshot

2016-06-17 Thread Amit Shah
From: "Denis V. Lunev" The following sequence of operations fails: virsh start vm virsh snapshot-create vm virshh save vm --file file with the following error error: Failed to save domain vm to file error: internal error: unable to execute QEMU command

[Qemu-devel] [PULL 01/13] migration: Don't use *_to_cpup() and cpu_to_*w()

2016-06-17 Thread Amit Shah
From: Peter Maydell The *_to_cpup() and cpu_to_*w() functions just compose a pointer dereference with a byteswap. Instead use ld*_p() and st*_p(), which handle potential pointer misalignment and avoid the need to cast the pointer. Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 11/13] migration: refine the decompression code

2016-06-17 Thread Amit Shah
From: Liang Li The current code for multi-thread decompression is not clear, especially in the aspect of using lock. Refine the code to make it clear. Signed-off-by: Liang Li Message-Id: <1462433579-13691-9-git-send-email-liang.z...@intel.com>

[Qemu-devel] [PULL 04/13] migration: Fix multi-thread compression bug

2016-06-17 Thread Amit Shah
From: Liang Li Recently, a bug related to multiple thread compression feature for live migration is reported. The destination side will be blocked during live migration if there are heavy workload in host and memory intensive workload in guest, this is most likely to happen

[Qemu-devel] [PULL 00/13] migration: many fixes

2016-06-17 Thread Amit Shah
The following changes since commit 4acc8fdfd315f7ee474bea28fcbcc4dca9717d13: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.7-20160617' into staging (2016-06-17 12:36:27 +0100) are available in the git repository at: https://git.kernel.org/pub/scm/virt/qemu/amit/migration.git

Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 14:46, Eduardo Habkost wrote: >> > >> > The bits are reserved anyway, so we can do whatever we want with them. >> > In fact I think it's weird for the architecture to make them >> > must-be-zero, it might even make more sense to make them must-be-one... >> > It's a mask after all,

Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-17 Thread Artyom Tarasenko
On Fri, Jun 17, 2016 at 2:44 PM, Mark Cave-Ayland wrote: > On 17/06/16 12:36, Artyom Tarasenko wrote: > >> Hi Mark, >> >> On Fri, Jun 17, 2016 at 1:27 PM, Mark Cave-Ayland >> wrote: >>> On 17/06/16 07:07, David Gibson wrote: >>>

Re: [Qemu-devel] git master build failure

2016-06-17 Thread Peter Maydell
On 17 June 2016 at 13:41, Mark Cave-Ayland wrote: > Thank you looking into this. I know that some workarounds have been > applied for similar bugs in Peter's setup, but in general should I > assume that out-of-the-box Debian oldstable is now no longer supported > to

Re: [Qemu-devel] [PATCH v2] ppc / sparc: Add a tester for checking whether OpenBIOS runs successfully

2016-06-17 Thread Mark Cave-Ayland
On 17/06/16 12:36, Artyom Tarasenko wrote: > Hi Mark, > > On Fri, Jun 17, 2016 at 1:27 PM, Mark Cave-Ayland > wrote: >> On 17/06/16 07:07, David Gibson wrote: >> >>> On Wed, Jun 15, 2016 at 01:10:18PM +1000, David Gibson wrote: On Tue, Jun 14, 2016 at

Re: [Qemu-devel] Odp.: [PATCH 6/9] m25p80: Introduce quad and equad modes.

2016-06-17 Thread Cédric Le Goater
On 06/15/2016 07:40 PM, Krzeminski, Marcin (Nokia - PL/Wroclaw) wrote: > > > W dniu 15.06.2016 o 16:25, Cédric Le Goater pisze: >> On 06/15/2016 03:41 PM, marcin.krzemin...@nokia.com wrote: >>> From: Marcin Krzeminski >>> >>> Quad and Equad modes for Spansion and

Re: [Qemu-devel] [PATCH v2] scsi: esp: remove handling of SATN/STOP

2016-06-17 Thread Amit Shah
On (Fri) 17 Jun 2016 [11:55:48], Paolo Bonzini wrote: > The implementation of SATN/STOP is completely busted. The idea > would be that the next DMA read is for a SCSI message and after > that the adapter would transition to the command phase. > > The recent fix to SATN/STOP broke migration,

Re: [Qemu-devel] [PATCH 3/5] x86: fill high bits of mtrr mask

2016-06-17 Thread Eduardo Habkost
On Fri, Jun 17, 2016 at 09:47:27AM +0200, Paolo Bonzini wrote: > On 16/06/2016 22:14, Eduardo Habkost wrote: > > This is necessary only when phys_bits is higher on the > > destination, right? > > > > Should we really default this to true? I would like to enable > > this hack only when really

Re: [Qemu-devel] git master build failure

2016-06-17 Thread Mark Cave-Ayland
On 15/06/16 13:35, Laszlo Ersek wrote: > On 06/15/16 12:08, Mark Cave-Ayland wrote: >> On 15/06/16 10:48, Andrew Jones wrote: >> >>> On Wed, Jun 15, 2016 at 08:14:18AM +0100, Mark Cave-Ayland wrote: Hi Peter, Just to let you know that after pulling git master

Re: [Qemu-devel] [PATCH] Change net/socket.c to use socket_*() functions

2016-06-17 Thread Paolo Bonzini
Thanks, much better! Just one thing: On 16/06/2016 12:20, Ashijeet Acharya wrote: > +case SOCKET_ADDRESS_KIND_INET: > +buf = g_strdup(addr->u.inet.data->host); Please include the port too here. Also, if the host contains a colon (which you can check with strchr), please print it as

[Qemu-devel] [PATCH] nbd/client.c: Correct trace format string

2016-06-17 Thread Peter Maydell
The trace format string in nbd_send_request uses PRIu16 for request->type, but request->type is a uint32_t. This provokes compiler warnings on the OSX clang. Use PRIu32 instead. Signed-off-by: Peter Maydell --- I didn't catch this when I ran the merge build test for the

<    1   2   3   4   5   >