Difficulty making usb-serial device visible within the guest

2020-08-19 Thread Mark Cave-Ayland
Hi all, I've been playing a bit with the usb-serial device recently and found it surprisingly difficult to make it visible within the guest. As an example my first test was to simply plug the device into the guest USB and verify that the drivers could identify the device: $ ./qemu-system-ppc -

Re: [PATCH 2/8] linux-headers: Update for KVM_DEV_XIVE_GRP_SOURCE_INFO

2020-08-19 Thread Cédric Le Goater
On 8/20/20 2:58 AM, David Gibson wrote: > On Wed, Aug 19, 2020 at 03:08:37PM +0200, Cédric Le Goater wrote: >> To be sent with the linux-headers update when support is merged. > > Ah, so this isn't ready to go just yet. No indeed. We should get the QEMU part correct first, and handle safely the

Re: [PATCH] spapr/xive: Allocate IPIs from the vCPU contexts

2020-08-19 Thread Cédric Le Goater
On 8/20/20 2:42 AM, David Gibson wrote: > On Sun, Aug 16, 2020 at 03:38:20PM +0200, Cédric Le Goater wrote: >> On 8/16/20 6:30 AM, David Gibson wrote: >>> On Fri, Aug 14, 2020 at 05:08:13PM +0200, Cédric Le Goater wrote: This works as expected with a 128 vCPUs guest with pinned vcpus. The

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Thu, Aug 20, 2020 at 06:16:28AM +0100, Sean Mooney wrote: > On Thu, 2020-08-20 at 12:01 +0800, Yan Zhao wrote: > > On Thu, Aug 20, 2020 at 02:29:07AM +0100, Sean Mooney wrote: > > > On Thu, 2020-08-20 at 08:39 +0800, Yan Zhao wrote: > > > > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck

Re: [PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition

2020-08-19 Thread Cédric Le Goater
On 8/20/20 2:11 AM, Eduardo Habkost wrote: > The macro definition had an extra semicolon. This was never > noticed because the macro was only being used where it didn't > make a difference. > > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Daniel P. Berrangé > Signed-off-by: Eduardo Habkos

Re: [PATCH v2 06/58] aspeed_soc: Rename memmap/irqmap enum constants

2020-08-19 Thread Cédric Le Goater
On 8/20/20 2:11 AM, Eduardo Habkost wrote: > Some of the enum constant names conflict with the QOM type check > macros: > > ASPEED_GPIO > ASPEED_I2C > ASPEED_RTC > ASPEED_SCU > ASPEED_SDHCI > ASPEED_SDMC > ASPEED_VIC > ASPEED_WDT > ASPEED_XDMA > > This needs to be addressed to allow us to transfo

Re: [PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header

2020-08-19 Thread Gerd Hoffmann
On Wed, Aug 19, 2020 at 08:12:07PM -0400, Eduardo Habkost wrote: > Move the VHOST_USER_GPU type checking macro to virtio-gpu.h, > close to the TYPE_VHOST_USER_GPU #define. > > This will make future conversion to OBJECT_DECLARE* easier. > > Signed-off-by: Eduardo Habkost Reviewed-by: Gerd Hoffma

Re: [PATCH v7 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-08-19 Thread Philippe Mathieu-Daudé
On 8/20/20 7:29 AM, Philippe Mathieu-Daudé wrote: > +Eric / Richard for compiler optimizations. > > On 8/20/20 3:53 AM, Havard Skinnemoen wrote: >> On Tue, Aug 11, 2020 at 8:26 PM Havard Skinnemoen >> wrote: >>> >>> On Tue, Aug 11, 2020 at 1:48 AM Philippe Mathieu-Daudé >>> wrote: INTERRUP

Re: [PATCH v5 1/1] audio/jack: fix use after free segfault

2020-08-19 Thread Gerd Hoffmann
Hi, > > +qemu_bh_cancel(c->shutdown_bh); > > Looks like a potential race. Quote from the API doc of qemu_bh_cancel(): > > "While cancellation itself is also wait-free and thread-safe, it can of > > course race with the loop that executes bottom halves unless you are

Re: [PATCH v7 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-08-19 Thread Philippe Mathieu-Daudé
+Eric / Richard for compiler optimizations. On 8/20/20 3:53 AM, Havard Skinnemoen wrote: > On Tue, Aug 11, 2020 at 8:26 PM Havard Skinnemoen > wrote: >> >> On Tue, Aug 11, 2020 at 1:48 AM Philippe Mathieu-Daudé >> wrote: >>> INTERRUPTED: Test interrupted by SIGTERM >>> Runner error occurred: Ti

Re: QEMU Library support

2020-08-19 Thread Pratik Parvati
>> Hi team, >> >> Lately, I have been working on QEMU modeling and interfacing it into the >> existing platform. What actually I wanted to check is; whether QEMU >> supports library that gives developers a clean interface to develop and >> integrate peripheral model in to QEMU. I know of the Greens

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Sean Mooney
On Thu, 2020-08-20 at 12:01 +0800, Yan Zhao wrote: > On Thu, Aug 20, 2020 at 02:29:07AM +0100, Sean Mooney wrote: > > On Thu, 2020-08-20 at 08:39 +0800, Yan Zhao wrote: > > > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > > > > On Tue, 18 Aug 2020 10:16:28 +0100 > > > > Daniel P.

Re: [PATCH 08/10] spapr: introduce SpaprMachineClass::numa_assoc_domains

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:22PM -0300, Daniel Henrique Barboza wrote: > We can't use the input from machine->numa_state->nodes directly > in the pSeries machine because PAPR does not work with raw distance > values, like ACPI SLIT does. We need to determine common > associativity domains, based

Re: [PATCH 02/10] numa: introduce MachineClass::forbid_asymmetrical_numa

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 10:11:28PM -0400, Eduardo Habkost wrote: > On Thu, Aug 20, 2020 at 11:17:26AM +1000, David Gibson wrote: > > On Fri, Aug 14, 2020 at 05:54:16PM -0300, Daniel Henrique Barboza wrote: > > > The pSeries machine does not support asymmetrical NUMA > > > configurations. > > > > T

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Thu, Aug 20, 2020 at 02:29:07AM +0100, Sean Mooney wrote: > On Thu, 2020-08-20 at 08:39 +0800, Yan Zhao wrote: > > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > > > On Tue, 18 Aug 2020 10:16:28 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Tue, Aug 18, 2020 at 05:01

Re: [PATCH 07/10] spapr: create helper to set ibm,associativity

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:21PM -0300, Daniel Henrique Barboza wrote: > We have several places around hw/ppc files where we use the > same code to set the ibm,associativity array. This patch > creates a helper called spapr_set_associativity() to do > that in a single place. It'll also make it sa

Re: [PATCH 05/10] spapr: make ibm,max-associativity-domains scale with user input

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:19PM -0300, Daniel Henrique Barboza wrote: > The ibm,max-associativity-domains is considering that only a single > associativity domain can exist in the same NUMA level. This is true > today because we do not support any type of NUMA distance user > customization, and

Re: [PATCH 04/10] spapr: add spapr_machine_using_legacy_numa() helper

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:18PM -0300, Daniel Henrique Barboza wrote: > The changes to come to NUMA support are all guest visible. In > theory we could just create a new 5_1 class option flag to > avoid the changes to cascade to 5.1 and under. The reality is that > these changes are only relevan

Re: [PATCH 03/10] spapr: robustify NVLink2 NUMA node logic

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:17PM -0300, Daniel Henrique Barboza wrote: > NVLink2 GPUs are allocated in their own NUMA node, at maximum > distance from every other resource in the board. The existing > logic makes some assumptions that don't scale well: > > - only NVLink2 GPUs will ever require s

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Wed, Aug 19, 2020 at 09:22:34PM -0600, Alex Williamson wrote: > On Thu, 20 Aug 2020 08:39:22 +0800 > Yan Zhao wrote: > > > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > > > On Tue, 18 Aug 2020 10:16:28 +0100 > > > Daniel P. Berrangé wrote: > > > > > > > On Tue, Aug 18, 2

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Wed, Aug 19, 2020 at 09:13:45PM -0600, Alex Williamson wrote: > On Thu, 20 Aug 2020 08:18:10 +0800 > Yan Zhao wrote: > > > On Wed, Aug 19, 2020 at 11:50:21AM -0600, Alex Williamson wrote: > > <...> > > > > > > > What I care about is that we have a *standard* userspace API for > > > > > > > per

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Alex Williamson
On Thu, 20 Aug 2020 08:39:22 +0800 Yan Zhao wrote: > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > > On Tue, 18 Aug 2020 10:16:28 +0100 > > Daniel P. Berrangé wrote: > > > > > On Tue, Aug 18, 2020 at 05:01:51PM +0800, Jason Wang wrote: > > > >On 2020/8/18 下午4:55, Dani

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Alex Williamson
On Thu, 20 Aug 2020 08:18:10 +0800 Yan Zhao wrote: > On Wed, Aug 19, 2020 at 11:50:21AM -0600, Alex Williamson wrote: > <...> > > > > > > What I care about is that we have a *standard* userspace API for > > > > > > performing device compatibility checking / state migration, for use > > > > > > b

Re: [RFC v3 1/1] memory: Skip bad range assertion if notifier supports arbitrary masks

2020-08-19 Thread Jason Wang
On 2020/8/19 下午11:50, Peter Xu wrote: On Wed, Aug 19, 2020 at 03:15:26PM +0800, Jason Wang wrote: Yes, actually, I feel confused after reading the codes. Is notifier->start IOVA or GPA? In vfio.c, we did:     iommu_notifier_init(&giommu->n, vfio_iommu_map_notify,   

Re: [PATCH 02/10] numa: introduce MachineClass::forbid_asymmetrical_numa

2020-08-19 Thread Eduardo Habkost
On Thu, Aug 20, 2020 at 11:17:26AM +1000, David Gibson wrote: > On Fri, Aug 14, 2020 at 05:54:16PM -0300, Daniel Henrique Barboza wrote: > > The pSeries machine does not support asymmetrical NUMA > > configurations. > > This seems a bit oddly specific to have as a global machine class > property.

Re: [PATCH v6 0/8] Generalize start-powered-off property from ARM

2020-08-19 Thread Thiago Jung Bauermann
David Gibson writes: > On Wed, Aug 19, 2020 at 01:42:58PM -0300, Thiago Jung Bauermann wrote: >> This version has one small fix in patch 7, and adds Philippe's Reviewed-bys. >> >> Applies cleanly on dgibson/ppc-for-5.2. >> >> Original cover letter below, followed by changelog: >> >> >> The

Re: [PATCH v4 4/4] iotests: Test node/bitmap aliases during migration

2020-08-19 Thread Eric Blake
On 8/18/20 8:32 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/300 | 595 + tests/qemu-iotests/300.out | 5 + Rather sparse output (I hate debugging those sorts of outputs when the test is failing). tests/qemu-iotests/grou

Re: [PATCH v7 13/13] tests/acceptance: console boot tests for quanta-gsj

2020-08-19 Thread Havard Skinnemoen
On Tue, Aug 11, 2020 at 8:26 PM Havard Skinnemoen wrote: > > On Tue, Aug 11, 2020 at 1:48 AM Philippe Mathieu-Daudé > wrote: > > INTERRUPTED: Test interrupted by SIGTERM > > Runner error occurred: Timeout reached > > (240.45 s) > > > > Is that expected? > > I'm not sure why it only happens when

Re: [PATCH v6 0/8] Generalize start-powered-off property from ARM

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 01:42:58PM -0300, Thiago Jung Bauermann wrote: > This version has one small fix in patch 7, and adds Philippe's Reviewed-bys. > > Applies cleanly on dgibson/ppc-for-5.2. > > Original cover letter below, followed by changelog: > > > The ARM code has a start-powered-off pr

Re: [PATCH 02/10] numa: introduce MachineClass::forbid_asymmetrical_numa

2020-08-19 Thread David Gibson
On Fri, Aug 14, 2020 at 05:54:16PM -0300, Daniel Henrique Barboza wrote: > The pSeries machine does not support asymmetrical NUMA > configurations. This seems a bit oddly specific to have as a global machine class property. Would it make more sense for machines with specific NUMA constraints to j

Re: [PATCH 3/8] spapr/xive: Query the characteristics of a source in KVM

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 03:08:38PM +0200, Cédric Le Goater wrote: > When running a guest with a kernel IRQ chip enabled, the XIVE > characteristics of the interrupts are advertised to the guest in the > H_INT_GET_SOURCE_INFO hcall. These characteristics depend on the > underlying HW interrupts but

Re: [PATCH 7/8] spapr/xive: Use the xics flag to check for XIVE-only IRQ backends

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 03:08:42PM +0200, Cédric Le Goater wrote: I can see why this is a good idea, but it really needs a rationale in the comment for posterity. > Signed-off-by: Cédric Le Goater > --- > hw/ppc/spapr_irq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH v7 0/7] coroutines: generate wrapper code

2020-08-19 Thread Eric Blake
On 7/27/20 7:59 AM, Vladimir Sementsov-Ogievskiy wrote: 27.07.2020 15:48, Stefan Hajnoczi wrote: On Wed, Jun 10, 2020 at 01:03:29PM +0300, Vladimir Sementsov-Ogievskiy wrote: Hi all! The aim of the series is to reduce code-duplication and writing parameters structure-packing by hand around cor

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Sean Mooney
On Thu, 2020-08-20 at 08:39 +0800, Yan Zhao wrote: > On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > > On Tue, 18 Aug 2020 10:16:28 +0100 > > Daniel P. Berrangé wrote: > > > > > On Tue, Aug 18, 2020 at 05:01:51PM +0800, Jason Wang wrote: > > > >On 2020/8/18 下午4:55, Daniel P.

Re: [PATCH] virtio: vdpa: omit check return of g_malloc

2020-08-19 Thread Li Qiang
Philippe Mathieu-Daudé 于2020年8月19日周三 下午11:07写道: > > On 8/19/20 4:43 PM, Li Qiang wrote: > > If g_malloc fails, the application will be terminated. > > Which we don't want... better to use g_try_malloc() instead? I don't think so. If g_malloc return NULL it means a critical situation I think termi

Re: [PATCH] qtest: add fuzz test case

2020-08-19 Thread Li Qiang
Alexander Bulekov 于2020年8月20日周四 上午12:23写道: > > On 200819 2250, Li Qiang wrote: > > Philippe Mathieu-Daudé 于2020年8月19日周三 下午10:38写道: > > > > > On 8/19/20 4:15 PM, Li Qiang wrote: > > > > Currently the device fuzzer find a more and more issues. > > > > For every fuzz case, we need not only the fixes

Re: [PATCH v4 3/4] iotests.py: Let wait_migration() return on failure

2020-08-19 Thread Eric Blake
On 8/18/20 8:32 AM, Max Reitz wrote: Let wait_migration() return on failure (with the return value indicating whether the migration was completed or has failed), so we can use it for migrations that are expected to fail, too. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 18 +++

Re: [PATCH v4 2/4] iotests.py: Add wait_for_runstate()

2020-08-19 Thread Eric Blake
On 8/18/20 8:32 AM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) Reviewed-by: Eric Blake diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 717b5b652c..ee93cf22db 100644 --- a/tests/qe

Re: [PATCH v4 1/4] migration: Add block-bitmap-mapping parameter

2020-08-19 Thread Eric Blake
On 8/18/20 8:32 AM, Max Reitz wrote: This migration parameter allows mapping block node names and bitmap names to aliases for the purpose of block dirty bitmap migration. This way, management tools can use different node and bitmap names on the source and destination and pass the mapping of how

Re: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

2020-08-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200820001236.1284548-1-ehabk...@redhat.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN

Re: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

2020-08-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200820001236.1284548-1-ehabk...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN =

Re: [PATCH 1/8] spapr/xive: Add a 'hv-prio' property to represent the KVM escalation priority

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 03:08:36PM +0200, Cédric Le Goater wrote: > On POWER9, the KVM XIVE device uses priority 7 for the escalation > interrupts. On POWER10, the host can use a reduced set of priorities > and KVM will configure the escalation priority to a lower number. In > any case, the guest i

Re: [PATCH 2/8] linux-headers: Update for KVM_DEV_XIVE_GRP_SOURCE_INFO

2020-08-19 Thread David Gibson
On Wed, Aug 19, 2020 at 03:08:37PM +0200, Cédric Le Goater wrote: > To be sent with the linux-headers update when support is merged. Ah, so this isn't ready to go just yet. > > Signed-off-by: Cédric Le Goater > --- > linux-headers/asm-powerpc/kvm.h | 8 > 1 file changed, 8 insertions(

Re: [PATCH] spapr/xive: Allocate IPIs from the vCPU contexts

2020-08-19 Thread David Gibson
On Sun, Aug 16, 2020 at 03:38:20PM +0200, Cédric Le Goater wrote: > On 8/16/20 6:30 AM, David Gibson wrote: > > On Fri, Aug 14, 2020 at 05:08:13PM +0200, Cédric Le Goater wrote: > >> > >> This works as expected with a 128 vCPUs guest with pinned vcpus. The > >> first 64 IPIs are allocated on the fi

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Tue, Aug 18, 2020 at 11:36:52AM +0200, Cornelia Huck wrote: > On Tue, 18 Aug 2020 10:16:28 +0100 > Daniel P. Berrangé wrote: > > > On Tue, Aug 18, 2020 at 05:01:51PM +0800, Jason Wang wrote: > > >On 2020/8/18 下午4:55, Daniel P. Berrangé wrote: > > > > > > On Tue, Aug 18, 2020 at 11:24:30A

Re: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

2020-08-19 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200820001236.1284548-1-ehabk...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20200820001236.1284548-1-ehabk...@redhat.com Subject: [PATCH v2 00/58] qom: Automated c

Re: device compatibility interface for live migration with assigned devices

2020-08-19 Thread Yan Zhao
On Wed, Aug 19, 2020 at 11:50:21AM -0600, Alex Williamson wrote: <...> > > > > > What I care about is that we have a *standard* userspace API for > > > > > performing device compatibility checking / state migration, for use by > > > > > QEMU/libvirt/ OpenStack, such that we can write code without c

Re: [PATCH v7 0/1] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
Forgot to update this cover letter too, sorry for the spam, there are no changes to spice-input.c anymore On 2020-08-20 10:27, Geoffrey McRae wrote: v7: * removed accidental inclusion of spice-input changes Geoffrey McRae (1): audio/jack: fix use after free segfault audio/jackaudio.c | 5

[PATCH v6 0/1] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
v6: * delete the QEMUBH when finished * fix possible race by taking the iothread mutex * removed whitespace changes Geoffrey McRae (1): audio/jack: fix use after free segfault audio/jackaudio.c | 51 +-- ui/spice-input.c | 2 ++ 2 files chang

Re: [PATCH v13 00/11] iotests: Dump QCOW2 dirty bitmaps metadata

2020-08-19 Thread Eric Blake
On 8/14/20 6:56 AM, Andrey Shinkevich wrote: Dear Eric! Vladimir has compeated reviewing this series. I have not received any other responses to it so far. So, is it good for pull request now? Would you please consider taking this series as you did it with the Vladimir's related one? I've

[PATCH v6 1/1] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
This change registers a bottom handler to close the JACK client connection when a server shutdown signal is recieved. Without this libjack2 attempts to "clean up" old clients and causes a use after free segfault. Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 51 ++

Re: [PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

2020-08-19 Thread Eduardo Habkost
CCing everybody who replied to the v1 thread. I've CCed people on individual patches using get_maintainer.pl, but forgot to CC people from the v1 thread (sorry!). On Wed, Aug 19, 2020 at 08:11:38PM -0400, Eduardo Habkost wrote: > This is an extension of the series previously submitted by > Daniel

[PATCH v2 44/58] qom: provide convenient macros for declaring and defining types

2020-08-19 Thread Eduardo Habkost
From: Daniel P. Berrangé When creating new QOM types, there is a lot of boilerplate code that must be repeated using a standard pattern. This is tedious to write and liable to suffer from subtle inconsistencies. Thus it would benefit from some simple automation. QOM was loosely inspired by GLib'

[PATCH v2 58/58] crypto: use QOM macros for declaration/definition of TLS creds types

2020-08-19 Thread Eduardo Habkost
From: Daniel P. Berrangé This introduces the use of the OBJECT_DEFINE and OBJECT_DECLARE macro families in the TLS creds types, in order to eliminate boilerplate code. Signed-off-by: Daniel P. Berrangé Message-Id: <20200723181410.3145233-5-berra...@redhat.com> [ehabkost: rebase, update to pass

[PATCH v2 48/58] qom: TYPE_INFO macro

2020-08-19 Thread Eduardo Habkost
Provide a TYPE_INFO macro that can be used to register a TypeInfo struct declaratively. This will allow QOM type registration to be 100% declarative. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- include/qom/object.h | 15 +-- 1 file

[PATCH v2 55/58] [automated] Use OBJECT_DECLARE_TYPE where possible

2020-08-19 Thread Eduardo Habkost
Replace DECLARE_OBJ_CHECKERS with OBJECT_DECLARE_TYPE where the typedefs can be safely removed. Generated running: $ ./scripts/codeconverter/converter.py -i \ --pattern=DeclareObjCheckers $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Script re-run after

[PATCH v7 1/1] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
This change registers a bottom handler to close the JACK client connection when a server shutdown signal is recieved. Without this libjack2 attempts to "clean up" old clients and causes a use after free segfault. Signed-off-by: Geoffrey McRae --- audio/jackaudio.c | 51 ++

[PATCH v2 47/58] qom: Make type checker functions accept const pointers

2020-08-19 Thread Eduardo Habkost
The existing type check macros all unconditionally drop const qualifiers from their arguments. Keep this behavior in the macros generated by DECLARE_*CHECKER* by now. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Remo

[PATCH v2 49/58] codeconverter: script for automating QOM code cleanups

2020-08-19 Thread Eduardo Habkost
This started as a simple script that scanned for regular expressions, but became more and more complex when exceptions to the rules were found. I don't know if this should be maintained in the QEMU source tree long term (maybe it can be reused for other code transformations that Coccinelle can't h

[PATCH v7 0/1] audio/jack: fix use after free segfault

2020-08-19 Thread Geoffrey McRae
v7: * removed accidental inclusion of spice-input changes Geoffrey McRae (1): audio/jack: fix use after free segfault audio/jackaudio.c | 51 +-- ui/spice-input.c | 2 ++ 2 files changed, 38 insertions(+), 15 deletions(-) -- 2.20.1

[PATCH v2 56/58] [automated] Use OBJECT_DECLARE_SIMPLE_TYPE when possible

2020-08-19 Thread Eduardo Habkost
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=ObjectDeclareType $(git grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- include/authz/list.h| 7 ++- include/authz/listfile.h| 7 ++- include/auth

[PATCH v2 39/58] pxa2xx: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: qemu-...@nongnu.org Cc: qemu-devel@nongnu.org --- include/hw/arm/pxa.h | 13 + hw/arm/pxa2xx.

[PATCH v2 45/58] qom: Allow class type name to be specified in OBJECT_DECLARE*

2020-08-19 Thread Eduardo Habkost
Many QOM types don't follow the Type/TypeClass pattern on the instance/struct names. Let the class struct name be specified in the OBJECT_DECLARE* macros. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- include/qom/object.h | 35 ++-

[PATCH v2 34/58] vmbus: Move QOM macros to vmbus.h

2020-08-19 Thread Eduardo Habkost
Move all declarations related to TYPE_VMBUS to the same place in vmbus.h. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: qemu-devel@nongnu.org --- include/hw/hyperv/vmbus-bridge.h | 3 +-- inclu

[PATCH v2 33/58] pckbd: Move QOM macro to header

2020-08-19 Thread Eduardo Habkost
Move the I8042 macro close to the TYPE_I8042 define. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- include/hw/input/i8042.

[PATCH v2 38/58] rocker: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Jiri Pirko Cc: Jason Wang Cc: qemu-devel@nongnu.org --- hw/net/rocker/rocker.h | 6 +- hw/net/rocker/rocker.c | 5 - 2 files changed, 5 in

[PATCH v2 30/58] ahci: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
The TYPE_* constants and the typedefs are defined in ahci.h, so we can move the type checking macros there too. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: John Snow Cc: qemu-bl...@nongnu.org

[PATCH v2 57/58] crypto: use QOM macros for declaration/definition of secret types

2020-08-19 Thread Eduardo Habkost
From: Daniel P. Berrangé This introduces the use of the OBJECT_DEFINE and OBJECT_DECLARE macro families in the secret types, in order to eliminate boilerplate code. Signed-off-by: Daniel P. Berrangé Message-Id: <20200723181410.3145233-4-berra...@redhat.com> [ehabkost: rebase, update to pass add

[PATCH v2 35/58] virtio-serial-bus: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Laurent Vivier Cc: Amit Shah Cc: "Michael S. Tsirkin" Cc: "Marc-André Lureau" Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- include/hw/virtio

[PATCH v2 50/58] [automated] Delete duplicate QOM typedefs

2020-08-19 Thread Eduardo Habkost
Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=QOMDuplicatedTypedefs $(git grep -l '' -- '*.[ch]') Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- include/crypto/secret_keyring.h | 8 1 file changed, 4 insertion

[PATCH v2 54/58] [semi-automated] Use DECLARE_*CHECKER* when possible (--force mode)

2020-08-19 Thread Eduardo Habkost
Separate run of the TypeCheckMacro converter using the --force flag, for the cases where typedefs weren't found in the same header nor in typedefs.h. Generated initially using: $ ./scripts/codeconverter/converter.py --force -i \ --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]') Then eac

[PATCH v2 31/58] i8257: Move QOM macro to header

2020-08-19 Thread Eduardo Habkost
Move the I8257 macro to i8257.h, close to the TYPE_I8257 define. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: "Michael S. Tsirkin" Cc: Paolo Bonzini Cc: qemu-devel@nongnu.org --- include/hw/

[PATCH v2 29/58] vhost-user-gpu: Move QOM macro to header

2020-08-19 Thread Eduardo Habkost
Move the VHOST_USER_GPU type checking macro to virtio-gpu.h, close to the TYPE_VHOST_USER_GPU #define. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: "Michael S. Tsirkin" Cc: "Marc-André Lureau"

[PATCH v2 40/58] mptsas: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Paolo Bonzini Cc: Fam Zheng Cc: qemu-devel@nongnu.org --- hw/scsi/mptsas.h | 6 +- hw/scsi/mptsas.c | 5 - 2 files changed, 5 insertions(+

[PATCH v2 46/58] qom: DECLARE_*_CHECKERS macros

2020-08-19 Thread Eduardo Habkost
Sometimes the typedefs are buried inside another header, but we want to benefit from the automatic definition of type cast functions. Introduce macros that will let type checkers be defined when typedefs are already available. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- C

[PATCH v2 43/58] qom: make object_ref/unref use a void * instead of Object *.

2020-08-19 Thread Eduardo Habkost
From: Daniel P. Berrangé The object_ref/unref methods are intended for use with any subclass of the base Object. Using "Object *" in the signature is not adding any meaningful level of type safety, since callers simply use "OBJECT(ptr)" and this expands to an unchecked cast "(Object *)". By usin

[PATCH v2 28/58] s390x: Move typedef SCLPEventFacility to event-facility.h

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. In sclp.h, use "struct SCLPEventFacility" to avoid introducing unnecessary header dependencies. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Cornelia Huck Cc: Halil Pasic Cc: Christian Borntr

[PATCH v2 26/58] xen-legacy-backend: Add missing typedef XenLegacyDevice

2020-08-19 Thread Eduardo Habkost
The typedef was used in the XENBACKEND_DEVICE macro, but it was never defined. Define the typedef close to the type checking macro. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 --- Cc: Stefano Stabellini Cc: Anthony Perard Cc: Paul Durrant Cc: xen-de...@

[PATCH v2 37/58] auxbus: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: qemu-devel@nongnu.org --- include/hw/misc/auxbus.h | 3 +++ hw/misc/auxbus.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff

[PATCH v2 42/58] vfio/pci: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Alex Williamson Cc: qemu-devel@nongnu.org --- hw/vfio/pci.h | 3 +++ hw/vfio/pci.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff

[PATCH v2 22/58] can_emu: Delete macros for non-existing typedef

2020-08-19 Thread Eduardo Habkost
CanBusClass doesn't exist. This will break when we automatically convert the code to use OBJECT_DEFINE_TYPE(). Delete the macros that reference the non-existing typedef. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: no

[PATCH v2 21/58] s390_flic: Move KVMS390FLICState typedef to header

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Acked-by: Cornelia Huck Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Cornelia Huck Cc: Thomas Huth Cc: Halil Pasic

[PATCH v2 41/58] kvm: Move QOM macros to kvm.h

2020-08-19 Thread Eduardo Habkost
Move QOM macros close to the KVMState typedef. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Paolo Bonzini Cc: k...@vger.kernel.org Cc: qemu-devel@nongnu.org --- include/sysemu/kvm.h | 6 +

[PATCH v2 19/58] hvf: Move HVFState typedef to hvf.h

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Cameron Esfahani Cc: Roman Bolshakov Cc: Paolo Bonzini Cc: Richard Hend

[PATCH v2 32/58] ahci: Move QOM macro to header

2020-08-19 Thread Eduardo Habkost
Move the ALLWINNER_AHCI macro close to the TYPE_ALLWINNER_AHCI define. This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: John Snow Cc: qemu-bl...@nongnu.org Cc: qemu-devel@nongnu.org --- include/h

[PATCH v2 16/58] throttle-groups: Move ThrottleGroup typedef to header

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Alberto Garcia Cc: Kevin Wolf Cc: M

[PATCH v2 36/58] piix: Move QOM macros to header

2020-08-19 Thread Eduardo Habkost
This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: "Hervé Poussineau" Cc: "Philippe Mathieu-Daudé" Cc: Aleksandar Markovic Cc: Aurelien Jarno Cc: qe

[PATCH v2 25/58] armsse: Rename QOM macros to avoid conflicts

2020-08-19 Thread Eduardo Habkost
Rename TYPE_ARMSSE to TYPE_ARM_SSE, and ARMSSE*() type checking macros to ARM_SSE*(). This will avoid a future conflict between an ARM_SSE() type checking macro and the ARMSSE typedef name. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: Peter Maydell Cc:

[PATCH v2 15/58] tulip: Move TulipState typedef to header

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Sven Schnelle Cc: Jason Wang Cc: qe

[PATCH v2 14/58] hcd-dwc2: Rename USB_*CLASS macros for consistency

2020-08-19 Thread Eduardo Habkost
Rename the DWC2_CLASS to DWC2_USB_CLASS and DWC2_GET_CLASS to DWC2_USB_GET_CLASS, for consistency with the DWC2_USB macro. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Gerd Hoffmann Cc: qemu-devel@nongnu.

[PATCH v2 12/58] virtio-ccw: Fix definition of VIRTIO_CCW_BUS_GET_CLASS

2020-08-19 Thread Eduardo Habkost
The macro was incorrectly defined using OBJECT_CHECK. Acked-by: Cornelia Huck Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: "Michael S. Tsirkin" Cc: Cornelia Huck Cc: Halil Pasic Cc: Christian Borntraeger Cc: Richard Henderson Cc: David

[PATCH v2 23/58] nubus: Delete unused NUBUS_BRIDGE macro

2020-08-19 Thread Eduardo Habkost
The macro never worked because the NubusBridge typedef doesn't exist. Delete it. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Laurent Vivier Cc: qemu-devel@nongnu.org --- include/hw/nubus/nubus.h | 1 -

[PATCH v2 11/58] versatile: Fix typo in PCI_VPB_HOST definition

2020-08-19 Thread Eduardo Habkost
Fixes: cd93dbf375bd ("versatile_pci: Update to realize and instance init functions") Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: Peter Maydell Cc: qemu-...@nongnu.org Cc: qemu-devel@nongnu.org --- hw/pc

[PATCH v2 27/58] spapr: Move typedef SpaprMachineState to spapr.h

2020-08-19 Thread Eduardo Habkost
Move the typedef from spapr_irq.h to spapr.h, and use "struct SpaprMachineState" in the spapr_*.h headers (to avoid circular header dependencies). This will make future conversion to OBJECT_DECLARE* easier. Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: new patch in series v2 Cc: D

[PATCH v2 17/58] pci: Move PCIBusClass typedef to pci.h

2020-08-19 Thread Eduardo Habkost
Move typedef closer to the type check macros, to make it easier to convert the code to OBJECT_DEFINE_TYPE() in the future. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: "Michael S. Tsirkin" Cc: Marcel Apfelbaum Cc: qemu-devel@nongnu.org ---

[PATCH v2 00/58] qom: Automated conversion of type checking boilerplate

2020-08-19 Thread Eduardo Habkost
This is an extension of the series previously submitted by Daniel[1], including a script that will convert existing type checker macros automatically. Changes from series v1 to v2: * Don't skip TypeCheckMacro conversion if typedefs are found in typedefs.h * Don't look for typedefs if type check

[PATCH v2 24/58] platform-bus: Delete macros for non-existing typedef

2020-08-19 Thread Eduardo Habkost
PlatformBusDeviceClass doesn't exist. This will break when we automatically convert the code to use OBJECT_DEFINE_TYPE(). Delete the macros that reference the non-existing typedef. Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: qemu-devel@nong

[PATCH v2 13/58] hvf: Add missing include

2020-08-19 Thread Eduardo Habkost
The sysemu/accel.h header is needed for the ACCEL_CLASS_NAME macro. This will be necessary to allow us to use OBJECT_DEFINE*() for TYPE_HVF_ACCEL. Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Roman Bolshakov Signed-off-by: Eduardo Habkost --- Changes v1 ->

[PATCH v2 07/58] opentitan: Rename memmap enum constants

2020-08-19 Thread Eduardo Habkost
Some of the enum constant names conflict with the QOM type check macros (IBEX_PLIC, IBEX_UART). This needs to be addressed to allow us to transform the QOM type check macros into functions generated by OBJECT_DECLARE_TYPE(). Rename all the constants to IBEX_DEV_*, to avoid conflicts. Reviewed-by

[PATCH v2 10/58] aspeed_timer: Fix ASPEED_TIMER macro definition

2020-08-19 Thread Eduardo Habkost
The macro definition had an extra semicolon. This was never noticed because the macro was only being used where it didn't make a difference. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Daniel P. Berrangé Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: none --- Cc: "Cédric Le Goater"

  1   2   3   4   >