Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-31 Thread Markus Armbruster
Eric Blake writes: > On 08/27/2018 11:40 PM, Markus Armbruster wrote: > typedef enum json_token_type { -JSON_MIN = 100, -JSON_LCURLY = JSON_MIN, +JSON_ERROR = 0, /* must be zero, see json_lexer[] */ +/* Gap for lexer states */ +JSON

Re: [Qemu-devel] [PATCH 5/6] json: Eliminate lexer state IN_ERROR

2018-08-31 Thread Markus Armbruster
Eric Blake writes: > On 08/28/2018 10:01 AM, Eric Blake wrote: >> The question remains, then, if a fixed-size gap (by making JSON_MIN >> be exactly 100) is any smarter than a contiguous layout (by making >> JSON_MIN be IN_START_INTERP + 1).  I can't see any strong reason for >> preferring one for

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

2018-08-31 Thread Hongbo Zhang
On 30 August 2018 at 21:29, Ard Biesheuvel wrote: > On 30 August 2018 at 12:02, Leif Lindholm wrote: >> On Thu, Aug 30, 2018 at 09:39:33AM +0100, Peter Maydell wrote: >>> On 30 August 2018 at 09:31, Leif Lindholm wrote: >>> > On Thu, Aug 30, 2018 at 03:07:29PM +0800, Hongbo Zhang wrote: >>> >> @

Re: [Qemu-devel] [Bug 1787505] Re: Solaris host: no network connection, mouse pointer mismatch

2018-08-31 Thread Peter Maydell
On 31 August 2018 at 01:47, Michele Denber <1787...@bugs.launchpad.net> wrote: > Anyone? I'm still trying to get my networking working. On this page: > https://en.wikibooks.org/wiki/QEMU/Networking#User_mode_networking, it > says > > "The guest OS will see an E1000 NIC with a virtual DHCP server

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

2018-08-31 Thread Igor Mammedov
On Thu, 30 Aug 2018 11:08:00 -0300 Eduardo Habkost wrote: > On Thu, Aug 30, 2018 at 09:58:51AM +0200, Igor Mammedov wrote: > > On Wed, 29 Aug 2018 14:33:01 -0300 > > Eduardo Habkost wrote: > > > > > On Wed, Aug 29, 2018 at 04:32:01PM +0200, Igor Mammedov wrote: > > > > commit > > > > (5cd

[Qemu-devel] [PATCH] target/xtensa: fix FPU2000 bugs

2018-08-31 Thread Max Filippov
- FPU2000 defines rfr and wfr opcodes, not rfr.s and wfr.s; - movcond.s uses incorrect operand in tcg_gen_movcond: in case the condition is not satisfied it must not change its argument 0. Fixes: c04e1692e3aa ("target/xtensa: extract FPU2000 opcode translators") Cc: qemu-sta...@nongnu.org Signed

[Qemu-devel] [PATCH v2 5/6] json: Eliminate lexer state IN_ERROR

2018-08-31 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qobject/json-lexer.c | 9 + qobject/json-parser-int.h | 8 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c index 39c7ce7adc..2a5561c917 100644 --- a/qobje

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

2018-08-31 Thread peng.hao2
>> +static void kvm_coalesce_pio_add(MemoryListener *listener, >> +MemoryRegionSection *section, >> +hwaddr start, hwaddr size) >> +{ >> +KVMState *s = kvm_state; >> + >> +if (s->coalesced_pio) { >> +struct kvm_coalesce

[Qemu-devel] [PATCH v2 6/6] json: Eliminate lexer state IN_WHITESPACE, pseudo-token JSON_SKIP

2018-08-31 Thread Markus Armbruster
The lexer ignores whitespace like this: on whitespace on non-ws spontaneously IN_START --> IN_WHITESPACE --> JSON_SKIP --> IN_START ^| \__/ on whitespace This accumulates a whitespace token in state IN_WHITESPACE, only to throw it

[Qemu-devel] [PATCH v2 0/6] json: More fixes, error reporting improvements, cleanups

2018-08-31 Thread Markus Armbruster
Just a few patches to follow up on "json: Fixes, error reporting improvements, cleanups". v2: * PATCH 1-2,4,6: Minor commit message improvements [Eric] Markus Armbruster (6): json: Fix lexer for lookahead character beyond '\x7F' json: Clean up how lexer consumes "end of input" json: Make le

[Qemu-devel] [PATCH v2 4/6] json: Nicer recovery from lexical errors

2018-08-31 Thread Markus Armbruster
When the lexer chokes on an input character, it consumes the character, emits a JSON error token, and enters its start state. This can lead to suboptimal error recovery. For instance, input 0123 , produces the tokens JSON_ERROR01 JSON_INTEGER 23 JSON_COMMA, Make the l

[Qemu-devel] [PATCH v2 1/6] json: Fix lexer for lookahead character beyond '\x7F'

2018-08-31 Thread Markus Armbruster
The lexer fails to end a valid token when the lookahead character is beyond '\x7F'. For instance, input true\xC2\xA2 produces the tokens JSON_ERROR true\xC2 JSON_ERROR \xA2 This should be JSON_KEYWORD true JSON_ERROR \xC2 JSON_ERROR \xA2 instead. Th

[Qemu-devel] [PATCH v2 3/6] json: Make lexer's "character consumed" logic less confusing

2018-08-31 Thread Markus Armbruster
The lexer uses macro TERMINAL_NEEDED_LOOKAHEAD() to decide whether a state transition consumes the input character. It returns true when the state transition is defined with the TERMINAL() macro. To detect that, it checks whether input '\0' would have resulted in the same state transition, and th

[Qemu-devel] [PATCH v2 2/6] json: Clean up how lexer consumes "end of input"

2018-08-31 Thread Markus Armbruster
When the lexer isn't in its start state at the end of input, it's working on a token. To flush it out, it needs to transit to its start state on "end of input" lookahead. There are two ways to the start state, depending on the current state: * If the lexer is in a TERMINAL(JSON_FOO) state, it ca

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

2018-08-31 Thread Igor Mammedov
On Thu, 30 Aug 2018 17:51:13 +0200 Laszlo Ersek wrote: > +Drew > > On 08/30/18 14:08, Igor Mammedov wrote: > > If VM has VCPUs plugged sparselly (for example a VM started with > > 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so > > only cpu0 and cpu2 are present), QGA will rise a

Re: [Qemu-devel] [PATCH] migration/rdma: Fix uninitialised rdma_return_path

2018-08-31 Thread Juan Quintela
"Dr. David Alan Gilbert (git)" wrote: > From: "Dr. David Alan Gilbert" > > Clang correctly errors out moaning that rdma_return_path > is used uninitialised in the earlier error paths. > Make it NULL so that the error path ignores it. > > Fixes: 55cc1b5937a8e709e4c102e74b206281073aab82 > Signed-of

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

2018-08-31 Thread Andrew Jones
On Fri, Aug 31, 2018 at 03:20:45PM +0800, Hongbo Zhang wrote: > If no DT in SBSA machine, then the code had much more difference with > virt, so there is possibility to make it a simple separate file; > If keep same DT as virt, then there are more overlap with virt codes, > so I am not sure how the

[Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test

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

[Qemu-devel] [PULL 0/9] Removal of deprecated options and improvements for qtests

2018-08-31 Thread Thomas Huth
Hi Peter! The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100) are available in the git repository at: https://gitlab.com/huth/qemu.git tags/pull-re

[Qemu-devel] [PULL 5/9] tests/libqos: Utilize newer glib spawn check

2018-08-31 Thread Thomas Huth
From: Eric Blake During development, I got a 'make check' failure that claimed: qemu-img returned status code 32512 ** ERROR:tests/libqos/libqos.c:202:mkimg: assertion failed: (!rc) But 32512 is too big for a normal exit status value, which means we failed to use WEXITSTATUS() to shift the bits

[Qemu-devel] [PULL 9/9] tests: add a qmp success-response test

2018-08-31 Thread Thomas Huth
From: Marc-André Lureau Verify the usage of this schema feature and the API behaviour. This should be the only case where qmp_dispatch() returns NULL. Signed-off-by: Marc-André Lureau Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth --- tests/qapi-schema/qapi-schema-test.json | 2

[Qemu-devel] [PULL 6/9] tests: add qmp_assert_error_class()

2018-08-31 Thread Thomas Huth
From: Marc-André Lureau This helper will simplify a bunch of code checking for QMP errors and can be shared by various tests. Note that test-qga does check for error description as well, so don't replace the code there for now. Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Signed-

[Qemu-devel] [PULL 3/9] Remove the deprecated options -startdate, -localtime and -rtc-td-hack

2018-08-31 Thread Thomas Huth
Deprecated since two releases, nobody complained, thus it's time to remove them now. Acked-by: Peter Krempa Acked-by: Ján Tomko Signed-off-by: Thomas Huth --- qemu-deprecated.texi | 13 - qemu-options.hx | 7 - vl.c | 76 +++

Re: [Qemu-devel] [PATCH v2 3/3] aspeed/timer: use the APB frequency from the SCU

2018-08-31 Thread Thomas Huth
On 2018-06-22 09:57, Cédric Le Goater wrote: > The timer controller can be driven by either an external 1MHz clock or > by the APB clock. Today, the model makes the assumption that the APB > frequency is always set to 24MHz but this is incorrect. > > The AST2400 SoC on the palmetto machines uses a

[Qemu-devel] [PULL 7/9] tests: add qmp/object-add-without-props test

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

[Qemu-devel] [PULL 2/9] Remove the deprecated -nodefconfig option

2018-08-31 Thread Thomas Huth
It's the same as -no-user-config and marked as deprecated since three releases already. Time to remove it now. Acked-by: Peter Krempa Acked-by: Ján Tomko Signed-off-by: Thomas Huth --- docs/interop/live-block-operations.rst | 4 ++-- qemu-deprecated.texi | 4 qemu-option

Re: [Qemu-devel] [PATCH v2 3/3] aspeed/timer: use the APB frequency from the SCU

2018-08-31 Thread Cédric Le Goater
On 08/31/2018 10:34 AM, Thomas Huth wrote: > On 2018-06-22 09:57, Cédric Le Goater wrote: >> The timer controller can be driven by either an external 1MHz clock or >> by the APB clock. Today, the model makes the assumption that the APB >> frequency is always set to 24MHz but this is incorrect. >> >

[Qemu-devel] [PULL 4/9] net: Remove the deprecated -tftp, -bootp, -redir and -smb options

2018-08-31 Thread Thomas Huth
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now. Reviewed

[Qemu-devel] [PULL 1/9] Remove the deprecated -balloon option

2018-08-31 Thread Thomas Huth
The "-balloon" option has been replaced by "-device virtio-balloon". It's been marked as deprecated since two releases, and nobody complained, so let's remove it now. Acked-by: Paolo Bonzini Reviewed-by: Daniel P. Berrangé Reviewed-by: Cornelia Huck Reviewed-by: Michael S. Tsirkin Reviewed-by:

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

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

Re: [Qemu-devel] [PATCH V2] block: increased maximum size of vvfat devices

2018-08-31 Thread Pavel Dovgalyuk
I've tried this patch and it worked for me. Small disk was created for the small folder, and it worked in MS-DOS. Larger disk was automatically selected for the folder larger than 504Mb. It worked only under Windows. Pavel Dovgalyuk > -Original Message- > From: Arkasha [mailto:ivanovrka.

Re: [Qemu-devel] [PATCH] migration/rdma: Fix uninitialised rdma_return_path

2018-08-31 Thread Dr. David Alan Gilbert
* Philippe Mathieu-Daudé (f4...@amsat.org) wrote: > On 8/30/18 2:36 PM, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Clang correctly errors out moaning that rdma_return_path > > is used uninitialised in the earlier error paths. > > Make it NULL so that the error

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

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

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

2018-08-31 Thread Jaggi, Manish
On 29-Aug-2018, at 6:46 PM, Andrew Jones mailto:drjo...@redhat.com>> wrote: External Email On Wed, Aug 29, 2018 at 12:40:08PM +, Jaggi, Manish wrote: On 28-Aug-2018, at 10:57 PM, Dr. David Alan Gilbert mailto:dgilb...@redhat.com>> wrote: External Email (Cc'ing in Eric, Drew, and Peter

[Qemu-devel] [Bug 1788665] Re: Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-31 Thread Dr. David Alan Gilbert
I find it interesting this is a slow down with PCI passthrough - that's pretty much the case you'd expect there to be least change; it shouldn't be generating lots of vm exit's for example which you'd expect could have been made slower by the recent security changes. I suppose one thing you could

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

2018-08-31 Thread Laszlo Ersek
On 08/31/18 10:00, Igor Mammedov wrote: > On Thu, 30 Aug 2018 17:51:13 +0200 > Laszlo Ersek wrote: > >> +Drew >> >> On 08/30/18 14:08, Igor Mammedov wrote: >>> If VM has VCPUs plugged sparselly (for example a VM started with >>> 3 VCPUs (cpu0, cpu1 and cpu2) and then cpu1 was hotunplugged so >>>

Re: [Qemu-devel] [PATCH] hw/arm/exynos4210: fix Exynos4210 UART support

2018-08-31 Thread Thomas Huth
On 2018-08-31 12:23, Bartlomiej Zolnierkiewicz wrote: > commit 97274d0c05d4 ("hw/char/exynos4210_uart.c: Remove unneeded > handling of NULL chardev") broke Exynos4210 support as it removed > NULL 'Chardev *chr' handling from exynos4210_uart_create() and > currently exynos4210_init() always passes N

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

2018-08-31 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > When reporting the id of virtio-based memory devices, we always have to > take the one of the proxy device (parent). > > Expose the function, so especially virtio-based memory devices can > reuse the function when filling out the id in MemoryDeviceIn

[Qemu-devel] [PATCH 06/11] aspeed/smc: fix default read value

2018-08-31 Thread Cédric Le Goater
0x should be returned for non implemented registers. Signed-off-by: Cédric Le Goater --- hw/ssi/aspeed_smc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index 1270842dcf0c..6045ca11b969 100644 --- a/hw/ssi/aspeed_smc.c

[Qemu-devel] [PATCH 02/11] hw/arm/aspeed: change the FMC flash model of the AST2500 evb

2018-08-31 Thread Cédric Le Goater
The AST2500 evb is shipped with a W25Q256 which has a non volatile bit to make the chip operate in 4 Byte address mode at power up. This should be an interesting feature to model as it will exercise a bit more the SMC controllers and MMIO execution at boot time. Signed-off-by: Cédric Le Goater --

[Qemu-devel] [PATCH 00/11] aspeed: misc fixes and enhancements (SMC)

2018-08-31 Thread Cédric Le Goater
Hello, This series adds a couple of cleanups and two main features to the Aspeed machines : - a 'mmio-exec' property to boot directly from a memory region alias of the FMC flash module using MMIO execution. This is not activated by default because boot time needs to be improved on recent

[Qemu-devel] [PATCH 03/11] hw/arm/aspeed: Add an Aspeed machine class

2018-08-31 Thread Cédric Le Goater
The code looks better, it removes duplicated lines and it will ease the introduction of common properties for the Aspeed machines. Signed-off-by: Cédric Le Goater --- include/hw/arm/aspeed.h | 46 + hw/arm/aspeed.c | 212 +--- 2 files changed,

[Qemu-devel] [PATCH 08/11] aspeed/smc: add support for DMAs

2018-08-31 Thread Cédric Le Goater
The FMC controller on the Aspeed SoCs support DMA to access the flash modules. It can operate in a normal mode, to copy to or from the flash module mapping window, or in a checksum calculation mode, to evaluate the best clock settings for reads. Our primary need is to support the checksum calculat

[Qemu-devel] [PATCH 01/11] aspeed/timer: fix compile breakage with clang 3.4.2

2018-08-31 Thread Cédric Le Goater
In file included from /home/thuth/devel/qemu/hw/timer/aspeed_timer.c:16: /home/thuth/devel/qemu/include/hw/misc/aspeed_scu.h:37:3: error: redefinition of typedef 'AspeedSCUState' is a C11 feature [-Werror,-Wtypedef-redefinition] } AspeedSCUState; ^ /home/thuth/devel/qemu/include/hw/timer/as

[Qemu-devel] [PATCH 05/11] aspeed/smc: fix some alignment issues

2018-08-31 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ssi/aspeed_smc.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c index b29bfd3124a9..1270842dcf0c 100644 --- a/hw/ssi/aspeed_smc.c +++ b/hw/ssi/aspeed_smc.c @@ -388,8 +388,8 @@ static uint

[Qemu-devel] [PATCH 04/11] hw/arm/aspeed: add a 'mmio-exec' property to boot from the FMC flash module

2018-08-31 Thread Cédric Le Goater
Now that MMIO execution is supported, introduce a 'mmio-exec' property to boot directly from CE0 of the FMC controller using a memory region alias. The overhead for the current firmware images using a custom U-Boot is around 2 seconds, which is fine, but with a U-Boot from mainline, it takes an ex

[Qemu-devel] [PATCH 07/11] aspeed/smc: add a 'sdram_base' and 'max-ram-size' properties

2018-08-31 Thread Cédric Le Goater
The setting of the DRAM address of the DMA transaction depends on the DRAM base address and the maximun DRAM size of the SoC. Let's add a couple of properties to give this information to the SMC controller model. Also, move the SDRAM Memory controller realization before the other controllers which

[Qemu-devel] [PATCH 09/11] aspeed/smc: add DMA calibration settings

2018-08-31 Thread Cédric Le Goater
When doing calibration, the SPI clock rate in the CE0 Control Register and the read delay cycles in the Read Timing Compensation Register are replaced by bit[11:4] of the DMA Control Register. Signed-off-by: Cédric Le Goater --- hw/ssi/aspeed_smc.c | 54 ++

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

2018-08-31 Thread Dr. David Alan Gilbert
Actually on second thoughts, a question: * David Hildenbrand (da...@redhat.com) wrote: > When reporting the id of virtio-based memory devices, we always have to > take the one of the proxy device (parent). > > Expose the function, so especially virtio-based memory devices can > reuse the function

Re: [Qemu-devel] [PATCH v4 20/29] util: add qemu_write_pidfile()

2018-08-31 Thread Daniel P . Berrangé
On Fri, Jul 13, 2018 at 03:09:07PM +0200, Marc-André Lureau wrote: > There are variants of qemu_create_pidfile() in qemu-pr-helper and > qemu-ga. Let's have a common implementation in libqemuutil. > > The code is based from pr-helper write_pidfile(), but allows the > caller to deal with error repo

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

2018-08-31 Thread David Hildenbrand
>> static gint memory_device_addr_sort(gconstpointer a, gconstpointer b) >> { >> const MemoryDeviceState *md_a = MEMORY_DEVICE(a); >> @@ -168,6 +184,7 @@ static uint64_t memory_device_get_free_addr(MachineState >> *ms, >> for (item = list; item; item = g_slist_next(item)) { >>

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

2018-08-31 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > > >> static gint memory_device_addr_sort(gconstpointer a, gconstpointer b) > >> { > >> const MemoryDeviceState *md_a = MEMORY_DEVICE(a); > >> @@ -168,6 +184,7 @@ static uint64_t > >> memory_device_get_free_addr(MachineState *ms, > >> for

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

2018-08-31 Thread Andrew Jones
On Thu, Aug 30, 2018 at 05:51:13PM +0200, Laszlo Ersek wrote: > Originally these guest agent commands (both getting and setting) were > meant to be used in the absence of real VCPU hot[un]plug, as a fallback > / place-holder. > > If the latter (= real VCPU hot(un)plug) works, then these guest agen

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

2018-08-31 Thread David Hildenbrand
On 31.08.2018 12:43, Dr. David Alan Gilbert wrote: > * David Hildenbrand (da...@redhat.com) wrote: >> static gint memory_device_addr_sort(gconstpointer a, gconstpointer b) { const MemoryDeviceState *md_a = MEMORY_DEVICE(a); @@ -168,6 +184,7 @@ static uint64_t memory

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

2018-08-31 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 31.08.2018 12:43, Dr. David Alan Gilbert wrote: > > * David Hildenbrand (da...@redhat.com) wrote: > >> > static gint memory_device_addr_sort(gconstpointer a, gconstpointer b) > { > const MemoryDeviceState *md_a = MEMORY_DEVICE

[Qemu-devel] [PATCH 10/11] aspeed/smc: inject errors in DMA checksum

2018-08-31 Thread Cédric Le Goater
Emulate read errors in the DMA Checksum Register for high frequencies and optimistic settings of the Read Timing Compensation Register. This will help in tuning the SPI timing calibration algorithm. The values below are those to expect from the first flash device of the FMC controller of a palmett

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

2018-08-31 Thread David Hildenbrand
On 31.08.2018 13:23, Eduardo Habkost wrote: > On Wed, Aug 29, 2018 at 05:36:18PM +0200, David Hildenbrand wrote: >> When reporting the id of virtio-based memory devices, we always have to >> take the one of the proxy device (parent). >> >> Expose the function, so especially virtio-based memory devi

[Qemu-devel] [PATCH 11/11] aspeed/smc: Add dummy data register

2018-08-31 Thread Cédric Le Goater
The SMC controllers have a register containing the byte that will be used as dummy output. It can be modified by software. Signed-off-by: Cédric Le Goater --- hw/ssi/aspeed_smc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.

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

2018-08-31 Thread Andrew Jones
Manish, Your mail reader doesn't appear to be providing any quoting, so I'm not sure I found all your replies. I've tried to fix up the quoting in order to reply here, but you should look into fixing your reader. On Fri, Aug 31, 2018 at 09:52:12AM +, Jaggi, Manish wrote: > On bleh-bleh, And

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

2018-08-31 Thread Eduardo Habkost
On Wed, Aug 29, 2018 at 05:36:18PM +0200, David Hildenbrand wrote: > When reporting the id of virtio-based memory devices, we always have to > take the one of the proxy device (parent). > > Expose the function, so especially virtio-based memory devices can > reuse the function when filling out the

[Qemu-devel] [PULL 0/1] qemu-openbios.for-upstream queue 20180831

2018-08-31 Thread Mark Cave-Ayland
tags/qemu-openbios.for-upstream-20180831 for you to fetch changes up to 09d0c187aa4cce9b349f23724f50587a0014b33b: Update OpenBIOS images to a1280807 built from submodule. (2018-08-31 12:19:30 +0100) qemu-openbios.for-upst

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

2018-08-31 Thread Eduardo Habkost
On Fri, Aug 31, 2018 at 01:26:03PM +0200, David Hildenbrand wrote: > On 31.08.2018 13:23, Eduardo Habkost wrote: > > On Wed, Aug 29, 2018 at 05:36:18PM +0200, David Hildenbrand wrote: > >> When reporting the id of virtio-based memory devices, we always have to > >> take the one of the proxy device

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

2018-08-31 Thread Hongbo Zhang
On 31 August 2018 at 16:42, Andrew Jones wrote: > On Fri, Aug 31, 2018 at 03:20:45PM +0800, Hongbo Zhang wrote: >> If no DT in SBSA machine, then the code had much more difference with >> virt, so there is possibility to make it a simple separate file; >> If keep same DT as virt, then there are mo

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

2018-08-31 Thread David Hildenbrand
>>> I don't like having virtio-specific code on memory-device.c. >>> What about making it generic? Let device 2 register a read-only >>> property for the user-visible ID, and make memory_device_id() use >>> that property if it's present. >> >> Valid point. Or avoid properties and add a function to

Re: [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test

2018-08-31 Thread Markus Armbruster
Thomas Huth writes: > From: Marc-André Lureau > > test_qom_set_without_value() is about a bug in infrastructure used by > the QMP core, fixed in commit c489780203. We covered the bug in > infrastructure unit tests (commit bce3035a44). I wrote that test > earlier, to cover QMP level as well, th

[Qemu-devel] [Bug 1392468] Re: qemu uses a bitmap icon

2018-08-31 Thread Stephan Henningsen
On Ubuntu 18.04 and this is still an issue. Please don't make QEMU look like a crappy piece of software. It deserves a crisp icon. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1392468 Title: qemu

[Qemu-devel] [PATCH] hw/arm/exynos4210: fix Exynos4210 UART support

2018-08-31 Thread Bartlomiej Zolnierkiewicz
commit 97274d0c05d4 ("hw/char/exynos4210_uart.c: Remove unneeded handling of NULL chardev") broke Exynos4210 support as it removed NULL 'Chardev *chr' handling from exynos4210_uart_create() and currently exynos4210_init() always passes NULL as 'Chardev *chr' argument to exynos4210_uart_create() cal

Re: [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test

2018-08-31 Thread Thomas Huth
On 2018-08-31 14:04, Markus Armbruster wrote: > Thomas Huth writes: > >> From: Marc-André Lureau >> >> test_qom_set_without_value() is about a bug in infrastructure used by >> the QMP core, fixed in commit c489780203. We covered the bug in >> infrastructure unit tests (commit bce3035a44). I wr

Re: [Qemu-devel] [PATCH 2/8] job: Fix off-by-one accesses to JobSTT and JobVerbTable

2018-08-31 Thread Liam Merwick
On 30/08/18 19:34, Eric Blake wrote: On 08/30/2018 10:47 AM, Liam Merwick wrote: In the array dereference of JobVerbTable[verb] in job_apply_verb() the check of the index, verb, allows an overrun because an index equal to the array size is permitted. Similarly, in the array dereference of Job

[Qemu-devel] [PATCH 1/3] nd: move nd_region to common header

2018-08-31 Thread Pankaj Gupta
This patch moves nd_region definition to common header include/linux/nd.h file. This is required for flush callback support for both virtio-pmem & pmem driver. Signed-off-by: Pankaj Gupta --- drivers/nvdimm/nd.h | 39 --- include/linux/nd.h | 40

Re: [Qemu-devel] [PATCH] input-linux: toggle for lock keys

2018-08-31 Thread Ryan El Kochta via Qemu-devel
On Aug 31, 2018, 2:07 AM, Gerd Hoffmann wrote: Hi, > That's a wonderful idea. Would you be comfortable with > grab_toggle=custom:x:x as well? What this is supposed to do? cheers, Gerd It would be the same as the original patch (you can input custom key IDs if you so desire) in addition to a f

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 2/2] tpm_spapr: Support suspend and resume

2018-08-31 Thread Stefan Berger
On 07/26/2018 01:31 AM, David Gibson wrote: On Tue, Dec 12, 2017 at 03:44:03PM -0500, Stefan Berger wrote: Signed-off-by: Stefan Berger --- hw/tpm/tpm_spapr.c | 61 ++ 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/hw/tpm/tp

[Qemu-devel] [PATCH 3/3] virtio-pmem: Add virtio pmem driver

2018-08-31 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into sy

[Qemu-devel] [PATCH] qemu: Add virtio pmem device

2018-08-31 Thread Pankaj Gupta
This patch adds virtio-pmem Qemu device. This device presents memory address range information to guest which is backed by file backend type. It acts like persistent memory device for KVM guest. Guest can perform read and persistent write operations on this memory range with the help of DA

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

2018-08-31 Thread Jeff Cody
On Wed, Aug 29, 2018 at 09:57:26PM -0400, John Snow wrote: > Presently we codify the entry point for a job as the "start" callback, > but a more apt name would be "run" to clarify the idea that when this > function returns we consider the job to have "finished," except for > any cleanup which occur

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

2018-08-31 Thread Max Reitz
On 2018-08-30 03:57, John Snow wrote: > Change the manual deferment to mirror_exit into the implicit > callback to job_exit and the mirror_exit callback. > > This does change the order of some bdrv_unref calls and job_completed, > but thanks to the new context in which we call .exit, this is safe

Re: [Qemu-devel] [PATCH 6/8] block: dump_qlist() may dereference a Null pointer

2018-08-31 Thread Liam Merwick
On 30/08/18 19:41, Eric Blake wrote: On 08/30/2018 10:47 AM, Liam Merwick wrote: A NULL 'list' passed into function dump_qlist() isn't correctly validated and can be passed to qlist_first() where it is dereferenced. But dump_qlist() is static, and it is easy to prove that it will never be

[Qemu-devel] [PATCH 2/3] libnvdimm: nd_region flush callback support

2018-08-31 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host f

Re: [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test

2018-08-31 Thread Thomas Huth
On 2018-08-31 15:24, Marc-André Lureau wrote: > Hi > On Fri, Aug 31, 2018 at 3:18 PM Thomas Huth wrote: >> >> On 2018-08-31 14:04, Markus Armbruster wrote: >>> Thomas Huth writes: >>> From: Marc-André Lureau test_qom_set_without_value() is about a bug in infrastructure used by >>>

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

2018-08-31 Thread Max Reitz
On 2018-08-30 03:57, John Snow wrote: > Jobs are now expected to return their retcode on the stack, from the > .run callback, so we can remove that argument. > > job_cancel does not need to set -ECANCELED because job_completed will > update the return code itself if the job was canceled. > > Whil

[Qemu-devel] [PATCH 0/3] kvm "fake DAX" device

2018-08-31 Thread Pankaj Gupta
This patch series has implementation for "fake DAX". "fake DAX" is fake persistent memory(nvdimm) in guest which allows to bypass the guest page cache. This also implements a VIRTIO based asynchronous flush mechanism. Sharing guest driver and qemu device changes in separate patch sets

Re: [Qemu-devel] [PULL 8/9] tests: add qmp/qom-set-without-value test

2018-08-31 Thread Marc-André Lureau
Hi On Fri, Aug 31, 2018 at 3:18 PM Thomas Huth wrote: > > On 2018-08-31 14:04, Markus Armbruster wrote: > > Thomas Huth writes: > > > >> From: Marc-André Lureau > >> > >> test_qom_set_without_value() is about a bug in infrastructure used by > >> the QMP core, fixed in commit c489780203. We cove

Re: [Qemu-devel] [PATCH 8/8] qcow2: Read outside array bounds in qcow2_pre_write_overlap_check()

2018-08-31 Thread Liam Merwick
On 30/08/18 19:43, Eric Blake wrote: On 08/30/2018 10:47 AM, Liam Merwick wrote: The commit for 0e4e4318eaa5 increments QCOW2_OL_MAX_BITNR but does not add an array entry for QCOW2_OL_BITMAP_DIRECTORY_BITNR to metadata_ol_names[]. As a result, an array dereference of metadata_ol_names[8] in

Re: [Qemu-devel] [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD

2018-08-31 Thread Aleksandar Markovic
Hi, Craig, > From: Craig Janeczek > Sent: Thursday, August 30, 2018 9:30 PM > > Subject: [PATCH v4 5/9] target/mips: Add MXU instruction S8LDD > Adds support for emulating the S8LDD MXU instruction. > Signed-off-by: Craig Janeczek > --- > v1 > - initial patch > v2 > - changed bitfie

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

2018-08-31 Thread Jeff Cody
On Wed, Aug 29, 2018 at 09:57:28PM -0400, John Snow wrote: > All jobs do the same thing when they leave their running loop: > - Store the return code in a structure > - wait to receive this structure in the main thread > - signal job completion via job_completed > > Few jobs do anything beyond exa

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

2018-08-31 Thread Jeff Cody
On Wed, Aug 29, 2018 at 09:57:29PM -0400, John Snow wrote: > Change the manual deferment to commit_complete into the implicit > callback to job_exit, renaming commit_complete to commit_exit. > > This conversion does change the timing of when job_completed is > called to after the bdrv_replace_node

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

2018-08-31 Thread Jeff Cody
On Wed, Aug 29, 2018 at 09:57:30PM -0400, John Snow wrote: > Change the manual deferment to mirror_exit into the implicit > callback to job_exit and the mirror_exit callback. > > This does change the order of some bdrv_unref calls and job_completed, > but thanks to the new context in which we call

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

2018-08-31 Thread Max Reitz
On 2018-08-30 03:57, John Snow wrote: > This is part one of a two part series that refactors the exit logic > of jobs. > > Part one removes job_defer_to_main_loop. > Part two removes the job->exit() callback introduced in part one. > > It's redundant to have each job manage deferring to the main

Re: [Qemu-devel] [PULL 00/11] Block patches

2018-08-31 Thread Max Reitz
On 2018-08-31 16:24, Max Reitz wrote: > The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: > > Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' > into staging (2018-08-27 16:44:20 +0100) > > are available in the Git repository at: > > htt

[Qemu-devel] [PULL 09/11] block/backup: make function variables consistently named

2018-08-31 Thread Max Reitz
From: John Snow Rename opaque_job to job to be consistent with other job implementations. Rename 'job', the BackupBlockJob object, to 's' to also be consistent. Suggested-by: Eric Blake Signed-off-by: John Snow Reviewed-by: Max Reitz Message-id: 20180830015734.19765-8-js...@redhat.com Signed-

[Qemu-devel] [PULL 02/11] tests: fix bdrv-drain leak

2018-08-31 Thread Max Reitz
From: Marc-André Lureau Spotted by ASAN: = ==5378==ERROR: LeakSanitizer: detected memory leaks Direct leak of 65536 byte(s) in 1 object(s) allocated from: #0 0x7f788f83bc48 in malloc (/lib64/libasan.so.5+0xeec48) #1 0x7f788

[Qemu-devel] [PULL 03/11] jobs: change start callback to run callback

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

[Qemu-devel] [PULL 11/11] jobs: remove job_defer_to_main_loop

2018-08-31 Thread Max Reitz
From: John Snow Now that the job infrastructure is handling the job_completed call for all implemented jobs, we can remove the interface that allowed jobs to schedule their own completion. Signed-off-by: John Snow Reviewed-by: Max Reitz Message-id: 20180830015734.19765-10-js...@redhat.com Sign

[Qemu-devel] [PULL 10/11] jobs: remove ret argument to job_completed; privatize it

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

[Qemu-devel] [PULL 01/11] file-posix: Skip effectiveless OFD lock operations

2018-08-31 Thread Max Reitz
From: Fam Zheng If we know we've already locked the bytes, don't do it again; similarly don't unlock a byte if we haven't locked it. This doesn't change the behavior, but fixes a corner case explained below. Libvirt had an error handling bug that an image can get its (ownership, file mode, SELin

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

2018-08-31 Thread Mark Cave-Ayland
On 20/08/18 04:16, David Gibson wrote: > On Fri, Aug 10, 2018 at 04:41:54PM +1000, David Gibson wrote: >> On Fri, Aug 10, 2018 at 07:37:12AM +0200, Hervé Poussineau wrote: >>> OpenBIOS gained 40p support in 5b20e4cacecb62fb2bdc6867c11d44cddd77c4ff >>> Use it, instead of relying on an unmaintained

[Qemu-devel] [PULL 05/11] jobs: add exit shim

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

[Qemu-devel] [PULL 07/11] block/mirror: utilize job_exit shim

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

[Qemu-devel] [PULL 08/11] jobs: utilize job_exit shim

2018-08-31 Thread Max Reitz
From: John Snow Utilize the job_exit shim by not calling job_defer_to_main_loop, and where applicable, converting the deferred callback into the job_exit callback. This converts backup, stream, create, and the unit tests all at once. Most of these jobs do not see any changes to the order in whic

[Qemu-devel] [PULL 06/11] block/commit: utilize job_exit shim

2018-08-31 Thread Max Reitz
From: John Snow Change the manual deferment to commit_complete into the implicit callback to job_exit, renaming commit_complete to commit_exit. This conversion does change the timing of when job_completed is called to after the bdrv_replace_node and bdrv_unref calls, which could have implication

  1   2   3   >