Re: [Qemu-devel] [RFC 2/4] hw/intc/arm_gicv3_kvm: Rename KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS

2017-01-26 Thread Auger Eric
Hi Vijaya, On 27/01/2017 08:02, Vijay Kilari wrote: > Hi Eric, > > On Thu, Jan 26, 2017 at 2:49 PM, Eric Auger wrote: >> Rename KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS into KVM_DEV_ARM_VGIC_CPU_SYSREGS >> as exposed in the kernel user API and pulled by update-linux-headers.sh. >

Re: [Qemu-devel] [PATCH 1/2] qapi2texi: change texi formatters

2017-01-26 Thread Markus Armbruster
I don't like "change FOO" subject lines. What about; qapi: Simplify qapi2texi.py a bit This way, it's obvious that the commit isn't supposed to change behavior. Can touch up on commit. Marc-André Lureau writes: > STRUCT_FMT is generic enough, rename it to

Re: [Qemu-devel] [RFC 3/4] hw/intc/arm_gicv3_its: Implement state save/restore

2017-01-26 Thread Auger Eric
Hi Vijaya, On 27/01/2017 08:17, Vijay Kilari wrote: > Hi Eric, > > On Thu, Jan 26, 2017 at 2:49 PM, Eric Auger wrote: >> We need to handle both registers and ITS tables. While >> register handling is standard, ITS table handling is more >> challenging since the kernel API

[Qemu-devel] [PULL 1/3] build-sys: Minor qapi doc generation target cleanups

2017-01-26 Thread Markus Armbruster
Move makeinfo flags from MAKEINFO to MAKEINFOFLAGS. Fix the call of quiet-command for target qemu-ga-qapi.texi. Both messed up in commit 56e8bdd. Cc: Marc-André Lureau Signed-off-by: Markus Armbruster Message-Id:

[Qemu-devel] [PULL 2/3] qapi: Remove unwanted commas after #optional keyword

2017-01-26 Thread Markus Armbruster
From: Stefan Weil We don't want that commas to be part of the generated documentation, so remove them. Signed-off-by: Stefan Weil Message-Id: <20170122145407.27476-1...@weilnetz.de> Reviewed-by: Markus Armbruster Signed-off-by: Markus

[Qemu-devel] [PULL 3/3] qmp: Fix argument name in error message of device-list-properties

2017-01-26 Thread Markus Armbruster
From: Lin Ma The argument is called "typename", not "name". [Thanks to Markus for correcting the commit message] Signed-off-by: Lin Ma Message-Id: <20170125052703.23571-1-...@suse.com> Reviewed-by: Markus Armbruster Signed-off-by: Markus

[Qemu-devel] [PULL 0/3] QAPI/QMP patches for 2017-01-27

2017-01-26 Thread Markus Armbruster
The following changes since commit c7f1cf01b8245762ca5864e835d84f6677ae8b1f: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2017-01-25 17:54:14 +) are available in the git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2017-01-27 for you

Re: [Qemu-devel] [RFC 3/4] hw/intc/arm_gicv3_its: Implement state save/restore

2017-01-26 Thread Vijay Kilari
Hi Eric, On Thu, Jan 26, 2017 at 2:49 PM, Eric Auger wrote: > We need to handle both registers and ITS tables. While > register handling is standard, ITS table handling is more > challenging since the kernel API is devised so that the > tables are flushed into guest RAM

Re: [Qemu-devel] [RFC 2/4] hw/intc/arm_gicv3_kvm: Rename KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS

2017-01-26 Thread Vijay Kilari
Hi Eric, On Thu, Jan 26, 2017 at 2:49 PM, Eric Auger wrote: > Rename KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS into KVM_DEV_ARM_VGIC_CPU_SYSREGS > as exposed in the kernel user API and pulled by update-linux-headers.sh. I will fix it in my next qemu patch series. I have updated

Re: [Qemu-devel] [PATCH v2 1/8] hw: Default -drive to if=ide explicitly where it works

2017-01-26 Thread Markus Armbruster
Thomas Huth writes: > On 26.01.2017 16:09, Markus Armbruster wrote: >> Block backends defined with -drive if=ide are meant to be picked up by >> machine initialization code: a suitable frontend gets created and >> wired up automatically. >> >> if=ide drives not picked up that

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Markus Armbruster
Peter Maydell writes: > On 26 January 2017 at 17:52, Paolo Bonzini wrote: >> - HTML is mostly a destination format. With the listed formats it is >> possible to produce a variety of outputs (mostly HTML itself and PDF; >> secondarily text or ePub

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 15:32, Pavel Dovgalyuk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 26/01/2017 14:37, Pavel Dovgalyuk wrote: > Simpler: > > use_icount && > ((int32_t)cpu->icount_decr.u32 < 0 || >

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Laszlo Ersek
On 01/26/17 19:59, Michael S. Tsirkin wrote: > On Thu, Jan 26, 2017 at 07:25:22PM +0100, Laszlo Ersek wrote: >> On 01/26/17 19:15, Michael S. Tsirkin wrote: >>> On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: On 01/26/17 16:20, Michael S. Tsirkin wrote: > On Thu, Jan 26,

[Qemu-devel] [PATCH 1/1] update-linux-headers: change SRCARCH to ARCH

2017-01-26 Thread Sam Bobroff
Currently, update-linux-headers.sh will crash when run with a clean checkout of a recent version of the linux kernel source (e.g. 4.10-rc1): scripts/Makefile.headersinst:62: *** Missing generated UAPI file ./arch/arm/include/generated/uapi/asm/unistd-common.h. Stop. This seems to be due to the

[Qemu-devel] char: Logging serial pty output when disconnected

2017-01-26 Thread Ed Swierk
Interactive access to a guest serial console can be enabled by hooking the serial device to a pty backend, e.g. -device isa-serial,chardev=cs0 -chardev pty,id=cs0. With libvirt this can be configured via . Output from the same serial device can also be logged to a file by adding logfile=/somefile

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-26 Thread Peter Maydell
On 26 January 2017 at 05:50, Thomas Huth wrote: > I think there is no real use case yet. But this fix is 1) simpler than > doing an error_report() + exit() here, and 2) maybe the vision of > constructing machines on the fly with QEMU will eventually come true one > day in the

Re: [Qemu-devel] [PATCH] cocoa: stop using MOUSE_EVENT_*

2017-01-26 Thread Peter Maydell
On 17 January 2017 at 15:20, Gerd Hoffmann wrote: > On Di, 2017-01-17 at 10:44 +, Peter Maydell wrote: >> On 17 January 2017 at 08:20, Gerd Hoffmann wrote: >> > On Mo, 2017-01-16 at 18:35 +, Peter Maydell wrote: >> >> On 11 January 2017 at 10:58,

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Fix crash when running without CPU

2017-01-26 Thread Alistair Francis
On Thu, Jan 26, 2017 at 12:38 AM, Laurent Vivier wrote: > Le 26/01/2017 à 06:50, Thomas Huth a écrit : >> On 26.01.2017 00:26, Alistair Francis wrote: >>> On Wed, Jan 25, 2017 at 12:52 PM, Laurent Vivier wrote: Le 25/01/2017 à 21:45, Thomas Huth a écrit

Re: [Qemu-devel] [PATCH] target-openrisc: Fix exception handling status registers

2017-01-26 Thread Stafford Horne
On Thu, Jan 26, 2017 at 09:26:55AM -0800, Richard Henderson wrote: > On 01/26/2017 05:12 AM, Stafford Horne wrote: > > I just sent you a mail with a link to my kernel for download. > > > > One thing I noticed is you passed '-append console=ttyS0' I think that > > does nothing on openrisc since as

[Qemu-devel] [Bug 1258626] Re: Curses Keyboard Broken On OS X

2017-01-26 Thread Thomas Huth
Does the problem still occur with the latest version of QEMU (currently v2.8)? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1258626 Title:

[Qemu-devel] [Bug 1256548] Re: qemu windows guest issues

2017-01-26 Thread Thomas Huth
Which exact version of QEMU did you use? Does this problem still occur with the latest version of QEMU? ** Changed in: qemu Status: New => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [Xen-devel] Commit 3a6c9 breaks QEMU on FreeBSD/Xen

2017-01-26 Thread Peter Maydell
On 26 January 2017 at 20:47, Peter Maydell wrote: > On 26 January 2017 at 19:36, Stefano Stabellini > wrote: >> It should be just a matter of replacing qdev_init_nofail with something >> that can fail. I couldn't find a regular qdev_init that

Re: [Qemu-devel] [Xen-devel] Commit 3a6c9 breaks QEMU on FreeBSD/Xen

2017-01-26 Thread Peter Maydell
On 26 January 2017 at 19:36, Stefano Stabellini wrote: > It should be just a matter of replacing qdev_init_nofail with something > that can fail. I couldn't find a regular qdev_init that can return > error, so maybe we would need to add it. That's just

[Qemu-devel] [PATCH] spapr: clock should count only if vm is running

2017-01-26 Thread Laurent Vivier
This is a port to ppc of the i386 commit: 00f4d64 kvmclock: clock should count only if vm is running We remove timebase_/pre_save/post_load/ functions, and use the VM state change handler to save and restore the guest_timebase (on stop and continue). Time base offset has originally been

Re: [Qemu-devel] QEMU websockets support is laggy?

2017-01-26 Thread Dr. David Alan Gilbert
* Brian Rak (b...@gameservers.com) wrote: > We've been considering switching over to using qemu's built in websockets > support (to avoid the overhead of needing websockify running). We've been > seeing very poor performance after the switch (it takes the console 4-5 > seconds to update after

Re: [Qemu-devel] [PATCH v2 1/8] hw: Default -drive to if=ide explicitly where it works

2017-01-26 Thread Thomas Huth
On 26.01.2017 16:09, Markus Armbruster wrote: > Block backends defined with -drive if=ide are meant to be picked up by > machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=ide drives not picked up that way can still be used with -device as > if they

Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none"

2017-01-26 Thread Dr. David Alan Gilbert
* Ashijeet Acharya (ashijeetacha...@gmail.com) wrote: > Migration of a "none" machine with no RAM crashes abruptly as > bitmap_new() fails and thus aborts. Instead, place a check for > last_ram_offset() being '0' at the start of ram_save_setup() and > error out with a meaningful error message. >

Re: [Qemu-devel] [Xen-devel] Commit 3a6c9 breaks QEMU on FreeBSD/Xen

2017-01-26 Thread Stefano Stabellini
On Thu, 26 Jan 2017, Roger Pau Monné wrote: > On Wed, Jan 25, 2017 at 11:05:29AM +, Roger Pau Monné wrote: > > On Tue, Jan 24, 2017 at 01:30:02PM -0800, Stefano Stabellini wrote: > > > On Tue, 24 Jan 2017, Stefano Stabellini wrote: > > > > On Tue, 24 Jan 2017, Roger Pau Monné wrote: > > > > >

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Michael S. Tsirkin
On Thu, Jan 26, 2017 at 07:25:22PM +0100, Laszlo Ersek wrote: > On 01/26/17 19:15, Michael S. Tsirkin wrote: > > On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: > >> On 01/26/17 16:20, Michael S. Tsirkin wrote: > >>> On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: > >>

Re: [Qemu-devel] [PATCH v2 2/2] trace: clean up trace-events files

2017-01-26 Thread Eric Blake
On 01/26/2017 11:16 AM, Stefan Hajnoczi wrote: > There are a number of unused trace events that > scripts/cleanup-trace-events.pl finds. The "hw/vfio/pci-quirks.c" > filename was typoed and "qapi/qapi-visit-core.c" was missing the qapi/ > directory prefix. > > Signed-off-by: Stefan Hajnoczi

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Laszlo Ersek
On 01/26/17 19:15, Michael S. Tsirkin wrote: > On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: >> On 01/26/17 16:20, Michael S. Tsirkin wrote: >>> On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: >> But, again, I'd like to keep COMMAND_ALLOCATE_RETURN_ADDR 8-byte

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Michael S. Tsirkin
On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: > On 01/26/17 16:20, Michael S. Tsirkin wrote: > > On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: > > >> But, again, I'd like to keep COMMAND_ALLOCATE_RETURN_ADDR 8-byte wide. > > > > > > What is

Re: [Qemu-devel] [PATCH v2 5/8] hw/arm/highbank: Default -drive to if=ide instead of if=scsi

2017-01-26 Thread Thomas Huth
On 26.01.2017 16:09, Markus Armbruster wrote: > These machines have no onboard SCSI HBA, and no way to plug one. > -drive if=scsi therefore cannot work. They do have an onboard IDE > controller (sysbus-ahci), but fail to honor if=ide. > > Change their default to if=ide, and add a TODO comment on

Re: [Qemu-devel] [PATCH v2 4/8] hw: Default -drive to if=none instead of scsi when scsi cannot work

2017-01-26 Thread Thomas Huth
On 26.01.2017 16:09, Markus Armbruster wrote: > Block backends defined with -drive if=scsi are meant to be picked up > by machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=scsi drives not picked up that way can still be used with -device > as if

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Cornelia Huck
On Thu, 26 Jan 2017 18:30:46 +0100 Paolo Bonzini wrote: > On 26/01/2017 18:28, G 3 wrote: > > > > On Jan 26, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: > > > >> > >> Hi all, > >> > >> as you may know I've been collecting some ideas about documentation for > >>

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Peter Maydell
On 26 January 2017 at 17:52, Paolo Bonzini wrote: > - HTML is mostly a destination format. With the listed formats it is > possible to produce a variety of outputs (mostly HTML itself and PDF; > secondarily text or ePub or others). It's an interesting question to ask what

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 18:40, G 3 wrote: > > On Jan 26, 2017, at 12:30 PM, Paolo Bonzini wrote: > >> >> >> On 26/01/2017 18:28, G 3 wrote: >>> >>> On Jan 26, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: >>> Hi all, as you may know I've been collecting some ideas about

Re: [Qemu-devel] [PATCH v2 1/2] qapi: add missing trace_visit_type_enum() call

2017-01-26 Thread Eric Blake
On 01/26/2017 11:16 AM, Stefan Hajnoczi wrote: > A trace event exists for enums but it's never called. This patch fixes > this oversight so that enums are traced just like the other QAPI types. > > Suggested-by: Daniel P. Berrange > Signed-off-by: Stefan Hajnoczi

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

2017-01-26 Thread P J P
Hello Jason, +-- On Mon, 26 Sep 2016, P J P wrote --+ | +-- On Fri, 23 Sep 2016, Jason Wang wrote --+ | | Actually the patch does not apply cleanly. Please fix and repost. | | The 'net: imx:...' patch is for v2.6 series. I missed to indicate that in | Patch v2. Could you please try it with

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Laszlo Ersek
On 01/26/17 16:20, Michael S. Tsirkin wrote: > On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: >> But, again, I'd like to keep COMMAND_ALLOCATE_RETURN_ADDR 8-byte wide. > > > What is COMMAND_ALLOCATE_RETURN_ADDR? I'm only familiar with > COMMAND_ALLOCATE. It's a new command being

[Qemu-devel] [PATCH v2 2/2] aspeed: add a watchdog controller

2017-01-26 Thread Cédric Le Goater
This enables reboot of a guest from U-Boot and Linux. Signed-off-by: Cédric Le Goater Reviewed-by: Joel Stanley --- hw/arm/aspeed_soc.c | 13 + include/hw/arm/aspeed_soc.h | 2 ++ 2 files changed, 15 insertions(+) diff --git

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread G 3
On Jan 26, 2017, at 12:30 PM, Paolo Bonzini wrote: On 26/01/2017 18:28, G 3 wrote: On Jan 26, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: Hi all, as you may know I've been collecting some ideas about documentation for QEMU at

[Qemu-devel] [PATCH v2 0/2] Aspeed watchdog controller model

2017-01-26 Thread Cédric Le Goater
Hello, The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters. This patchset provides a model for this controller and adds the first watchdog to the Aspeed SoC model. A second watchdog exists and is used on real HW to boot from a second flash module containing a golden

[Qemu-devel] [PATCH v2 1/2] wdt: Add Aspeed watchdog device model

2017-01-26 Thread Cédric Le Goater
The Aspeed SoC includes a set of watchdog timers using 32-bit decrement counters, which can be based either on the APB clock or a 1 MHz clock. The watchdog timer is designed to prevent system deadlock and, in general, it should be restarted before timeout. When a timeout occurs, different types

Re: [Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 18:28, G 3 wrote: > > On Jan 26, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: > >> >> Hi all, >> >> as you may know I've been collecting some ideas about documentation for >> QEMU at http://wiki.qemu-project.org/Features/Documentation. >> >> I've now prepared a poll to

[Qemu-devel] Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread G 3
On Jan 26, 2017, at 12:00 PM, qemu-devel-requ...@nongnu.org wrote: Hi all, as you may know I've been collecting some ideas about documentation for QEMU at http://wiki.qemu-project.org/Features/Documentation. I've now prepared a poll to understand how familiars developers are with

Re: [Qemu-devel] [PATCH] target-openrisc: Fix exception handling status registers

2017-01-26 Thread Richard Henderson
On 01/26/2017 05:12 AM, Stafford Horne wrote: I just sent you a mail with a link to my kernel for download. One thing I noticed is you passed '-append console=ttyS0' I think that does nothing on openrisc since as far as I know openrisc only gets boot params from the device tree file. I tried

Re: [Qemu-devel] [PATCH 3/8] virtio: use address_space_map/unmap to access descriptors

2017-01-26 Thread Stefan Hajnoczi
On Wed, Jan 25, 2017 at 03:04:43PM +0100, Paolo Bonzini wrote: > > > On 25/01/2017 14:22, Stefan Hajnoczi wrote: > > On Tue, Jan 24, 2017 at 07:04:15PM +0100, Paolo Bonzini wrote: > >> @@ -689,18 +714,34 @@ void *virtqueue_pop(VirtQueue *vq, size_t sz) > >> } > >> > >> i = head; > >>

[Qemu-devel] [PATCH v2 2/2] trace: clean up trace-events files

2017-01-26 Thread Stefan Hajnoczi
There are a number of unused trace events that scripts/cleanup-trace-events.pl finds. The "hw/vfio/pci-quirks.c" filename was typoed and "qapi/qapi-visit-core.c" was missing the qapi/ directory prefix. Signed-off-by: Stefan Hajnoczi --- block/trace-events | 2 --

Re: [Qemu-devel] [PULL 21/26] target-hppa: Implement branches

2017-01-26 Thread Richard Henderson
On 01/26/2017 04:14 AM, Paolo Bonzini wrote: I haven't studied the code much, so I'm just reporting what Coverity says. Not sure if the code has a bug or can just be simplified. It looks like it can be simplified. I'm sure at one point in the development, "which" was not a constant like

[Qemu-devel] [PATCH v2 1/2] qapi: add missing trace_visit_type_enum() call

2017-01-26 Thread Stefan Hajnoczi
A trace event exists for enums but it's never called. This patch fixes this oversight so that enums are traced just like the other QAPI types. Suggested-by: Daniel P. Berrange Signed-off-by: Stefan Hajnoczi --- qapi/qapi-visit-core.c | 1 + 1 file

[Qemu-devel] [PATCH v2 0/2] trace: clean up trace-events files

2017-01-26 Thread Stefan Hajnoczi
I noticed that some trace-events files are out of date. This series fixes them. Stefan Hajnoczi (2): qapi: add missing trace_visit_type_enum() call trace: clean up trace-events files qapi/qapi-visit-core.c | 1 + block/trace-events | 2 -- hw/block/trace-events | 1 -

Re: [Qemu-devel] [PATCH] trace: clean up trace-events files

2017-01-26 Thread Stefan Hajnoczi
On Wed, Jan 25, 2017 at 02:20:22PM +, Daniel P. Berrange wrote: > On Wed, Jan 25, 2017 at 02:14:26PM +, Stefan Hajnoczi wrote: > > There are a number of unused trace events that > > scripts/cleanup-trace-events.pl finds. The "hw/vfio/pci-quirks.c" > > filename was typoed and

[Qemu-devel] Poll on QEMU documentation project

2017-01-26 Thread Paolo Bonzini
Hi all, as you may know I've been collecting some ideas about documentation for QEMU at http://wiki.qemu-project.org/Features/Documentation. I've now prepared a poll to understand how familiars developers are with various documentation tools. I've CCed people with most commits to QEMU

[Qemu-devel] [PULL v2 18/18] hw/pci: disable pci-bridge's shpc by default

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The shpc component is optional while ACPI hotplug is used for hot-plugging PCI devices into a PCI-PCI bridge. Disabling the shpc by default will make slot 0 usable at boot time and not only for hot-plug, without loosing any functionality. Older machines

[Qemu-devel] [PULL v2 17/18] vhost-user: delete chardev on cleanup

2017-01-26 Thread Michael S. Tsirkin
From: Marc-André Lureau Remove the chardev implicitly when cleaning up the netdev. This prevents from reusing the chardev since it would be in an incorrect state with the slave. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1256618 Signed-off-by: Marc-André

[Qemu-devel] [PULL v2 09/18] hw/ioh3420: derive from PCI Express Root Port base class

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Preserve only Intel specific details. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/ioh3420.c | 121

[Qemu-devel] [PULL v2 07/18] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc()

2017-01-26 Thread Michael S. Tsirkin
From: Jason Wang We don't use 1ULL which is wrong during size calculation. Fix it, and while at it, switch to use cto64() and adds a comments to make it simpler and easier to be understood. Reported-by: Paolo Bonzini Cc: Paolo Bonzini

[Qemu-devel] [PULL v2 14/18] pci: Convert msix_init() to Error and fix callers

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin msix_init() reports errors with error_report(), which is wrong when it's used in realize(). The same issue was fixed for msi_init() in commit 1108b2f. In order to make the API change as small as possible, leave the return value check to later patch. For

[Qemu-devel] [PULL v2 04/18] compiler: expression version of QEMU_BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
QEMU_BUILD_BUG_ON uses a typedef in order to be safe to use outside functions, but sometimes it's useful to have a version that can be used within an expression. Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO that return zero after checking condition at build time. Signed-off-by:

[Qemu-devel] [PULL v2 15/18] virtio: make virtio_should_notify static

2017-01-26 Thread Michael S. Tsirkin
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 1 -

[Qemu-devel] [PULL v2 03/18] compiler: rework BUG_ON using a struct

2017-01-26 Thread Michael S. Tsirkin
There are theoretical concerns that some compilers might not trigger build failures on attempts to define an array of size (x ? -1 : 1) where x is a variable and make it a variable sized array instead. Let rewrite using a struct with a negative bit field size instead as there are no dynamic bit

Re: [Qemu-devel] [PATCH] net: e1000e: fix dead code in e1000e_write_packet_to_guest

2017-01-26 Thread Dmitry Fleytman
Good catch! Reviewed-by: Dmitry Fleytman > On 26 Jan 2017, at 12:10 PM, Paolo Bonzini wrote: > > Because is_first is declared inside a loop, it is always true. The store > is dead, and so is the "else" branch of "if (is_first)". is_last is > okay

[Qemu-devel] [PULL v2 13/18] hcd-xhci: check & correct param before using it

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when

[Qemu-devel] [PULL v2 16/18] vhost: skip ROM sections

2017-01-26 Thread Michael S. Tsirkin
vhost does not support RO protections on memory at the moment - adding ROMs would mean that e.g. a buggy guest might change them in-memory - a condition from which guest reset does not recover. Not nice. We also definitely don't want to try logging writes into ROMs - in particular guests set very

[Qemu-devel] [PULL v2 00/18] virtio, vhost, pci: fixes, features

2017-01-26 Thread Michael S. Tsirkin
The following changes since commit ae5045ae5b2bbd8ce1335d1b05f9ecacca83a6cf: Merge remote-tracking branch 'remotes/rth/tags/pull-nios-20170124' into staging (2017-01-25 13:30:23 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git

[Qemu-devel] [PULL v2 11/18] hw/i386: check if nvdimm is enabled before plugging

2017-01-26 Thread Michael S. Tsirkin
From: Haozhong Zhang The missing of 'nvdimm' in the machine type option '-M' means NVDIMM is disabled. QEMU should refuse to plug any NVDIMM device in this case and report the misconfiguration. The behavior of NVDIMM on unsupported platform (HW/FW) is vendor specific.

[Qemu-devel] [PULL v2 10/18] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The Generic Root Port behaves almost the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour

[Qemu-devel] [PULL v2 12/18] msix: Follow CODING_STYLE

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin

[Qemu-devel] [PULL v2 01/18] compiler: drop ; after BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
All users include the trailing ; anyway, let's require that - it seems cleaner. Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- include/qemu/compiler.h | 3 ++- 1 file changed, 2 insertions(+),

[Qemu-devel] [PULL v2 08/18] hw/pcie: Introduce a base class for PCI Express Root Ports

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum

[Qemu-devel] [PULL v2 02/18] qxl: switch to constants within BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
We are switching BUILD_BUG_ON to verify that it's parameter is a compile-time constant, and it turns out that some gcc versions (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are not smart enough to figure it out for expressions involving local variables. This is harmless but

[Qemu-devel] [PULL v2 06/18] pci: mark ROMs read-only

2017-01-26 Thread Michael S. Tsirkin
Looks like we didn't mark PCI ROMs as RO allowing mischief such as guests writing there. Further, e.g. vhost gets confused trying to allocate enough space to log writes there. Fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum

[Qemu-devel] [PULL v2 05/18] ARRAY_SIZE: check that argument is an array

2017-01-26 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to

Re: [Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Thomas Huth
On 26.01.2017 16:09, Markus Armbruster wrote: > Block backends defined with -drive if=ide are meant to be picked up by > machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=ide drives not picked up that way can still be used with -device as > if they

Re: [Qemu-devel] [Xen-devel] Commit 3a6c9 breaks QEMU on FreeBSD/Xen

2017-01-26 Thread Roger Pau Monné
On Wed, Jan 25, 2017 at 11:05:29AM +, Roger Pau Monné wrote: > On Tue, Jan 24, 2017 at 01:30:02PM -0800, Stefano Stabellini wrote: > > On Tue, 24 Jan 2017, Stefano Stabellini wrote: > > > On Tue, 24 Jan 2017, Roger Pau Monné wrote: > > > > Hello, > > > > > > > > The following commit: > > > >

[Qemu-devel] [PATCH v6 1/2] move vm_start to cpus.c

2017-01-26 Thread Claudio Imbrenda
This patch: * moves vm_start to cpus.c . * exports qemu_vmstop_requested, since it's needed by vm_start . * extracts vm_prepare_start from vm_start; it does what vm_start did, except restarting the cpus. vm_start now calls vm_prepare_start. * moves the call to qemu_clock_enable away from

[Qemu-devel] [PATCH v6 2/2] gdbstub: Fix vCont behaviour

2017-01-26 Thread Claudio Imbrenda
When GDB issues a "vCont", QEMU was not handling it correctly when multiple VCPUs are active. For vCont, for each thread (VCPU), it can be specified whether to single step, continue or stop that thread. The default is to stop a thread. However, when (for example) "vCont;s:2" is issued, all VCPUs

[Qemu-devel] [PATCH v6 0/2] Qemu: gdbstub: fix vCont

2017-01-26 Thread Claudio Imbrenda
This small patchset fixes the incorrect behaviour of the vCont command in the gdb stub. The first patch, as suggested be Paolo, refactors some code. The most visible change is that it moves vm_start to cpus.c The second one fixes the incorrect behaviour of the vCont command. Previously,

[Qemu-devel] [PATCH] aio-posix: drop QEMU_AIO_POLL_MAX_NS env var

2017-01-26 Thread Stefan Hajnoczi
This hunk should not have been merged but I forgot to remove it. Let's remove it before it slips into a QEMU release. ¯\_(ツ)_/¯ Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index

[Qemu-devel] [PATCH 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs

2017-01-26 Thread Markus Armbruster
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. Drives defined with if=scsi are also picked up by SCSI HBAs added with -device, unlike other interface types.

[Qemu-devel] [PATCH 0/3] hw: Deprecate unwanted use -drive if=scsi

2017-01-26 Thread Markus Armbruster
Drives defined with if=scsi get connected to buses created with -device, unlike other interface types. Deprecate this usage. There is no good default SCSI HBA for PC machines. Deprecate if=scsi there entirely. Before this series, frontends for -drive if=scsi get created by SCSI HBAs.

[Qemu-devel] [PATCH 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types

2017-01-26 Thread Markus Armbruster
The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi. For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU create 25 of them. lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and

[Qemu-devel] [PATCH 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place

2017-01-26 Thread Markus Armbruster
The logic to create frontends for -drive if=scsi is in SCSI HBAs. For all other interface types, it's in machine initialization code. A few machine types create the SCSI HBAs necessary for that. That's also not done for other interface types. I'm going to deprecate these SCSI eccentricities.

Re: [Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Laurent Vivier
Le 26/01/2017 à 16:09, Markus Armbruster a écrit : > Block backends defined with -drive if=ide are meant to be picked up by > machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=ide drives not picked up that way can still be used with -device as > if

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Michael S. Tsirkin
On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: > On 01/25/17 19:35, Michael S. Tsirkin wrote: > > On Wed, Jan 25, 2017 at 09:36:52AM -0800, Ben Warren wrote: > >> Hi Laszlo, > >> > >> > >> On Jan 24, 2017, at 7:55 PM, Laszlo Ersek wrote: > >> > >> Hi Ben,

[Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous special checks for orphaned -drive

2017-01-26 Thread Markus Armbruster
We've traditionally rejected orphans here and there, but not systematically. For instance, the sun4m machines have an onboard SCSI HBA (bus=0), and have always rejected bus>0. Other machines with an onboard SCSI HBA don't. Commit a66c9dc made all orphans trigger a warning, and the previous

[Qemu-devel] [PATCH v2 5/8] hw/arm/highbank: Default -drive to if=ide instead of if=scsi

2017-01-26 Thread Markus Armbruster
These machines have no onboard SCSI HBA, and no way to plug one. -drive if=scsi therefore cannot work. They do have an onboard IDE controller (sysbus-ahci), but fail to honor if=ide. Change their default to if=ide, and add a TODO comment on what needs to be done to actually honor -drive if=ide.

[Qemu-devel] [PATCH v2 0/8] More sensible default for -drive interface type

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=T, T!=none are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=T drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided.

[Qemu-devel] [PATCH v2 2/8] hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus

2017-01-26 Thread Markus Armbruster
Machine types cubieboard, xlnx-ep108, xlnx-zcu102 have an onboard AHCI controller, but neglect to set their MachineClass member units_per_default_bus = 1. This permits -drive if=ide,unit=1, which makes no sense for AHCI. It also screws up index=N for odd N, because it gets desugared to

[Qemu-devel] [PATCH v2 6/8] blockdev: Improve message for orphaned -drive

2017-01-26 Thread Markus Armbruster
We warn when a -drive isn't supported by the machine type (commit a66c9dc): $ qemu-system-x86_64 -S -display none -drive if=mtd Warning: Orphaned drive without device: id=mtd0,file=,if=mtd,bus=0,unit=0 Improve this to point to the offending bit of configuration: qemu-system-x86_64:

[Qemu-devel] [PATCH v2 7/8] blockdev: Make orphaned -drive fatal

2017-01-26 Thread Markus Armbruster
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. If machine initialization code doesn't comply, the block backend remains unused. This triggers a warning since

[Qemu-devel] [PATCH v2 4/8] hw: Default -drive to if=none instead of scsi when scsi cannot work

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=scsi are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=scsi drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided.

[Qemu-devel] [PATCH v2 1/8] hw: Default -drive to if=ide explicitly where it works

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused

[Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 15:32, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 26/01/2017 14:37, Pavel Dovgalyuk wrote: Simpler: use_icount && ((int32_t)cpu->icount_decr.u32 < 0 || cpu->icount_decr.u16.low + cpu->icount_extra == 0) >>>

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 14:37, Pavel Dovgalyuk wrote: > >> Simpler: > >> > >>use_icount && > >>((int32_t)cpu->icount_decr.u32 < 0 || > >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > > Right. > > > >> But I'm not sure that you need to

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 14:37, Pavel Dovgalyuk wrote: >> Simpler: >> >> use_icount && >> ((int32_t)cpu->icount_decr.u32 < 0 || >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > Right. > >> But I'm not sure that you need to test u32. After all you're not > Checking u32 is needed,

Re: [Qemu-devel] [PULL 15/18] spapr: CPU hot unplug support

2017-01-26 Thread Bharata B Rao
On Thu, Jan 26, 2017 at 12:32:58PM +0100, Igor Mammedov wrote: > On Fri, 17 Jun 2016 16:36:36 +1000 > David Gibson wrote: > > > From: Bharata B Rao > > > > Remove the CPU core device by removing the underlying CPU thread devices. > > Hot

[Qemu-devel] [PATCH] memory: don't sign-extend 32-bit writes

2017-01-26 Thread Ladi Prosek
ldl_p has a signed return type so assigning it to uint64_t implicitly sign-extends the value. This results in devices with min_access_size = 8 seeing unexpected values passed to their write handlers. Example: guest performs a 32-bit write of 0x8000 to an mmio region and the handler receives

  1   2   3   >