[Qemu-devel] [Bug 1785197] Re: qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
1. Add breakpoint at vga.c:790 s->vbe_regs[VBE_DISPI_INDEX_ENABLE] = val; (gdb) b vga.c:790 Breakpoint 2 at 0x56100ad10521: file /qemu-2.12/hw/display/vga.c, line 790. (gdb) c Continuing. 2. When breakpoint is hited , val is 0 Thread 5 "CPU 1/KVM" hit Breakpoint 2, vbe_ioport_write_data (opaque

[Qemu-devel] [Bug 1785197] Re: qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
I have tried many times to reproduce the issue. 1. Add a breakpoint (gdb) b memory_region_snapshot_and_clear_dirty if size==0 Breakpoint 1 at 0x55ef37b7d450: file /qemu-2.12/memory.c, line 1986. 2. Occasionally the breakpoint hited, size is 0 (gdb) c Continuing. Thread 1 "kvm" hit Breakpoint 1, m

Re: [Qemu-devel] [PATCH 0/2] hw/net/pcnet-pci: Convert away from old_mmio accessors

2018-08-03 Thread Richard Henderson
On 08/02/2018 10:40 AM, Peter Maydell wrote: > Peter Maydell (2): > hw/net/pcnet-pci: Convert away from old_mmio accessors > hw/net/pcnet-pci: Unify pcnet_ioport_read/write and > pcnet_mmio_read/write Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH] hw/intc/apic: Switch away from old_mmio

2018-08-03 Thread Philippe Mathieu-Daudé
On 08/03/2018 07:19 AM, Peter Maydell wrote: > Switch the apic away from using the old_mmio MemoryRegionOps > accessor functions. > > Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > --- > I think this is the last old_mmio user. We can clean up the > core code once all the on

Re: [Qemu-devel] [PATCH v5 45/76] target/mips: Implement emulation of nanoMIPS LLWP/SCWP pair

2018-08-03 Thread Richard Henderson
On 08/03/2018 03:48 AM, Aleksandar Rikalo wrote: >> > However, it looks there is a bigger problem now in SCWP. QEMU crashes with >> > this message: >> > >> > /qemu/tcg/tcg.c:2862: tcg fatal error I said remove all of the tcg_temp_local_new that were not necessary. You removed one that was necessa

Re: [Qemu-devel] [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-03 Thread Alex Williamson
On Fri, 3 Aug 2018 21:42:18 +0300 "Michael S. Tsirkin" wrote: > On Tue, Jul 31, 2018 at 03:50:30PM -0600, Alex Williamson wrote: > > On Tue, 31 Jul 2018 16:07:46 +0100 > > "Dr. David Alan Gilbert" wrote: > > > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > > On Tue, 31 Jul

[Qemu-devel] [Bug 1785308] [NEW] 0x8 exception encountered but not handled

2018-08-03 Thread Ra Cohen
Public bug reported: Present in all QEMU versions. OS is triple page faulting and crashing rather than handling the expected double page fault properly. The same OS works in Bochs so I know its not the problem. ** Affects: qemu Importance: Undecided Status: New -- You received th

Re: [Qemu-devel] [PATCH 0/6] dirty-bitmap: rewrite bdrv_dirty_iter_next_area

2018-08-03 Thread no-reply
Hi, This series failed 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. Type: series Message-id: 20180803174654.278336-1-vsement...@virtuozzo.com Subject: [Qemu-devel] [PATCH 0/6] dirty-

Re: [Qemu-devel] [PATCH v2 0/4] Balloon inhibit enhancements, vfio restriction

2018-08-03 Thread Michael S. Tsirkin
On Tue, Jul 31, 2018 at 03:50:30PM -0600, Alex Williamson wrote: > On Tue, 31 Jul 2018 16:07:46 +0100 > "Dr. David Alan Gilbert" wrote: > > > * Alex Williamson (alex.william...@redhat.com) wrote: > > > On Tue, 31 Jul 2018 15:29:17 +0300 > > > "Michael S. Tsirkin" wrote: > > > > > > > On Mon,

[Qemu-devel] [PULL alternative 0/2] pc: regression fix

2018-08-03 Thread Michael S. Tsirkin
At Peter's request, this version of only including fix for a regression since 2.12. The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) are available in the Git repository at: git://git.kernel.org/pub

[Qemu-devel] [PULL alternative 1/2] pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

2018-08-03 Thread Michael S. Tsirkin
From: Igor Mammedov Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices) broke the first dimm hotplug in following cases: 1: there is no coldplugged dimm in the last numa node but there is a coldplugged dimm in another node -m 4096,slots=4,maxmem=32G

[Qemu-devel] [PULL alternative 2/2] tests/acpi: update tables after memory hotplug changes

2018-08-03 Thread Michael S. Tsirkin
Previous patch changes acpi tables, update expected files accordingly. Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/SRAT.dimmpxm | Bin 472 -> 472 bytes tests/acpi-test-data/pc/SRAT.memhp| Bin 264 -> 264 bytes tests/acpi-test-data/q35/SRAT.dimmpxm | Bin 472 -> 472 bytes t

Re: [Qemu-devel] [PATCH 1/6] dirty-bitmap: improve bdrv_dirty_bitmap_next_zero

2018-08-03 Thread Eric Blake
On 08/03/2018 12:46 PM, Vladimir Sementsov-Ogievskiy wrote: Add bytes parameter to the function, to limit searched range. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 ++- include/qemu/hbitmap.h | 7 +-- block/backup.c | 2 +-

Re: [Qemu-devel] [PATCH 10/10] display: add -display app launching external application

2018-08-03 Thread Eric Blake
On 08/03/2018 12:36 PM, Marc-André Lureau wrote: Add a new display backend that will configure Spice to allow a remote client to control QEMU in a similar fashion as other display backend like GTK. For this to work, we set up Spice server with a unix socket, and register a VC chardev that will b

Re: [Qemu-devel] [PATCH 07/10] char: move SpiceChardev and open_spice_port() to spice.h header

2018-08-03 Thread Eric Blake
On 08/03/2018 12:36 PM, Marc-André Lureau wrote: This will allow to subclass SpiceChardev easily. Grammar - 'allow to ${verb}' is not idiomatic; better is 'allow ${verb}ing' or 'allow ${subject} to ${verb}'. Here, I'd write: This will allow easier subclassing of SpiceChardev. -- Eric Blake,

Re: [Qemu-devel] [PATCH 03/10] configure: bump spice-server required version to 0.12.6

2018-08-03 Thread Eric Blake
On 08/03/2018 12:36 PM, Marc-André Lureau wrote: Looking at chardev/spice.c code, I realize compilation was broken for a while with spice-server < 0.12.3. I propose to bump required version to 0.12.6, released 3y ago, instead of adding more #ifdef. Can you please also investigate which version

Re: [Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 11:45:36AM +0100, Peter Maydell wrote: > On 3 August 2018 at 10:27, Michael S. Tsirkin wrote: > > Please consider for 3.0 if there is another rc. > > > > The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: > > > > Update version for v3.0.0-rc3 rel

Re: [Qemu-devel] [PATCH 2/6] dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
03.08.2018 20:46, Vladimir Sementsov-Ogievskiy wrote: The function alters bdrv_dirty_iter_next_area(), which is wrong and less efficient (see next commit for description). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 +++ include/qemu/hbitmap.h | 15

[Qemu-devel] [PATCH 6/6] Revert "hbitmap: Add @advance param to hbitmap_iter_next()"

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
This reverts commit a33fbb4f8b64226becf502a123733776ce319b24. The functionality is unused. Note: in addition to automatic revert, drop second parameter in hbitmap_iter_next() call from hbitmap_next_dirty_area() too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 5 +-

[Qemu-devel] [PATCH 1/6] dirty-bitmap: improve bdrv_dirty_bitmap_next_zero

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
Add bytes parameter to the function, to limit searched range. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 ++- include/qemu/hbitmap.h | 7 +-- block/backup.c | 2 +- block/dirty-bitmap.c | 5 +++-- nbd/server.c

[Qemu-devel] [PATCH 5/6] Revert "test-hbitmap: Add non-advancing iter_next tests"

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
This reverts commit 269576848ec3d57d2d958cf5ac69b08c44adf816. The functionality is unused. Drop tests. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/test-hbitmap.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/tests/test-hbitm

[Qemu-devel] [PATCH 4/6] Revert "block/dirty-bitmap: Add bdrv_dirty_iter_next_area"

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
This reverts commit 72d10a94213a954ad569095cb4491f2ae0853c40. The function is unused now. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 2 -- block/dirty-bitmap.c | 55 2 files changed, 57 deletions(-) diff

[Qemu-devel] [PATCH 0/6] dirty-bitmap: rewrite bdrv_dirty_iter_next_area

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
Hi all. 1. bdrv_dirty_iter_next_area don't use hbitmap_next_zero and uses inefficient loop instead. Let's improve it. 2. bdrv_dirty_iter_next_area don't handle unaligned offset and max_offset correctly. I'm not sure that it is a real bug. But if it is, we need these series in 3.0. Details are in

[Qemu-devel] [PATCH 2/6] dirty-bitmap: add bdrv_dirty_bitmap_next_dirty_area

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
The function alters bdrv_dirty_iter_next_area(), which is wrong and less efficient (see next commit for description). Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 3 +++ include/qemu/hbitmap.h | 15 +++ block/dirty-bitmap.c | 7 ++

[Qemu-devel] [PATCH 3/6] block/mirror: fix and improve do_sync_target_write

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
Use bdrv_dirty_bitmap_next_dirty_area() instead of bdrv_dirty_iter_next_area(), because of the following problems of bdrv_dirty_iter_next_area(): 1. Using HBitmap iterators we should carefully handle unaligned offset, as first call to hbitmap_iter_next() may return a value less than original offse

[Qemu-devel] [PATCH 08/10] char: register spice ports after spice started

2018-08-03 Thread Marc-André Lureau
Spice port registration is delayed until the server is started. But ports created after are not being registered. If the server is already started, do vmc_register_interface() to register it from qemu_chr_open_spice_port(). Signed-off-by: Marc-André Lureau --- chardev/spice.c | 5 + 1 file c

[Qemu-devel] [PATCH 07/10] char: move SpiceChardev and open_spice_port() to spice.h header

2018-08-03 Thread Marc-André Lureau
This will allow to subclass SpiceChardev easily. Signed-off-by: Marc-André Lureau --- include/chardev/spice.h | 27 +++ chardev/spice.c | 28 +--- 2 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 include/chardev/spice.

[Qemu-devel] [PATCH 10/10] display: add -display app launching external application

2018-08-03 Thread Marc-André Lureau
Add a new display backend that will configure Spice to allow a remote client to control QEMU in a similar fashion as other display backend like GTK. For this to work, we set up Spice server with a unix socket, and register a VC chardev that will be exposed as Spice ports. A QMP monitor is also exp

[Qemu-devel] [PATCH 05/10] spice: merge options lists

2018-08-03 Thread Marc-André Lureau
Passing several -spice options to qemu command line, or calling several time qemu_opts_set() will ignore all but the first option list. Since the spice server is a singleton, it makes sense to merge all the options, the last value being the one taken into account. This changes the behaviour from,

[Qemu-devel] [PATCH 09/10] build-sys: add gio-2.0 check

2018-08-03 Thread Marc-André Lureau
GIO is required for the -display app backend. Signed-off-by: Marc-André Lureau --- configure | 13 + 1 file changed, 13 insertions(+) diff --git a/configure b/configure index 8a1371c55c..9f91752289 100755 --- a/configure +++ b/configure @@ -3483,6 +3483,14 @@ for i in $glib_modules;

[Qemu-devel] [PATCH 03/10] configure: bump spice-server required version to 0.12.6

2018-08-03 Thread Marc-André Lureau
Looking at chardev/spice.c code, I realize compilation was broken for a while with spice-server < 0.12.3. I propose to bump required version to 0.12.6, released 3y ago, instead of adding more #ifdef. Signed-off-by: Marc-André Lureau --- hw/display/qxl.h| 2 -- include/ui/qemu-spice.h |

[Qemu-devel] [PATCH 06/10] spice: do not stop spice if VM is paused

2018-08-03 Thread Marc-André Lureau
spice_server_vm_start/stop() was added to help migration state. However, a paused VM could keep running the spice server. This will allow a Spice client to keep sending commands to a spice chardev. This allows to stop/cont a VM from a Spice monitor port. Signed-off-by: Marc-André Lureau --- ui/

[Qemu-devel] [PATCH 01/10] char/spice: trigger HUP event

2018-08-03 Thread Marc-André Lureau
Inform the front-end of disconnected state (spice client disconnected). This will wakeup the source handler immediately, so it can detect the disconnection asap. Signed-off-by: Marc-André Lureau --- chardev/spice.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --gi

[Qemu-devel] [PATCH 02/10] char/spice: discard write() if backend is disconnected

2018-08-03 Thread Marc-André Lureau
Most chardev backend handle write() as discarded data if underlying system is disconnected. For unknown historical reasons, the Spice backend has "reliable" write. It will wait until the client end is reconnected to accept further write(). Let's review Spice chardev usage and handling of a disconn

[Qemu-devel] [PATCH 04/10] spice: avoid spice runtime assert

2018-08-03 Thread Marc-André Lureau
The Spice server doesn't like to be started or stopped twice . It aborts with: (process:6191): Spice-ERROR **: 19:29:35.912: red-worker.c:623:handle_dev_start: assertion `!worker->running' failed It's easy to avoid that situation since qemu spice_display_is_running tracks the server state. Sign

[Qemu-devel] [PATCH 00/10] RFC: spice: add -display app to launch external UI

2018-08-03 Thread Marc-André Lureau
Hi, One of the most featurefull UI that qemu has is the GTK one. Yet, it doesn't provide many of the functionalities we can expect from a VM desktop application (USB redirection, shared folders, drag and drop, better multimonitor support etc.). Spice is able to export all the VM details to a clien

Re: [Qemu-devel] [PATCH 3/3] target/arm: Add dummy needed functions to M profile vmstate subsections

2018-08-03 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Currently the migration code incorrectly treats a subsection with > no .needed function pointer as if it was the subsection list > terminator -- it is ignored and so is everything after it. > Work around this by giving various M profile vmstate st

Re: [Qemu-devel] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-03 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Currently the migration code incorrectly treats a subsection with > no .needed function pointer as if it was the subsection list > terminator -- it is ignored and so is everything after it. > Work around this by giving vmstate_gicv3_gicd_no_migrat

Re: [Qemu-devel] [PATCH v3 for-3.0] tests/libqtest: Improve kill_qemu()

2018-08-03 Thread Eric Blake
On 08/03/2018 10:51 AM, Markus Armbruster wrote: Eric Blake writes: In kill_qemu() we have an assert that checks that the QEMU process didn't dump core: assert(!WCOREDUMP(wstatus)); Unfortunately the WCOREDUMP macro here means the resulting message is not very easy to comprehend

Re: [Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Paolo Bonzini
On 03/08/2018 17:49, Fam Zheng wrote: > void aio_notify_accept(AioContext *ctx) > { > -if (atomic_xchg(&ctx->notified, false)) { > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need > the > + * ctx->notifier event to wake up, so don't already clear it just > be

Re: [Qemu-devel] [PATCH 2/3] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu

2018-08-03 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > Commit 6692aac411199064 accidentally introduced a second initialization > of the .subsections field of vmstate_gicv3_cpu, instead of adding > the new subsection to the existing list. The effect of this was > probably that migration of GICv3 with v

Re: [Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Paolo Bonzini
On 03/08/2018 17:49, Fam Zheng wrote: > void aio_notify_accept(AioContext *ctx) > { > -if (atomic_xchg(&ctx->notified, false)) { > +/* If ctx->notify_me >= 2, another aio_poll() is waiting which may need > the > + * ctx->notifier event to wake up, so don't already clear it just > be

Re: [Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-03 Thread Stefan Berger
On 08/03/2018 11:32 AM, Marc-André Lureau wrote: With vga=775 on the Linux command line a first boot of the VM running Linux works fine. After a warm reboot it crashes during Linux boot. Before that, valgrind points out bad memory write to console surface. The VGA code is not aware that virtio-g

[Qemu-devel] [PATCH 1/3] hw/intc/arm_gicv3_common: Give no-migration-shift-bug subsection a needed function

2018-08-03 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving vmstate_gicv3_gicd_no_migration_shift_bug a 'needed' function that always returns true

[Qemu-devel] [PATCH 2/3] hw/intc/arm_gicv3_common: Combine duplicate .subsections in vmstate_gicv3_cpu

2018-08-03 Thread Peter Maydell
Commit 6692aac411199064 accidentally introduced a second initialization of the .subsections field of vmstate_gicv3_cpu, instead of adding the new subsection to the existing list. The effect of this was probably that migration of GICv3 with virtualization enabled was broken (or alternatively that mi

[Qemu-devel] [PATCH 3/3] target/arm: Add dummy needed functions to M profile vmstate subsections

2018-08-03 Thread Peter Maydell
Currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything after it. Work around this by giving various M profile vmstate structs a 'needed' function that always returns true. We reu

[Qemu-devel] [PATCH 0/3] Arm migration fixes for 3.0

2018-08-03 Thread Peter Maydell
This patchset primarily fixes problems with Arm migration induced by a bug in the core vmstate handling of subsections: currently the migration code incorrectly treats a subsection with no .needed function pointer as if it was the subsection list terminator -- it is ignored and so is everything aft

Re: [Qemu-devel] [PATCH v3 for-3.0] tests/libqtest: Improve kill_qemu()

2018-08-03 Thread Markus Armbruster
Eric Blake writes: > In kill_qemu() we have an assert that checks that the QEMU process > didn't dump core: > assert(!WCOREDUMP(wstatus)); > > Unfortunately the WCOREDUMP macro here means the resulting message > is not very easy to comprehend on at least some systems: > > ahci-test: t

[Qemu-devel] [RFC PATCH] async: Fix aio_notify_accept

2018-08-03 Thread Fam Zheng
>From main loop, bdrv_set_aio_context() can call IOThread's aio_poll(). That breaks aio_notify() because the ctx->notifier event can get cleared too early by this which causes IOThread hanging. See https://bugzilla.redhat.com/show_bug.cgi?id=1562750 for details. Signed-off-by: Fam Zheng --- uti

[Qemu-devel] [PATCH] virtio-gpu: fix crashes upon warm reboot with vga mode

2018-08-03 Thread Marc-André Lureau
With vga=775 on the Linux command line a first boot of the VM running Linux works fine. After a warm reboot it crashes during Linux boot. Before that, valgrind points out bad memory write to console surface. The VGA code is not aware that virtio-gpu got a message surface scanout when the display i

Re: [Qemu-devel] [PULL 33/35] block/mirror: Add active mirroring

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
18.06.2018 19:45, Kevin Wolf wrote: From: Max Reitz This patch implements active synchronous mirroring. In active mode, the passive mechanism will still be in place and is used to copy all initially dirty clusters off the source disk; but every write request will write data both to the source

Re: [Qemu-devel] [PULL 30/35] block/dirty-bitmap: Add bdrv_dirty_iter_next_area

2018-08-03 Thread Vladimir Sementsov-Ogievskiy
18.06.2018 19:44, Kevin Wolf wrote: From: Max Reitz This new function allows to look for a consecutively dirty area in a dirty bitmap. Signed-off-by: Max Reitz Reviewed-by: Fam Zheng Reviewed-by: John Snow Message-id: 20180613181823.13618-10-mre...@redhat.com Signed-off-by: Max Reitz ---

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-03 Thread Kevin Wolf
Am 03.08.2018 um 15:37 hat Alberto Garcia geschrieben: > On Mon 30 Jul 2018 12:55:22 PM CEST, Kevin Wolf wrote: > > I agree with changing the defaults, I would have proposed a change > > myself soon. We have been offering cache size options for a long time, > > and management tools are still ignori

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

2018-08-03 Thread Laszlo Ersek
On 08/03/18 16:39, Andrew Jones wrote: > On Fri, Aug 03, 2018 at 03:44:21PM +0200, Laszlo Ersek wrote: >> In my earlier email >> >> dynamic DRAM base for ArmVirtQemu >> http://mid.mail-archive.com/4cce2b8b-a411-bd5d-a06f-b0b80a5fb2f1@redhat.com >> >> I investigated what it would take to adapt

[Qemu-devel] [PATCH v4 6/6] Add QTest testcase for the Intel Hexadecimal

2018-08-03 Thread Stefan Hajnoczi
From: Su Hang 'test.hex' file is a bare metal ARM software stored in Hexadecimal Object Format. When it's loaded by QEMU, it will print "Hello world!\n" on console. `pre_store` array in 'hexloader-test.c' file, stores the binary format of 'test.hex' file, which is used to verify correctness. Re

[Qemu-devel] [PATCH v4 5/6] loader: Implement .hex file loader

2018-08-03 Thread Stefan Hajnoczi
From: Su Hang This patch adds Intel Hexadecimal Object File format support to the generic loader device. The file format specification is available here: http://www.piclist.com/techref/fileext/hex/intel.htm This file format is often used with microcontrollers such as the micro:bit, Arduino, STM

[Qemu-devel] [PATCH v4 0/6] arm: add Cortex M0 CPU model and hex file loader

2018-08-03 Thread Stefan Hajnoczi
v4: * Drop ARMv7MState to ARMMProfileState rename because it causes a lot of code churn and is incomplete. Other parts of QEMU (like NVIC emulation) still refer to "v7m" although they apply to other architecture versions too. [Peter] * Use the generic loader device (-device loader,file=

[Qemu-devel] [PATCH v4 1/6] hw/arm: make bitbanded IO optional on ARMv7-M

2018-08-03 Thread Stefan Hajnoczi
Some ARM CPUs have bitbanded IO, a memory region that allows convenient bit access via 32-bit memory loads/stores. This eliminates the need for read-modify-update instruction sequences. This patch makes this optional feature an ARMv7MState qdev property, allowing boards to choose whether they wan

[Qemu-devel] [PATCH v4 3/6] loader: extract rom_free() function

2018-08-03 Thread Stefan Hajnoczi
The next patch will need to free a rom. There is already code to do this in rom_add_file(). Note that rom_add_file() uses: rom = g_malloc0(sizeof(*rom)); ... if (rom->fw_dir) { g_free(rom->fw_dir); g_free(rom->fw_file); } The conditional is unnecessary since g_free(NULL) is

[Qemu-devel] [PATCH v4 4/6] loader: add rom transaction API

2018-08-03 Thread Stefan Hajnoczi
Image file loaders may add a series of roms. If an error occurs partway through loading there is no easy way to drop previously added roms. This patch adds a transaction mechanism that works like this: rom_transaction_begin(); ...call rom_add_*()... rom_transaction_end(ok); If ok is false

[Qemu-devel] [PATCH v4 2/6] target/arm: add "cortex-m0" CPU model

2018-08-03 Thread Stefan Hajnoczi
Define a "cortex-m0" ARMv6-M CPU model. Most of the register reset values set by other CPU models are not relevant for the cut-down ARMv6-M architecture. Signed-off-by: Stefan Hajnoczi Reviewed-by: Peter Maydell --- target/arm/cpu.c | 11 +++ 1 file changed, 11 insertions(+) diff --gi

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

2018-08-03 Thread Andrew Jones
On Fri, Aug 03, 2018 at 03:44:21PM +0200, Laszlo Ersek wrote: > Hi Drew, > > On 08/03/18 11:37, Andrew Jones wrote: > > On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: > >> On 3 August 2018 at 11:23, Peter Maydell > >> wrote: > >>> On 3 August 2018 at 10:21, Hongbo Zhang > >>> wr

Re: [Qemu-devel] [PATCH v6 39/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

2018-08-03 Thread Stefan Markovic
BPOSGE32C is introduced in DSP-R3. Shouldn't there be check_dspr3(), and applied here? You're right. DSPR3 is not supported in QEMU at the moment. Patch with DSP Revision 3 support will be included in next version of patch set. >From the code, it turns out that the only difference between BP

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

2018-08-03 Thread Laszlo Ersek
Hi Drew, On 08/03/18 11:37, Andrew Jones wrote: > On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: >> On 3 August 2018 at 11:23, Peter Maydell >> wrote: >>> On 3 August 2018 at 10:21, Hongbo Zhang >>> wrote: The 'sbsa' machine won't consume QEMU generated ACPI, so it won't >>

Re: [Qemu-devel] [PATCH 0/6] qcow2: Make the L2 cache cover the whole image by default

2018-08-03 Thread Alberto Garcia
On Mon 30 Jul 2018 12:55:22 PM CEST, Kevin Wolf wrote: > I agree with changing the defaults, I would have proposed a change > myself soon. We have been offering cache size options for a long time, > and management tools are still ignoring them. So we need to do > something in QEMU. Indeed, there's

Re: [Qemu-devel] [PATCH 0/4] target/arm sve fixes

2018-08-03 Thread Peter Maydell
On 1 August 2018 at 13:31, Richard Henderson wrote: > These four patches are minor, reported by Laurent this week. > > If there happens to be an -rc4 release, it would be nice if > they were included. But if not, no biggie. I suspect that > other minor issues will be found past these four, so I

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 4/4] arm/arm64: GICv2: add GICD_ITARGETSR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:42PM +0100, Andre Przywara wrote: > Some tests for the ITARGETS registers. > Bits corresponding to non-existent CPUs must be RAZ/WI. > These registers must be byte-accessible, also check that accesses beyond > the implemented IRQ limit are actually read-as-zero/write-i

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 3/4] arm/arm64: GICv2: add GICD_IPRIORITYR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:41PM +0100, Andre Przywara wrote: > Some tests for the IPRIORITY registers. The significant number of bits > is IMPLEMENTATION DEFINED, but should be the same for every IRQ. > Also these registers must be byte-accessible. > Check that accesses beyond the implemented IR

[Qemu-devel] [PATCH] Makefile: Don't add -dirty to pkgversion when tree is not dirty

2018-08-03 Thread Lucas Eriksson
On a clean just-cloned repo, git-diff-index has no local index to compare with, leading to all files being marked as new on some systems. git-diff on the other hand actually compares the files contents with the repository tree and then updates said local index. This problem was found when trying to

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 3/4] arm/arm64: GICv2: add GICD_IPRIORITYR testing

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:41PM +0100, Andre Przywara wrote: > Some tests for the IPRIORITY registers. The significant number of bits > is IMPLEMENTATION DEFINED, but should be the same for every IRQ. > Also these registers must be byte-accessible. > Check that accesses beyond the implemented IR

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 2/4] arm/arm64: GIC: basic GICv2 MMIO tests

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:40PM +0100, Andre Przywara wrote: > This adds an MMIO subtest to the GIC test. > It accesses some generic GICv2 registers and does some sanity tests, > like checking for some of them being read-only. > > Signed-off-by: Andre Przywara > --- > arm/gic.c | 91

Re: [Qemu-devel] [kvm-unit-tests PATCH v2 1/4] mark exit() and abort() as non-returning functions

2018-08-03 Thread Andrew Jones
On Fri, Jul 20, 2018 at 04:39:39PM +0100, Andre Przywara wrote: > exit() and abort() are functions that never return, and (at least) > GCC has an attribute to flag those functions accordingly. This allows > the compiler to do further optimizations and to omit various warnings > about uninitialized

Re: [Qemu-devel] [Qemu-block] [PATCH 6/6] qcow2: Resize the cache upon image resizing

2018-08-03 Thread Alberto Garcia
On Sun 29 Jul 2018 11:27:44 PM CEST, Leonid Bloch wrote: > The caches are now recalculated upon image resizing. This is done > because the new default behavior of assigning a sufficient L2 cache to > cover the entire image implies that the cache will still be sufficient > after image resizing. To p

Re: [Qemu-devel] [PATCH v6 00/77] Add nanoMIPS support to QEMU

2018-08-03 Thread Stefan Markovic
Hi, This series seems to have some coding style problems. Yes, we are aware of those issues: 1. "Does MAINTAINERS need an update" warning for several patches: The answer is there is no need to update MAINTAINERS file. These warnings will persist in any version of this series. We will not fix

Re: [Qemu-devel] [PATCH] qemu-img.c: Add examples section

2018-08-03 Thread Programmingkid
> On Aug 3, 2018, at 4:46 AM, Fam Zheng wrote: > > On Thu, 08/02 22:34, Programmingkid wrote: >> >>> On Aug 2, 2018, at 10:10 PM, Fam Zheng wrote: >>> >>> On Thu, 08/02 20:50, John Arbuckle wrote: Add an examples section to the help output. Signed-off-by: John Arbuckle

Re: [Qemu-devel] [PATCH v6 77/77] linux-user: Add nanoMIPS support in scripts/qemu-binfmt-conf.sh

2018-08-03 Thread Aleksandar Rikalo
Hi, Laurent, Thank You for the explanation. We will correct this in the next version. We will also fix family values for the regular mips architectures in separate patch. Best Regards, Aleksandar Rikalo From: Laurent Vivier Sent: Thursday, August 2, 2018 9

Re: [Qemu-devel] [PATCH v6 23/77] target/mips: Add emulation of nanoMIPS 16-bit load and store instructions

2018-08-03 Thread Aleksandar Markovic
Also, wrong indentation of the block that follows these lines: > +case NM_P_LS_WM: > +case NM_P_LS_UAWM: From: Richard Henderson Sent: Thursday, August 2, 2018 7:39:27 PM To: Stefan Markovic; qemu-devel@nongnu.org Cc: laur...@viv

Re: [Qemu-devel] [PATCH v6 43/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 6

2018-08-03 Thread Aleksandar Markovic
> > From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 43/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 6 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 6. > > Signed-off-by: Aleksandar Markovic > Si

Re: [Qemu-devel] [PATCH v6 77/77] linux-user: Add nanoMIPS support in scripts/qemu-binfmt-conf.sh

2018-08-03 Thread Laurent Vivier
Le 03/08/2018 à 13:23, Aleksandar Rikalo a écrit : > Hi, Laurent, > > Thank You for the explanation. > > We will correct this in the next version. > We will also fix family values for the regular mips architectures in > separate patch. It's a good idea. Thanks, Laurent

Re: [Qemu-devel] [Qemu-block] [PATCH 4/6] qcow2: Update total_sectors when resizing the image

2018-08-03 Thread Alberto Garcia
On Mon 30 Jul 2018 02:28:28 PM CEST, Kevin Wolf wrote: >> > Also, 512 should be BDRV_SECTOR_SIZE. >> >> I was surprised that it's not, but it's 512 also in two other places, >> including in qcow2_co_truncate itself. So I decided to keep >> that. Probably would be better if I'd repair it in the oth

Re: [Qemu-devel] [PATCH v6 42/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 5

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 42/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 5 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 5. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [PATCH v6 41/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 4

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 41/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 4 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 4. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [PATCH v6 40/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 3

2018-08-03 Thread Aleksandar Markovic
> From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 40/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 3 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 3. > > Signed-off-by: Aleksandar Markovic > Signe

Re: [Qemu-devel] [Qemu-block] [PATCH 3/6 for-3.0] qcow2: Options' documentation fixes

2018-08-03 Thread Alberto Garcia
On Sun 29 Jul 2018 11:27:41 PM CEST, Leonid Bloch wrote: > Signed-off-by: Leonid Bloch > --- > docs/qcow2-cache.txt | 9 ++--- > qapi/block-core.json | 6 +++--- > qemu-options.hx | 15 +-- > 3 files changed, 18 insertions(+), 12 deletions(-) > > diff --git a/docs/qcow2-cac

Re: [Qemu-devel] [PATCH v6 39/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 2

2018-08-03 Thread Aleksandar Markovic
> +case NM_BPOSGE32C: > +check_dsp(ctx); > +{ > +int32_t imm = extract32(ctx->opcode, 1, 13) | > + extract32(ctx->opcode, 0, 1) << 13; > + > +gen_compute_bran

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/2] ppc-for-3.0 queue 20180801

2018-08-03 Thread David Gibson
On Fri, Aug 03, 2018 at 07:49:12AM +0200, Thomas Huth wrote: > On 08/02/2018 04:07 PM, David Gibson wrote: > > On Thu, Aug 02, 2018 at 10:16:32AM +0100, Peter Maydell wrote: > >> On 2 August 2018 at 08:08, David Gibson > >> wrote: > >>> The macio fix, however, *is* a regression from 2.12. Whethe

Re: [Qemu-devel] [PATCH v6 38/77] target/mips: Add emulation of DSP ASE for nanoMIPS - part 1

2018-08-03 Thread Aleksandar Markovic
> > From: Stefan Markovic > Sent: Thursday, August 2, 2018 4:16 PM > Subject: [PATCH v6 38/77] target/mips: Add emulation of DSP ASE for nanoMIPS > - part 1 > > From: Stefan Markovic > > Add emulation of DSP ASE instructions for nanoMIPS - part 1. > > Signed-off-by: Aleksandar Markovic > Si

Re: [Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-03 Thread Peter Maydell
On 3 August 2018 at 10:27, Michael S. Tsirkin wrote: > Please consider for 3.0 if there is another rc. > > The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: > > Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) > > are available in the Git repository at

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes support

Re: [Qemu-devel] [PATCH v3 6/7] loader: Implement .hex file loader

2018-08-03 Thread Stefan Hajnoczi
On Thu, Aug 02, 2018 at 11:04:46PM +0100, Peter Maydell wrote: > On 2 August 2018 at 13:43, Stefan Hajnoczi wrote: > > On Mon, Jul 30, 2018 at 07:01:53PM +0100, Peter Maydell wrote: > >> I'm still not convinced we want to add another random > >> special case only-works-on-one-architecture-and-some

[Qemu-devel] [PATCH] hw/intc/apic: Switch away from old_mmio

2018-08-03 Thread Peter Maydell
Switch the apic away from using the old_mmio MemoryRegionOps accessor functions. Signed-off-by: Peter Maydell --- I think this is the last old_mmio user. We can clean up the core code once all the on-list patches get into master. --- hw/intc/apic.c | 42 ++

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

2018-08-03 Thread Hongbo Zhang
On 3 August 2018 at 17:39, Peter Maydell wrote: > On 3 August 2018 at 10:26, Ard Biesheuvel wrote: >> On 3 August 2018 at 11:23, Peter Maydell wrote: >>> Would the real hardware you are trying to be an example >>> for use DT for this? It seems a bit unlikely to me. >>> >> >> Yes, as a matter of

[Qemu-devel] [Bug 1785203] [NEW] accel/tcg/translate-all.c:2511: page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed.

2018-08-03 Thread Serge Belyshev
Public bug reported: qemu-riscv64 version 2.12.93 crashes when mincore() is called with invalid pointer with the following message: qemu-riscv64: /opt/qemu/accel/tcg/translate-all.c:2511: page_check_range: Assertion `start < ((target_ulong)1 << L1_MAP_ADDR_SPACE_BITS)' failed. qemu:handle_cpu_si

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

2018-08-03 Thread Peter Maydell
On 3 August 2018 at 10:26, Ard Biesheuvel wrote: > On 3 August 2018 at 11:23, Peter Maydell wrote: >> Would the real hardware you are trying to be an example >> for use DT for this? It seems a bit unlikely to me. >> > > Yes, as a matter of fact. There is work underway both on the EDK2 and > the A

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

2018-08-03 Thread Andrew Jones
On Fri, Aug 03, 2018 at 11:26:41AM +0200, Ard Biesheuvel wrote: > On 3 August 2018 at 11:23, Peter Maydell wrote: > > On 3 August 2018 at 10:21, Hongbo Zhang wrote: > >> The 'sbsa' machine won't consume QEMU generated ACPI, so it won't > >> touch or add new ACPI tables. > >> > >> UEFI relies on i

[Qemu-devel] [Bug 1785197] [NEW] qemu 2.12.0 crash during install windows 10 with vga

2018-08-03 Thread changlimin
Public bug reported: Same issue as https://www.qubes-os.org/doc/windows-vm/ , it's not easy to reproduced. cpu_physical_memory_snapshot_get_dirty: Assertion `start + length <= snap->end’ failed Qemu version is 2.12.0. (gdb) bt #0 0x7f504ed6fc37 in raise () from /lib/x86_64-linux-gnu/libc.

Re: [Qemu-devel] [PATCH 0/5] tests/vm: various minor improvements

2018-08-03 Thread Fam Zheng
On Fri, 08/03 09:52, Peter Maydell wrote: > The setup I had for my BSD VMs broke today, so I thought I'd > have a look at using the tests/vm/ support for building QEMU > inside BSD VMs rather than re-rolling my own. This patchset > fixes some rough edges I ran into along the way: > * fixes support

[Qemu-devel] [PULL 4/5] pc: acpi: fix memory hotplug regression by reducing stub SRAT entry size

2018-08-03 Thread Michael S. Tsirkin
From: Igor Mammedov Commit 848a1cc1e (hw/acpi-build: build SRAT memory affinity structures for DIMM devices) broke the first dimm hotplug in following cases: 1: there is no coldplugged dimm in the last numa node but there is a coldplugged dimm in another node -m 4096,slots=4,maxmem=32G

[Qemu-devel] [PULL 3/5] tests/acpi-test: update ACPI tables test blobs

2018-08-03 Thread Michael S. Tsirkin
From: Dou Liyang Now, QEmu adds a new check for memory-less NUMA nodes in build_srat(). It effects the ACPI test. So, Update ACPI tables test blobs. Signed-off-by: Dou Liyang Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/SRAT.numamem | Bin 2

[Qemu-devel] [PULL 0/5] pc, virtio: fixes

2018-08-03 Thread Michael S. Tsirkin
Please consider for 3.0 if there is another rc. The following changes since commit f7502360397d291be04bc040e9f96c92ff2d8030: Update version for v3.0.0-rc3 release (2018-07-31 19:30:17 +0100) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_

  1   2   >