Re: [Qemu-devel] [PATCH for-4.0 v3 3/4] i386: import bootparam.h

2018-12-04 Thread Li Zhijian
On 12/04/2018 09:06 AM, Michael S. Tsirkin wrote: On Mon, Dec 03, 2018 at 10:48:51PM +0800, Li Zhijian wrote: It provides setup_data struct and header fields CC: Michael S. Tsirkin Signed-off-by: Li Zhijian Sorry I was unclear when I said "import it from Linux". Sorry, it's my fault. T

[Qemu-devel] [PATCH v3] s390x/tod: Properly stop the KVM TOD while the guest is not running

2018-12-04 Thread Christian Borntraeger
On 30.11.2018 10:49, David Hildenbrand wrote: > Just like on other architectures, we should stop the clock while the guest > is not running. This is already properly done for TCG. Right now, doing an > offline migration (stop, migrate, cont) can easily trigger stalls in the > guest. > > Even doing

Re: [Qemu-devel] [PATCH v3] s390x/tod: Properly stop the KVM TOD while the guest is not running

2018-12-04 Thread Thomas Huth
On 2018-11-30 10:49, David Hildenbrand wrote: > Just like on other architectures, we should stop the clock while the guest > is not running. This is already properly done for TCG. Right now, doing an > offline migration (stop, migrate, cont) can easily trigger stalls in the > guest. > > Even doing

Re: [Qemu-devel] [PATCH v3] xen/pt: allow passthrough of devices with bogus interrupt pin

2018-12-04 Thread Roger Pau Monné
On Tue, Dec 04, 2018 at 02:50:49AM -0500, Zhao Yan wrote: > For some pci device, even its PCI_INTERRUPT_PIN is not 0, it actually > doesn't support INTx mode, so its machine irq read from host sysfs is 0. > In that case, report PCI_INTERRUPT_PIN as 0 to guest and let passthrough > continue. > > Cc

Re: [Qemu-devel] [PULL 0/2] Fixes 31 20181203 patches

2018-12-04 Thread Peter Maydell
On Mon, 3 Dec 2018 at 19:51, Gerd Hoffmann wrote: > > The following changes since commit 039d4e3df0049bdd8f93a2de735a816483b13954: > > scsi: Address spurious clang warning (2018-11-27 23:56:12 +) > > are available in the git repository at: > > git://git.kraxel.org/qemu tags/fixes-31-201812

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 00:41, wrote: > > >I would still prefer to see a more detailed examination of whether > >we can do this with a PCI device before we commit to taking the > >MMIO version into the virt board. > > I'm sorry I thought I had sent an email. yesterday when I wrote an email to > expl

Re: [Qemu-devel] [qemu-web PATCH] Import historical documentation

2018-12-04 Thread Daniel P . Berrangé
On Mon, Dec 03, 2018 at 11:14:48PM +0400, Marc-André Lureau wrote: > Hi > > On Mon, Dec 3, 2018 at 9:23 PM Daniel P. Berrangé wrote: > > > > The files included are taken from formal builds of previous versions > > of QEMU, going back to 2.0.0 > > > > - qemu-doc.html > > - qemu-qmp-ref.html >

Re: [Qemu-devel] QMP accepts double dict keys

2018-12-04 Thread Daniel P . Berrangé
On Mon, Dec 03, 2018 at 01:57:13PM -0600, Eric Blake wrote: > On 12/3/18 1:48 PM, Markus Armbruster wrote: > > Eric Blake writes: > > > > > On 12/3/18 10:30 AM, Max Reitz wrote: > > > > Hi, > > > > > > > > QMP accepts double keys in dicts without complaining. The value it is > > > > using is ap

Re: [Qemu-devel] [PULL 10/10] hw/arm: versal: Add a virtual Xilinx Versal board

2018-12-04 Thread Peter Maydell
On Fri, 2 Nov 2018 at 17:24, Peter Maydell wrote: > > From: "Edgar E. Iglesias" > > Add a virtual Xilinx Versal board. > > This board is based on the Xilinx Versal SoC. The exact > details of what peripherals are attached to this board > will remain in control of QEMU. QEMU will generate an > FDT

Re: [Qemu-devel] insecure git submodule URLs

2018-12-04 Thread Stefan Hajnoczi
On Mon, Oct 08, 2018 at 02:17:39PM -0500, Eric Blake wrote: > On 7/15/18 7:56 PM, Jann Horn via Qemu-devel wrote: > > On Sun, Jul 15, 2018 at 11:18 PM Peter Maydell > > wrote: > > > > > > On 15 July 2018 at 20:50, Jann Horn via Qemu-devel > > > wrote: > > > > I noticed that when I build QEMU fr

Re: [Qemu-devel] [PATCH 1/5] VFIO KABI for migration interface

2018-12-04 Thread Cornelia Huck
On Tue, 27 Nov 2018 12:52:48 -0700 Alex Williamson wrote: > Actually I'm wondering if we can distill everything down to two bits, > STOPPED and LOGGING. > > We start at RUNNING, the user can optionally enable LOGGING when > supported by the device to cover the SETUP and PRECOPY states > proposed

Re: [Qemu-devel] [qemu-web PATCH] Import historical documentation

2018-12-04 Thread Thomas Huth
On 2018-12-03 17:41, Daniel P. Berrangé wrote: > The files included are taken from formal builds of previous versions > of QEMU, going back to 2.0.0 > > - qemu-doc.html > - qemu-qmp-ref.html > - qemu-ga-ref.html > > To import them all content outside of is stripped and > replaced by a triv

Re: [Qemu-devel] [PATCH 11/18] xen: remove 'XenBlkDev' and 'blkdev' names from dataplane/xen-qdisk

2018-12-04 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:12:04PM +, Paul Durrant wrote: > This is a purely cosmetic patch that substitutes the old 'struct XenBlkDev' > name with 'XenQdiskDataPlane' and 'blkdev' field/variable names with > 'dataplane', and then does necessary fix-up to adhere to coding style. > > No functio

Re: [Qemu-devel] [PATCH 12/18] xen: remove 'ioreq' struct/varable/field names from dataplane/xen-qdisk.c

2018-12-04 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:12:05PM +, Paul Durrant wrote: > This is a purely cosmetic patch that purges the name 'ioreq' from struct, > variable and field names. (This name has been problematic for a long time > as 'ioreq' is the name used for generic I/O requests coming from Xen). > The patch

Re: [Qemu-devel] [PATCH V5 for 3.1 0/5] Fix possible OOB during queuing packets

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 03:54, Jason Wang wrote: > > Hi: > > This series tries to fix a possible OOB during queueing packets > through qemu_net_queue_append_iov(). This could happen when it tries > to queue a packet whose size is larger than INT_MAX which may lead > integer overflow. We've fixed sim

Re: [Qemu-devel] [PATCH 13/18] xen: purge 'blk' and 'ioreq' from function names in dataplane/xen-qdisk.c

2018-12-04 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:12:06PM +, Paul Durrant wrote: > This is a purely cosmetic patch that purges remaining use of 'blk' and > 'ioreq' in local function names. > > No functional change. > > Signed-off-by: Paul Durrant I don't think it's a good idee to use function names that could be

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Andrew Jones
On Tue, Dec 04, 2018 at 09:40:07AM +, Peter Maydell wrote: > On Tue, 4 Dec 2018 at 00:41, wrote: > > > > >I would still prefer to see a more detailed examination of whether > > >we can do this with a PCI device before we commit to taking the > > >MMIO version into the virt board. > > > > I'm s

Re: [Qemu-devel] [PATCH v6 07/13] fpu: introduce hardfloat

2018-12-04 Thread Alex Bennée
Emilio G. Cota writes: > The appended paves the way for leveraging the host FPU for a subset > of guest FP operations. For most guest workloads (e.g. FP flags > aren't ever cleared, inexact occurs often and rounding is set to the > default [to nearest]) this will yield sizable performance speed

Re: [Qemu-devel] [PATCH v5 27/36] sysbus: add a sysbus_mmio_unmap() helper

2018-12-04 Thread Cédric Le Goater
Hello Peter, On 12/3/18 6:48 PM, Peter Maydell wrote: > On Thu, 29 Nov 2018 at 04:55, David Gibson > wrote: >> >> On Fri, Nov 16, 2018 at 11:57:20AM +0100, Cédric Le Goater wrote: >>> This will be used to remove the MMIO regions of the POWER9 XIVE >>> interrupt controller when the sPAPR machine

Re: [Qemu-devel] [PATCH 14/18] xen: add implementations of xen-qdisk connect and disconnect functions...

2018-12-04 Thread Anthony PERARD
On Wed, Nov 21, 2018 at 03:12:07PM +, Paul Durrant wrote: > diff --git a/hw/block/xen-qdisk.c b/hw/block/xen-qdisk.c > index 35f7b70480..8c88393832 100644 > --- a/hw/block/xen-qdisk.c > +++ b/hw/block/xen-qdisk.c > static void xen_qdisk_connect(XenQdiskDevice *qdiskdev, Error **errp) > { >

Re: [Qemu-devel] [PATCH 0/3] vfio-ccw: support hsch/csch (kernel part)

2018-12-04 Thread Halil Pasic
On Thu, 22 Nov 2018 17:54:29 +0100 Cornelia Huck wrote: > [This is the Linux kernel part, git tree is available at > https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git > vfio-ccw-caps > > The companion QEMU patches are available at > https://github.com/cohuck/qemu vfio-ccw-cap

Re: [Qemu-devel] [Bug 1804961] Re: qemu-system-aarch64: Windows 10 ARM64 BSoD on boot while using virt-3.0

2018-12-04 Thread Igor Mammedov
On Wed, 28 Nov 2018 19:25:07 - GH Cao <1804...@bugs.launchpad.net> wrote: > @imammedo: > I am new to kernel debugging, but I managed to get some traces, hope that > will help you. > > https://pastebin.com/shWUC1Pk > https://pastebin.com/n0gnSaVx > try it with following amli options set: e

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 12:05, Andrew Jones wrote: > To muddy the waters a bit more, while I'm not opposed to this device > being a PCI device, there is a chance that someone will still want a > platform-mmio version as well. I'm not sure how everything will > eventually fall into place, but I've se

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Daniel P . Berrangé
On Mon, Dec 03, 2018 at 06:50:03PM +, Peter Maydell wrote: > On Mon, 3 Dec 2018 at 11:04, Peng Hao wrote: > > > > The first patches are simple cleanups: > > - patch 1 move the pvpanic device with the 'ocmmon objects' so we > > compile > >it once for the x86/arm/aarch64 ar

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 12:47, Daniel P. Berrangé wrote: > After it had merged there were some changes and the question of turning > it into a PCI device was raised. Paolo was concerned that the guest OS > is in an unknown state (arbitrary locks held, data structures corrupt, > etc) when panic is fi

Re: [Qemu-devel] [PATCH v5 27/36] sysbus: add a sysbus_mmio_unmap() helper

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 12:33, Cédric Le Goater wrote: > A completely new interrupt controller was introduced on the POWER9 > processor and it uses MMIO regions for interrupt management. These > regions are backed by simple MRs in QEMU, when using TCG, and backed > by ram_device_ptr MRs under KVM. >

Re: [Qemu-devel] [PATCH 0/3] vfio-ccw: support hsch/csch (kernel part)

2018-12-04 Thread Cornelia Huck
On Tue, 4 Dec 2018 13:38:10 +0100 Halil Pasic wrote: > On Thu, 22 Nov 2018 17:54:29 +0100 > Cornelia Huck wrote: > > > [This is the Linux kernel part, git tree is available at > > https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/vfio-ccw.git > > vfio-ccw-caps > > > > The companion QEMU

Re: [Qemu-devel] [PATCH for-3.2 v4 16/28] hw: apply machine compat properties without touching globals

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 09:41:42 -0200 Eduardo Habkost wrote: > On Fri, Nov 30, 2018 at 11:55:26AM +0100, Igor Mammedov wrote: > > On Fri, 30 Nov 2018 01:36:03 +0400 > > Marc-André Lureau wrote: > > > > > Hi > > > > > > On Thu, Nov 29, 2018 at 9:51 PM Eduardo Habkost > > > wrote: > > > > > >

[Qemu-devel] [PATCH v3 0/6] monitor: misc fixes

2018-12-04 Thread Marc-André Lureau
Hi, Here is a small series of fixes for the monitor, mostly related to threading issues. v3: - replaced an error_report() with an assert() - simplify a mon->use_io_thread condition, removing needless QMP check - modify/add some code comments - update commit messages v2 bis: - update comment

[Qemu-devel] [PATCH v3 1/6] monitor: inline ambiguous helper functions

2018-12-04 Thread Marc-André Lureau
The function were not named with "mon_iothread", or following the AIO vs GMainContext distinction. Inline them instead. Signed-off-by: Marc-André Lureau Reviewed-by: Peter Xu Reviewed-by: Markus Armbruster --- monitor.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) dif

[Qemu-devel] [PATCH v3 4/6] monitor: check if chardev can switch gcontext for OOB

2018-12-04 Thread Marc-André Lureau
Not all backends are able to switch gcontext. Those backends cannot drive a OOB monitor (the monitor would then be blocking on main thread). For example, ringbuf, spice, or more esoteric input chardevs like braille or MUX. We currently forbid MUX because not all frontends are ready to run outside

[Qemu-devel] [PATCH v3 2/6] monitor: accept chardev input from iothread

2018-12-04 Thread Marc-André Lureau
Chardev backends may not handle safely IO events from concurrent threads (they are not thread-safe in general, only the write path is since commit > 9005b2a7589540a3733b3abdcfbccfe7746cd1a1). Better to wake up the chardev from the monitor IO thread if it's being used as the chardev context. Unify

[Qemu-devel] [PATCH v3 6/6] monitor: avoid potential dead-lock when cleaning up

2018-12-04 Thread Marc-André Lureau
When a monitor is connected to a Spice chardev, the monitor cleanup can dead-lock: #0 0x7f43446637fd in __lll_lock_wait () at /lib64/libpthread.so.0 #1 0x7f434465ccf4 in pthread_mutex_lock () at /lib64/libpthread.so.0 #2 0x556dd79f22ba in qemu_mutex_lock_impl (mutex=0x556dd81c922

[Qemu-devel] [PATCH v3 3/6] char: add a QEMU_CHAR_FEATURE_GCONTEXT flag

2018-12-04 Thread Marc-André Lureau
The feature should be set if the chardev is able to switch GMainContext. Callers that want to put a chardev in a different thread context can/should check this capability. Otherwise, print an error (arguably, it may assert instead). Signed-off-by: Marc-André Lureau --- include/chardev/char.h |

[Qemu-devel] [PATCH v3 5/6] monitor: prevent inserting new monitors after cleanup

2018-12-04 Thread Marc-André Lureau
monitor_cleanup() is one of the last things main() calls before it returns. In the following patch, monitor_cleanup() will release the monitor_lock during flushing. There may be pending commands to insert new monitors, which would modify the mon_list during iteration, and the clean-up could thus m

Re: [Qemu-devel] [PATCH RFC] qdev: Let the hotplug_unplug() caller delete the device

2018-12-04 Thread David Hildenbrand
On 03.12.18 17:01, Cornelia Huck wrote: > On Wed, 28 Nov 2018 15:54:55 +0100 > David Hildenbrand wrote: > >> When unplugging a device, at one point the device will be destroyed >> via object_unparent(). This will, one the one hand, unrealize the >> device hierarchy to be removed, and on the other

Re: [Qemu-devel] [PATCH v2] hostmem: Validate host-nodes before setting bitmap

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 10:28:44 -0200 Eduardo Habkost wrote: > host_memory_backend_set_host_nodes() was not validating > host-nodes before writing to backend->host_nodes, making QEMU > write beyond the end of the bitmap. > > Fix the crash and add a simple regression test for the fix. > > While at

[Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init

2018-12-04 Thread Peter Maydell
The timer_new() function allocates memory; this means that if we call it in the CPU's init method we would need to provide an instance_finalize method to free it. Defer the timer creation to the realize function instead. This fixes a memory leak spotted by clang LeakSanitizer when a CPU object is

[Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()

2018-12-04 Thread Peter Maydell
In sdhci_sysbus_realize() we override the initialization of s->iomem that sdhci_common_realize() performs. However we don't destroy the old memory region before reinitializing it, which means that the memory allocated for mr->name in memory_region_do_init() is leaked. Since sdhci_initfn() already

[Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma()

2018-12-04 Thread Peter Maydell
The clang leak sanitizer spots a (one-off, trivial) memory leak in make_dma() due to a missing free. Signed-off-by: Peter Maydell --- hw/arm/mps2-tz.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index 6dd02ae47e8..82b1d020a58 100644 --- a/hw/arm/mps2-t

[Qemu-devel] [PATCH 4/5] tests/test-arm-mptimer: Don't leak string memory

2018-12-04 Thread Peter Maydell
The test-arm-mptimer setup creates a lot of test names using g_strdup_printf() and never frees them. This is entirely harmless since it's one-shot test code, but it clutters up the output from clang's LeakSanitizer. Refactor to use a helper function so we can free the memory. Signed-off-by: Peter

Re: [Qemu-devel] [PATCH RFC] qdev: Let the hotplug_unplug() caller delete the device

2018-12-04 Thread Igor Mammedov
On Wed, 28 Nov 2018 15:54:55 +0100 David Hildenbrand wrote: > When unplugging a device, at one point the device will be destroyed > via object_unparent(). This will, one the one hand, unrealize the > device hierarchy to be removed, and on the other hand, destroy/free the > device hierarchy. > >

Re: [Qemu-devel] [PATCH v6 07/13] fpu: introduce hardfloat

2018-12-04 Thread Richard Henderson
On 12/4/18 6:28 AM, Alex Bennée wrote: > Emilio G. Cota writes: >> This assumes that QEMU is running on an IEEE754-compliant FPU and >> that the rounding is set to the default (to nearest). The >> implementation-dependent specifics of the FPU should not matter; things >> like tininess detection an

[Qemu-devel] [PATCH 0/5] arm: five simple memory leak fixes

2018-12-04 Thread Peter Maydell
I ran 'make check' with the clang sanitizers enabled, which it turns out these days includes LeakSanitizer. That points out a fair number of memory leaks, most of which are not terribly significant. This patchset fixes five of them (there are plenty more to do). The "device does timer_new() in its

[Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries

2018-12-04 Thread Peter Maydell
When we add a new entry to the ARMCPRegInfo hash table in add_cpreg_to_hashtable(), we allocate memory for tehe ARMCPRegInfo struct itself, and we also g_strdup() the name string. So the hashtable's value destructor function must free the name string as well as the struct. Spotted by clang's leak

[Qemu-devel] [PATCH] s390/MAINTAINERS: Add Halil as kvm and machine maintainer

2018-12-04 Thread Christian Borntraeger
Halil does more work in this area than I do right now. Lets add Halil. Signed-off-by: Christian Borntraeger --- MAINTAINERS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 63effdc473..76fbf1331a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Paolo Bonzini
On 04/12/18 13:59, Peter Maydell wrote: > On Tue, 4 Dec 2018 at 12:47, Daniel P. Berrangé wrote: >> After it had merged there were some changes and the question of turning >> it into a PCI device was raised. Paolo was concerned that the guest OS >> is in an unknown state (arbitrary locks held, dat

Re: [Qemu-devel] [PATCH v3 5/8] hw: arm: Convert the RSDP build to the buid_append_foo() API

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 14:00:29 +0100 Samuel Ortiz wrote: > Instead of filling a mapped and packed C structure field in random order > and being careful about endianness and sizes, build_rsdp() now uses > build_append_int_noprefix() to compose RSDP table. > > This makes reviewing and maintaining co

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Peter Maydell
On Tue, 4 Dec 2018 at 13:30, Paolo Bonzini wrote: > > On 04/12/18 13:59, Peter Maydell wrote: > > ...and if we'd done it that way in the first place for x86 then > > we wouldn't be having to do anything at all now for Arm. > > That suggests to me that we should do it that way now, and then we > >

Re: [Qemu-devel] [PATCH v3 6/8] hw: arm: Support both legacy and current RSDP build

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 14:00:30 +0100 Samuel Ortiz wrote: > We add the ability to build legacy or current RSDP tables, based on the > AcpiRsdpData revision field passed to build_rsdp(). > Although arm/virt only uses RSDP v2, adding that capability to > build_rsdp will allow us to share the RSDP buil

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Daniel P . Berrangé
On Tue, Dec 04, 2018 at 12:59:51PM +, Peter Maydell wrote: > On Tue, 4 Dec 2018 at 12:47, Daniel P. Berrangé wrote: > > After it had merged there were some changes and the question of turning > > it into a PCI device was raised. Paolo was concerned that the guest OS > > is in an unknown state

[Qemu-devel] [PATCH] permit dynamic adjust compress level when migration running

2018-12-04 Thread Ivan Ren
After commit dcaf446ebda5d87e05eb41cdbafb7ae4a7cc4a62, we can't dynamic adjust the compress level when migration running. For some scenes, dynamic adjust the compress level to change the compress behavior without restart a new migration is useful. Signed-off-by: Ivan Ren --- migration/ram.c | 32

Re: [Qemu-devel] [PATCH v6 07/13] fpu: introduce hardfloat

2018-12-04 Thread Alex Bennée
Richard Henderson writes: > On 12/4/18 6:28 AM, Alex Bennée wrote: >> Emilio G. Cota writes: >>> This assumes that QEMU is running on an IEEE754-compliant FPU and >>> that the rounding is set to the default (to nearest). The >>> implementation-dependent specifics of the FPU should not matter;

Re: [Qemu-devel] [PATCH V11 0/8] add pvpanic mmio support

2018-12-04 Thread Paolo Bonzini
On 04/12/18 14:43, Peter Maydell wrote: > The point about PCI is that it is the same everywhere and > discoverable, and easy for the user to add to the system or not. > MMIO requires extra work for every board model that we want to > put the device into, plus extra on both kernel and QEMU side > fo

Re: [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries

2018-12-04 Thread Richard Henderson
On 12/4/18 7:29 AM, Peter Maydell wrote: > When we add a new entry to the ARMCPRegInfo hash table in > add_cpreg_to_hashtable(), we allocate memory for tehe > ARMCPRegInfo struct itself, and we also g_strdup() the > name string. So the hashtable's value destructor function > must free the name stri

Re: [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma()

2018-12-04 Thread Richard Henderson
On 12/4/18 7:29 AM, Peter Maydell wrote: > The clang leak sanitizer spots a (one-off, trivial) memory > leak in make_dma() due to a missing free. > > Signed-off-by: Peter Maydell > --- > hw/arm/mps2-tz.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()

2018-12-04 Thread Richard Henderson
On 12/4/18 7:29 AM, Peter Maydell wrote: > In sdhci_sysbus_realize() we override the initialization of > s->iomem that sdhci_common_realize() performs. However we > don't destroy the old memory region before reinitializing > it, which means that the memory allocated for mr->name in > memory_region_

Re: [Qemu-devel] [PATCH 4/5] tests/test-arm-mptimer: Don't leak string memory

2018-12-04 Thread Richard Henderson
On 12/4/18 7:29 AM, Peter Maydell wrote: > The test-arm-mptimer setup creates a lot of test names using > g_strdup_printf() and never frees them. This is entirely > harmless since it's one-shot test code, but it clutters > up the output from clang's LeakSanitizer. Refactor to > use a helper functio

Re: [Qemu-devel] [PATCH 5/5] target/arm: Create timers in realize, not init

2018-12-04 Thread Richard Henderson
On 12/4/18 7:29 AM, Peter Maydell wrote: > The timer_new() function allocates memory; this means that > if we call it in the CPU's init method we would need > to provide an instance_finalize method to free it. Defer > the timer creation to the realize function instead. > > This fixes a memory leak

Re: [Qemu-devel] [PATCH v3 7/8] hw: acpi: Export and share the ARM RSDP build

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 14:00:31 +0100 Samuel Ortiz wrote: > Now that build_rsdp() supports building both legacy and current RSDP > tables, we can move it to a generic folder (hw/acpi) and have the i386 > ACPI code reuse it in order to reduce code duplication. > > Signed-off-by: Samuel Ortiz > Revi

Re: [Qemu-devel] [PATCH v3 8/8] hw: acpi: Remove AcpiRsdpDescriptor and fix tests

2018-12-04 Thread Igor Mammedov
On Fri, 30 Nov 2018 14:00:32 +0100 Samuel Ortiz wrote: > The only remaining AcpiRsdpDescriptor users are the ACPI utils for the > BIOS table tests. > We remove that dependency and can thus remove the structure itself. > > Signed-off-by: Samuel Ortiz Reviewed-by: Igor Mammedov > --- > includ

[Qemu-devel] [PATCH for-3.2 v5 00/19] Generalize machine compatibility properties

2018-12-04 Thread Marc-André Lureau
Hi, During "[PATCH v2 05/10] qom/globals: generalize object_property_set_globals()" review, Eduardo suggested to rework the GlobalProperty handling, so that -global is limited to QDev only and we avoid mixing the machine compats and the user-provided -global properties (instead of generalizing -gl

[Qemu-devel] [PATCH for-3.2 v5 01/19] tests: qdev_prop_check_globals() doesn't return "all_used"

2018-12-04 Thread Marc-André Lureau
Instead, it returns 1 if an error was detected, which is the case for: /qdev/properties/dynamic/global/subprocess: warning: global dynamic-prop-type-bad.prop3 has invalid class name warning: global nohotplug-type.prop5=105 not used warning: global nondevice-type.prop6 has invalid class name Clari

[Qemu-devel] [PATCH for-3.2 v5 03/19] qom: make user_creatable_complete() specific to UserCreatable

2018-12-04 Thread Marc-André Lureau
Instead of accepting any Object*, change user_creatable_complete() to require a UserCreatable*. Modify the callers to pass the appropriate argument, removing redundant dynamic cast checks in object creation. Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Eduardo Habkost

[Qemu-devel] [PATCH for-3.2 v5 10/19] qdev: make a separate helper function to apply compat properties

2018-12-04 Thread Marc-André Lureau
This will allow to apply compat properties on other objects than QDev easily. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 2 ++ hw/core/qdev.c | 6 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index

[Qemu-devel] [PATCH for-3.2 v5 12/19] qdev-props: convert global_props to GPtrArray

2018-12-04 Thread Marc-André Lureau
A step towards being able to call a common function, object_apply_global_props(). Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.

[Qemu-devel] [PATCH for-3.2 v5 02/19] qom: make interface types abstract

2018-12-04 Thread Marc-André Lureau
Interfaces don't have instance, let's make the interface type really abstract to avoid confusion. Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- include/hw/acpi/acpi_dev_interface.h | 6 +- include/hw/arm/linux-boot-if.h | 5 + includ

[Qemu-devel] [PATCH for-3.2 v5 06/19] qom: remove unimplemented class_finalize

2018-12-04 Thread Marc-André Lureau
Instead of trying to implement something that isn't well specified, remove it. (it would be tricky to implement, since a class struct is memcpy on children types...) Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov Reviewed-by: Eduardo Habkost --- include/qom/object.h | 7 ++-

Re: [Qemu-devel] [PATCH for-3.2 v5 00/19] Generalize machine compatibility properties

2018-12-04 Thread Marc-André Lureau
Sorry, I forgot to change the subject prefix, it should read for-4.0 :)

[Qemu-devel] [PATCH for-3.2 v5 13/19] qdev-props: remove errp from GlobalProperty

2018-12-04 Thread Marc-André Lureau
All qdev_prop_register_global() set &error_fatal for errp, except '-rtc driftfix=slew', which arguably should also use &error_fatal, as otherwise failing to apply the property would only report a warning. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h| 6 -- hw/core/qdev-pro

[Qemu-devel] [PATCH for-3.2 v5 04/19] accel: register global_props like machine globals

2018-12-04 Thread Marc-André Lureau
global_props is only used for Xen xen_compat_props. It's a static array of GlobalProperty, like machine globals in SET_MACHINE_COMPAT(). Let's register the globals the same way, without extra copy allocation. Signed-off-by: Marc-André Lureau Reviewed-by: Igor Mammedov --- include/hw/qdev-proper

[Qemu-devel] [PATCH for-3.2 v5 07/19] hw: apply accel compat properties without touching globals

2018-12-04 Thread Marc-André Lureau
Instead of registering compat properties as globals, let's keep them in their own array, to avoid mixing with user globals. Introduce object_apply_global_props() function, to apply compatibility properties from a GPtrArray. Signed-off-by: Marc-André Lureau --- include/hw/qdev-core.h | 10 ++

Re: [Qemu-devel] [PATCH 07/18] xen: add event channel interface for XenDevice-s

2018-12-04 Thread Anthony PERARD
On Mon, Dec 03, 2018 at 04:24:24PM +, Anthony PERARD wrote: > On Wed, Nov 21, 2018 at 03:12:00PM +, Paul Durrant wrote: > > +static void xen_device_event(void *opaque) > > +{ > > +XenDevice *xendev = opaque; > > +unsigned long port = xenevtchn_pending(xendev->xeh); > > + > > +no

[Qemu-devel] [PATCH for-3.2 v5 18/19] hw/arm/virt: add virt-4.0 machine type

2018-12-04 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- hw/arm/virt.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 530c8ca89d..433374f0d0 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1797,7 +1797,7 @@ static void machvirt_machi

[Qemu-devel] [PATCH for-3.2 v5 05/19] qdev: move qdev_prop_register_global_list() to tests

2018-12-04 Thread Marc-André Lureau
The function is only used by a test, move it there. Signed-off-by: Marc-André Lureau Reviewed-by: Eduardo Habkost Reviewed-by: Igor Mammedov Reviewed-by: Philippe Mathieu-Daudé --- include/hw/qdev-properties.h | 1 - hw/core/qdev-properties.c | 9 - tests/test-qdev-global-pro

[Qemu-devel] [PATCH for-3.2 v5 11/19] qdev: all globals are now user-provided

2018-12-04 Thread Marc-André Lureau
All globals are now either provided via -global or through -cpu features (CPU features are implemented by registering globals). If the global isn't being used, it should warn in either case. We can thus consider that all global_props are "user-provided" globals. No need to track this per-globals

Re: [Qemu-devel] [PATCH 3/5] hw/sd/sdhci: Don't leak memory region in sdhci_sysbus_realize()

2018-12-04 Thread Philippe Mathieu-Daudé
On 4/12/18 14:29, Peter Maydell wrote: > In sdhci_sysbus_realize() we override the initialization of > s->iomem that sdhci_common_realize() performs. However we > don't destroy the old memory region before reinitializing > it, which means that the memory allocated for mr->name in > memory_region_do

[Qemu-devel] [PATCH for-3.2 v5 09/19] hw: remove SET_MACHINE_COMPAT

2018-12-04 Thread Marc-André Lureau
No longer needed. Signed-off-by: Marc-André Lureau --- include/hw/boards.h | 16 1 file changed, 16 deletions(-) diff --git a/include/hw/boards.h b/include/hw/boards.h index 28c2b0af41..f743d9d4a4 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -287,20 +287,4 @@ s

Re: [Qemu-devel] [PATCH 1/5] target/arm: Free name string in ARMCPRegInfo hashtable entries

2018-12-04 Thread Philippe Mathieu-Daudé
On 4/12/18 14:29, Peter Maydell wrote: > When we add a new entry to the ARMCPRegInfo hash table in > add_cpreg_to_hashtable(), we allocate memory for tehe "for the"? > ARMCPRegInfo struct itself, and we also g_strdup() the > name string. So the hashtable's value destructor function > must free th

[Qemu-devel] [PATCH for-3.2 v5 08/19] hw: apply machine compat properties without touching globals

2018-12-04 Thread Marc-André Lureau
Similarly to accel properties, move compat properties out of globals registration, and apply the machine compat properties during device_post_init(). As suggested during review, populating the arrays can be done directly without resorting to using macros. Signed-off-by: Marc-André Lureau --- in

Re: [Qemu-devel] [PATCH 2/5] hw/arm/mps2-tz.c: Free mscname string in make_dma()

2018-12-04 Thread Philippe Mathieu-Daudé
On 4/12/18 14:29, Peter Maydell wrote: > The clang leak sanitizer spots a (one-off, trivial) memory > leak in make_dma() due to a missing free. > > Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > --- > hw/arm/mps2-tz.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git

[Qemu-devel] [PATCH for-3.2 v5 14/19] qdev-props: call object_apply_global_props()

2018-12-04 Thread Marc-André Lureau
It's now possible to use the common function. Teach object_apply_global_props() to warn if Error argument is NULL. Signed-off-by: Marc-André Lureau --- hw/core/qdev-properties.c | 24 ++-- qom/object.c | 12 +++- 2 files changed, 13 insertions(+), 23 del

[Qemu-devel] [PATCH for-3.2 v5 17/19] hw/i386: add pc-i440fx-4.0 & pc-q35-4.0

2018-12-04 Thread Marc-André Lureau
The following patch is going to add compatiblity parameters for qemu <= 3.1. Signed-off-by: Marc-André Lureau --- include/hw/compat.h | 3 +++ include/hw/i386/pc.h | 3 +++ hw/i386/pc_piix.c| 21 + hw/i386/pc_q35.c | 18 -- 4 files changed, 39 inser

[Qemu-devel] [PATCH for-3.2 v5 15/19] qom: add object_class_get_class_data()

2018-12-04 Thread Marc-André Lureau
Add a simple function to retrieve the associated class data. Signed-off-by: Marc-André Lureau --- include/qom/object.h | 9 + qom/object.c | 5 + 2 files changed, 14 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index 5183c587f3..d5266405da 100644 --

[Qemu-devel] [PATCH for-3.2 v5 16/19] RFC: arm: replace instance_post_init()

2018-12-04 Thread Marc-André Lureau
Replace arm_cpu_post_init() instance callback by calling it from leaf classes, to avoid potential ordering issue with other post_init callbacks. Note: this patch is no longer needed in this series, since the compat-props interface approach was abandoned. Signed-off-by: Marc-André Lureau Suggeste

[Qemu-devel] [PATCH for-3.2 v5 19/19] hostmem: use object id for memory region name with >= 4.0

2018-12-04 Thread Marc-André Lureau
hostmem-file and hostmem-memfd use the whole object path for the memory region name, and hostname-ram uses only the path component (the object id, or canonical path basename): qemu -m 1024 -object memory-backend-file,id=mem,size=1G,mem-path=/tmp/foo -numa node,memdev=mem -monitor stdio (qemu) inf

Re: [Qemu-devel] hax_enabled() cannot be called in vl.c

2018-12-04 Thread Paolo Bonzini
On 04/12/18 15:45, Peter Maydell wrote: > kvm_enabled() does a similar thing to what hax_enabled() does, > but this works out OK because it takes care to avoid > providing the #define-to-0 implementation except in the > case where it is building a target-specific file for a > target where KVM is no

Re: [Qemu-devel] [PATCH v3 4/8] hw: arm: Carry RSDP specific data through AcpiRsdpData

2018-12-04 Thread Andrew Jones
On Fri, Nov 30, 2018 at 02:00:28PM +0100, Samuel Ortiz wrote: > That will allow us to generalize the ARM build_rsdp() routine to support > both legacy RSDP (The current i386 implementation) and extended RSDP > (The ARM implementation). > > Signed-off-by: Samuel Ortiz > Reviewed-by: Igor Mammedov

Re: [Qemu-devel] [PATCH v3 6/8] hw: arm: Support both legacy and current RSDP build

2018-12-04 Thread Andrew Jones
On Fri, Nov 30, 2018 at 02:00:30PM +0100, Samuel Ortiz wrote: > We add the ability to build legacy or current RSDP tables, based on the > AcpiRsdpData revision field passed to build_rsdp(). > Although arm/virt only uses RSDP v2, adding that capability to > build_rsdp will allow us to share the RSDP

[Qemu-devel] hax_enabled() cannot be called in vl.c

2018-12-04 Thread Peter Maydell
In vl.c we do this: if (hax_enabled()) { hax_sync_vcpus(); } But hax_enabled() varies depending on CONFIG_HAX: if that is not defined then it is "#define hax_enabled() (0)", otherwise it is a function. And CONFIG_HAX is a per-target configuration define, only set for i386-softmmu

Re: [Qemu-devel] [qemu-s390x] [PATCH] s390/MAINTAINERS: Add Halil as kvm and machine maintainer

2018-12-04 Thread Halil Pasic
On Tue, 4 Dec 2018 14:38:02 +0100 Christian Borntraeger wrote: > Halil does more work in this area than I do right now. Lets add Halil. > > Signed-off-by: Christian Borntraeger Acked-by: Halil Pasic > --- > MAINTAINERS | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --

Re: [Qemu-devel] [PATCH 0/3] vfio-ccw: support hsch/csch (kernel part)

2018-12-04 Thread Halil Pasic
On Tue, 4 Dec 2018 14:11:30 +0100 Cornelia Huck wrote: > On Tue, 4 Dec 2018 13:38:10 +0100 > Halil Pasic wrote: > > > On Thu, 22 Nov 2018 17:54:29 +0100 > > Cornelia Huck wrote: > > > > > [This is the Linux kernel part, git tree is available at > > > https://git.kernel.org/pub/scm/linux/kerne

[Qemu-devel] [PATCH v3 2/3] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2018-12-04 Thread Stefan Berger
Make sure that the new locality passed to tpm_tis_prep_abort() is valid. Add a comment to aborting_locty that it may be any locality, including TPM_TIS_NO_LOCALITY. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/tpm/tp

[Qemu-devel] [PATCH v3 1/3] tpm: Remove unused locty parameter from tpm_tis_abort()

2018-12-04 Thread Stefan Berger
Remove the unused locty parameter from tpm_tis_abort() function. Signed-off-by: Stefan Berger Reviewed-by: Philippe Mathieu-Daudé --- hw/tpm/tpm_tis.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index d9322692ee..176d424ed9 10064

[Qemu-devel] [PATCH v3 3/3] tpm: Make sure the locality received from backend is valid

2018-12-04 Thread Stefan Berger
Make sure that the locality passed from the backend to tpm_tis_request_completed() is valid. Signed-off-by: Stefan Berger --- hw/tpm/tpm_tis.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 04e4ad9212..2563d7501f 100644 --- a/hw/tpm/tpm_tis.c +++

Re: [Qemu-devel] hax_enabled() cannot be called in vl.c

2018-12-04 Thread Thomas Huth
On 2018-12-04 15:45, Peter Maydell wrote: > In vl.c we do this: > > if (hax_enabled()) { > hax_sync_vcpus(); > } > > But hax_enabled() varies depending on CONFIG_HAX: if that is > not defined then it is "#define hax_enabled() (0)", otherwise > it is a function. And CONFIG_HAX is a

[Qemu-devel] [PATCH v3 0/3] Cleanup and locality range check

2018-12-04 Thread Stefan Berger
This series of patches removes an unnecessary parameter from tpm_tis_abort() and adds a locality range check to tpm_tis_prep_abort() and tpm_tis_request_completed(). Stefan Stefan Berger (3): tpm: Remove unused locty parameter from tpm_tis_abort() tpm: Make sure new locality passed to tpm_

Re: [Qemu-devel] [PATCH v3 8/8] hw: acpi: Remove AcpiRsdpDescriptor and fix tests

2018-12-04 Thread Andrew Jones
On Fri, Nov 30, 2018 at 02:00:32PM +0100, Samuel Ortiz wrote: > The only remaining AcpiRsdpDescriptor users are the ACPI utils for the > BIOS table tests. > We remove that dependency and can thus remove the structure itself. > > Signed-off-by: Samuel Ortiz > --- > include/hw/acpi/acpi-defs.h | 1

Re: [Qemu-devel] [PATCH v5 19/36] spapr: add a 'pseries-3.1-xive' machine type

2018-12-04 Thread Cédric Le Goater
On 11/28/18 11:37 PM, Cédric Le Goater wrote: > On 11/28/18 5:42 AM, David Gibson wrote: >> On Fri, Nov 16, 2018 at 11:57:12AM +0100, Cédric Le Goater wrote: >>> The interrupt mode is statically defined to XIVE only for this machine. >>> The guest OS is required to have support for the XIVE exploit

Re: [Qemu-devel] [PATCH v3 2/3] tpm: Make sure new locality passed to tpm_tis_prep_abort() is valid

2018-12-04 Thread Marc-André Lureau
On Tue, Dec 4, 2018 at 7:04 PM Stefan Berger wrote: > > Make sure that the new locality passed to tpm_tis_prep_abort() > is valid. > > Add a comment to aborting_locty that it may be any locality, including > TPM_TIS_NO_LOCALITY. > > Signed-off-by: Stefan Berger Reviewed-by: Marc-André Lureau >

  1   2   3   >