[Qemu-devel] [Bug 1580459] Re: Windows (10?) guest freezes entire host on shutdown if using PCI passthrough

2016-06-24 Thread Jimi
I enabled MSI interrupts, and now for 2 nights in a row I gamed 2 hours straight and shut down the Windows VM without a freeze. Never in my 7 months of living with this bug have I gotten no freeze twice in a row. I think the MSI interrupts have fixed it for me, and no, I did not remove my HDMI soun

Re: [Qemu-devel] [PATCH 0/1] vhost-user: Add a protocol extension for client responses to vhost commands.

2016-06-24 Thread Prerna Saxena
On 25/06/16 4:43 am, "Michael S. Tsirkin" wrote: >On Fri, Jun 24, 2016 at 05:39:31PM +, Prerna Saxena wrote: >> >> >> On 24/06/16 9:15 pm, "Felipe Franciosi" wrote: >> >> >We talked to MST on IRC a while back and he brainstormed the idea of doing >> >this per-message. >> >(I even re

Re: [Qemu-devel] [PATCH v8 11/12] vfio: register aer resume notification handler for aer resume

2016-06-24 Thread Zhou Jie
Hi Alex, We should never depend on the guest driver to behave in a certain way, but we need to prioritize what that actually means. vfio in the kernel has a responsibility first and foremost to the host kernel. User owned devices cannot be allowed to exploit or interfere with the host regardle

Re: [Qemu-devel] [PATCH 0/1] vhost-user: Add a protocol extension for client responses to vhost commands.

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 05:39:31PM +, Prerna Saxena wrote: > > > On 24/06/16 9:15 pm, "Felipe Franciosi" wrote: > > >We talked to MST on IRC a while back and he brainstormed the idea of doing > >this per-message. > >(I even recall proposing to call this feature REPLY_ALL and he suggested

Re: [Qemu-devel] Default for phys-addr-bits? (was Re: [PATCH 4/5] x86: Allow physical address bits to be set)

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 07:55:33AM +0200, Gerd Hoffmann wrote: > On Do, 2016-06-23 at 19:38 +0300, Michael S. Tsirkin wrote: > > On Thu, Jun 23, 2016 at 10:40:03AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > > Well the crash of guest phys bits > host phys bits, should be easy to > > > >

Re: [Qemu-devel] Qemu and heavily increased RSS usage

2016-06-24 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 11:57:45AM +0200, Peter Lieven wrote: > Am 21.06.2016 um 15:18 schrieb Dr. David Alan Gilbert: > > * Peter Lieven (p...@kamp.de) wrote: > > > Hi, > > > > > > while upgrading from Qemu 2.2.0 to Qemu 2.5.1.1 I noticed that the RSS > > > memory usage has heavily increased. >

Re: [Qemu-devel] [PATCH 1/1] vhost-user : Introduce a new feature VHOST_USER_PROTOCOL_F_REPLY_ACK. This feature, if negotiated, forces the remote vhost-user process to send a u64 reply containing a st

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 01:17:08AM -0700, Prerna Saxena wrote: > From: Prerna Saxena > > Signed-off-by: Prerna Saxena > --- > docs/specs/vhost-user.txt | 36 +++ > hw/virtio/vhost-user.c| 153 > +- > 2 files changed, 186 insertions(+), 3

Re: [Qemu-devel] [PATCH 0/1] vhost-user: Add a protocol extension for client responses to vhost commands.

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 01:17:07AM -0700, Prerna Saxena wrote: > From: Prerna Saxena > > The current vhost-user protocol requires the client to send responses to only > few commands. For the remaining commands, it is impossible for QEMU to know > the status of the requested operation -- ie, did

Re: [Qemu-devel] [PATCH 05/24] vhost: change some assert() for error_report() or silent fail

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 03:25:30PM +0200, Marc-André Lureau wrote: > On Thu, Jun 23, 2016 at 7:13 PM, Michael S. Tsirkin wrote: > >> > If it's ok and we can recover, then why should we print errors? > >> > >> To me, the current disconnect handling is not handled cleanly. There > >> is not much/not

Re: [Qemu-devel] [PATCH 00/24] vhost-user reconnect fixes

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 03:22:19PM +0200, Marc-André Lureau wrote: > Hi > > On Thu, Jun 23, 2016 at 6:31 AM, Michael S. Tsirkin wrote: > > > > OK so if it's ok for read or write to fail, then I think > > the callback should just return success. > > This will make sure backends such as vhost net i

Re: [Qemu-devel] [PATCH v2 3/3] socket: unlink unix socket on remove

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 02:08:52PM +0200, Marc-André Lureau wrote: > On Thu, Jun 23, 2016 at 7:01 PM, Michael S. Tsirkin wrote: > >> > Maybe what you want is a need_unlink feature. > >> > Set it for unix sockets only, that would make some sense. > >> > >> Oh perhaps what you mean is that if the fd

Re: [Qemu-devel] [PATCH v2 09/10] tests: acpi: add CPU hotplug testcase

2016-06-24 Thread Michael S. Tsirkin
On Fri, Jun 24, 2016 at 08:00:20AM +0200, Igor Mammedov wrote: > On Fri, 24 Jun 2016 08:53:25 +0300 > "Michael S. Tsirkin" wrote: > > > On Thu, Jun 23, 2016 at 03:47:36PM +0200, Igor Mammedov wrote: > > > On Thu, 23 Jun 2016 16:08:38 +0300 > > > Marcel Apfelbaum wrote: > > > > > > > On 06/16/20

Re: [Qemu-devel] [RFC PATCH 7/7] block/qdev: Allow configuring WCE with qdev properties

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > As cache.writeback is a BlockBackend property and as such more related > to the guest device than the BlockDriverState, we already removed it > from the blockdev-add interface. This patch adds the new way to set it, > as a qdev property of the correspondi

Re: [Qemu-devel] [RFC PATCH 6/7] block: Accept node-name for block-stream

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > In order to remove the necessity to use BlockBackend names in the > external API, we want to allow node-names everywhere. This is an example > conversion that accepts a node-name without lifting the restriction that > we're operating at a root node. Chang

Re: [Qemu-devel] [RFC PATCH 5/7] block: Accept device model name for blockdev-open/close-tray

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > This is an example conversion of a QMP command that operates on the > BlockBackend level to accept both the device model name (which is > supposed to become the primary interface) and the BlockBackend name. > > Naming suggestions for the new QMP field ar

[Qemu-devel] [PATCH] hw/ptimer: Don't wrap around counter for expired timer that uses tick handler

2016-06-24 Thread Dmitry Osipenko
Software should see timer counter wrap around only after IRQ being triggered. Change returned counter value to "1" for the expired timer and avoid returning wrapped around counter value in periodic mode for the timer that has bottom-half handler setup, assuming it is IRQ handler. This fixes regres

Re: [Qemu-devel] [RFC PATCH 4/7] qdev-monitor: Add blk_by_qdev_id()

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > This finds the BlockBackend attached to the device model identified by > its qdev ID. > > Signed-off-by: Kevin Wolf > --- > include/sysemu/block-backend.h | 1 + > qdev-monitor.c | 18 ++ > 2 files changed, 19 insertion

[Qemu-devel] [PATCH] target-ppc: gen_pause for instructions: yield, mdoio, mdoom, miso

2016-06-24 Thread Aaron Larson
Call gen_pause for all "or rx,rx,rx" encodings other nop. This provides a reasonable implementation for yield, and a better approximation for mdoio, mdoom, and miso. The choice to pause for all encodings !=0 leverages the PowerISA admonition that the reserved encodings might change program prior

Re: [Qemu-devel] [PATCH 0/1] vhost-user: Add a protocol extension for client responses to vhost commands.

2016-06-24 Thread Prerna Saxena
On 24/06/16 9:15 pm, "Felipe Franciosi" wrote: >We talked to MST on IRC a while back and he brainstormed the idea of doing >this per-message. >(I even recall proposing to call this feature REPLY_ALL and he suggested >REPLY_ANY due to that.) > >I agree with doing it per message, as the protoco

Re: [Qemu-devel] [PULL 17/28] hw/ptimer: Perform counter wrap around if timer already expired

2016-06-24 Thread Dmitry Osipenko
On 24.06.2016 21:37, Mark Cave-Ayland wrote: > On 24/06/16 19:19, Dmitry Osipenko wrote: > >> On 24.06.2016 19:02, Peter Maydell wrote: >>> On 24 June 2016 at 16:58, Mark Cave-Ayland >>> wrote: On 06/06/16 15:47, Peter Maydell wrote: > From: Dmitry Osipenko > > ptimer_get_c

Re: [Qemu-devel] [PATCH 2/3] VFIO driver for mediated PCI device

2016-06-24 Thread Alex Williamson
On Sat, 25 Jun 2016 00:04:27 +0530 Kirti Wankhede wrote: > Thanks Alex. > > > On 6/22/2016 4:18 AM, Alex Williamson wrote: > > On Mon, 20 Jun 2016 22:01:47 +0530 > > Kirti Wankhede wrote: > > > >> + > >> +static int get_mdev_region_info(struct mdev_device *mdev, > >> +

Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver

2016-06-24 Thread Alex Williamson
On Fri, 24 Jun 2016 23:24:58 +0530 Kirti Wankhede wrote: > Alex, > > Thanks for taking closer look. I'll incorporate all the nits you suggested. > > On 6/22/2016 3:00 AM, Alex Williamson wrote: > > On Mon, 20 Jun 2016 22:01:46 +0530 > > Kirti Wankhede wrote: > > > ... > >> + > >> +config MDE

[Qemu-devel] [PATCH] target-ppc: Eliminate redundant and incorrect function booke206_page_size_to_tlb

2016-06-24 Thread Aaron Larson
Eliminate redundant and incorrect booke206_page_size_to_tlb function from ppce500_spin.c in preference to previously existing but newly exported definition from e500.c Signed-off-by: Aaron Larson --- hw/ppc/e500.c | 2 +- hw/ppc/e500.h | 2 ++ hw/ppc/ppce500_spin.c | 7 +--

Re: [Qemu-devel] [PATCH 2/3] VFIO driver for mediated PCI device

2016-06-24 Thread Kirti Wankhede
Thanks Alex. On 6/22/2016 4:18 AM, Alex Williamson wrote: > On Mon, 20 Jun 2016 22:01:47 +0530 > Kirti Wankhede wrote: > >> + >> +static int get_mdev_region_info(struct mdev_device *mdev, >> +struct pci_region_info *vfio_region_info, >> +i

Re: [Qemu-devel] [PULL 17/28] hw/ptimer: Perform counter wrap around if timer already expired

2016-06-24 Thread Dmitry Osipenko
On 24.06.2016 19:02, Peter Maydell wrote: > On 24 June 2016 at 16:58, Mark Cave-Ayland > wrote: >> On 06/06/16 15:47, Peter Maydell wrote: >> >>> From: Dmitry Osipenko >>> >>> ptimer_get_count() might be called while QEMU timer already been expired. >>> In that case ptimer would return counter =

Re: [Qemu-devel] [PULL 17/28] hw/ptimer: Perform counter wrap around if timer already expired

2016-06-24 Thread Mark Cave-Ayland
On 24/06/16 19:19, Dmitry Osipenko wrote: On 24.06.2016 19:02, Peter Maydell wrote: On 24 June 2016 at 16:58, Mark Cave-Ayland wrote: On 06/06/16 15:47, Peter Maydell wrote: From: Dmitry Osipenko ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer

[Qemu-devel] [Bug 1588328] Re: Qemu 2.6 Solaris 9 Sparc Segmentation Fault

2016-06-24 Thread Mark Cave-Ayland
Artyom has located the regression and posted a patch here: https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg07226.html. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1588328 Title: Qemu 2.6

Re: [Qemu-devel] [PATCH 1/3] Mediated device Core driver

2016-06-24 Thread Kirti Wankhede
Alex, Thanks for taking closer look. I'll incorporate all the nits you suggested. On 6/22/2016 3:00 AM, Alex Williamson wrote: > On Mon, 20 Jun 2016 22:01:46 +0530 > Kirti Wankhede wrote: > ... >> + >> +config MDEV >> +tristate "Mediated device driver framework" >> +depends on VFIO >> +

Re: [Qemu-devel] [RFC PATCH 1/7] block/qdev: Allow node name for drive properties

2016-06-24 Thread Kevin Wolf
Am 24.06.2016 um 19:35 hat Eric Blake geschrieben: > On 06/23/2016 08:36 AM, Kevin Wolf wrote: > > If a node name instead of a BlockBackend name is specified as the driver > > for a guest device, an anonymous BlockBackend is created now. > > > > Signed-off-by: Kevin Wolf > > --- > > hw/core/qdev

Re: [Qemu-devel] [RFC PATCH 3/7] qdev-monitor: Factor out find_device_state()

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qdev-monitor.c | 16 > 1 file changed, 12 insertions(+), 4 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-301-3266 Libvirt virtualization library http://libvirt.org

[Qemu-devel] [PULL] qemu-sparc update

2016-06-24 Thread Mark Cave-Ayland
Hi Peter, This request just contains Artyom's fix for the Solaris 9 regression introduced by the previous register window changes. Please pull. ATB, Mark. The following changes since commit a01aef5d2f96c334d048f43f0d3573a1152b37ca: Merge remote-tracking branch 'remotes/mst/tags/for_upstrea

Re: [Qemu-devel] [RFC PATCH 2/7] block: Add blk_by_dev()

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > This finds a BlockBackend given the device model that is attached to it. > > Signed-off-by: Kevin Wolf > --- > block/block-backend.c | 19 +++ > include/sysemu/block-backend.h | 1 + > 2 files changed, 20 insertions(+) Revie

Re: [Qemu-devel] [RFC PATCH 1/7] block/qdev: Allow node name for drive properties

2016-06-24 Thread Eric Blake
On 06/23/2016 08:36 AM, Kevin Wolf wrote: > If a node name instead of a BlockBackend name is specified as the driver > for a guest device, an anonymous BlockBackend is created now. > > Signed-off-by: Kevin Wolf > --- > hw/core/qdev-properties-system.c | 18 +- > 1 file changed, 1

Re: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits

2016-06-24 Thread Peter Maydell
On 24 June 2016 at 18:22, Andrew Jones wrote: > On Fri, Jun 24, 2016 at 05:41:55PM +0100, Peter Maydell wrote: >> KVM AArch32 is 4 CPUs per cluster: >> http://lxr.free-electrons.com/source/arch/arm/kvm/coproc.c#L109 > > Hmm... yes, it should use coproc.c, but here's what I get when I > test > > qe

Re: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits

2016-06-24 Thread Andrew Jones
On Fri, Jun 24, 2016 at 05:41:55PM +0100, Peter Maydell wrote: > On 24 June 2016 at 17:15, Andrew Jones wrote: > > On Fri, Jun 24, 2016 at 06:03:21PM +0200, Andrew Jones wrote: > >> So we can either > >> a) play it safe and always use clusters of 4 for ARM guests, and > >>KVM will get "fixed"

[Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Mark Cave-Ayland
From: Artyom Tarasenko Signed-off-by: Artyom Tarasenko Reviewed-by: Richard Henderson Signed-off-by: Mark Cave-Ayland --- target-sparc/translate.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index afd46b8..0f4f

Re: [Qemu-devel] [PATCH 1/7] coccinelle: add a script to remove useless casts

2016-06-24 Thread Eric Blake
On 06/15/2016 10:14 AM, Laurent Vivier wrote: > Script from LKML. Link to a particular message? > > Signed-off-by: Laurent Vivier > --- > scripts/coccinelle/typecast.cocci | 7 +++ > 1 file changed, 7 insertions(+) > create mode 100644 scripts/coccinelle/typecast.cocci > > diff --git a/s

Re: [Qemu-devel] [RFC v3 10/19] tcg: cpus rm tcg_exec_all()

2016-06-24 Thread Sergey Fedorov
On 03/06/16 23:40, Alex Bennée wrote: > In preparation for multi-threaded TCG we remove tcg_exec_all and move > all the CPU cycling into the main thread function. When MTTCG is enabled > we shall use a separate thread function which only handles one vCPU. > > Signed-off-by: Alex Bennée Reviewed-b

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Mark Cave-Ayland
On 24/06/16 17:01, Artyom Tarasenko wrote: On Fri, Jun 24, 2016 at 5:51 PM, Mark Cave-Ayland wrote: On 24/06/16 13:34, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/t

Re: [Qemu-devel] [PATCH 2/2] target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests

2016-06-24 Thread Peter Maydell
On 24 June 2016 at 17:09, Laurent Desnogues wrote: > On Fri, Jun 24, 2016 at 5:49 PM, Peter Maydell > wrote: >> SYS_HEAPINFO is one of the few semihosting calls which has to write >> values back into a parameter block in memory. When we added >> support for 64-bit semihosting we updated the cod

Re: [Qemu-devel] [PATCH v2 05/18] target-i386: cpu: replace custom apic-id setter/getter with static property

2016-06-24 Thread Eric Blake
On 06/24/2016 10:05 AM, Igor Mammedov wrote: > custom apic-id setter/getter doesn't do any property specific > checks anymorer, so clean it up and use more compact static s/anymorer/anymore/ > property DEFINE_PROP_UINT32 instead. > > Signed-off-by: Igor Mammedov > --- > target-i386/cpu.c | 45

[Qemu-devel] [PATCH v2 16/18] target-i386: fix apic object leak when CPU is deleted

2016-06-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 04c0b79..2fa445d 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2765,6 +2765,7 @@ static void x86_cpu_apic_create(X86CPU *cpu, Error **err

[Qemu-devel] [PATCH v2 18/18] pc: make device_del CPU work for x86 CPUs

2016-06-24 Thread Igor Mammedov
ACPI subsystem already has all logic in place the only thing left to eject CPU is destroy it and ammend present CPUs counter in CMOS, do so. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c i

[Qemu-devel] [PATCH v2 15/18] target-i386: do not ignore error and fix apic parent

2016-06-24 Thread Igor Mammedov
object_property_add_child() silently fails with error that it can't create duplicate propery 'apic' as we already have 'apic' property registered for AIPC ID. As result generic device_realize puts apic as into unattached container. As it's programming error, abort on it and fix property name for a

[Qemu-devel] [PATCH v2 17/18] target-i386: add x86_cpu_unrealizefn()

2016-06-24 Thread Igor Mammedov
first remove VCPU from exec loop and only then remove lapic. Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c

Re: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits

2016-06-24 Thread Peter Maydell
On 24 June 2016 at 17:15, Andrew Jones wrote: > On Fri, Jun 24, 2016 at 06:03:21PM +0200, Andrew Jones wrote: >> So we can either >> a) play it safe and always use clusters of 4 for ARM guests, and >>KVM will get "fixed" when we start managing the guest's MPIDR >>from userspace, or >> b) u

[Qemu-devel] [PATCH v2 14/18] (kvm)apic: add unrealize callbacks

2016-06-24 Thread Igor Mammedov
callbacks will do necessary cleanups before APIC device is deleted Signed-off-by: Chen Fan Signed-off-by: Gu Zheng Signed-off-by: Zhu Guihua Signed-off-by: Igor Mammedov --- hw/i386/kvm/apic.c | 5 + hw/intc/apic.c | 10 ++ hw/intc/apic_common.c

[Qemu-devel] [PATCH v2 06/18] target-i386: add socket/core/thread properties to X86CPU

2016-06-24 Thread Igor Mammedov
these properties will be used by as address where to plug CPU with help -device/device_add commands. Signed-off-by: Igor Mammedov --- v2: - rename socket/core/thread properties to socket-id/core-id/thread-id - add mismatch checks for apic_id and socket-id/core-id/thread-id in case both ar

[Qemu-devel] [PATCH v2 13/18] apic: drop APICCommonState.idx and use APIC ID as index in local_apics[]

2016-06-24 Thread Igor Mammedov
local_apics[] is sized to contain all APIC ID supported in xAPIC mode, so use APIC ID as index in it instead of constantly increasing counter idx. Fixes error "apic initialization failed" when a CPU hotplugged and unplugged more times than there are free slots in local_apics[]. Signed-off-by: Igo

[Qemu-devel] [PATCH v2 10/18] pc: register created initial and hotpluged CPUs in one place pc_cpu_plug()

2016-06-24 Thread Igor Mammedov
consolidate possible_cpus array management in pc_cpu_plug() for smp_cpus, coldplugged with -device and hotplugged with device_add. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/p

[Qemu-devel] [PATCH v2 11/18] pc: cpu: allow device_add to be used with x86 cpu

2016-06-24 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 1ec40a0..ebf4140 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -3239,6 +3239,7 @@ static void x86_cpu_common_class_init(ObjectClass *oc,

[Qemu-devel] [PATCH v2 04/18] pc: cpu: consolidate apic-id validity checks in pc_cpu_pre_plug()

2016-06-24 Thread Igor Mammedov
Machine code knows about all possible APIC IDs so use that instead of hack which does O(n^2) complexity duplicate checks, interating over global CPUs list. As result duplicate check is done only once with O(log n) complexity. Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 44 ++

[Qemu-devel] [PATCH v2 09/18] pc: delay setting number of boot CPUs to machine_done time

2016-06-24 Thread Igor Mammedov
currently present CPUs counter in CMOS only contains smp_cpus (i.e. initial CPUs specified with -smp X) and doesn't account for CPUs created with -device. If VM is started with additional CPUs added with -device, it will hang in BIOS waiting for condition smp_cpus == counted_cpus forever as cou

[Qemu-devel] [PATCH v2 05/18] target-i386: cpu: replace custom apic-id setter/getter with static property

2016-06-24 Thread Igor Mammedov
custom apic-id setter/getter doesn't do any property specific checks anymorer, so clean it up and use more compact static property DEFINE_PROP_UINT32 instead. Signed-off-by: Igor Mammedov --- target-i386/cpu.c | 45 ++--- 1 file changed, 6 insertions(+), 3

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Mark Cave-Ayland
On 24/06/16 16:58, Richard Henderson wrote: On 06/24/2016 05:34 AM, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 5111cf0..0

Re: [Qemu-devel] [PATCH 2/2] target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests

2016-06-24 Thread Laurent Desnogues
On Fri, Jun 24, 2016 at 5:49 PM, Peter Maydell wrote: > SYS_HEAPINFO is one of the few semihosting calls which has to write > values back into a parameter block in memory. When we added > support for 64-bit semihosting we updated the code which reads from > the parameter block to read 64-bit word

[Qemu-devel] [PATCH v2 02/18] pc: add x86_topo_ids_from_apicid()

2016-06-24 Thread Igor Mammedov
it's reverse of apicid_from_topo_ids() and will be used in follow up patches to fill in data structures for query-hotpluggable-cpus and for user friendly error reporting Signed-off-by: Igor Mammedov --- include/hw/i386/topology.h | 15 +++ 1 file changed, 15 insertions(+) diff --git

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Artyom Tarasenko
On Fri, Jun 24, 2016 at 5:51 PM, Mark Cave-Ayland wrote: > On 24/06/16 13:34, Artyom Tarasenko wrote: > >> Signed-off-by: Artyom Tarasenko >> --- >> target-sparc/translate.c | 5 - >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/target-sparc/translate.c b/target-sparc/tr

[Qemu-devel] [Bug 1596009] [NEW] config/build problem due to libncursesw on Xenial

2016-06-24 Thread Alexander Stohr
Public bug reported: it happened to me during a build of yocto/bitbake related cross tools. the auto-configuration part titled "SDL probe" for qemu-2.2.0 i found the configuration step failing for the compile_prog routine. actually those test compile went fine but only the test linking failed. th

[Qemu-devel] [PATCH v2 08/18] pc: implement query-hotpluggable-cpus callback

2016-06-24 Thread Igor Mammedov
it returns a list of present/possible to hotplug CPU objects with a list of properties to use with device_add. in PC case returned list would looks like: -> { "execute": "query-hotpluggable-cpus" } <- {"return": [ { "type": "qemu64-x86_64-cpu", "vcpus-count": 1, "props": {"cor

Re: [Qemu-devel] [RFC v3 PATCH 13/14] aarch64: Generate fences for aarch64

2016-06-24 Thread Alex Bennée
Pranith Kumar writes: > Signed-off-by: Pranith Kumar > --- > target-arm/translate-a64.c | 18 +- > 1 file changed, 13 insertions(+), 5 deletions(-) > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > index ce8141a..fa24bf2 100644 > --- a/target-arm/transl

[Qemu-devel] [PATCH v2 12/18] apic: move MAX_APICS check to 'apic' class

2016-06-24 Thread Igor Mammedov
MAX_APICS is only used by child 'apic' class and not by its parent TYPE_APIC_COMMON or any other derived class. Move check into end user 'apic' class so it won't get in the way of other APIC implementations if they support more then MAX_APICS. Signed-off-by: Igor Mammedov --- hw/intc/apic.c

Re: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits

2016-06-24 Thread Andrew Jones
On Thu, Jun 23, 2016 at 12:15:59PM +0100, Peter Maydell wrote: > On 21 June 2016 at 19:58, Andrew Jones wrote: > > Signed-off-by: Andrew Jones > > I think this commit message could be improved...it's both > very short and a bit off the mark. > > > --- > > hw/arm/virt.c | 10 ++ > > 1 f

Re: [Qemu-devel] [PATCH 0/1] vhost-user: Add a protocol extension for client responses to vhost commands.

2016-06-24 Thread Felipe Franciosi
We talked to MST on IRC a while back and he brainstormed the idea of doing this per-message. (I even recall proposing to call this feature REPLY_ALL and he suggested REPLY_ANY due to that.) I agree with doing it per message, as the protocol itself should be flexible in that sense. (Even if qemu

Re: [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits

2016-06-24 Thread Andrew Jones
On Fri, Jun 24, 2016 at 06:03:21PM +0200, Andrew Jones wrote: > On Thu, Jun 23, 2016 at 12:15:59PM +0100, Peter Maydell wrote: > > On 21 June 2016 at 19:58, Andrew Jones wrote: > > > Signed-off-by: Andrew Jones > > > > I think this commit message could be improved...it's both > > very short and

[Qemu-devel] [PATCH v2 01/18] target-i386: cpu: use uint32_t for X86CPU.apic_id

2016-06-24 Thread Igor Mammedov
redo 9886e834 target-i386: Require APIC ID to be explicitly set before CPU realize in another way that doesn't use int64_t to detect if apic-id property was set. Use the fact that 0x is the broadcast value that a CPU can't have and set default uint32_t apic_id to it instead of using int64

Re: [Qemu-devel] [PULL 17/28] hw/ptimer: Perform counter wrap around if timer already expired

2016-06-24 Thread Peter Maydell
On 24 June 2016 at 16:58, Mark Cave-Ayland wrote: > On 06/06/16 15:47, Peter Maydell wrote: > >> From: Dmitry Osipenko >> >> ptimer_get_count() might be called while QEMU timer already been expired. >> In that case ptimer would return counter = 0, which might be undesirable >> in case of polled t

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Richard Henderson
On 06/24/2016 05:34 AM, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 5111cf0..065326c 100644 --- a/target-sparc/translate.c +

Re: [Qemu-devel] [RFC] target-arm: fix semihosting ram base issue

2016-06-24 Thread Tsung-Han Lin
2016-06-24 1:26 GMT+08:00 Peter Maydell : > On 17 June 2016 at 03:37, Tsung-Han Lin wrote: > > Hi, I made some changes to TRY TO fix the ARM semihosting issue in > > SYS_HEAPINFO handling. > > This problem has been bothering me for quite a while. > > > > A new global variable 'main_ram_base' is a

[Qemu-devel] [PATCH v2 00/18] pc: add CPU hot-add/hot-remove with device_add/device_del

2016-06-24 Thread Igor Mammedov
Changelog: since v1: * s/pc_find_cpu/pc_find_cpu_slot/ + add comment to it * add more sanity checks for socket-id/core-id/thread-id and 'apic' properties * include device_del cpu patches and related fixes to x86 CPU/apic Series enabling usage of -device/device_add for adding CP

[Qemu-devel] [PATCH v2 07/18] pc: set APIC ID based on socket/core/thread ids if it's not been set yet

2016-06-24 Thread Igor Mammedov
CPU added with device_add help won't have APIC ID set, so set it according to socket/core/thread ids provided with device_add command. Signed-off-by: Igor Mammedov --- v2: - add validity checks for socket-id/core-id/thread-id values --- hw/i386/pc.c | 44

Re: [Qemu-devel] [PULL 17/28] hw/ptimer: Perform counter wrap around if timer already expired

2016-06-24 Thread Mark Cave-Ayland
On 06/06/16 15:47, Peter Maydell wrote: From: Dmitry Osipenko ptimer_get_count() might be called while QEMU timer already been expired. In that case ptimer would return counter = 0, which might be undesirable in case of polled timer. Do counter wrap around for periodic timer to keep it distrib

Re: [Qemu-devel] [PATCH 1/2] linux-user: Make semihosting heap/stack fields abi_ulongs

2016-06-24 Thread Laurent Desnogues
On Fri, Jun 24, 2016 at 5:49 PM, Peter Maydell wrote: > The fields in the TaskState heap_base, heap_limit and stack_base > are all guest addresses (representing the locations of the heap > and stack for the guest binary), so they should be abi_ulong > rather than uint32_t. (This only in practice a

[Qemu-devel] [PATCH v2 03/18] pc: extract CPU lookup into a separate function

2016-06-24 Thread Igor Mammedov
it will be reused in the next patch at pre_plug time Signed-off-by: Igor Mammedov --- v2: - rename pc_find_cpu() into pc_find_cpu_slot() and add comment to it Eduardo Habkost --- hw/i386/pc.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 1/3] block: ignore flush requests when storage is clean

2016-06-24 Thread Evgeny Yakovlev
On 24.06.2016 18:31, Eric Blake wrote: On 06/24/2016 09:06 AM, Denis V. Lunev wrote: From: Evgeny Yakovlev Some guests (win2008 server for example) do a lot of unnecessary flushing when underlying media has not changed. This adds additional overhead on host when calling fsync/fdatasync. This

[Qemu-devel] [PATCH 2/2] target-arm/arm-semi.c: Fix SYS_HEAPINFO for 64-bit guests

2016-06-24 Thread Peter Maydell
SYS_HEAPINFO is one of the few semihosting calls which has to write values back into a parameter block in memory. When we added support for 64-bit semihosting we updated the code which reads from the parameter block to read 64-bit words but forgot to change the code that writes back into the block

[Qemu-devel] [PATCH v8 5/8] register: QOMify

2016-06-24 Thread Alistair Francis
From: Peter Crosthwaite QOMify registers as a child of TYPE_DEVICE. This allows registers to define GPIOs. Define an init helper that will do QOM initialisation. Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis Reviewed-by: KONRAD Frederic Reviewed-by: Peter Maydell --- V7:

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Mark Cave-Ayland
On 24/06/16 13:34, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 5111cf0..065326c 100644 --- a/target-sparc/translate.c +++ b

Re: [Qemu-devel] [PATCH] target-sparc: fix register corruption in ldstub if there is no write permission

2016-06-24 Thread Richard Henderson
On 06/24/2016 05:34 AM, Artyom Tarasenko wrote: Signed-off-by: Artyom Tarasenko --- target-sparc/translate.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

[Qemu-devel] [PATCH 0/2] target-arm: Fix SYS_HEAPINFO for 64-bit guests

2016-06-24 Thread Peter Maydell
These patches fix bugs in the ARM semihosting SYS_HEAPINFO syscall for 64-bit guests: * the fields in linux-user's TaskState should be abi_ulong, not uint32_t, since they're guest addresses * the SYS_HEAPINFO implementation needs to write its return data struct using fields of the right wid

[Qemu-devel] [PATCH v8 4/8] register: Define REG and FIELD macros

2016-06-24 Thread Alistair Francis
From: Peter Crosthwaite Define some macros that can be used for defining registers and fields. The REG32 macro will define A_FOO, for the byte address of a register as well as R_FOO for the uint32_t[] register number (A_FOO / 4). The FIELD macro will define FOO_BAR_MASK, FOO_BAR_SHIFT and FOO_B

Re: [Qemu-devel] [PATCH 08/11] drive-backup: added support for data compression

2016-06-24 Thread Pavel Butsykin
On 24.06.2016 18:39, Eric Blake wrote: On 06/23/2016 03:15 AM, Pavel Butsykin wrote: @@ -3309,6 +3315,7 @@ void qmp_drive_backup(const char *device, const char *target, bool has_mode, enum NewImageMode mode, bool has_speed, int64_t speed,

Re: [Qemu-devel] [RFC] target-arm: fix semihosting ram base issue

2016-06-24 Thread Peter Maydell
On 23 June 2016 at 18:26, Peter Maydell wrote: > I suggest you start by sending a patch which just fixes > the 64-bit case to write 64-bit values, since that's the > easy bit. I ran into this bug myself this afternoon, so I wrote some patches which fix this part and will send them out in a minute

[Qemu-devel] [PATCH v8 2/8] register: Add Register API

2016-06-24 Thread Alistair Francis
This API provides some encapsulation of registers and factors out some common functionality to common code. Bits of device state (usually MMIO registers) often have all sorts of access restrictions and semantics associated with them. This API allows you to define what those restrictions are on a bi

Re: [Qemu-devel] [RFC v3 07/19] translate-all: Add assert_memory_lock annotations

2016-06-24 Thread Sergey Fedorov
On 03/06/16 23:40, Alex Bennée wrote: > This adds calls to the assert_memory_lock for all public APIs which are > documented as holding the mmap_lock for user-mode. > > Signed-off-by: Alex Bennée > --- > linux-user/elfload.c | 4 > translate-all.c | 20 > 2 files c

[Qemu-devel] [PATCH 1/2] linux-user: Make semihosting heap/stack fields abi_ulongs

2016-06-24 Thread Peter Maydell
The fields in the TaskState heap_base, heap_limit and stack_base are all guest addresses (representing the locations of the heap and stack for the guest binary), so they should be abi_ulong rather than uint32_t. (This only in practice affects ARM AArch64 since all the other semihosting implementati

[Qemu-devel] [PATCH v8 8/8] xilinx_zynq: Connect devcfg to the Zynq machine model

2016-06-24 Thread Alistair Francis
From: Peter Crosthwaite Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis Reviewed-by: Peter Maydell --- V7: - Remove unused property add V4: - Small corrections to the device model logic hw/arm/xilinx_zynq.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/arm/x

[Qemu-devel] [PATCH v8 3/8] register: Add Memory API glue

2016-06-24 Thread Alistair Francis
Add memory io handlers that glue the register API to the memory API. Just translation functions at this stage. Although it does allow for devices to be created without all-in-one mmio r/w handlers. This patch also adds the RegisterInfoArray struct, which allows all of the individual RegisterInfo s

[Qemu-devel] [PATCH v8 0/8] data-driven device registers

2016-06-24 Thread Alistair Francis
This patch series is based on Peter C's original register API. His original cover letter is below. Future work: Allow support for memory attributes. V8: - Remove GPIO infrastructure from patch set V7: - Rebase - Fixup the DecCFG model - Fixes and corrections to the register API model and func

[Qemu-devel] [PATCH v8 7/8] dma: Add Xilinx Zynq devcfg device model

2016-06-24 Thread Alistair Francis
Add a minimal model for the devcfg device which is part of Zynq. This model supports DMA capabilities and interrupt generation. Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis --- V7: - Corrections to the internal device V5: - Corrections to the device model logic default-co

[Qemu-devel] [PATCH v8 6/8] register: Add block initialise helper

2016-06-24 Thread Alistair Francis
From: Peter Crosthwaite Add a helper that will scan a static RegisterAccessInfo Array and populate a container MemoryRegion with registers as defined. Signed-off-by: Peter Crosthwaite Signed-off-by: Alistair Francis --- The reason that I'm not using GArray is because the array needs to store t

Re: [Qemu-devel] [PATCH 07/11] block: optimization blk_pwrite_compressed()

2016-06-24 Thread Eric Blake
On 05/31/2016 03:15 AM, Denis V. Lunev wrote: > From: Pavel Butsykin > > For bdrv_pwrite_compressed() it looks like most of the code creating coroutine > is duplicated in blk_prw(). So we can just add a > flag(BDRV_REQ_WRITE_COMPRESSED) > and use the blk_prw() as a generic one. > > Signed-off-b

[Qemu-devel] [PATCH v8 1/8] bitops: Add MAKE_64BIT_MASK macro

2016-06-24 Thread Alistair Francis
Add a macro that creates a 64bit value which has length number of ones shifted across by the value of shift. Signed-off-by: Alistair Francis Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell --- V7: - Fixup commit typo - Use the method from deposit64() V5: - Re-write to a 64-bit mask inste

Re: [Qemu-devel] [PATCH 08/11] drive-backup: added support for data compression

2016-06-24 Thread Eric Blake
On 06/23/2016 03:15 AM, Pavel Butsykin wrote: >>> @@ -3309,6 +3315,7 @@ void qmp_drive_backup(const char *device, const >>> char *target, >>> bool has_mode, enum NewImageMode mode, >>> bool has_speed, int64_t speed, >>> bool h

Re: [Qemu-devel] [RFC v3 06/19] tcg: comment on which functions have to be called with tb_lock held

2016-06-24 Thread Sergey Fedorov
On 03/06/16 23:40, Alex Bennée wrote: > diff --git a/translate-all.c b/translate-all.c > index e3f44d9..8b162ff 100644 > --- a/translate-all.c > +++ b/translate-all.c (snip) > @@ -347,8 +349,10 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr) > cpu_restore_state_from_tb(cpu, tb,

Re: [Qemu-devel] [PATCH 09/17] block: Move bdrv_commit() to block/commit.c

2016-06-24 Thread Eric Blake
On 06/21/2016 03:21 AM, Kevin Wolf wrote: > No code changes, just moved from one file to another. > > Signed-off-by: Kevin Wolf > --- > block.c | 110 --- > block/Makefile.objs | 3 +- > block/commit.c | 111 > ++

[Qemu-devel] [RFC v2] virtio-blk: simple multithreaded MQ implementation for bdrv_raw

2016-06-24 Thread Roman Pen
v2: * Rebased onto latest v4 Stefan's series: [PATCH v4 0/7] virtio-blk: multiqueue support Hello, all. This is RFC because mostly this patch is a quick attempt to get true multithreaded multiqueue support for a block device with native AIO. The goal is to squeeze everything possible on loc

Re: [Qemu-devel] [PATCH 1/3] block: ignore flush requests when storage is clean

2016-06-24 Thread Eric Blake
On 06/24/2016 09:06 AM, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > Some guests (win2008 server for example) do a lot of unnecessary > flushing when underlying media has not changed. This adds additional > overhead on host when calling fsync/fdatasync. > > This change introduces a dirty fl

Re: [Qemu-devel] [RFC v3 05/19] exec: add assert_debug_safe and notes on debug structures

2016-06-24 Thread Sergey Fedorov
On 03/06/16 23:40, Alex Bennée wrote: > diff --git a/exec.c b/exec.c > index a3a93ae..b225282 100644 > --- a/exec.c > +++ b/exec.c > @@ -25,6 +25,7 @@ > #include "qemu/cutils.h" > #include "cpu.h" > #include "exec/exec-all.h" > +#include "qom/cpu.h" > #include "tcg.h" > #include "hw/qdev-core.

Re: [Qemu-devel] [PATCH 0/3] block: ignore flush requests when storage is clean

2016-06-24 Thread Eric Blake
On 06/24/2016 09:06 AM, Denis V. Lunev wrote: > Changes from v2: > - Better comments > - Rebased on latest master Remember, 'git send-email -v3' will automatically put v3 in all your subject lines, making it easier to see that this is an updated series. Rebasing on Kevin's block branch may be mor

  1   2   3   4   >