Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-07 Thread Andrew Jones
On Thu, Sep 06, 2018 at 12:23:45PM -0400, Wei Huang wrote: > > > - Original Message - > > From: "Andrew Jones" > > To: "Wei Huang" > > Cc: lviv...@redhat.com, "peter maydell" , > > quint...@redhat.com, qemu-devel@nongnu.org, > > dgilb...@redhat.com, "alex bennee" > > Sent: Thursday, S

[Qemu-devel] [PULL 00/14] ppc-for-3.1 queue 20180907

2018-09-07 Thread David Gibson
pc-for-3.1-20180907 for you to fetch changes up to be0c46d464c7c6b601adcd21fe9d2dd054a6a2cf: target-ppc: Extend HWCAP2 bits for ISA 3.0 (2018-09-07 11:29:50 +1000) ppc patch queue 2018-09-07 Here's another pull request for qem

[Qemu-devel] [PULL 02/14] spapr: fix leak of rev array

2018-09-07 Thread David Gibson
From: "Emilio G. Cota" Introduced in 04d595b300 ("spapr: do not use CPU_FOREACH_REVERSE", 2018-08-23) Fixes: CID1395181 Reported-by: Peter Maydell Signed-off-by: Emilio G. Cota Reviewed-by: Richard Henderson Signed-off-by: David Gibson --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+

[Qemu-devel] [PULL 01/14] ppc: Remove deprecated ppcemb target

2018-09-07 Thread David Gibson
From: Thomas Huth There is no known available OS for ppc around anymore that uses page sizes below 4k, so it does not make much sense that we keep wasting our time on building and testing the ppcemb-softmmu target. It has been deprecated since two releases, and nobody complained, so let's remove

[Qemu-devel] [PULL 10/14] mac_newworld: implement custom FWPathProvider

2018-09-07 Thread David Gibson
From: 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

[Qemu-devel] [PULL 14/14] target-ppc: Extend HWCAP2 bits for ISA 3.0

2018-09-07 Thread David Gibson
From: Sandipan Das This adds the HWCAP2 bit to detect if a linux user process is running on an ISA 3.0 compliant cpu like POWER9. This can be verified using a simple test program that prints the value in the auxiliary vector for AT_HWCAP2 as shown below. Before: $ qemu-ppc64le -cpu power8 test

[Qemu-devel] [PULL 04/14] macio: move MACIOIDEState type declarations to macio.h

2018-09-07 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- hw/ide/macio.c| 1 + hw/ppc/mac.h | 26 -- include/hw/misc/macio/macio.h | 26 ++ 3 files changed, 27 insertions(+), 26 delet

[Qemu-devel] [PULL 08/14] mac_oldworld: implement custom FWPathProvider

2018-09-07 Thread David Gibson
From: 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

[Qemu-devel] [PULL 11/14] spapr: Correct reference count on spapr-cpu-core

2018-09-07 Thread David Gibson
From: Sam Bobroff 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 reference and the realization attaches them to a default parent object which al

[Qemu-devel] [PULL 06/14] macio: add addr property to macio IDE object

2018-09-07 Thread David Gibson
From: 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 Signed-off-by: David Gibson --- hw/ide/macio.c| 1 + hw/misc/macio/macio

[Qemu-devel] [PULL 09/14] uninorth: add ofw-addr property to allow correct fw path generation

2018-09-07 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- 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

[Qemu-devel] [PULL 12/14] Fix a deadlock case in the CPU hotplug flow

2018-09-07 Thread David Gibson
From: Jose Ricardo Ziviani We need to set cs->halted to 1 before calling ppc_set_compat. The reason is that ppc_set_compat kicks up the new thread created to manage the hotplugged KVM virtual CPU and the code drives directly to KVM_RUN ioctl. When cs->halted is 1, the code: int kvm_cpu_exec(CPUS

[Qemu-devel] [PULL 07/14] grackle: set device fw_name and address for correct fw path generation

2018-09-07 Thread David Gibson
From: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: David Gibson --- 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 -

[Qemu-devel] [PULL 03/14] spapr_pci: fix potential NULL pointer dereference

2018-09-07 Thread David Gibson
From: Greg Kurz Commit 2c88b098e76fd added a call to SPAPR_MACHINE_GET_CLASS(spapr) in spapr_phb_realize() before we check spapr isn't NULL. This causes QEMU to crash when starting a non-pseries machine with a sPAPR PHB. This could be fixed by setting the smc variable after the null check, but i

[Qemu-devel] [PULL 05/14] macio: add macio bus to help with fw path generation

2018-09-07 Thread David Gibson
From: 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

[Qemu-devel] [PULL 13/14] target/ppc/kvm: set vcpu as online/offline

2018-09-07 Thread David Gibson
From: Nikunj A Dadhania Set the newly added register(KVM_REG_PPC_ONLINE) to indicate if the vcpu is online(1) or offline(0) KVM will use this information to set the RWMR register, which controls the PURR and SPURR accumulation. CC: pau...@samba.org Signed-off-by: Nikunj A Dadhania Signed-off-b

Re: [Qemu-devel] [PATCH] hw/intc/arm_gic: Drop GIC_BASE_IRQ macro

2018-09-07 Thread Luc Michel
On 8/24/18 6:18 PM, Peter Maydell wrote: > The GIC_BASE_IRQ macro is a leftover from when we shared code > between the GICv2 and the v7M NVIC. Since the NVIC is now > split off, GIC_BASE_IRQ is always 0, and we can just delete it. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > ---

[Qemu-devel] [Bug 1790975] Re: Default arm virt machine broken

2018-09-07 Thread Eric Auger
Hi Jonathan, I sent an email yesterday on the qemu ML. " Please can you try using qemu-system-arm -machine virt,highmem=off -m 1024M -kernel zImage -serial stdio Does your guest support LPAE? This may be the cause. Thanks Eric " -- You received this bug notification because you are a member

[Qemu-devel] [PATCH v2 01/12] qdev-monitor: print help to stdout

2018-09-07 Thread Marc-André Lureau
qdev_device_help() is used from command line "-device help", or from HMP "device_add". If used from command line, print help to stdout (it is only printed on explicit demand). Signed-off-by: Marc-André Lureau --- include/monitor/monitor.h | 2 ++ monitor.c | 16 +---

[Qemu-devel] [PATCH v2 00/12] Various qemu command line options help improvements

2018-09-07 Thread Marc-André Lureau
Hi, This is a compilation of patches I have to improve command line help support. The "qemu-option" patches have already been sent earlier, I modified the first to fix an issue reported by Markus. The other patches add support for -object help. A few related patches for QOM, to fix/improve some mi

[Qemu-devel] [PATCH v2 11/12] hostmem: add some properties description

2018-09-07 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- backends/hostmem-memfd.c | 9 + backends/hostmem.c | 14 ++ 2 files changed, 23 insertions(+) diff --git a/backends/hostmem-memfd.c b/backends/hostmem-memfd.c index 1e20fe0ba8..789c8c3f87 100644 --- a/backends/hostmem-memfd.c +++ b/

[Qemu-devel] [PATCH v2 04/12] qemu-option: improve qemu_opts_print_help() output

2018-09-07 Thread Marc-André Lureau
Modify qemu_opts_print_help(): - to print expected argument type - skip description if not available - sort lines - prefix with the list name (like qdev, to avoid confusion) - drop 16-chars alignment, use a '-' as seperator for option name and description For ex, "-spice help" output is changed

[Qemu-devel] [PATCH v2 02/12] cutils: add qemu_pstrcmp

2018-09-07 Thread Marc-André Lureau
A char** variant of strcmp(). Signed-off-by: Marc-André Lureau --- include/qemu/cutils.h | 12 util/cutils.c | 5 + 2 files changed, 17 insertions(+) diff --git a/include/qemu/cutils.h b/include/qemu/cutils.h index 47aaa3b0b9..0941639f36 100644 --- a/include/qemu/cutil

[Qemu-devel] [PATCH v2 03/12] qemu-option: add help fallback to print the list of options

2018-09-07 Thread Marc-André Lureau
QDev options accept 'help' (or '?', but that's problematic with shell globing) in the list of parameters, which is handy to list the available options. Unfortunately, this isn't built in QemuOpts. qemu_opts_parse_noisily() seems to be the common path for command line options, so place a fallback t

[Qemu-devel] [PATCH v2 05/12] qom/object: fix iterating properties over a class

2018-09-07 Thread Marc-André Lureau
object_class_property_iter_init() starts from the given class, so the next class should continue with the parent class. Signed-off-by: Marc-André Lureau --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qom/object.c b/qom/object.c index 75d1d48944..d8666de3f2 1

[Qemu-devel] [PATCH v2 08/12] tests/qom-proplist: check properties are not listed multiple times

2018-09-07 Thread Marc-André Lureau
And factor out a common function used by the follow class properties iterator test. Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 44 +- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/tests/check-qom-proplist.c b/tests/chec

[Qemu-devel] [PATCH v2 07/12] tests/qom-proplist: check duplicate "bv" property registration failed

2018-09-07 Thread Marc-André Lureau
"bv" is already a class property. Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 92898e1520..0f6d9c1ce3 100644 --- a/tests/check-qom-proplist.c +

[Qemu-devel] [PATCH v2 06/12] qom/object: register 'type' property as class property

2018-09-07 Thread Marc-André Lureau
Let's save a few byte in each object instance. (Is this property really used anywhere? Only qom-get could read it) Signed-off-by: Marc-André Lureau --- qom/object.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qom/object.c b/qom/object.c index d8666de3f2..185d1dd9f

[Qemu-devel] [PATCH v2 09/12] tests/qom-proplist: check class properties iterator

2018-09-07 Thread Marc-André Lureau
This test failed before "fix iterating properties over a class". Signed-off-by: Marc-André Lureau --- tests/check-qom-proplist.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/check-qom-proplist.c b/tests/check-qom-proplist.c index 8e1b9c27f3..7ed16b704b 100644 --- a/tests/ch

[Qemu-devel] [PATCH v2 10/12] vl: handle -object help

2018-09-07 Thread Marc-André Lureau
List the user creatable objects. Signed-off-by: Marc-André Lureau --- vl.c | 13 + 1 file changed, 13 insertions(+) diff --git a/vl.c b/vl.c index 5ba06adf78..71765a2982 100644 --- a/vl.c +++ b/vl.c @@ -2731,6 +2731,19 @@ static int machine_set_property(void *opaque, */ static bo

[Qemu-devel] [PATCH v2 12/12] vl: list user creatable properties when 'help' is argument

2018-09-07 Thread Marc-André Lureau
Iterate over the writable class properties, sort and print them out with the description if available. Ex: qemu -object memory-backend-file,help memory-backend-file.align=int memory-backend-file.discard-data=bool memory-backend-file.dump=bool - Set to 'off' to exclude from core dump memory-backend

Re: [Qemu-devel] backend for blk or fs with guaranteed blocking/synchronous I/O

2018-09-07 Thread Artem Pisarenko
No. I don't need realtime behavior. Realtime implies determinism, but determinism doesn't implies realtime. Of course, I realize that there are other sources of non-determinism exist, but these are separate stories. Here I just trying to eliminate one of them - asynchronous emulation of I/O inside

Re: [Qemu-devel] [PATCH v2 01/12] qdev-monitor: print help to stdout

2018-09-07 Thread Thomas Huth
On 2018-09-07 09:59, Marc-André Lureau wrote: > qdev_device_help() is used from command line "-device help", or from > HMP "device_add". If used from command line, print help to stdout > (it is only printed on explicit demand). Good idea, it always bugged me that "-device help" behaves differently

Re: [Qemu-devel] [PATCH v2 02/12] cutils: add qemu_pstrcmp

2018-09-07 Thread Thomas Huth
On 2018-09-07 09:59, Marc-André Lureau wrote: > A char** variant of strcmp(). > > Signed-off-by: Marc-André Lureau > --- > include/qemu/cutils.h | 12 > util/cutils.c | 5 + > 2 files changed, 17 insertions(+) > > diff --git a/include/qemu/cutils.h b/include/qemu/cutil

Re: [Qemu-devel] [PATCH v2 02/12] cutils: add qemu_pstrcmp

2018-09-07 Thread Marc-André Lureau
Hi On Fri, Sep 7, 2018 at 12:26 PM Thomas Huth wrote: > > On 2018-09-07 09:59, Marc-André Lureau wrote: > > A char** variant of strcmp(). > > > > Signed-off-by: Marc-André Lureau > > --- > > include/qemu/cutils.h | 12 > > util/cutils.c | 5 + > > 2 files changed, 17 i

Re: [Qemu-devel] [PATCH v2 02/12] cutils: add qemu_pstrcmp

2018-09-07 Thread Thomas Huth
On 2018-09-07 10:29, Marc-André Lureau wrote: > Hi > > On Fri, Sep 7, 2018 at 12:26 PM Thomas Huth wrote: >> >> On 2018-09-07 09:59, Marc-André Lureau wrote: >>> A char** variant of strcmp(). >>> >>> Signed-off-by: Marc-André Lureau >>> --- >>> include/qemu/cutils.h | 12 >>> util/

Re: [Qemu-devel] [PATCH v2] hw/ppc: on 40p machine, change default firmware to OpenBIOS

2018-09-07 Thread Mark Cave-Ayland
On 07/09/18 02:32, David Gibson wrote: > On Thu, Sep 06, 2018 at 05:38:26AM +0100, Mark Cave-Ayland wrote: >> On 05/09/18 01:13, David Gibson wrote: >> >>> On Tue, Sep 04, 2018 at 09:49:03PM +0200, Hervé Poussineau wrote: OpenBIOS gained 40p support in 5b20e4cacecb62fb2bdc6867c11d44cddd77c4ff

Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This patch adds support for dynamically loaded plugins. > Every plugin is a dynamic library with a set of optional exported > functions that will be called from QEMU. > > Signed-off-by: Pavel Dovgalyuk > --- > qemu-options.hx | 10 + > vl.c

[Qemu-devel] [PATCH 1/3] Improve xen_disk batching behaviour

2018-09-07 Thread Tim Smith
When I/O consists of many small requests, performance is improved by batching them together in a single io_submit() call. When there are relatively few requests, the extra overhead is not worth it. This introduces a check to start batching I/O requests via blk_io_plug()/ blk_io_unplug() in an amoun

[Qemu-devel] [PATCH 3/3] Avoid repeated memory allocation in xen_disk

2018-09-07 Thread Tim Smith
xen_disk currently allocates memory to hold the data for each ioreq as that ioreq is used, and frees it afterwards. Because it requires page-aligned blocks, this interacts poorly with non-page-aligned allocations and balloons the heap. Instead, allocate the maximum possible requirement, which is B

[Qemu-devel] [PATCH 2/3] Improve xen_disk response latency

2018-09-07 Thread Tim Smith
If the I/O ring is full, the guest cannot send any more requests until some responses are sent. Only sending all available responses just before checking for new work does not leave much time for the guest to supply new work, so this will cause stalls if the ring gets full. Also, not completing rea

Re: [Qemu-devel] [PATCH v2 3/4] qga: win32: fix crashes when PCI info cannot be retrived

2018-09-07 Thread Tomáš Golembiovský
On Wed, 05 Sep 2018 18:21:07 -0500 Michael Roth wrote: > Quoting Tomáš Golembiovský (2018-08-07 05:51:37) > > The guest-get-fsinfo command collects also information about PCI > > controller where the disk is attached. When this fails for some reasons > > it tries to return just the partial inform

Re: [Qemu-devel] [PATCH v2] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-07 Thread Igor Mammedov
On Thu, 6 Sep 2018 16:13:52 +0200 Laszlo Ersek wrote: > On 09/06/18 14:51, Igor Mammedov wrote: > > If VM has VCPUs plugged sparselly (for example a VM started with > > 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so > > only cpu0 and cpu2 are present), QGA will rise a error > >

Re: [Qemu-devel] [PATCH for-3.1 v10 04/31] block: Add BDS.auto_backing_file

2018-09-07 Thread Max Reitz
On 2018-09-05 16:22, Alberto Garcia wrote: > On Thu 09 Aug 2018 11:35:01 PM CEST, Max Reitz wrote: >> If the backing file is overridden, this most probably does change the >> guest-visible data of a BDS. Therefore, we will need to consider this >> in bdrv_refresh_filename(). >> >> To see whether i

Re: [Qemu-devel] [PATCH for-3.1 v10 31/31] iotests: Test json:{} filenames of internal BDSs

2018-09-07 Thread Max Reitz
On 2018-09-05 16:44, Alberto Garcia wrote: > On Thu 09 Aug 2018 11:35:28 PM CEST, Max Reitz wrote: >> +vm.shutdown() >> + >> +#assert top_name[:5] == 'json:' >> +#top_options = json.loads(top_name[5:]) >> + >> +#if filter_node_name: >> +## This should be

Re: [Qemu-devel] [PATCH v4 05/15] block/mirror: don't install backing chain on abort

2018-09-07 Thread Max Reitz
On 2018-09-05 17:39, John Snow wrote: > > > On 09/05/2018 06:40 AM, Max Reitz wrote: >> On 2018-09-04 19:09, John Snow wrote: >>> In cases where we abort the block/mirror job, there's no point in >>> installing the new backing chain before we finish aborting. >>> >>> Move this to the "success" po

[Qemu-devel] [PATCH v3 3/5] qga: win32: add debugging information

2018-09-07 Thread Tomáš Golembiovský
The windows code generaly lacks debug information (compared to posix code). This patch adds some related to HW info in guest-get-fsinfo command. Signed-off-by: Tomáš Golembiovský --- qga/commands-win32.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/qga/commands-win32.c b/

[Qemu-devel] [PATCH v3 2/5] build: rename CONFIG_QGA_NTDDDISK to CONFIG_QGA_NTDDSCSI

2018-09-07 Thread Tomáš Golembiovský
There was inconsistency between commits: 50cbebb9a3 configure: add configure check for ntdddisk.h a3ef3b2272 qga: added bus type and disk location path The first commit added #define CONFIG_QGA_NTDDDISK but the second commit expected the name to be CONFIG_QGA_NTDDSCSI. As a result the code in

[Qemu-devel] [PATCH v3 1/5] qga: win32: fix crashes when PCI info cannot be retrived

2018-09-07 Thread Tomáš Golembiovský
The guest-get-fsinfo command collects also information about PCI controller where the disk is attached. When this fails for some reasons it tries to return just the partial information. However in certain cases the pointer to the structure was not initialized and was set to NULL. This breaks the se

[Qemu-devel] [PATCH v3 0/5] qga: report serial number and disk node

2018-09-07 Thread Tomáš Golembiovský
Note that PCI controller reporting on Windows was and still is broken. Unfortunately I don't know how to fix it at the momemnt. See commit message and code comment. If anyone has environment where the original code works let me know. CCing author of the code In case I missed something obvious. v3:

[Qemu-devel] [PATCH v3 5/5] qga: return disk device in guest-get-fsinfo

2018-09-07 Thread Tomáš Golembiovský
Report device node of the disk. It is implemented for Linux (needs udev) and Windows. The node is reported e.g. as "/dev/sda2" on Linux and as "\\?\PhysicalDriveX" on Windows. As part of this effort the Windows code was changed to probe disk extents and return list of all disks. Originally only fi

[Qemu-devel] [PATCH v3 4/5] qga: report disk serial number

2018-09-07 Thread Tomáš Golembiovský
The feature is implemented for Windows and Linux. Reporting of serial number on Linux depends on libudev. Example from Linux: { "name": "dm-2", "mountpoint": "/", ... "disk": [ { "serial": "SAMSUNG_MZ7LN512HCHP-000L1_S1ZKNXAG822493", ...

Re: [Qemu-devel] [PATCH v2] qga: ignore non present cpus when handling qmp_guest_get_vcpus()

2018-09-07 Thread Laszlo Ersek
On 09/07/18 13:30, Igor Mammedov wrote: > On Thu, 6 Sep 2018 16:13:52 +0200 > Laszlo Ersek wrote: > >> On 09/06/18 14:51, Igor Mammedov wrote: >>> If VM has VCPUs plugged sparselly (for example a VM started with >>> 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so >>> only cpu0 and

[Qemu-devel] [PATCH v2 0/3] util: add qemu_write_pidfile()

2018-09-07 Thread Marc-André Lureau
Hi, Here are a few PID file related patches extracted from "[PATCH v4 00/29] vhost-user for input & GPU" series, with suggestions from Daniel Berrangé. thanks v2: - use an exit notifier (instead of atexit handler) - add an r-b tag Marc-André Lureau (3): util: add qemu_write_pidfile() util:

[Qemu-devel] [PATCH v2 3/3] Delete PID file on exit

2018-09-07 Thread Marc-André Lureau
Register an exit notifier to remove the PID file. By the time atexit() is called, qemu_write_pidfile() guarantees QEMU owns the PID file, thus we could safely remove it when exiting. Signed-off-by: Marc-André Lureau --- vl.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) d

[Qemu-devel] [PATCH v2 2/3] util: use fcntl() for qemu_write_pidfile() locking

2018-09-07 Thread Marc-André Lureau
Daniel Berrangé suggested to use fcntl() locks rather than lockf(). 'man lockf': On Linux, lockf() is just an interface on top of fcntl(2) locking. Many other systems implement lockf() in this way, but note that POSIX.1 leaves the relationship between lockf() and fcntl(2) locks unspec

Re: [Qemu-devel] [RFC PATCH v2 1/7] tcg: add headers for non-target helpers

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > From: Pavel Dovgalyuk > > This patch adds functions and headers for adding the helpers from > the modules other than the target translators. > > Signed-off-by: Pavel Dovgalyuk > --- > include/exec/helper-register.h | 53 >

[Qemu-devel] [PATCH v2 1/3] util: add qemu_write_pidfile()

2018-09-07 Thread Marc-André Lureau
There are variants of qemu_create_pidfile() in qemu-pr-helper and qemu-ga. Let's have a common implementation in libqemuutil. The code is initially based from pr-helper write_pidfile(), with various improvements and suggestions from Daniel Berrangé: QEMU will leave the pidfile existing on disk

Re: [Qemu-devel] [PATCH for-3.1 v10 04/31] block: Add BDS.auto_backing_file

2018-09-07 Thread Alberto Garcia
On Fri 07 Sep 2018 01:32:58 PM CEST, Max Reitz wrote: > On 2018-09-05 16:22, Alberto Garcia wrote: >> On Thu 09 Aug 2018 11:35:01 PM CEST, Max Reitz wrote: >>> If the backing file is overridden, this most probably does change the >>> guest-visible data of a BDS. Therefore, we will need to consider

Re: [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions

2018-09-07 Thread Mark Cave-Ayland
On 07/09/18 07:27, Thomas Huth wrote: > On 2018-09-06 19:15, Mark Cave-Ayland wrote: >> On 06/09/18 17:40, Thomas Huth wrote: > [...] >> Amusingly the main reason I need to expose the LSIState at all is to be >> able to call scsi_bus_legacy_handle_cmdline() on the SCSI bus object >> itself. I gues

Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This patch adds support for dynamically loaded plugins. > Every plugin is a dynamic library with a set of optional exported > functions that will be called from QEMU. > > Signed-off-by: Pavel Dovgalyuk > --- > Makefile.target |1 > configure

Re: [Qemu-devel] [Qemu-block] [PATCH v2 01/11] block: Mark commit and mirror as filter drivers

2018-09-07 Thread Alberto Garcia
On Fri 10 Aug 2018 12:31:07 AM CEST, Max Reitz wrote: > The commit and mirror block nodes are filters, so they should be marked > as such. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH for-3.1 v10 04/31] block: Add BDS.auto_backing_file

2018-09-07 Thread Max Reitz
On 2018-09-07 14:28, Alberto Garcia wrote: > On Fri 07 Sep 2018 01:32:58 PM CEST, Max Reitz wrote: >> On 2018-09-05 16:22, Alberto Garcia wrote: >>> On Thu 09 Aug 2018 11:35:01 PM CEST, Max Reitz wrote: If the backing file is overridden, this most probably does change the guest-visible da

[Qemu-devel] [PATCH v2 0/3] scsi: replace lsi53c895a_create() and lsi53c810_create() functions

2018-09-07 Thread Mark Cave-Ayland
As part of an upcoming 40p patchset I have a requirement to change the PCI configuration of the LSI SCSI. However since commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi", the lsi53c8*_create() wrapper fun

[Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function

2018-09-07 Thread Mark Cave-Ayland
This is the function that will soon be used to replace lsi53c895a_create() and lsi53c810_create(). Signed-off-by: Mark Cave-Ayland --- hw/scsi/lsi53c895a.c | 7 +++ include/hw/pci/pci.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 95

[Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions

2018-09-07 Thread Mark Cave-Ayland
Now that these functions are no longer required they can be removed. Signed-off-by: Mark Cave-Ayland --- hw/scsi/lsi53c895a.c | 14 -- include/hw/pci/pci.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index 8f5ab82d57..f5cbbf653c

[Qemu-devel] [Bug 1716292] Re: User mode emulation returns wrong value for write(fd, NULL, 0)

2018-09-07 Thread Tony Garnock-Jones
This happens for me also, with qemu version 2.12.0 (Debian 1:2.12+dfsg-3). An initial patch was proposed here: https://lists.gnu.org/archive/html /qemu-devel/2017-09/msg08073.html Discussion pointed out some problems, and the patch languished and was not accepted. Here is a summary of the change

[Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline()

2018-09-07 Thread Mark Cave-Ayland
As part of commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi" devices" the lsi53c895a_create() and lsi53c810_create() functions were added to wrap pci_create_simple() and scsi_bus_legacy_handle_cmdline(). U

[Qemu-devel] [Bug 1716292] Re: User mode emulation returns wrong value for write(fd, NULL, 0)

2018-09-07 Thread Tony Garnock-Jones
** Patch added: "0001-Bring-linux-user-write-2-handling-into-line-with-lin.patch" https://bugs.launchpad.net/qemu/+bug/1716292/+attachment/5186008/+files/0001-Bring-linux-user-write-2-handling-into-line-with-lin.patch -- You received this bug notification because you are a member of qemu- de

Re: [Qemu-devel] [PATCH v2 1/3] scsi: add lsi53c8xx_handle_legacy_cmdline() function

2018-09-07 Thread Thomas Huth
On 2018-09-07 14:56, Mark Cave-Ayland wrote: > This is the function that will soon be used to replace lsi53c895a_create() and > lsi53c810_create(). > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/lsi53c895a.c | 7 +++ > include/hw/pci/pci.h | 1 + > 2 files changed, 8 insertions(+) Revi

Re: [Qemu-devel] [RFC PATCH v2 3/7] plugins: provide helper functions for plugins

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > From: Pavel Dovgalyuk > > This patch adds interface functions that may be called from the loaded > plugins. > Such functions are needed to inspect the VM state and to pass data > to the QEMU (e.g., QEMU-side logging). > > Signed-off-by: Pavel Dovgalyuk Reviewed-by:

Re: [Qemu-devel] [PATCH v2 2/3] scsi: move lsi53c8xx_create() callers to lsi53c8xx_handle_legacy_cmdline()

2018-09-07 Thread Thomas Huth
On 2018-09-07 14:56, Mark Cave-Ayland wrote: > As part of commits a64aa5785d "hw: Deprecate -drive if=scsi with non-onboard > HBAs" and b891538e81 "hw/ppc/prep: Fix implicit creation of "-drive if=scsi" > devices" the lsi53c895a_create() and lsi53c810_create() functions were added > to wrap pci_cre

Re: [Qemu-devel] [PATCH v2 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions

2018-09-07 Thread Thomas Huth
On 2018-09-07 14:56, Mark Cave-Ayland wrote: > Now that these functions are no longer required they can be removed. > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/lsi53c895a.c | 14 -- > include/hw/pci/pci.h | 2 -- > 2 files changed, 16 deletions(-) Reviewed-by: Thomas Huth

Re: [Qemu-devel] [PATCH v4 00/29] vhost-user for input & GPU

2018-09-07 Thread Marc-André Lureau
Hi On Wed, Aug 29, 2018 at 4:00 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 29, 2018 at 11:50 AM, Daniel P. Berrangé > wrote: > > On Fri, Jul 13, 2018 at 03:08:47PM +0200, Marc-André Lureau wrote: > >> Hi, > >> > >> vhost-user allows to drive a virtio device in a seperate > >> process. A

[Qemu-devel] [PATCH] target/ppc/cpu-models: Re-group the 970 CPUs together again

2018-09-07 Thread Thomas Huth
The addition of the POWER9 CPUs divided the entries for the 970 CPUs, which is a little bit confusing when you look at the code. So let's re-group the 970 CPUs together again, and since these chips have been based on the POWER4 processor, move them also in front of the POWER5 chips now. Signed-off

Re: [Qemu-devel] [RFC PATCH v2 4/7] tcg: add instrumenting module

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > From: Pavel Dovgalyuk > > This is a samples of the instrumenting interface and implementation > of some instruction tracing tasks. > > Signed-off-by: Pavel Dovgalyuk > --- > accel/tcg/translator.c|5 + > include/qemu/instrument.h |7 +++ > plugin

[Qemu-devel] [PATCH v2 1/4] Fix segmentation fault when qemu_signal_init fails

2018-09-07 Thread Fei Li
Currently, when qemu_signal_init() fails it only returns a non-zero value but without propagating any Error. But its callers need a non-null err when runs error_report_err(err), or else 0->msg occurs. To avoid such segmentation fault, add a new Error parameter to make the call trace to propagate t

[Qemu-devel] [PATCH v2 0/4] qemu_thread_create: propagate errors to callers to check

2018-09-07 Thread Fei Li
Hi, This idea comes from BiteSizedTasks, and this patch series implement the error checking of qemu_thread_create: make qemu_thread_create return a flag to indicate if it succeeded rather than failing with an error; make all callers check it. The first three patches apply to those call traces who

[Qemu-devel] [PATCH v2 3/4] qemu_init_vcpu: add a new Error parameter to propagate

2018-09-07 Thread Fei Li
The caller of qemu_init_vcpu() already passed the **errp to handle errors. In view of this, add a new Error parameter to the following call trace to propagate the error and let the further caller check it. Besides, make qemu_init_vcpu() return a Boolean value to let its callers know whether it suc

[Qemu-devel] [PATCH v2 2/4] ui/vnc.c: polish vnc_init_func

2018-09-07 Thread Fei Li
Add a new Error parameter for vnc_display_init() to handle errors in its caller: vnc_init_func(), just like vnc_display_open() does. And let the call trace propagate the Error. Besides, make vnc_start_worker_thread() return a bool to indicate whether it succeeds instead of returning nothing. Sign

Re: [Qemu-devel] [PATCH v2 03/12] qemu-option: add help fallback to print the list of options

2018-09-07 Thread Eric Blake
On 09/07/2018 02:59 AM, Marc-André Lureau wrote: QDev options accept 'help' (or '?', but that's problematic with shell globing) in the list of parameters, which is handy to list the s/globing/globbing/ available options. Unfortunately, this isn't built in QemuOpts. qemu_opts_parse_noisily()

Re: [Qemu-devel] [PATCH V9 2/4] tests/migration: Support cross compilation in generating boot header file

2018-09-07 Thread Wei Huang
On 09/07/2018 02:04 AM, Andrew Jones wrote: > On Thu, Sep 06, 2018 at 12:23:45PM -0400, Wei Huang wrote: >> >> >> - Original Message - >>> From: "Andrew Jones" >>> To: "Wei Huang" >>> Cc: lviv...@redhat.com, "peter maydell" , >>> quint...@redhat.com, qemu-devel@nongnu.org, >>> dgilb..

[Qemu-devel] [PATCH v2 4/4] qemu_thread_create: propagate the error to callers to handle

2018-09-07 Thread Fei Li
Make qemu_thread_create() return a Boolean to indicate if it succeeds rather than failing with an error. And add an Error parameter to hold the error message and let the callers handle it. Besides, directly return if thread->data is NULL to avoid the segmentation fault in qemu_thread_join in qemu-

Re: [Qemu-devel] [PULL 01/14] ppc: Remove deprecated ppcemb target

2018-09-07 Thread Eric Blake
On 09/07/2018 02:31 AM, David Gibson wrote: From: Thomas Huth There is no known available OS for ppc around anymore that uses page sizes below 4k, so it does not make much sense that we keep wasting our time on building and testing the ppcemb-softmmu target. It has been deprecated since two rel

Re: [Qemu-devel] [PATCH v2 01/12] qdev-monitor: print help to stdout

2018-09-07 Thread Eric Blake
On 09/07/2018 02:59 AM, Marc-André Lureau wrote: qdev_device_help() is used from command line "-device help", or from HMP "device_add". If used from command line, print help to stdout (it is only printed on explicit demand). Signed-off-by: Marc-André Lureau --- include/monitor/monitor.h | 2

Re: [Qemu-devel] [RFC PATCH v2 5/7] plugins: add plugin template

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > From: Pavel Dovgalyuk > > This is a template of the QEMU plugin. It includes empty functions that > plugins may implement. > I'm not sure it's worth having a null-template plugin if we can have one or two well documented example plugins. It just runs the risk of bitr

Re: [Qemu-devel] [PATCH v2 12/12] vl: list user creatable properties when 'help' is argument

2018-09-07 Thread Eric Blake
On 09/07/2018 02:59 AM, Marc-André Lureau wrote: Iterate over the writable class properties, sort and print them out with the description if available. Ex: qemu -object memory-backend-file,help memory-backend-file.align=int memory-backend-file.discard-data=bool memory-backend-file.dump=bool - Se

Re: [Qemu-devel] [RFC PATCH v2 6/7] plugin: add instruction execution logger

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > From: Pavel Dovgalyuk > > This patch adds a plugin for logging addresses of all executed instructions, > making a complete instruction-level trace. This isn't a good example. You can do this now with a much simpler: ${QEMU} -singlestep -d nochain,trace:exec_tb -D

Re: [Qemu-devel] [Bug 1716292] Re: User mode emulation returns wrong value for write(fd, NULL, 0)

2018-09-07 Thread Eric Blake
On 09/07/2018 06:51 AM, Tony Garnock-Jones wrote: ** Patch added: "0001-Bring-linux-user-write-2-handling-into-line-with-lin.patch" https://bugs.launchpad.net/qemu/+bug/1716292/+attachment/5186008/+files/0001-Bring-linux-user-write-2-handling-into-line-with-lin.patch While a developer can

Re: [Qemu-devel] [PATCH v2 1/3] util: add qemu_write_pidfile()

2018-09-07 Thread Eric Blake
On 09/07/2018 07:13 AM, Marc-André Lureau wrote: There are variants of qemu_create_pidfile() in qemu-pr-helper and qemu-ga. Let's have a common implementation in libqemuutil. Unrelated to this patch, but a question that this raises: should 'qemu-nbd' also have a mode for creating a pid file,

Re: [Qemu-devel] [RFC PATCH v2 7/7] plugins: add syscall logging plugin sample

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This is an example of plugin which instruments only specific instructions: > sysenter and sysexit. When executing them, it prints system call id > and return code to the QEMU log. Again I'm not sure this is a very useful example either. It doesn't achieve anything we

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

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > Peter, what about this one? > > Pavel Dovgalyuk > >> -Original Message- >> From: Pavel Dovgalyuk [mailto:dovga...@ispras.ru] >> Sent: Tuesday, June 05, 2018 2:56 PM >> To: 'Peter Maydell'; 'Pavel Dovgalyuk' >> Cc: 'QEMU Developers'; maria.klimushenk...@ispras.r

Re: [Qemu-devel] [PATCH 1/3] Improve xen_disk batching behaviour

2018-09-07 Thread Paul Durrant
> -Original Message- > From: Qemu-devel [mailto:qemu-devel- > bounces+paul.durrant=citrix@nongnu.org] On Behalf Of Tim Smith > Sent: 07 September 2018 11:21 > To: qemu-devel@nongnu.org > Subject: [Qemu-devel] [PATCH 1/3] Improve xen_disk batching behaviour > > When I/O consists of many

Re: [Qemu-devel] [RFC PATCH v2 2/7] Add plugin support

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > This patch adds support for dynamically loaded plugins. > Every plugin is a dynamic library with a set of optional exported > functions that will be called from QEMU. > > + > +static QLIST_HEAD(, QemuPluginInfo) qemu_plugins > += QLIST_

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

2018-09-07 Thread Alex Bennée
Pavel Dovgalyuk writes: > The following series implements dynamic binary instrumentation upon > QEMU. OK I've done a pass through the patches, final comments bellow. > > For the current patches the plugins should provide the following > callbacks: > - "needs" callback to check whether the s

Re: [Qemu-devel] [PATCH 1/6] qht: remove unused map param from qht_remove__locked

2018-09-07 Thread Alex Bennée
Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > util/qht.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/util/qht.c b/util/qht.c > index c138777a9c..7b57b50a24 100644 > --- a/util/qht.c > +++ b/util/qht.c > @@ -665,8 +

Re: [Qemu-devel] [PATCH 2/6] qht: add qht_iter_remove

2018-09-07 Thread Alex Bennée
Emilio G. Cota writes: > This currently has no users, but the use case is so common that I > think we must support it. > > Note that without the appended we cannot safely remove a set of > elements; a 2-step approach (i.e. qht_iter first, keep track of > the to-be-deleted elements, and then a b

Re: [Qemu-devel] [PATCH 3/6] test-qht: test qht_iter_remove

2018-09-07 Thread Alex Bennée
Emilio G. Cota writes: > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > tests/test-qht.c | 50 ++-- > 1 file changed, 48 insertions(+), 2 deletions(-) > > diff --git a/tests/test-qht.c b/tests/test-qht.c > index dda6a067be..283fb3

Re: [Qemu-devel] [PATCH 4/6] test-qht: test removal of non-existent entries

2018-09-07 Thread Alex Bennée
Emilio G. Cota writes: > This improves qht.c code coverage from 89.44% to 90.00%. > > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > tests/test-qht.c | 26 -- > 1 file changed, 24 insertions(+), 2 deletions(-) > > diff --git a/tests/test-qht.c b/test

Re: [Qemu-devel] [PATCH 5/6] test-qht: test deletion of the last entry in a bucket

2018-09-07 Thread Alex Bennée
Emilio G. Cota writes: > This improves coverage by one (!) LoC in qht.c, bringing the > coverage rate up from 90.00% to 90.28%. > > Signed-off-by: Emilio G. Cota Reviewed-by: Alex Bennée > --- > tests/test-qht.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff

  1   2   >