Re: [Qemu-devel] [PATCH 0/2] optimize waiting for free thread to do compression

2018-12-21 Thread Peter Xu
On Thu, Dec 13, 2018 at 03:57:25PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > Currently we have two behaviors if all threads are busy to do compression, > the main thread mush wait one of them becoming free if @compress-wait-thread > set to on or the main thread can

Re: [Qemu-devel] [PATCH 14/15] spapr: Expose the name of the interrupt controller node

2018-12-21 Thread Cédric Le Goater
On 12/21/18 7:35 AM, Greg Kurz wrote: > This will be needed by PHB hotplug in order to access the phandle property. > > Signed-off-by: Greg Kurz I would have used the prefix 'spapr_dt_', but it's minor. Reviewed-by: Cédric Le Goater Thanks, C. > --- > hw/intc/spapr_xive.c|9

Re: [Qemu-devel] [PATCH 07/15] spapr_pci: Define SPAPR_MAX_PHBS in hw/pci-host/spapr.h

2018-12-21 Thread Cédric Le Goater
On 12/21/18 1:36 AM, Greg Kurz wrote: > PHB hotplug will bring more users for it. Let's define it along with > the PHB defines from which it is derived for simplicity. > > While here fix a misleading comment about manual placement, which was > abandoned with 30b3bc5aa9f4. > > Signed-off-by: Greg

Re: [Qemu-devel] is the "tcg translation" necessary when the "kvm acceleration" emulation mode enabled?

2018-12-21 Thread tugouxp
much appreciate! :) At 2018-12-21 14:33:08, "Paolo Bonzini" wrote: >> scenario 1: did the tcg translation need to be done in this case now >> that the host and target arch is the same? or let the kvm emulation >> the system wit the original instructions with out the TCG >> translation

[Qemu-devel] [Bug 1809252] Re: Password authentication in FIPS-compliant mode

2018-12-21 Thread Tomasz Barański
I understand. Thank you, guys! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1809252 Title: Password authentication in FIPS-compliant mode Status in QEMU: Invalid Bug description: The

Re: [Qemu-devel] [PATCH v8 10/20] replay: introduce info hmp/qmp command

2018-12-21 Thread Pavel Dovgalyuk
> From: Markus Armbruster [mailto:arm...@redhat.com] > Pavel Dovgalyuk writes: > > > This patch introduces 'info replay' monitor command and > > corresponding qmp request. > > These commands request the current record/replay mode, replay log file name, > > and the execution step (number or

[Qemu-devel] [PATCH 2/3] Pass raw DB values from hda-codec.c to audio driver

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- hw/audio/hda-codec.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 09f9da344b..d160e86d2a 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -437,6 +437,7 @@ static

[Qemu-devel] [PATCH 1/3] Allow audio driver to pass DB value to underlying drivers

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- audio/audio.c | 15 +-- audio/audio.h | 6 -- audio/mixeng.h | 6 -- hw/audio/ac97.c | 4 ++-- hw/audio/hda-codec-common.h | 2 +- hw/audio/hda-codec.c| 8 ++--

Re: [Qemu-devel] [PATCH 2/3] Pass raw DB values from hda-codec.c to audio driver

2018-12-21 Thread Yaroslav Isakov
Sorry, lost cover letter and first patch, resending them пт, 21 дек. 2018 г. в 21:57, Yaroslav Isakov : > > Signed-off-by: Yaroslav Isakov > --- > hw/audio/hda-codec.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c >

[Qemu-devel] [PATCH 0/3] Allow hw/audio drivers to pass raw DB values to audio/ drivers

2018-12-21 Thread Yaroslav Isakov
This patch series introduces the ability for virtual audio drivers to pass information about guest-chosen DB values to backend audio drivers. For now, supported virtual driver is hda-codec, and backend is pulseaudio, as they both support DB values. Without these patches, emulated Windows has a

[Qemu-devel] [PATCH 3/3] iotests: Allow 147 to be run concurrently

2018-12-21 Thread Max Reitz
To do this, we need to allow creating the NBD server on various ports instead of a single one (which may not even work if you run just one instance, because something entirely else might be using that port). So we just pick a random port in [32768, 32768 + 1024) and try to create a server there.

[Qemu-devel] [PATCH 0/3] iotests: Allow 147 to be run concurrently

2018-12-21 Thread Max Reitz
147 currently cannot be run concurrently for two reasons: (1) It creates TCP/IP NBD servers on a fixed port. (2) It uses a mix of "0.0.0.0", "localhost", and "::1" as host addresses to bind to. As explained in the commit messages of patches 2 and 3, this results in it potentially

Re: [Qemu-devel] [PULL v4 00/35] Misc patches for 2018-12-21

2018-12-21 Thread Peter Maydell
On Fri, 21 Dec 2018 at 12:40, Paolo Bonzini wrote: > > The following changes since commit e85c577158a2e8e252414959da9ef15c12eec63d: > > Merge remote-tracking branch > 'remotes/huth-gitlab/tags/pull-request-2018-12-17' into staging (2018-12-18 > 14:31:06 +) > > are available in the git

[Qemu-devel] [PATCH 3/3] If raw DB values are known, use them in paaudio

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- audio/paaudio.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 4c100bc318..d25df102ab 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -724,8 +724,13 @@ static int qpa_ctl_out

[Qemu-devel] [RFC v2 2/4] elf-ops.h: Add get_elf_note_type()

2018-12-21 Thread Liam Merwick
Introduce a routine which, given a pointer to a range of ELF Notes, searches through them looking for a note matching the type specified and returns a pointer to the matching ELF note. Signed-off-by: Liam Merwick --- include/hw/elf_ops.h | 50 ++

Re: [Qemu-devel] [RFC PATCH] fpu: add compile time check for old glibc/libm and fma

2018-12-21 Thread Emilio G. Cota
On Thu, Dec 20, 2018 at 11:10:08 +, Alex Bennée wrote: (snip) > +#if defined(__GLIBC__) && (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 12) > +#define QEMU_HARDFLOAT_USE_FMA 0 > +#else > +#define QEMU_HARDFLOAT_USE_FMA 1 > +#endif > +#else > +#define QEMU_HARDFLOAT_USE_FMA 1 > +#endif > + > /* > *

Re: [Qemu-devel] [RFC 1/3] pvh: Add x86/HVM direct boot ABI header file

2018-12-21 Thread Liam Merwick
On 11/12/2018 14:57, Liam Merwick wrote: On 11/12/2018 14:01, Stefan Hajnoczi wrote: On Wed, Dec 05, 2018 at 10:37:24PM +, Liam Merwick wrote: From: Liam Merwick The x86/HVM direct boot ABI permits Qemu to be able to boot directly into the uncompressed Linux kernel binary without the

[Qemu-devel] [RFC v2 0/4] QEMU changes to do PVH boot

2018-12-21 Thread Liam Merwick
For certain applications it is desirable to rapidly boot a KVM virtual machine. In cases where legacy hardware and software support within the guest is not needed, QEMU should be able to boot directly into the uncompressed Linux kernel binary with minimal firmware involvement. There already

[Qemu-devel] [PATCH 3/3] If raw DB values are known, use them in paaudio

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- audio/paaudio.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 4c100bc318..d25df102ab 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -724,8 +724,13 @@ static int qpa_ctl_out

[Qemu-devel] Segfaults in chardev due to races

2018-12-21 Thread Max Reitz
Hi, While fixing iotest 147 (which currently cannot be run in parallel), I've noticed that after it's fixed (and does run in parallel), I see some segfaults in chardev/char-socket.c. They usually look like this: #0 0x556f3b5765d0 in object_get_class (obj=obj@entry=0x0) at qom/object.c:822

Re: [Qemu-devel] [PATCH v3 2/2] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-12-21 Thread Yu Zhang
On Fri, Dec 21, 2018 at 01:10:13PM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 22, 2018 at 01:34:01AM +0800, Yu Zhang wrote: > > On Fri, Dec 21, 2018 at 12:15:26PM -0500, Michael S. Tsirkin wrote: > > > On Sat, Dec 22, 2018 at 12:19:20AM +0800, Yu Zhang wrote: > > > > > I'd like to avoid poking

Re: [Qemu-devel] [PATCH v6 09/11] iotests: change qmp_log filters to expect QMP objects only

2018-12-21 Thread John Snow
On 12/21/18 7:41 AM, Vladimir Sementsov-Ogievskiy wrote: > Hmm. This made me check, is enumerate applicable to dicts, > and, yes it is. > enumerate on dicts gives you a numerical index paired with the key, so... k is the numerical index and v is the key. > so, it may be as easy as > >

[Qemu-devel] [RFC v2 1/4] elf: Add optional function ptr to load_elf() to parse ELF notes

2018-12-21 Thread Liam Merwick
This patch adds an optional function pointer, 'elf_note_fn', to load_elf() which causes load_elf() to additionally parse any ELF program headers of type PT_NOTE and check to see if the ELF Note is of the type specified by the 'translate_opaque' arg. If a matching ELF Note is found then the

Re: [Qemu-devel] [RFC 2/3] pc: Read PVH entry point from ELF note in kernel binary

2018-12-21 Thread Liam Merwick
Thanks Stefan for the review - comments inline. On 11/12/2018 14:17, Stefan Hajnoczi wrote: On Wed, Dec 05, 2018 at 10:37:25PM +, Liam Merwick wrote: From: Liam Merwick Add support to read the PVH Entry address from an ELF note in the uncompressed kernel binary (as defined by the x86/HVM

Re: [Qemu-devel] [RFC PATCH] fpu: add compile time check for old glibc/libm and fma

2018-12-21 Thread Richard Henderson
On 12/21/18 11:30 AM, Emilio G. Cota wrote: > +ua.s = 0x0021; > +ub.s = 0x3ca0; > +uc.s = 0x0020; > +ur.h = fma(ua.h, ub.h, uc.h); > +if (ur.s != 0x0021) { Forgot your ull's, but otherwise ok. In email to Alex, I did wonder if

[Qemu-devel] [PATCH 2/3] iotests: Bind qemu-nbd to localhost in 147

2018-12-21 Thread Max Reitz
By default, qemu-nbd binds to 0.0.0.0. However, we then proceed to connect to "localhost". Usually, this works out fine; but if this test is run concurrently, some other test function may have bound a different server to ::1 (on the same port -- you can bind different serves to the same port, as

[Qemu-devel] [PATCH 1/3] iotests.py: Add qemu_nbd_pipe()

2018-12-21 Thread Max Reitz
In some cases, we may want to deal with qemu-nbd errors (e.g. by launching it in a different configuration until it no longer throws any). In that case, we do not want its output ending up in the test output. It may still be useful for handling the error, though, so add a new function that works

[Qemu-devel] [RFC v2 4/4] pvh: Boot uncompressed kernel using direct boot ABI

2018-12-21 Thread Liam Merwick
These changes (along with corresponding Linux kernel and qboot changes) enable a guest to be booted using the x86/HVM direct boot ABI. This commit adds a load_elfboot() routine to pass the size and location of the kernel entry point to qboot (which will fill in the start_info struct information

[Qemu-devel] [PATCH 0/3] Allow hw/audio drivers to pass raw DB values to audio/ drivers

2018-12-21 Thread Yaroslav Isakov
This patch series introduces the ability for virtual audio drivers to pass information about guest-chosen DB values to backend audio drivers. For now, supported virtual driver is hda-codec, and backend is pulseaudio, as they both support DB values. Without these patches, emulated Windows has a

Re: [Qemu-devel] [PATCH] i386: remove the 'INTEL_PT' CPUID bit from named CPU models

2018-12-21 Thread Robert Hoo
On Fri, 2018-12-21 at 16:27 +0100, Paolo Bonzini wrote: > On 21/12/18 16:22, Philippe Mathieu-Daudé wrote: > > Hi Paolo, > > > > On 12/21/18 7:30 AM, Paolo Bonzini wrote: > > > From: Robert Hoo > > > > > > Processor tracing is not yet implemented for KVM and it will be > > > an > > > opt in

Re: [Qemu-devel] [PATCH v3 1/2] intel-iommu: differentiate host address width from IOVA address width.

2018-12-21 Thread Yu Zhang
On Fri, Dec 21, 2018 at 02:02:28PM -0500, Michael S. Tsirkin wrote: > On Sat, Dec 22, 2018 at 01:37:58AM +0800, Yu Zhang wrote: > > On Fri, Dec 21, 2018 at 12:04:49PM -0500, Michael S. Tsirkin wrote: > > > On Sat, Dec 22, 2018 at 12:09:44AM +0800, Yu Zhang wrote: > > > > Well, my understanding of

[Qemu-devel] [PATCH 1/3] Allow audio driver to pass DB value to underlying drivers

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- audio/audio.c | 15 +-- audio/audio.h | 6 -- audio/mixeng.h | 6 -- hw/audio/ac97.c | 4 ++-- hw/audio/hda-codec-common.h | 2 +- hw/audio/hda-codec.c| 8 ++--

[Qemu-devel] [PATCH 2/3] Pass raw DB values from hda-codec.c to audio driver

2018-12-21 Thread Yaroslav Isakov
Signed-off-by: Yaroslav Isakov --- hw/audio/hda-codec.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c index 09f9da344b..d160e86d2a 100644 --- a/hw/audio/hda-codec.c +++ b/hw/audio/hda-codec.c @@ -437,6 +437,7 @@ static

Re: [Qemu-devel] [PATCH 1/2] i386: remove the new CPUID 'PCONFIG' from Icelake-Server CPU model

2018-12-21 Thread Robert Hoo
On Fri, 2018-12-21 at 16:03 +0100, Paolo Bonzini wrote: > On 21/12/18 15:04, Robert Hoo wrote: > > > So this series is correct and I will follow up with one for > > > INTEL_PT; > > > however, this begs the question of how the patches are being > > > tested. > > > > My apologies for carelessness.

[Qemu-devel] [PATCH v7 21/28] compat: remove remaining PC_COMPAT macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. I decided to rename the conflicting pc_compat_2_1() function with pc_compat_2_1_fn(). Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/i386/pc.h | 236 +++ hw/i386/pc.c | 232

[Qemu-devel] [PATCH v7 26/28] qdev-props: call object_apply_global_props()

2018-12-21 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 Reviewed-by: Igor Mammedov --- hw/core/qdev-properties.c | 24 ++-- qom/object.c | 12 +++- 2 files

[Qemu-devel] [PATCH v7 09/28] compat: replace PC_COMPAT_2_11 & HW_COMPAT_2_11 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 19 --- include/hw/i386/pc.h | 13 ++--- hw/arm/virt.c | 5 + hw/core/machine.c

[Qemu-devel] [PATCH v7 17/28] compat: replace PC_COMPAT_2_3 & HW_COMPAT_2_3 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. I decided to rename the conflicting pc_compat_2_3() function with pc_compat_2_3_fn(). Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h | 3 ++ include/hw/compat.h | 39 include/hw/i386/pc.h | 88

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

2018-12-21 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)

[Qemu-devel] [PATCH v7 20/28] include: remove compat.h

2018-12-21 Thread Marc-André Lureau
The header is now empty. Signed-off-by: Marc-André Lureau --- include/hw/compat.h| 4 include/hw/i386/pc.h | 1 - hw/arm/virt.c | 1 - hw/ppc/spapr.c | 1 - hw/s390x/s390-virtio-ccw.c | 1 - 5 files changed, 8 deletions(-) delete mode 100644

[Qemu-devel] [PATCH v6 07/11] iotests: add qmp recursive sorting function

2018-12-21 Thread John Snow
Python before 3.6 does not sort dictionaries (including kwargs). Therefore, printing QMP objects involves sorting the keys to have a predictable ordering in the iotests output. This means that iotests output will sometimes show arguments in an order not specified by the test author. Presently, we

[Qemu-devel] [PATCH v6 08/11] iotests: remove default filters from qmp_log

2018-12-21 Thread John Snow
Several places in iotests deal with serializing objects into JSON strings, but to add pretty-printing it seems desirable to localize all of those cases. log() seems like a good candidate for that centralized behavior. log() can already serialize json objects, but when it does so, it assumes

Re: [Qemu-devel] travis failures

2018-12-21 Thread Greg Kurz
On Fri, 21 Dec 2018 09:36:23 +0100 Greg Kurz wrote: > On Fri, 21 Dec 2018 07:47:07 +0100 > Thomas Huth wrote: > > > On 2018-12-21 04:06, Alexey Kardashevskiy wrote: > > > Hi > > > > > > I am trying https://travis-ci.org/aik/qemu/ and that thing fails every > > > time I am not so sure why. >

Re: [Qemu-devel] [PATCH v8 08/20] migration: introduce icount field for snapshots

2018-12-21 Thread Pavel Dovgalyuk
> From: Markus Armbruster [mailto:arm...@redhat.com] > Pavel Dovgalyuk writes: > > > Saving icount as a parameters of the snapshot allows navigation between > > them in the execution replay scenario. > > This information can be used for finding a specific snapshot for rewinding > > the recorded

Re: [Qemu-devel] [RFC PATCH v2 3/7] sdl2: use only QKeyCode in sdl2_process_key()

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:09:00PM +0100, Gerd Hoffmann wrote: > Small cleanup. Also drop the special backspace handling, > kbd_put_qcode_console() learned to handle that meanwhile. I'm not seeing what backspace handlking is changed in this patch - i guess this comment is left over from a

Re: [Qemu-devel] [QEMU-devel][PATCH v4 0/2] Fix concurrent aio_poll/set_fd_handler.

2018-12-21 Thread Paolo Bonzini
On 20/12/18 17:37, Stefan Hajnoczi wrote: > On Thu, Dec 20, 2018 at 04:20:28PM +0100, remy.n...@blade-group.com wrote: >> From: Remy Noel >> >> It is possible for an io_poll/read/write callback to be concurrently >> executed along >> with an aio_set_fd_handlers. This can cause all sorts of

Re: [Qemu-devel] did the qemu can emulate the whole system with the processor that without support the "virtulization and kvm"?

2018-12-21 Thread tugouxp
thank you. i just want to confirm one thing, that is whether the qemu can emulate a whole operation system just by analysis instructions by instructions manually without the support of KVM. so from the answer you give to me, it is feasible, right? thanks very much! At 2018-12-21

[Qemu-devel] [PATCH v7 01/28] hw: apply accel compat properties without touching globals

2018-12-21 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 Reviewed-by: Igor Mammedov ---

[Qemu-devel] [PATCH v7 16/28] compat: replace PC_COMPAT_2_4 & HW_COMPAT_2_4 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 ++ include/hw/compat.h| 27 -- include/hw/i386/pc.h | 74 ++ hw/core/machine.c | 29

[Qemu-devel] [PATCH v7 05/28] hw: remove SET_MACHINE_COMPAT

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

[Qemu-devel] [PATCH v7 27/28] arm: replace instance_post_init()

2018-12-21 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. Signed-off-by: Marc-André Lureau Suggested-by: Igor Mammedov Reviewed-by: Igor Mammedov --- target/arm/cpu-qom.h | 3 +++ target/arm/cpu.h | 2

[Qemu-devel] [PATCH v7 15/28] compat: replace PC_COMPAT_2_5 & HW_COMPAT_2_5 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 24 include/hw/i386/pc.h | 4 ++-- hw/core/machine.c | 26 ++

[Qemu-devel] [PATCH v7 25/28] qdev-props: remove errp from GlobalProperty

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

[Qemu-devel] [PATCH v7 14/28] compat: replace PC_COMPAT_2_6 & HW_COMPAT_2_6 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 15 --- include/hw/i386/pc.h | 23 ++- hw/arm/virt.c | 5 + hw/core/machine.c

[Qemu-devel] [PATCH v7 24/28] qdev-props: convert global_props to GPtrArray

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

[Qemu-devel] [PATCH v6 03/11] blockdev: n-ary bitmap merge

2018-12-21 Thread John Snow
Especially outside of transactions, it is helpful to provide all-or-nothing semantics for bitmap merges. This facilitates the coalescing of multiple bitmaps into a single target for the "checkpoint" interpretation when assembling bitmaps that represent arbitrary points in time from component

[Qemu-devel] [PATCH v6 01/11] blockdev: abort transactions in reverse order

2018-12-21 Thread John Snow
Presently, we abort transactions in the same order they were processed in. Bitmap commands, though, attempt to restore backup data structures on abort. That's not valid, they need to be aborted in reverse chronological order. Replace the QSIMPLEQ data structure with a QTAILQ one, so we can

[Qemu-devel] [PATCH] tcmu: Introduce qemu-tcmu utility

2018-12-21 Thread Yaowei Bai
This patch introduces a new utility, qemu-tcmu. Apart from the underlaying protocol it interacts with the world much like qemu-nbd. This patch bases on Fam's version. Qemu-tcmu handles SCSI commands which are passed through userspace from kernel by LIO subsystem using TCMU protocol. Libtcmu is

Re: [Qemu-devel] [RFC PATCH v2 2/7] kbd-state: use state tracker for sdl2

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:08:59PM +0100, Gerd Hoffmann wrote: > Use the new keyboard state tracked for sdl2. We can drop the modifier > state tracking from sdl2. Also keyup code is simpler, the state tracker > will take care to not send suspious keyup events to the guest. > > Signed-off-by:

Re: [Qemu-devel] [RFC PATCH v2 7/7] keymap: fix keyup mappings

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:09:04PM +0100, Gerd Hoffmann wrote: > It is possible that the modifier state on keyup is different from the > modifier state on keydown. In that case the keycode lookup can end up > with different keys in case multiple keysym -> keycode mappings exist, > because it

Re: [Qemu-devel] [RFC PATCH v2 6/7] keymap: pass full keyboard state to keysym2scancode

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:09:03PM +0100, Gerd Hoffmann wrote: > Pass the keyboard state tracker handle down to keysym2scancode(), > so the code can fully inspect the keyboard state as needed. No > functional change. > > Signed-off-by: Gerd Hoffmann > --- > ui/keymaps.h | 3 ++- > ui/curses.c

[Qemu-devel] [PATCH v7 10/28] compat: replace PC_COMPAT_2_10 & HW_COMPAT_2_10 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 11 --- include/hw/i386/pc.h | 17 ++--- hw/arm/virt.c | 6 +- hw/core/machine.c

[Qemu-devel] [PATCH v7 04/28] machine: move compat properties out of globals

2018-12-21 Thread Marc-André Lureau
Move the compat arrays inside functions that use them. Signed-off-by: Marc-André Lureau --- hw/arm/virt.c | 94 +++-- hw/i386/pc_piix.c | 705 ++--- hw/i386/pc_q35.c | 121 +++ hw/ppc/spapr.c | 254 +++--

[Qemu-devel] [PATCH v7 11/28] compat: replace PC_COMPAT_2_9 & HW_COMPAT_2_9 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 19 --- include/hw/i386/pc.h | 9 ++--- hw/arm/virt.c | 6 +- hw/core/machine.c

[Qemu-devel] [PATCH v7 13/28] compat: replace PC_COMPAT_2_7 & HW_COMPAT_2_7 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 23 --- include/hw/i386/pc.h | 34 ++ hw/arm/virt.c | 5 +

[Qemu-devel] [PATCH v6 04/11] block: remove 'x' prefix from experimental bitmap APIs

2018-12-21 Thread John Snow
The 'x' prefix was added because I was uncertain of the direction we'd take for the libvirt API. With the general approach solidified, I feel comfortable committing to this API for 4.0. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- blockdev.c

[Qemu-devel] [PATCH v6 05/11] iotests.py: don't abort if IMGKEYSECRET is undefined

2018-12-21 Thread John Snow
Instead of using os.environ[], use .get with a default of empty string to match the setup in check to allow us to import the iotests module (for debugging, say) without needing a crafted environment just to import the module. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v6 10/11] iotests: implement pretty-print for log and qmp_log

2018-12-21 Thread John Snow
If iotests have lines exceeding >998 characters long, git doesn't want to send it plaintext to the list. We can solve this by allowing the iotests to use pretty printed QMP output that we can match against instead. As a bonus, it's much nicer for human eyes too. Signed-off-by: John Snow

[Qemu-devel] [PATCH v6 02/11] block/dirty-bitmap: remove assertion from restore

2018-12-21 Thread John Snow
When making a backup of a dirty bitmap (for transactions), we want to restore that backup whether or not the bitmap is enabled. It is perfectly valid to write into bitmaps that are disabled. It is only illegitimate for the guest to have done so. Remove this assertion. Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH for-4.0 v8 6/7] qemu_thread_create: propagate the error to callers to handle

2018-12-21 Thread Fei Li
On 12/19/2018 08:14 PM, Fei Li wrote: On 12/19/2018 06:10 PM, Markus Armbruster wrote: Fei Li writes: On 12/13/2018 03:26 PM, Markus Armbruster wrote: There's a question for David Gibson inline.  Please search for /ppc/. Fei Li writes: Make qemu_thread_create() return a Boolean to

Re: [Qemu-devel] [PATCH 07/15] spapr_pci: Define SPAPR_MAX_PHBS in hw/pci-host/spapr.h

2018-12-21 Thread Greg Kurz
On Fri, 21 Dec 2018 09:03:49 +0100 Cédric Le Goater wrote: > On 12/21/18 1:36 AM, Greg Kurz wrote: > > PHB hotplug will bring more users for it. Let's define it along with > > the PHB defines from which it is derived for simplicity. > > > > While here fix a misleading comment about manual

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

2018-12-21 Thread Cornelia Huck
On Wed, 19 Dec 2018 15:17:19 +0100 Halil Pasic wrote: > On Wed, 19 Dec 2018 12:54:42 +0100 > Cornelia Huck wrote: > > > On Fri, 7 Dec 2018 17:54:23 +0100 > > Halil Pasic wrote: > > > > > On Fri, 7 Dec 2018 11:05:29 +0100 > > > Cornelia Huck wrote: > > > > > > > > > I think most of the

[Qemu-devel] [PATCH v7 00/28] Generalize machine compatibility properties

2018-12-21 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

[Qemu-devel] [PATCH v7 06/28] compat: replace PC_COMPAT_3_1 & HW_COMPAT_3_1 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 3 --- include/hw/i386/pc.h | 4 ++-- hw/arm/virt.c | 6 +- hw/core/machine.c | 3 +++ hw/i386/pc.c

[Qemu-devel] [PATCH v7 02/28] machines: replace COMPAT define with a static array

2018-12-21 Thread Marc-André Lureau
Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 10 +- hw/arm/virt.c | 45 +-- hw/i386/pc_piix.c | 563 + hw/i386/pc_q35.c | 66 - hw/ppc/spapr.c | 201 ++---

[Qemu-devel] [PATCH v7 18/28] compat: replace PC_COMPAT_2_2 & HW_COMPAT_2_2 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. I decided to rename the conflicting pc_compat_2_2() function with pc_compat_2_2_fn(). Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h | 3 ++ include/hw/compat.h | 3 -- include/hw/i386/pc.h | 97

[Qemu-devel] [PATCH v6 06/11] iotests: add filter_generated_node_ids

2018-12-21 Thread John Snow
To mimic the common filter of the same name, but for the python tests. Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v6 00/11] bitmaps: remove x- prefix from QMP api

2018-12-21 Thread John Snow
Fix some outstanding bugs, change the design of an API element, remove the x- prefix to signify stability, and add iotests. V6: - Cover letter touchups - 09: Rewrite qmp_filter to cope with lists or dicts. - 11: small touchups. V5: 002: New bugfix. 003: I forgot to actually capture

Re: [Qemu-devel] [PATCH 14/15] spapr: Expose the name of the interrupt controller node

2018-12-21 Thread Greg Kurz
On Fri, 21 Dec 2018 09:12:24 +0100 Cédric Le Goater wrote: > On 12/21/18 7:35 AM, Greg Kurz wrote: > > This will be needed by PHB hotplug in order to access the phandle property. > > > > Signed-off-by: Greg Kurz > > I would have used the prefix 'spapr_dt_', but it's minor. > I guess there

Re: [Qemu-devel] [PATCH v7 01/28] hw: apply accel compat properties without touching globals

2018-12-21 Thread Cornelia Huck
On Fri, 21 Dec 2018 13:03:43 +0400 Marc-André Lureau wrote: > 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. >

Re: [Qemu-devel] travis failures

2018-12-21 Thread Greg Kurz
On Fri, 21 Dec 2018 07:47:07 +0100 Thomas Huth wrote: > On 2018-12-21 04:06, Alexey Kardashevskiy wrote: > > Hi > > > > I am trying https://travis-ci.org/aik/qemu/ and that thing fails every > > time I am not so sure why. > > > > One example: > > https://travis-ci.org/aik/qemu/jobs/470796318 >

Re: [Qemu-devel] did the qemu can emulate the whole system with the processor that without support the "virtulization and kvm"?

2018-12-21 Thread Alex Bennée
tugouxp <13824125...@163.com> writes: > Hi alex: > now my host machine did not have the "/dev/kvm" nodes and no chance to > make it exists. > so i want to know whether the "/dev/kvm" is mandatory for qemu to emulate > the whole system. > so i can make the emulation without the support

[Qemu-devel] [PATCH v7 03/28] hw: apply machine compat properties without touching globals

2018-12-21 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(). Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +- hw/arm/virt.c | 27 hw/core/machine.c

[Qemu-devel] [PATCH v7 07/28] compat: replace PC_COMPAT_3_0 & HW_COMPAT_3_0 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 3 --- include/hw/i386/pc.h | 17 ++--- hw/arm/virt.c | 6 +- hw/core/machine.c | 3 +++

[Qemu-devel] [PATCH v7 12/28] compat: replace PC_COMPAT_2_8 & HW_COMPAT_2_8 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 43 --- include/hw/i386/pc.h | 29 ++-- hw/arm/virt.c | 5

[Qemu-devel] [PATCH v7 23/28] qdev: all globals are now user-provided

2018-12-21 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

[Qemu-devel] [PATCH v7 08/28] compat: replace PC_COMPAT_2_12 & HW_COMPAT_2_12 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h| 3 +++ include/hw/compat.h| 27 --- include/hw/i386/pc.h | 21 ++--- hw/arm/virt.c | 5 +

[Qemu-devel] [PATCH v7 19/28] compat: replace PC_COMPAT_2_1 & HW_COMPAT_2_1 macros

2018-12-21 Thread Marc-André Lureau
Use static arrays instead. I decided to rename the conflicting pc_compat_2_1() function with pc_compat_2_1_fn(). Suggested-by: Eduardo Habkost Signed-off-by: Marc-André Lureau --- include/hw/boards.h | 3 +++ include/hw/compat.h | 31 --- include/hw/i386/pc.h |

[Qemu-devel] [PATCH v7 22/28] qdev: make a separate helper function to apply compat properties

2018-12-21 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

[Qemu-devel] [PATCH v6 09/11] iotests: change qmp_log filters to expect QMP objects only

2018-12-21 Thread John Snow
As laid out in the previous commit's message: ``` Several places in iotests deal with serializing objects into JSON strings, but to add pretty-printing it seems desirable to localize all of those cases. log() seems like a good candidate for that centralized behavior. log() can already serialize

[Qemu-devel] [PATCH v6 11/11] iotests: add iotest 236 for testing bitmap merge

2018-12-21 Thread John Snow
New interface, new smoke test. Signed-off-by: John Snow Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- tests/qemu-iotests/236 | 161 + tests/qemu-iotests/236.out | 351 + tests/qemu-iotests/group | 1 + 3 files

Re: [Qemu-devel] [RFC PATCH v2 1/7] kbd-state: add keyboard state tracker

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:08:58PM +0100, Gerd Hoffmann wrote: > Now that most user interfaces are using QKeyCodes it is easier to have > common keyboard code useable by all user interfaces. > > This patch adds helper code to track the state of all keyboard keys, > using a bitmap indexed by

Re: [Qemu-devel] [RFC PATCH v2 4/7] kbd-state: use state tracker for gtk

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:09:01PM +0100, Gerd Hoffmann wrote: > Use the new keyboard state tracked for gtk. Allows to drop the > gtk-specific modifier state tracking code. > > Signed-off-by: Gerd Hoffmann > --- > include/ui/gtk.h | 2 ++ > ui/gtk.c | 38

Re: [Qemu-devel] [PATCH 1/3] vfio-ccw: add capabilities chain

2018-12-21 Thread Cornelia Huck
On Wed, 19 Dec 2018 09:28:00 -0700 Alex Williamson wrote: > On Tue, 18 Dec 2018 18:24:00 +0100 > Cornelia Huck wrote: > > > On Mon, 17 Dec 2018 16:53:34 -0500 > > Eric Farman wrote: > > > > > On 11/22/2018 11:54 AM, Cornelia Huck wrote: > > > > > > ...snip... > > > > > > > diff --git

Re: [Qemu-devel] [RFC PATCH v2 5/7] kbd-state: use state tracker for vnc

2018-12-21 Thread Daniel P . Berrangé
On Wed, Dec 19, 2018 at 01:09:02PM +0100, Gerd Hoffmann wrote: > Use the new keyboard state tracked for vnc. Allows to drop the > vnc-specific modifier state tracking code. > > Signed-off-by: Gerd Hoffmann > --- > ui/vnc.h | 5 ++- > ui/vnc.c | 120 >

[Qemu-devel] [PULL 23/35] test: replace gtester with a TAP driver

2018-12-21 Thread Paolo Bonzini
gtester is deprecated by upstream glib (see for example the announcement at https://blog.gtk.org/2018/07/11/news-from-glib-2-58/) and it does not support tests that call g_test_skip in some glib stable releases. glib suggests instead using Automake's TAP support, which gtest itself supports since

Re: [Qemu-devel] [PATCH v7 07/28] compat: replace PC_COMPAT_3_0 & HW_COMPAT_3_0 macros

2018-12-21 Thread Cornelia Huck
On Fri, 21 Dec 2018 13:03:49 +0400 Marc-André Lureau wrote: > Use static arrays instead. > > Suggested-by: Eduardo Habkost > Signed-off-by: Marc-André Lureau > --- > include/hw/boards.h| 3 +++ > include/hw/compat.h| 3 --- > include/hw/i386/pc.h | 17

Re: [Qemu-devel] [PATCH v7 10/28] compat: replace PC_COMPAT_2_10 & HW_COMPAT_2_10 macros

2018-12-21 Thread Cornelia Huck
On Fri, 21 Dec 2018 13:03:52 +0400 Marc-André Lureau wrote: > Use static arrays instead. > > Suggested-by: Eduardo Habkost > Signed-off-by: Marc-André Lureau > --- > include/hw/boards.h| 3 +++ > include/hw/compat.h| 11 --- > include/hw/i386/pc.h | 17

Re: [Qemu-devel] [PATCH v7 16/28] compat: replace PC_COMPAT_2_4 & HW_COMPAT_2_4 macros

2018-12-21 Thread Cornelia Huck
On Fri, 21 Dec 2018 13:03:58 +0400 Marc-André Lureau wrote: > Use static arrays instead. > > Suggested-by: Eduardo Habkost > Signed-off-by: Marc-André Lureau > --- > include/hw/boards.h| 3 ++ > include/hw/compat.h| 27 -- > include/hw/i386/pc.h | 74

Re: [Qemu-devel] [PATCH v7 17/28] compat: replace PC_COMPAT_2_3 & HW_COMPAT_2_3 macros

2018-12-21 Thread Cornelia Huck
On Fri, 21 Dec 2018 13:03:59 +0400 Marc-André Lureau wrote: > Use static arrays instead. I decided to rename the conflicting > pc_compat_2_3() function with pc_compat_2_3_fn(). > > Suggested-by: Eduardo Habkost > Signed-off-by: Marc-André Lureau > --- > include/hw/boards.h | 3 ++ >

  1   2   3   >