Re: [Qemu-devel] [PATCH v3 4/9] monitor: no need to save need_resume

2018-08-29 Thread Markus Armbruster
Peter Xu writes: > On Wed, Aug 29, 2018 at 02:40:39PM +0200, Markus Armbruster wrote: >> Peter Xu writes: >> >> > On Wed, Aug 29, 2018 at 10:55:51AM +0200, Markus Armbruster wrote: >> >> Peter Xu writes: >> >> >> >> > On Tue, Aug 28, 2018 at 05:46:29PM +0200, Markus Armbruster wrote: >> >> >>

[Qemu-devel] [PATCH 0/2] sun4u: generate correct fw paths for cmd646 IDE and virtio-blk-pci devices

2018-08-29 Thread Mark Cave-Ayland
This patchset is the QEMU counterpart to the patches posted on the OpenBIOS list at https://mail.coreboot.org/pipermail/openbios/2018-August/010422.html which generate correct fw paths for the sun4u machine. With these patches applied QEMU generates the correct fw paths for both the in-built cmd64

[Qemu-devel] [PATCH 2/2] sun4u: implement custom FWPathProvider

2018-08-29 Thread Mark Cave-Ayland
This enables the correct generation of bootdevice fw paths for in-built IDE and virtio-pci-blk devices suitable for OpenBIOS. Note we also set the MachineClass ignore_boot_device_suffixes property to true to allow the correct customisation of the disk node names as required. Signed-off-by: Mark C

[Qemu-devel] [PATCH 1/2] sabre: generate correct fw path for sabre PCI host bridge

2018-08-29 Thread Mark Cave-Ayland
Set the fw_name property to "pci" and also set an explicit OFW address using the value of the special_base property. Signed-off-by: Mark Cave-Ayland --- hw/pci-host/sabre.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/pci-host/sabre.c b/hw/pci-host/sabre.c index e2f4ee480

Re: [Qemu-devel] [PATCH 1/1] spapr: Correct reference count on spapr-cpu-core

2018-08-29 Thread David Gibson
On Thu, Aug 30, 2018 at 03:54:40PM +1000, Sam Bobroff wrote: 11;rgb://> spapr_init_cpus() currently creates spapr-cpu-core objects via > object_new() and setting their realized property to true. This leaves > their reference count at two, because object_new() adds an initial > referenc

Re: [Qemu-devel] [PATCH V11 16/20] filter: Add handle_event method for NetFilterClass

2018-08-29 Thread Zhang Chen
On Tue, Aug 28, 2018 at 3:19 PM Jason Wang wrote: > > > On 2018年08月24日 13:57, Zhang Chen wrote: > > On Wed, Aug 22, 2018 at 4:22 PM Jason Wang wrote: > > > >> On 2018年08月21日 17:25, Zhang Chen wrote: > >>> On Tue, Aug 21, 2018 at 11:30 AM Jason Wang > wrote: > >>> > On 2018年08月12日 04:59, Zha

[Qemu-devel] [PATCH] usb: add config options for hub and hid devices (kbd, mouse, tablet).

2018-08-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- default-configs/usb.mak | 2 ++ hw/usb/Makefile.objs| 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/default-configs/usb.mak b/default-configs/usb.mak index e42cfeabbe..3ee117dbf6 100644 --- a/default-configs/usb.mak +++ b/default-confi

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-29 Thread Robert Hoo
On Thu, 2018-08-23 at 14:11 -0300, Eduardo Habkost wrote: > On Thu, Aug 23, 2018 at 02:28:28PM +0800, Robert Hoo wrote: > > On Sat, 2018-08-18 at 12:05 -0300, Eduardo Habkost wrote: > [...] > > > We don't want QEMU to refuse to run if the kernel doesn't have > > > KVM_CAP_GET_MSR_FEATURES. We can

Re: [Qemu-devel] [RFC PATCH v2 0/7] QEMU binary instrumentation prototype

2018-08-29 Thread Alex Bennée
Peter Maydell writes: > Alex, were you planning to look at this series ? Yes it's in my queue. I'll be looking at it as part of the presentation I'm doing for Connect. > > thanks > -- PMM > > On 29 August 2018 at 06:39, Pavel Dovgalyuk wrote: >> Ping? >> >> >> >> Pavel Dovgalyuk >> >>> -

Re: [Qemu-devel] [PATCH v3 4/9] monitor: no need to save need_resume

2018-08-29 Thread Peter Xu
On Wed, Aug 29, 2018 at 02:40:39PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > On Wed, Aug 29, 2018 at 10:55:51AM +0200, Markus Armbruster wrote: > >> Peter Xu writes: > >> > >> > On Tue, Aug 28, 2018 at 05:46:29PM +0200, Markus Armbruster wrote: > >> >> Peter Xu writes: > >> >>

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-29 Thread Liu, Jing2
Ping Michael :) Thanks, Jing On 8/25/2018 12:51 AM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource for legacy pci-pci bridge. Add the resource reserve capability deleting in pci_bridge_dev_exitfn

[Qemu-devel] [PATCH v3 8/9] jobs: remove ret argument to job_completed; privatize it

2018-08-29 Thread John Snow
Jobs are now expected to return their retcode on the stack, from the .run callback, so we can remove that argument. job_cancel does not need to set -ECANCELED because job_completed will update the return code itself if the job was canceled. While we're here, make job_completed static to job.c and

[Qemu-devel] [PATCH v3 9/9] jobs: remove job_defer_to_main_loop

2018-08-29 Thread John Snow
Now that the job infrastructure is handling the job_completed call for all implemented jobs, we can remove the interface that allowed jobs to schedule their own completion. Signed-off-by: John Snow Reviewed-by: Max Reitz --- include/qemu/job.h | 17 - job.c | 40 ++-

[Qemu-devel] [PATCH v3 0/9] jobs: Job Exit Refactoring Pt 1

2018-08-29 Thread John Snow
This is part one of a two part series that refactors the exit logic of jobs. Part one removes job_defer_to_main_loop. Part two removes the job->exit() callback introduced in part one. It's redundant to have each job manage deferring to the main loop itself. Unifying this makes sense from an API s

[Qemu-devel] [PATCH v3 3/9] jobs: add exit shim

2018-08-29 Thread John Snow
All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything beyond exactly this. Consolidate this exit logic for a net reduction in SLOC. Mo

[Qemu-devel] [PATCH v3 2/9] jobs: canonize Error object

2018-08-29 Thread John Snow
Jobs presently use both an Error object in the case of the create job, and char strings in the case of generic errors elsewhere. Unify the two paths as just j->err, and remove the extra argument from job_completed. The integer error code for job_completed is kept for now, to be removed shortly in

[Qemu-devel] [PATCH v3 6/9] jobs: utilize job_exit shim

2018-08-29 Thread John Snow
Utilize the job_exit shim by not calling job_defer_to_main_loop, and where applicable, converting the deferred callback into the job_exit callback. This converts backup, stream, create, and the unit tests all at once. Most of these jobs do not see any changes to the order in which they clean up th

[Qemu-devel] [PATCH v3 7/9] block/backup: make function variables consistently named

2018-08-29 Thread John Snow
Rename opaque_job to job to be consistent with other job implementations. Rename 'job', the BackupBlockJob object, to 's' to also be consistent. Suggested-by: Eric Blake Signed-off-by: John Snow Reviewed-by: Max Reitz --- block/backup.c | 62 +---

[Qemu-devel] [PATCH v3 5/9] block/mirror: utilize job_exit shim

2018-08-29 Thread John Snow
Change the manual deferment to mirror_exit into the implicit callback to job_exit and the mirror_exit callback. This does change the order of some bdrv_unref calls and job_completed, but thanks to the new context in which we call .exit, this is safe to defer the possible flushing of any nodes to t

[Qemu-devel] [PATCH v3 4/9] block/commit: utilize job_exit shim

2018-08-29 Thread John Snow
Change the manual deferment to commit_complete into the implicit callback to job_exit, renaming commit_complete to commit_exit. This conversion does change the timing of when job_completed is called to after the bdrv_replace_node and bdrv_unref calls, which could have implications for bjob->blk wh

[Qemu-devel] [PATCH v3 1/9] jobs: change start callback to run callback

2018-08-29 Thread John Snow
Presently we codify the entry point for a job as the "start" callback, but a more apt name would be "run" to clarify the idea that when this function returns we consider the job to have "finished," except for any cleanup which occurs in separate callbacks later. As part of this clarification, chan

Re: [Qemu-devel] [PATCH 0/7] mac: generate correct fw paths for macio IDE and virtio-blk-pci devices

2018-08-29 Thread David Gibson
On Wed, Aug 29, 2018 at 05:59:04PM +0100, Mark Cave-Ayland wrote: 1;5202;0c> This patchset is the QEMU counterpart to the patches posted on the OpenBIOS > list at https://mail.coreboot.org/pipermail/openbios/2018-August/010422.html > which generate correct fw paths for the Mac Old World and New Wo

Re: [Qemu-devel] [PATCH] RISC-V - Dynamic parameterization of RISC-V memory map

2018-08-29 Thread Michael Eager
Whoops. I just noticed that this patch is against the riscv-qemu repo on github, not the qemu.org repo. I will rework it for the qemu.org repo. Meanwhile, I welcome any comments. On 08/29/2018 05:21 PM, Michael Eager wrote: Memory parameters for RISC-V boards can be read from a configuratio

[Qemu-devel] [PATCH] RISC-V - Dynamic parameterization of RISC-V memory map

2018-08-29 Thread Michael Eager
Memory parameters for RISC-V boards can be read from a configuration file using the -readconfig command line option. The configuration file should have a section for the board and memory. The configuration for the VirtIO board has the following configuration variables: [riscv-virt-mem] debug-b

Re: [Qemu-devel] [PATCH v2 1/9] jobs: change start callback to run callback

2018-08-29 Thread John Snow
On 08/27/2018 05:30 AM, Max Reitz wrote: > On 2018-08-24 00:08, John Snow wrote: >> Presently we codify the entry point for a job as the "start" callback, >> but a more apt name would be "run" to clarify the idea that when this >> function returns we consider the job to have "finished," except f

[Qemu-devel] [Bug 1789751] [NEW] Using -overcommit flag leads to qemu crashing

2018-08-29 Thread Jim White
Public bug reported: Running the following leads to a qemu crash on startup: jwhite@laptop:~/os$ qemu-system-i386 -overcommit cpu-pm=on qemu-system-i386: -overcommit cpu-pm=on: There is no option group 'overcommit' Segmentation fault (core dumped) jwhite@laptop:~/os$ This fixes the issue: ---

Re: [Qemu-devel] [PATCH v5 2/3] arm: Add Nordic Semiconductor nRF51 SoC

2018-08-29 Thread Stefan Hajnoczi
On Thu, Aug 16, 2018 at 11:43:02PM +0930, Joel Stanley wrote: > The nRF51 is a Cortex-M0 microcontroller with an on-board radio module, > plus other common ARM SoC peripherals. > > http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf > > This defines a basic model of the CPU and memory, with n

Re: [Qemu-devel] [RFC PATCH v2 0/7] QEMU binary instrumentation prototype

2018-08-29 Thread Peter Maydell
Alex, were you planning to look at this series ? thanks -- PMM On 29 August 2018 at 06:39, Pavel Dovgalyuk wrote: > Ping? > > > > Pavel Dovgalyuk > >> -Original Message- >> From: Stefan Hajnoczi [mailto:stefa...@gmail.com] >> Sent: Tuesday, July 10, 2018 4:07 PM >> To: Pavel Dovgalyuk >>

Re: [Qemu-devel] [PATCH 0/3] qemu-error: advanced report_once handling

2018-08-29 Thread Markus Armbruster
Cornelia Huck writes: > Based on previous discussions, I wanted to enhance the recently > merged report_once infrastucture with a way to print a message > once based on a variable instead of globally-once, similar to > what vfio-ccw uses today. > > Not really tested, mainly wanted to get this out

[Qemu-devel] [PATCH] dump: fix Windows dump memory run mapping

2018-08-29 Thread Viktor Prutyanov
We should map and use guest memory run by parts if it can't be mapped as a whole. After this patch, continuos guest physical memory blocks which are not continuos in host virtual address space will be processed correctly. Signed-off-by: Viktor Prutyanov --- win_dump.c | 40 ++

[Qemu-devel] qemu-web PATCH

2018-08-29 Thread milis linux
sorry i couldnt do with git. i am founder and developer of Milis Linux can you consider this patch please: it is : * Milis: `mps kur qemu-all` best regards QEMU is packaged by most Linux distributions: * Arch: `pacman -S qemu` * Debian/Ubuntu: `apt-get install qemu` * Fedora: `dnf install @v

[Qemu-devel] [PATCH v4 4/7] hw/riscv/virt: Connect the gpex PCIe

2018-08-29 Thread Alistair Francis
Connect the gpex PCIe device based on the device tree included in the HiFive Unleashed ROM. Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 3 ++ default-configs/riscv64-softmmu.mak | 3 ++ hw/riscv/virt.c | 58 + includ

[Qemu-devel] [PATCH v4 7/7] hw/riscv/virt: Connect a VirtIO net PCIe device

2018-08-29 Thread Alistair Francis
Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 1 + default-configs/riscv64-softmmu.mak | 1 + hw/riscv/virt.c | 20 +--- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/default-configs/riscv32-softmmu.mak b/default

[Qemu-devel] [PATCH v4 3/7] hw/riscv/virt: Increase the number of interrupts

2018-08-29 Thread Alistair Francis
Increase the number of interrupts to match the HiFive Unleashed board. Signed-off-by: Alistair Francis --- include/hw/riscv/virt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index 91163d6cbf..7cb2742070 100644 --- a/inclu

[Qemu-devel] [PATCH v4 6/7] hw/riscv/sifive_u: Connect the Xilinx PCIe

2018-08-29 Thread Alistair Francis
Connect the Xilinx PCIe device based on the information in the device tree stored in the ROM of the HiFish Unleashed board. Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 1 + default-configs/riscv64-softmmu.mak | 1 + hw/riscv/sifive_u.c | 64 +++

[Qemu-devel] [PATCH v4 5/7] riscv: Enable VGA and PCIE_VGA

2018-08-29 Thread Alistair Francis
Enable compile support for VGA devices. This allows the user to conenct a display by adding '-device bochs-display -display sdl' to their command line argument. Signed-off-by: Alistair Francis --- default-configs/riscv32-softmmu.mak | 3 +++ default-configs/riscv64-softmmu.mak | 3 +++ hw/riscv/

[Qemu-devel] [PATCH v4 2/7] hw/riscv/spike: Set the soc device tree node as a simple-bus

2018-08-29 Thread Alistair Francis
To allow Linux to enumerate devices on the /soc/ node set it as a "simple-bus". Signed-off-by: Alistair Francis --- hw/riscv/spike.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/spike.c b/hw/riscv/spike.c index c8c056c50b..eb857c434e 100644 --- a/hw/riscv/spike.c

[Qemu-devel] [PATCH v4 1/7] hw/riscv/virtio: Set the soc device tree node as a simple-bus

2018-08-29 Thread Alistair Francis
To allow Linux to enumerate devices on the /soc/ node set it as a "simple-bus". Signed-off-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé --- hw/riscv/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 248bbdffd3..e8ba4d1

[Qemu-devel] [PATCH v4 0/7] Connect a PCIe host and graphics support to RISC-V

2018-08-29 Thread Alistair Francis
V4: - Fix the spike device tree - Don't use stdvga device V3: - Remove Makefile config changes - Connect a network adapter to the virt device V2: - Use the gpex PCIe host for virt - Add support for SiFive U PCIe Alistair Francis (7): hw/riscv/virtio: Set the soc device tree node as a simp

Re: [Qemu-devel] [PATCH 1/1] hostmem-file: fixed the memory leak while get pmem path.

2018-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2018 at 12:14:22AM +0800, Zhang Yi wrote: > object_get_canonical_path_component() returns a string which > must be freed using g_free(). > > Reported-by: Peter Maydell > Signed-off-by: Michael S. Tsirkin > Signed-off-by: Zhang Yi Reviewed-by: Eduardo Habkost Queueing on machi

Re: [Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-29 Thread Eduardo Habkost
On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > commit > (5cdc9b76e3 vl.c: Remove dead assignment) > removed sockets calculation when 'sockets' weren't provided on CLI > since there wasn't any users for it back then. Exiting checks > are neither reachable >} else if (sockets

[Qemu-devel] [PATCH 0/7] mac: generate correct fw paths for macio IDE and virtio-blk-pci devices

2018-08-29 Thread Mark Cave-Ayland
This patchset is the QEMU counterpart to the patches posted on the OpenBIOS list at https://mail.coreboot.org/pipermail/openbios/2018-August/010422.html which generate correct fw paths for the Mac Old World and New World machines. With these patches applied QEMU generates the correct fw paths for

[Qemu-devel] [PATCH 1/7] macio: move MACIOIDEState type declarations to macio.h

2018-08-29 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c| 1 + hw/ppc/mac.h | 26 -- include/hw/misc/macio/macio.h | 26 ++ 3 files changed, 27 insertions(+), 26 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide/macio.c

[Qemu-devel] [PATCH 4/7] grackle: set device fw_name and address for correct fw path generation

2018-08-29 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/pci-host/grackle.c | 17 + hw/ppc/mac_oldworld.c | 1 + 2 files changed, 18 insertions(+) diff --git a/hw/pci-host/grackle.c b/hw/pci-host/grackle.c index 4810a4de79..5a151e93e9 100644 --- a/hw/pci-host/grackle.c +++ b/hw/pci-host/grackle.c

[Qemu-devel] [PATCH 2/7] macio: add macio bus to help with fw path generation

2018-08-29 Thread Mark Cave-Ayland
As the in-built IDE controller is attached to the macio bus then we should also model this the same in QEMU to aid fw path generation. Note that all existing macio devices are moved onto the new macio bus so that the qdev tree accurately reflects the real hardware. Signed-off-by: Mark Cave-Ayland

Re: [Qemu-devel] [PATCH] Add support for TCP path/QMP_PATH in scripts/qmp/qmp

2018-08-29 Thread Eduardo Habkost
On Tue, Aug 28, 2018 at 09:32:18PM +0800, Chen Zhang wrote: > From a1f93198020b8c043edab5292db39b52ac77f78b Mon Sep 17 00:00:00 2001 > > Signed-off-by: Zhang Chen > --- > scripts/qmp/qmp | 14 -- > 1 file changed, 12 insertions(+), 2 deletions(-) > > diff --git a/scripts/qmp/qmp b/s

[Qemu-devel] [PATCH 6/7] uninorth: add ofw-addr property to allow correct fw path generation

2018-08-29 Thread Mark Cave-Ayland
Signed-off-by: Mark Cave-Ayland --- hw/pci-host/uninorth.c | 16 hw/ppc/mac_newworld.c | 1 + include/hw/pci-host/uninorth.h | 1 + 3 files changed, 18 insertions(+) diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index a843aa7b36..1378c5c7fb 1006

[Qemu-devel] [PATCH 5/7] mac_oldworld: implement custom FWPathProvider

2018-08-29 Thread Mark Cave-Ayland
This enables the correct generation of bootdevice fw paths for in-built IDE and virtio-pci-blk devices suitable for OpenBIOS. Note we also set the MachineClass ignore_boot_device_suffixes property to true since an additional disk node should not be added except for virtio devices. Signed-off-by:

[Qemu-devel] [PATCH 3/7] macio: add addr property to macio IDE object

2018-08-29 Thread Mark Cave-Ayland
This contains the offset of the IDE controller within the macio address space and is required to allow the address to be included within the fw path. Signed-off-by: Mark Cave-Ayland --- hw/ide/macio.c| 1 + hw/misc/macio/macio.c | 5 +++-- include/hw/misc/macio/macio.h |

[Qemu-devel] [PATCH 7/7] mac_newworld: implement custom FWPathProvider

2018-08-29 Thread Mark Cave-Ayland
This enables the correct generation of bootdevice fw paths for in-built IDE and virtio-pci-blk devices suitable for OpenBIOS. Note we also set the MachineClass ignore_boot_device_suffixes property to true since an additional disk node should not be added except for virtio devices. Signed-off-by:

Re: [Qemu-devel] [PATCH V4 1/4] target-i386: introduce coalesced_pio kvm header update

2018-08-29 Thread Radim Krčmář
2018-08-28 11:58-0300, Eduardo Habkost: > On Sat, Aug 25, 2018 at 08:19:47PM +0800, Peng Hao wrote: > > add coalesced_pio's struct and KVM_CAP_COALESCED_PIO header. > > > > Signed-off-by: Peng Hao > > What's the status of the corresponding KVM header patch? I got a minor request to improve comp

Re: [Qemu-devel] [PATCH 3/9] chardev: use a child source for qio input source

2018-08-29 Thread Daniel P . Berrangé
On Tue, Aug 28, 2018 at 12:23:16AM +0200, Marc-André Lureau wrote: > GLib child source were added with version 2.28. We can use them now > that we bumped our requirement to 2.40. > > Signed-off-by: Marc-André Lureau > --- > chardev/char-io.c | 48 +-- >

Re: [Qemu-devel] [PATCH v8 81/87] linux-user: Add support for statx() syscall for all platforms

2018-08-29 Thread Timothy Baldwin
On Mon, 20 Aug 2018, at 10:45 AM, Aleksandar Markovic wrote: > > As such an implementation of lstat that uses statx will be broken. > > > > Since fstatat exists since 2.6.16 this can be reduced to a call to fstatat. > > I am not sure what you meant here. I think QEMU lstat() implementation > do

Re: [Qemu-devel] [PATCH 1/9] char.h: fix gtk-doc comment style

2018-08-29 Thread Daniel P . Berrangé
On Tue, Aug 28, 2018 at 12:23:14AM +0200, Marc-André Lureau wrote: > Use the gtk-doc function comment style, as documented in: > https://developer.gnome.org/gtk-doc-manual/stable/documenting_symbols.html.en I don't think we ever agreed what syntax we are supposed to be using for inline API docs in

Re: [Qemu-devel] [PATCH V4 2/4] target-i386:add coalesced_pio API

2018-08-29 Thread Eduardo Habkost
On Sat, Aug 25, 2018 at 08:19:48PM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao Reviewed-by: Eduardo Habkost -- Eduardo

Re: [Qemu-devel] [PATCH v3 0/8] Add limited MXU instruction support

2018-08-29 Thread Aleksandar Markovic
> From: Craig Janeczek > Sent: Tuesday, August 28, 2018 3:00 PM > > Subject: [PATCH v3 0/8] Add limited MXU instruction support > > This patch set begins to add MXU instruction support for mips emulation. Craig, May I ask you what is the exact platform (CPU/board) that you are targeting with th

Re: [Qemu-devel] [PATCH 2/3] qemu-error: make use of {error, warn}_report_once_cond

2018-08-29 Thread Cornelia Huck
On Wed, 29 Aug 2018 18:12:32 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > {error,warn}_report_once() are a special case of the new functions > > and can simply switch to them. > > > > Signed-off-by: Cornelia Huck > > --- > > include/qemu/error-report.h | 10 ++ > > 1 f

Re: [Qemu-devel] [PATCH 1/3] qemu-error: add {error, warn}_report_once_cond

2018-08-29 Thread Cornelia Huck
On Wed, 29 Aug 2018 18:07:46 +0200 Markus Armbruster wrote: > Cornelia Huck writes: > > > Add two functions to print an error/warning report once depending > > on a passed-in condition variable and flip it if printed. This is > > useful if you want to print a message not once-globally, but e.g.

Re: [Qemu-devel] [PATCH 2/3] qemu-error: make use of {error, warn}_report_once_cond

2018-08-29 Thread Markus Armbruster
Cornelia Huck writes: > {error,warn}_report_once() are a special case of the new functions > and can simply switch to them. > > Signed-off-by: Cornelia Huck > --- > include/qemu/error-report.h | 10 ++ > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/include/qemu/error

Re: [Qemu-devel] [PATCH 1/3] qemu-error: add {error, warn}_report_once_cond

2018-08-29 Thread Markus Armbruster
Cornelia Huck writes: > Add two functions to print an error/warning report once depending > on a passed-in condition variable and flip it if printed. This is > useful if you want to print a message not once-globally, but e.g. > once-per-device. > > Inspired by warn_once() in hw/vfio/ccw.c. This

[Qemu-devel] [PATCH v2 17/20] hmp: handle virtio-pmem when printing memory device infos

2018-08-29 Thread David Hildenbrand
Print the memory device info just like for PCDIMM/NVDIMM. Signed-off-by: David Hildenbrand --- hmp.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/hmp.c b/hmp.c index 4975fa56b0..a592a4af9d 100644 --- a/hmp.c +++ b/hmp.c @@ -2529,27 +2529,21

[Qemu-devel] [PATCH v2 19/20] virtio-pmem: hotplug support functions

2018-08-29 Thread David Hildenbrand
virtio-pmem devices will have to be hotplugged using the machine hotplug handler just like other memory devices. Therefore, all machines that want to support virtio-pmem will have to modify their machine hotplug handler. virtio-pmem devices are realized when their parent proxy device (virtio-pmem-

[Qemu-devel] [PATCH v2 20/20] pc: support for virtio-pmem

2018-08-29 Thread David Hildenbrand
Compile virtio-pmem for x86 and properly hotplug virtio-pmem devices (memory-device part) from our pc machine hotplug handler. Signed-off-by: David Hildenbrand --- default-configs/i386-softmmu.mak | 1 + hw/i386/pc.c | 10 +- 2 files changed, 10 insertions(+), 1 dele

[Qemu-devel] [PATCH v2 15/20] virtio-pmem: prototype

2018-08-29 Thread David Hildenbrand
From: Pankaj Gupta This is the current protoype of virtio-pmem. Support will require machine changes for the architectures that will support it, so it will not yet be compiled. Signed-off-by: Pankaj Gupta [ MemoryDevice/MemoryRegion changes, cleanups, addr property "memaddr", split up patches

[Qemu-devel] [PATCH v2 18/20] numa: handle virtio-pmem in NUMA stats

2018-08-29 Thread David Hildenbrand
Account the memory to node 0 for now. Once (if ever) virtio-pmem supports NUMA, we can account it to the right node. Signed-off-by: David Hildenbrand --- numa.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/numa.c b/numa.c index 81542d4ebb..8aa9b

[Qemu-devel] [PATCH v2 16/20] virtio-pci: proxy for virtio-pmem

2018-08-29 Thread David Hildenbrand
From: Pankaj Gupta We need a proxy device for virtio-pmem. Signed-off-by: Pankaj Gupta [ split up patches ] Signed-off-by: David Hildenbrand --- hw/virtio/virtio-pci.c | 41 + hw/virtio/virtio-pci.h | 14 ++ include/hw/pci/pci.h | 1 + 3

[Qemu-devel] [PATCH v2 11/20] memory-device: complete factoring out unplug handling

2018-08-29 Thread David Hildenbrand
With the new memory device functions in place, we can factor out unplugging of memory devices completely. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 8 ++-- hw/mem/pc-dimm.c | 3 +-- include/hw/mem/memory-device.h | 2 +- 3 files changed, 8 insertions

[Qemu-devel] [PATCH v2 13/20] hw/acpi-build: only indicate nvdimm and pc-dimm

2018-08-29 Thread David Hildenbrand
Once we have other memory devices that are not ACPI devices (e.g. virtio based), we cannot indicate them via ACPI. So let's skip these devices. Signed-off-by: David Hildenbrand --- hw/i386/acpi-build.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/hw/i386/a

[Qemu-devel] [PATCH v2 14/20] memory-device: ids of virtio based devices are special

2018-08-29 Thread David Hildenbrand
When reporting the id of virtio-based memory devices, we always have to take the one of the proxy device (parent). Expose the function, so especially virtio-based memory devices can reuse the function when filling out the id in MemoryDeviceInfo. Details: When the user creates a virtio device (e.

[Qemu-devel] [PATCH v2 12/20] memory-device: trace when pre_assigning/assigning/unassigning addresses

2018-08-29 Thread David Hildenbrand
Let's trace the address when pre_pluggin/plugging/unplugging a memory device. Trace it when pre_plugging as well as when plugging, so we really know when a specific address is actually used. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 6 ++ hw/mem/pc-dimm.c | 8 -

[Qemu-devel] [PATCH v2 01/20] memory-device: fix error message when hinted address is too small

2018-08-29 Thread David Hildenbrand
The "at" should actually be a "before". if (new_addr < address_space_start) -> "can't add memory ... before... $address_space_start" So it looks similar to the other check } else if ((new_addr + size) > address_space_end) -> "can't add memory ... beyond..." Signed-off-by: David

[Qemu-devel] [PATCH v2 09/20] memory-device: complete factoring out pre_plug handling

2018-08-29 Thread David Hildenbrand
With all required memory device class functions in place, we can factor out pre_plug handling of memory devices. Take proper care of errors. We still have to carry along legacy_align required for pc compatibility handling. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 32

[Qemu-devel] [PATCH v2 10/20] memory-device: complete factoring out plug handling

2018-08-29 Thread David Hildenbrand
With the new memory device functions in place, we can factor out plugging of memory devices completely. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 10 +++--- hw/mem/pc-dimm.c | 7 +-- include/hw/mem/memory-device.h | 3 +-- 3 files changed, 9 in

[Qemu-devel] [PATCH v2 07/20] memory-device: add device class function set_addr()

2018-08-29 Thread David Hildenbrand
To be able to factor out address asignment of memory devices, we will have to read (get_addr()) and write (set_addr()) the address. We can't use properties for this purpose, as properties are device specific. E.g. while the address property for a DIMM is called "addr", it might be called different

[Qemu-devel] [PATCH v2 08/20] pc-dimm: implement memory device class function set_addr()

2018-08-29 Thread David Hildenbrand
Keep it simple for now and simply set the static property, that will fail once realized. Signed-off-by: David Hildenbrand --- hw/mem/pc-dimm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index a208b17c64..d4e8a415bf 100644 --- a/hw/mem/pc-dimm.c

[Qemu-devel] [PATCH v2 06/20] memory-device: document MemoryDeviceClass

2018-08-29 Thread David Hildenbrand
Document the functions and when to not expect errors. Signed-off-by: David Hildenbrand --- include/hw/mem/memory-device.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/hw/mem/memory-device.h b/include/hw/mem/memory-device.h index 852fd8f98a..d353564faf 100644 --- a/i

[Qemu-devel] [PATCH v2 00/20] memory-device: complete refactoring + virtio-pmem

2018-08-29 Thread David Hildenbrand
This series completes refactoring of pre_plug, plug and unplug logic of memory devices. With this as a basis, one can easily have e.g. virtio based memory devices (virtio-mem, virtio-pmem, virtio-fs?) with minor modifications on e.g. x86. Patch 1-14 are the "real" patches of this series. Patch 15-

[Qemu-devel] [PATCH v2 05/20] memory-device: convert get_region_size() to get_memory_region()

2018-08-29 Thread David Hildenbrand
To factor out plugging and unplugging of memory device we need access to the memory region. So let's replace get_region_size() by get_memory_region(). If any memory device will in the future have multiple memory regions that make up the total region size, it can simply use a wrapping memory region

[Qemu-devel] [PATCH v2 04/20] memory-device: get_region_size()/get_plugged_size() might fail

2018-08-29 Thread David Hildenbrand
Let's properly forward the error, so errors from get_region_size() / get_plugged_size(), can be handled. Users right now call both functions after the device has been realized, which is guaranteed to no fail (we'll document this behavior in a follow-up patch). Signed-off-by: David Hildenbrand --

[Qemu-devel] [PATCH v2 02/20] memory-device: use memory device terminology in error messages

2018-08-29 Thread David Hildenbrand
While we rephrased most error messages, we missed these. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/mem/memory-device.c b/hw/mem/memory-device.c index efacbc2a7d..0d9892b715 100644 --- a/hw/mem/memory-d

[Qemu-devel] [PATCH v2 03/20] memory-device: introduce separate config option

2018-08-29 Thread David Hildenbrand
Some architectures might support memory devices, while they don't support DIMM/NVDIMM. So let's - Rename CONFIG_MEM_HOTPLUG to CONFIG_MEM_DEVICE - Introduce CONFIG_DIMM and use it similarly to CONFIG NVDIMM CONFIG_DIMM and CONFIG_NVDIMM require CONFIG_MEM_DEVICE. Reviewed-by: Igor Mammedov Signe

Re: [Qemu-devel] [PATCH v5 08/13] target/arm: Finish implementation of PM[X]EVCNTR and PM[X]EVTYPER

2018-08-29 Thread Aaron Lindsay
On Jul 17 17:17, Peter Maydell wrote: > On 22 June 2018 at 21:32, Aaron Lindsay wrote: > > Add arrays to hold the registers, the definitions themselves, access > > functions, and logic to reset counters when PMCR.P is set. Update > > filtering code to support counters other than PMCCNTR. > > > > S

Re: [Qemu-devel] [PATCH] pc: make sure that guest isn't able to unplug the first cpu

2018-08-29 Thread Laszlo Ersek
On 08/29/18 15:51, Igor Mammedov wrote: > On Wed, 29 Aug 2018 09:15:53 -0400 > "Michael S. Tsirkin" wrote: > >> On Wed, Aug 29, 2018 at 10:43:11AM +0200, Igor Mammedov wrote: >>> On Wed, 29 Aug 2018 12:54:40 +1000 >>> David Gibson wrote: >>> On Tue, Aug 28, 2018 at 03:18:48PM +0200, Igor

Re: [Qemu-devel] blkdebug get_status bug [was: [Qemu-block] NBD structured reads vs. block size]

2018-08-29 Thread Max Reitz
On 2018-08-29 15:24, Max Reitz wrote: > On 2018-08-28 23:59, Eric Blake wrote: >> [following up to a different set of emails] >> >> On 08/28/2018 03:41 PM, Eric Blake wrote: >>> Revisiting this: >>> >>> On 08/01/2018 09:41 AM, Eric Blake wrote: Rich Jones pointed me to questionable behavior in

Re: [Qemu-devel] [PATCH v5 07/13] target/arm: Add array for supported PMU events, generate PMCEID[01]

2018-08-29 Thread Aaron Lindsay
On Jul 17 17:06, Peter Maydell wrote: > On 22 June 2018 at 21:32, Aaron Lindsay wrote: > > This commit doesn't add any supported events, but provides the framework > > for adding them. We store the pm_event structs in a simple array, and > > provide the mapping from the event numbers to array inde

Re: [Qemu-devel] [PATCH 5/9] block: Allow child references on reopen

2018-08-29 Thread Max Reitz
On 2018-08-29 16:56, Alberto Garcia wrote: > On Wed 29 Aug 2018 02:59:01 PM CEST, Max Reitz wrote: Specifically, that means when you don't specify @backing, the default chain will be opened and may replace the current one. >>> >>> At the moment "backing" is the only child option that can

Re: [Qemu-devel] [PATCH 5/9] block: Allow child references on reopen

2018-08-29 Thread Alberto Garcia
On Wed 29 Aug 2018 02:59:01 PM CEST, Max Reitz wrote: >>> Specifically, that means when you don't specify @backing, the default >>> chain will be opened and may replace the current one. >> >> At the moment "backing" is the only child option that can be omitted, >> all others must be specified. So

Re: [Qemu-devel] [PATCH 3/9] block: Remove child references from bs->{options, explicit_options}

2018-08-29 Thread Alberto Garcia
On Wed 29 Aug 2018 02:18:45 PM CEST, Max Reitz wrote: @@ -3313,6 +3317,12 @@ void bdrv_reopen_commit(BDRVReopenState *reopen_state) bs->open_flags = reopen_state->flags; bs->read_only = !(reopen_state->flags & BDRV_O_RDWR); +/* Remove child ref

[Qemu-devel] [PATCH] vl:c: make sure that sockets are calculated correctly in '-smp X' case

2018-08-29 Thread Igor Mammedov
commit (5cdc9b76e3 vl.c: Remove dead assignment) removed sockets calculation when 'sockets' weren't provided on CLI since there wasn't any users for it back then. Exiting checks are neither reachable } else if (sockets * cores * threads < cpus) { or nor triggable if (sockets * cores * threa

Re: [Qemu-devel] [Query] Live Migration between machines with different processor ids

2018-08-29 Thread Dr. David Alan Gilbert
* Jaggi, Manish (manish.ja...@cavium.com) wrote: > Just to add what happens in ARM64 case, qemu running on Machine A sends cpu > state information to Machine B. > This state contains MIDR value, and so Processor ID value is compared in KVM > and not in qemu (correcting myself). > > IIRC, Peter/

Re: [Qemu-devel] [PATCH] pc: make sure that guest isn't able to unplug the first cpu

2018-08-29 Thread Igor Mammedov
On Wed, 29 Aug 2018 09:15:53 -0400 "Michael S. Tsirkin" wrote: > On Wed, Aug 29, 2018 at 10:43:11AM +0200, Igor Mammedov wrote: > > On Wed, 29 Aug 2018 12:54:40 +1000 > > David Gibson wrote: > > > > > On Tue, Aug 28, 2018 at 03:18:48PM +0200, Igor Mammedov wrote: > > > > On Tue, 28 Aug 2018

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm: Add Arm Enterprise machine type

2018-08-29 Thread Andrew Jones
On Wed, Aug 29, 2018 at 05:17:20PM +0800, Hongbo Zhang wrote: > On 17 August 2018 at 21:37, Peter Maydell wrote: > > On 25 July 2018 at 06:30, Hongbo Zhang wrote: > >> For the Aarch64, there is one machine 'virt', it is primarily meant to > >> run on KVM and execute virtualization workloads, but

[Qemu-devel] [PATCH v4 10/10] qmp: common 'id' handling & make QGA conform to QMP spec

2018-08-29 Thread Marc-André Lureau
Let qmp_dispatch() copy the 'id' field. That way any qmp client will conform to the specification, including QGA. Furthermore, it simplifies the work for qemu monitor. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Reviewed-by: Michael Roth --- monitor.c | 33 +++

[Qemu-devel] [PATCH v4 08/10] tests: add a qmp success-response test

2018-08-29 Thread Marc-André Lureau
Verify the usage of this schema feature and the API behaviour. This should be the only case where qmp_dispatch() returns NULL without error. Signed-off-by: Marc-André Lureau --- tests/test-qmp-cmds.c | 17 + tests/qapi-schema/qapi-schema-test.json | 2 ++ test

[Qemu-devel] [PATCH v4 06/10] tests: add qmp/object-add-without-props test

2018-08-29 Thread Marc-André Lureau
test_object_add_without_props() tests a bug in qmp_object_add() we fixed in commit e64c75a975. Sadly, we don't have systematic object-add tests. This lone test can go into qmp-cmd-test for want of a better home. Signed-off-by: Marc-André Lureau --- tests/qmp-cmd-test.c | 31 +++

[Qemu-devel] [PATCH v4 09/10] qga: process_event() simplification

2018-08-29 Thread Marc-André Lureau
Simplify the code around qmp_dispatch(): - rely on qmp_dispatch/check_obj() for message checking - have a single send_response() point - constify send_response() argument It changes a couple of error messages: * When @req isn't a dictionary, from Invalid JSON syntax to QMP input must be

[Qemu-devel] [PATCH RFC] migration: make sure to run iterate precopy during the bulk stage

2018-08-29 Thread Quan Xu
From 8dbf7370e7ea1caab0b769d0d4dcdd072d14d421 Mon Sep 17 00:00:00 2001 From: Quan Xu Date: Wed, 29 Aug 2018 21:33:14 +0800 Subject: [PATCH RFC] migration: make sure to run iterate precopy during the  bulk stage Since the bulk stage assumes in (migration_bitmap_find_dirty) that every page is dirt

[Qemu-devel] [PATCH v4 05/10] json-lexer: make it safe to call destroy multiple times

2018-08-29 Thread Marc-André Lureau
We can easily avoid the burden of checking if the lexer was initialized prior to calling destroy by the caller, let's do it. This allows simplification in state tracking in the qmp-async RFC series, the patch "qmp: add QmpSession" can call qmp_session_destroy() multiple time, which in turns calls

[Qemu-devel] [PATCH v4 07/10] tests: add qmp/qom-set-without-value test

2018-08-29 Thread Marc-André Lureau
test_qom_set_without_value() is about a bug in infrastructure used by the QMP core, fixed in commit c489780203. We covered the bug in infrastructure unit tests (commit bce3035a44). I wrote that test earlier, to cover QMP level as well, the test could go into qmp-test. Signed-off-by: Marc-André L

[Qemu-devel] [PATCH v4 00/10] monitor: various code simplification and fixes

2018-08-29 Thread Marc-André Lureau
Hi, This series is a rebased subset of "[PATCH v3 00/38] RFC: monitor: add asynchronous command type". v4: - splitted "tests: add a few qmp tests" - fix success-response crash regression in "qga: process_event() simplification" - add r-b tags from Michael v3: - updated "tests: add a few qmp test

  1   2   3   >