[Qemu-devel] [PATCH] hw/char/mcf_uart: QOMify the ColdFire UART

2017-01-27 Thread Thomas Huth
Use type_init() etc. to adapt the ColdFire UART to the latest QEMU device conventions. Signed-off-by: Thomas Huth --- hw/char/mcf_uart.c| 102 +- hw/m68k/mcf5208.c | 6 +-- include/hw/m68k/mcf.h | 6 +-- 3 files

[Qemu-devel] [Bug 1660010] [NEW] AArch64 system emulation cannot execute virt uefi in 2.7 or 2.8

2017-01-27 Thread Icenowy Zheng
Public bug reported: The UEFI firmware file is retrieved from http://snapshots.linaro.org/components/kernel/linaro- edk2/latest/release/qemu64/QEMU_EFI.fd . The error is: ``` TODO /var/lib/abbs/build/tmp.p2dMBBlJ0D/qemu-2.7.0/tci.c:1049: tcg_qemu_tb_exec()

[Qemu-devel] HPET emulation and 64-bit access using 32-bit processor

2017-01-27 Thread spam collector
Hi everyone, It has been a little while since I have visited this list, which is a good thing, since if I am visiting this list, there might be something wrong with QEMU :-) (Note, last time I visited, there was a simple bit error in the ATA Ready code) Anyway, this time I have a question,

[Qemu-devel] [PATCH v3 3/3] qemu-io: Fix tests expecting the wrong output

2017-01-27 Thread Nir Soffer
From: Nir Soffer Many tests expected the wrong behavior when qemu-io call into the command with after failing to open the file, writing this error: no file open, try 'help open' Now that we fail immediately when opening a file fails, this error does not exist in the

[Qemu-devel] [PATCH v3 2/3] qemu-io: Add regression tests

2017-01-27 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-existing file or using the wrong format. Signed-off-by: Nir Soffer --- tests/qemu-iotests/173 | 59 ++

[Qemu-devel] [PATCH v3 1/3] qemu-io: Return non-zero exit code on failure

2017-01-27 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c

[Qemu-devel] [PATCH v2 1/2] qemu-io: Return non-zero exit code on failure

2017-01-27 Thread Nir Soffer
From: Nir Soffer The result of openfile was not checked, leading to failure deep in the actual command with confusing error message, and exiting with exit code 0. Here is a simple example - trying to read with the wrong format: $ touch file $ qemu-io -f qcow2 -c

[Qemu-devel] [PATCH v2 2/2] qemu-io: Add regression tests

2017-01-27 Thread Nir Soffer
From: Nir Soffer Add regression tests checking that qemu-io fail with non-zero exit code when reading non-exising file or using the wrong format. --- tests/qemu-iotests/173 | 59 ++ tests/qemu-iotests/173.out | 9 +++

[Qemu-devel] [PATCH] qemu-img: Do not truncate before preallocation

2017-01-27 Thread Nir Soffer
From: Nir Soffer When using file system that does not support fallocate(), posix_fallocate() fallback to emulation mode. In this mode, when preallocating blocks before file end, posix_preallocate is calling one pread() and one pwrite() per block. But when preallocation blocks

Re: [Qemu-devel] [PATCH v3 2/3] xen-platform: add support for unplugging NVMe disks...

2017-01-27 Thread Stefano Stabellini
On Thu, 26 Jan 2017, Paul Durrant wrote: > ...not just IDE and SCSI. > > This patch allows the Xen tool-stack to fully support of NVMe as an > emulated disk type. See [1] for the relevant tool-stack patch discussion. > > [1] https://lists.xen.org/archives/html/xen-devel/2017-01/msg01225.html >

Re: [Qemu-devel] [PATCH] MAINTAINERS: Update xen-devel mailing list address

2017-01-27 Thread Stefano Stabellini
On Wed, 25 Jan 2017, Anthony PERARD wrote: > On Mon, Nov 28, 2016 at 10:14:00AM -0800, Stefano Stabellini wrote: > > On Fri, 25 Nov 2016, Anthony PERARD wrote: > > > Signed-off-by: Anthony PERARD > > > > Acked-by: Stefano Stabellini > > Hi, >

Re: [Qemu-devel] [PATCH] util/path: Always translate /etc/ld.so.cache

2017-01-27 Thread Andrey Smirnov
On Fri, Jan 27, 2017 at 10:53 AM, Peter Maydell wrote: > On 27 January 2017 at 18:31, Andrey Smirnov wrote: >> Always translate /etc/ld.so.cache to point somwhere inside of guest's >> filesystem tree pointed to by 'prefix'. This prevents

Re: [Qemu-devel] [Bug 1622547] Re: [PATCH] target/sparc: Restore ldstub of odd asis

2017-01-27 Thread Mark Cave-Ayland
On 27/01/17 12:57, Artyom Tarasenko wrote: > On Fri, Jan 27, 2017 at 9:15 AM, Richard Henderson wrote: >> Fixes the booting of ss20 roms. > > Mike, can you please test this fix? > >> Reported-by: Mark Cave-Ayland > > Initially Reported-by:

Re: [Qemu-devel] [PATCH 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types

2017-01-27 Thread Markus Armbruster
Markus Armbruster writes: > The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically > create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi. > For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU > create 25 of them. > >

Re: [Qemu-devel] Towards an ivshmem 2.0?

2017-01-27 Thread Markus Armbruster
Jan Kiszka writes: > On 2017-01-23 15:19, Markus Armbruster wrote: >> Jan Kiszka writes: >> >>> Hi, >>> >>> some of you may know that we are using a shared memory device similar to >>> ivshmem in the partitioning hypervisor Jailhouse [1]. >>> >>> We

[Qemu-devel] [PULL 18/41] x86-KVM: Supply TSC and APIC clock rates to guest like VMWare

2017-01-27 Thread Paolo Bonzini
From: Phil Dennis-Jordan This fixes timekeeping of x86-64 Darwin/OS X/macOS guests when using KVM. Darwin/OS X/macOS for x86-64 uses the TSC for timekeeping; it normally calibrates this by querying various clock frequency scaling MSRs. Details depend on the exact CPU model

[Qemu-devel] [PULL v2 00/41] Misc patches for 2017-01-27

2017-01-27 Thread Paolo Bonzini
The following changes since commit 29ba0cdc1fd1300f910d150c03a0f74236083bf7: Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2017-01-27' into staging (2017-01-27 15:20:08 +) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you

Re: [Qemu-devel] [PATCH] util/path: Always translate /etc/ld.so.cache

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 18:31, Andrey Smirnov wrote: > Always translate /etc/ld.so.cache to point somwhere inside of guest's > filesystem tree pointed to by 'prefix'. This prevents guest's libc from > reading /etc/ld.so.cache of the host and potentialy failing. One of the

Re: [Qemu-devel] [PATCH] util/path: Always translate /etc/ld.so.cache

2017-01-27 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Subject: [Qemu-devel] [PATCH] util/path: Always translate /etc/ld.so.cache Message-id:

[Qemu-devel] [PATCH] util/path: Always translate /etc/ld.so.cache

2017-01-27 Thread Andrey Smirnov
Always translate /etc/ld.so.cache to point somwhere inside of guest's filesystem tree pointed to by 'prefix'. This prevents guest's libc from reading /etc/ld.so.cache of the host and potentialy failing. One of the manifestation of the problem could be easily reproduced by executing and simple

Re: [Qemu-devel] [PATCH v2 2/8] hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus

2017-01-27 Thread Alistair Francis
On Thu, Jan 26, 2017 at 7:09 AM, Markus Armbruster wrote: > Machine types cubieboard, xlnx-ep108, xlnx-zcu102 have an onboard AHCI > controller, but neglect to set their MachineClass member > units_per_default_bus = 1. This permits -drive if=ide,unit=1, which > makes no sense

Re: [Qemu-devel] [PATCH v2 4/8] hw: Default -drive to if=none instead of scsi when scsi cannot work

2017-01-27 Thread Alistair Francis
On Thu, Jan 26, 2017 at 9:59 AM, Thomas Huth wrote: > On 26.01.2017 16:09, Markus Armbruster wrote: >> Block backends defined with -drive if=scsi are meant to be picked up >> by machine initialization code: a suitable frontend gets created and >> wired up automatically. >> >>

Re: [Qemu-devel] [PULL 02/15] migration: extend VMStateInfo

2017-01-27 Thread Dr. David Alan Gilbert
* Cornelia Huck (cornelia.h...@de.ibm.com) wrote: > On Wed, 25 Jan 2017 14:44:20 + > "Dr. David Alan Gilbert" wrote: > > > * Cornelia Huck (cornelia.h...@de.ibm.com) wrote: > > > On Wed, 25 Jan 2017 13:22:55 + > > > "Dr. David Alan Gilbert"

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Ben Warren
> On Jan 27, 2017, at 8:12 AM, Laszlo Ersek wrote: > > On 01/27/17 16:43, Kevin O'Connor wrote: >> On Fri, Jan 27, 2017 at 03:46:33PM +0100, Laszlo Ersek wrote: >>> On 01/27/17 15:18, Kevin O'Connor wrote: If an offset is going to be added, shouldn't both a source offset

[Qemu-devel] [PATCH v7 1/2] move vm_start to cpus.c

2017-01-27 Thread Claudio Imbrenda
This patch: * moves vm_start to cpus.c. * exports qemu_vmstop_requested, since it's needed by vm_start. * extracts vm_prepare_start from vm_start; it does what vm_start did, except restarting the cpus. * vm_start now calls vm_prepare_start and then restarts the cpus. Signed-off-by: Claudio

[Qemu-devel] [PATCH v7 2/2] gdbstub: Fix vCont behaviour

2017-01-27 Thread Claudio Imbrenda
When GDB issues a "vCont", QEMU was not handling it correctly when multiple VCPUs are active. For vCont, for each thread (VCPU), it can be specified whether to single step, continue or stop that thread. The default is to stop a thread. However, when (for example) "vCont;s:2" is issued, all VCPUs

[Qemu-devel] [PATCH v7 0/2] Qemu: gdbstub: fix vCont

2017-01-27 Thread Claudio Imbrenda
This small patchset fixes the incorrect behaviour of the vCont command in the gdb stub. The first patch, as suggested be Paolo, refactors some code. The most visible change is that it moves vm_start to cpus.c The second one fixes the incorrect behaviour of the vCont command. Previously,

Re: [Qemu-devel] QEMU websockets support is laggy?

2017-01-27 Thread Daniel P. Berrange
On Fri, Jan 27, 2017 at 09:35:38AM +, Daniel P. Berrange wrote: > On Tue, Jan 24, 2017 at 05:02:25PM -0500, Brian Rak wrote: > > We've been considering switching over to using qemu's built in websockets > > support (to avoid the overhead of needing websockify running). We've been > > seeing

Re: [Qemu-devel] [PATCH 10/17] migration: create ram_multifd_page

2017-01-27 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > The function still don't use multifd, but we have simplified > ram_save_page, xbzrle and RDMA stuff is gone. We have added a new > counter and a new flag for this type of pages. > > Signed-off-by: Juan Quintela > --- > hmp.c

Re: [Qemu-devel] [PATCH 09/17] migration: Start of multiple fd work

2017-01-27 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > We create new channels for each new thread created. We only send through > them a character to be sure that we are creating the channels in the > right order. > > Note: Reference count/freeing of channels is not done > > Signed-off-by: Juan Quintela

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2017-01-27 Thread Alex Bennée
Claudio Imbrenda writes: > On 27/01/17 18:07, Alex Bennée wrote: >> >> Claudio Imbrenda writes: >> >>> When GDB issues a "vCont", QEMU was not handling it correctly when >>> multiple VCPUs are active. >>> For vCont, for each thread

[Qemu-devel] [Bug 1659901] [NEW] Regression: SIGSEGV running Java

2017-01-27 Thread Rich DiCroce
Public bug reported: I have a build script that bootstraps a Debian armhf image. Part of the process involves running a Java program while inside a chroot. I am using Debian's qemu-user-static package to run the armhf Java binary on an amd64 system. qemu-user-static version 1:2.7+dfsg-3~bpo8+2

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2017-01-27 Thread Claudio Imbrenda
On 27/01/17 18:07, Alex Bennée wrote: > > Claudio Imbrenda writes: > >> When GDB issues a "vCont", QEMU was not handling it correctly when >> multiple VCPUs are active. >> For vCont, for each thread (VCPU), it can be specified whether to >> single step, continue or

Re: [Qemu-devel] [PATCH] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Markus Armbruster
Peter Maydell writes: > On 27 January 2017 at 16:40, Alistair Francis > wrote: >> On Fri, Jan 27, 2017 at 6:51 AM, Thomas Huth wrote: >>> The "or-irq" device is just used internally. It's strange to >>> see this device

Re: [Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2017-01-27 Thread Claudio Imbrenda
On 27/01/17 18:05, Alex Bennée wrote: > > Claudio Imbrenda writes: > >> On 27/01/17 17:31, Alex Bennée wrote: >>> >>> Claudio Imbrenda writes: >>> This patch: * moves vm_start to cpus.c . * exports

Re: [Qemu-devel] [RFC PATCH v2 0/6] translate: [tcg] Generic translation framework

2017-01-27 Thread Alex Bennée
Lluís Vilanova writes: > Lluís Vilanova writes: > >> This series proposes a generic (target-agnostic) instruction translation >> framework. > >> It basically provides a generic main loop for instruction disassembly, which >> calls target-specific functions when necessary.

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2017-01-27 Thread Alex Bennée
Claudio Imbrenda writes: > When GDB issues a "vCont", QEMU was not handling it correctly when > multiple VCPUs are active. > For vCont, for each thread (VCPU), it can be specified whether to > single step, continue or stop that thread. The default is to stop a >

Re: [Qemu-devel] [Qemu-arm] [PATCH v8 25/25] tcg: enable MTTCG by default for ARM on x86 hosts

2017-01-27 Thread Alex Bennée
Pranith Kumar writes: > On Fri, Jan 27, 2017 at 5:35 AM, Alex Bennée wrote: > >> diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h >> index 21d96ec35c..536190f647 100644 >> --- a/tcg/i386/tcg-target.h >> +++ b/tcg/i386/tcg-target.h

Re: [Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2017-01-27 Thread Alex Bennée
Claudio Imbrenda writes: > On 27/01/17 17:31, Alex Bennée wrote: >> >> Claudio Imbrenda writes: >> >>> This patch: >>> >>> * moves vm_start to cpus.c . >>> * exports qemu_vmstop_requested, since it's needed by vm_start . >>> * extracts

Re: [Qemu-devel] [PATCH] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 16:40, Alistair Francis wrote: > On Fri, Jan 27, 2017 at 6:51 AM, Thomas Huth wrote: >> The "or-irq" device is just used internally. It's strange to >> see this device showing up in the "-device ?" help text. Let's mark it >>

Re: [Qemu-devel] [PULL 00/41] Misc changes for 2017-01-27

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 13:45, Paolo Bonzini wrote: > The following changes since commit 3879284d6517dc22529395bdb259f4183b589127: > > Merge remote-tracking branch 'remotes/berrange/tags/pull-qio-2017-01-23-2' > into staging (2017-01-23 15:59:09 +) > > are available in

Re: [Qemu-devel] [PATCH 2/3] arm: add trailing ; after MISMATCH_CHECK

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 16:27, Michael S. Tsirkin wrote: > Macro calls without a trailing ; look weird in C, this works as a side > effect of how QEMU_BUILD_BUG_ON is implemented. Fix this up. > > Signed-off-by: Michael S. Tsirkin > --- > target/arm/kvm-consts.h

Re: [Qemu-devel] [PULL 0/3] QAPI/QMP patches for 2017-01-27

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 07:29, Markus Armbruster wrote: > The following changes since commit c7f1cf01b8245762ca5864e835d84f6677ae8b1f: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2017-01-25 17:54:14 +) > > are available in the git

Re: [Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2017-01-27 Thread Claudio Imbrenda
On 27/01/17 17:31, Alex Bennée wrote: > > Claudio Imbrenda writes: > >> This patch: >> >> * moves vm_start to cpus.c . >> * exports qemu_vmstop_requested, since it's needed by vm_start . >> * extracts vm_prepare_start from vm_start; it does what vm_start did, >>

Re: [Qemu-devel] [PATCH 1/3] arm: better stub version for MISMATCH_CHECK

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 16:27, Michael S. Tsirkin wrote: > stub version of MISMATCH_CHECK is empty so it's easy to misuse for > people not building kvm on arm. Use QEMU_BUILD_BUG_ON similar to the > non-stub version to make it easier to catch bugs. > > Signed-off-by: Michael S.

Re: [Qemu-devel] [Qemu-arm] [PATCH v8 25/25] tcg: enable MTTCG by default for ARM on x86 hosts

2017-01-27 Thread Pranith Kumar
On Fri, Jan 27, 2017 at 5:35 AM, Alex Bennée wrote: > diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h > index 21d96ec35c..536190f647 100644 > --- a/tcg/i386/tcg-target.h > +++ b/tcg/i386/tcg-target.h > @@ -165,4 +165,20 @@ static inline void

Re: [Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2017-01-27 Thread Alex Bennée
Claudio Imbrenda writes: > When GDB issues a "vCont", QEMU was not handling it correctly when > multiple VCPUs are active. > For vCont, for each thread (VCPU), it can be specified whether to > single step, continue or stop that thread. The default is to stop a >

Re: [Qemu-devel] [PATCH] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Alistair Francis
On Fri, Jan 27, 2017 at 6:51 AM, Thomas Huth wrote: > The "or-irq" device is just used internally. It's strange to > see this device showing up in the "-device ?" help text. Let's mark it > with cannot_instantiate_with_device_add_yet to hide it from the users. I agree that it

Re: [Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2017-01-27 Thread Alex Bennée
Claudio Imbrenda writes: > This patch: > > * moves vm_start to cpus.c . > * exports qemu_vmstop_requested, since it's needed by vm_start . > * extracts vm_prepare_start from vm_start; it does what vm_start did, > except restarting the cpus. vm_start now calls

[Qemu-devel] [PATCH 3/3] ppc: switch to constants within BUILD_BUG_ON

2017-01-27 Thread Michael S. Tsirkin
We are switching BUILD_BUG_ON to verify that it's parameter is a compile-time constant, and it turns out that some gcc versions (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are not smart enough to figure it out for expressions involving local variables. This is harmless but

Re: [Qemu-devel] [PATCH 1/4] hw/pcie: fix Extended Configuration Space for devices with no Extended Capabilities

2017-01-27 Thread Marcel Apfelbaum
On 01/10/2017 05:13 AM, Michael S. Tsirkin wrote: On Wed, Jan 04, 2017 at 09:57:15PM +0200, Marcel Apfelbaum wrote: Absence of any Extended Capabilities is required to be indicated by an Extended Capability header with a Capability ID of h, a Capability Version of 0h, and a Next Capability

[Qemu-devel] [PATCH 2/3] arm: add trailing ; after MISMATCH_CHECK

2017-01-27 Thread Michael S. Tsirkin
Macro calls without a trailing ; look weird in C, this works as a side effect of how QEMU_BUILD_BUG_ON is implemented. Fix this up. Signed-off-by: Michael S. Tsirkin --- target/arm/kvm-consts.h | 96 - 1 file changed, 48

[Qemu-devel] [PATCH 1/3] arm: better stub version for MISMATCH_CHECK

2017-01-27 Thread Michael S. Tsirkin
stub version of MISMATCH_CHECK is empty so it's easy to misuse for people not building kvm on arm. Use QEMU_BUILD_BUG_ON similar to the non-stub version to make it easier to catch bugs. Signed-off-by: Michael S. Tsirkin --- target/arm/kvm-consts.h | 4 +++- 1 file changed, 3

Re: [Qemu-devel] [PATCH 2/4] hw/virtio: fix error enabling flags in Device Control register

2017-01-27 Thread Marcel Apfelbaum
On 01/10/2017 05:07 AM, Michael S. Tsirkin wrote: On Wed, Jan 04, 2017 at 09:57:16PM +0200, Marcel Apfelbaum wrote: When the virtio devices are PCI Express, make error-enabling flags writable to respect the PCIe spec. Signed-off-by: Marcel Apfelbaum If guest writes there,

[Qemu-devel] [PATCH 8/9] virtio: check for vring setup in virtio_queue_update_used_idx

2017-01-27 Thread Paolo Bonzini
If the vring has not been set up, it is not necessary for vring_used_idx to do anything (as is already the case when the caller is virtio_load). This is harmless for now, but it will be a problem when the MemoryRegionCache has not been set up. Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 07/15] postcopy: Plumb pagesize down into place helpers

2017-01-27 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > Now we deal with normal size pages and huge pages we need > > to tell the place handlers the size we're dealing with > > and

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Kevin O'Connor
On Fri, Jan 27, 2017 at 03:46:33PM +0100, Laszlo Ersek wrote: > On 01/27/17 15:18, Kevin O'Connor wrote: > > If an offset is going to be added, shouldn't both a source offset and > > destination offset be used? > > > > /* > > * COMMAND_WRITE_POINTER - update a writeable file

Re: [Qemu-devel] [PULL 00/22] target-arm queue

2017-01-27 Thread no-reply
Hi, Your series seems to have some coding style problems. See output below for more information: Type: series Subject: [Qemu-devel] [PULL 00/22] target-arm queue Message-id: 1485531137-2362-1-git-send-email-peter.mayd...@linaro.org === TEST SCRIPT BEGIN === #!/bin/bash BASE=base n=1

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Laszlo Ersek
On 01/27/17 16:43, Kevin O'Connor wrote: > On Fri, Jan 27, 2017 at 03:46:33PM +0100, Laszlo Ersek wrote: >> On 01/27/17 15:18, Kevin O'Connor wrote: >>> If an offset is going to be added, shouldn't both a source offset and >>> destination offset be used? >>> >>> /* >>> *

[Qemu-devel] [PATCH 4/9] exec: make address_space_cache_destroy idempotent

2017-01-27 Thread Paolo Bonzini
Clear cache->mr so that address_space_cache_destroy does nothing the second time it is called. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- exec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/exec.c b/exec.c index

Re: [Qemu-devel] [PATCH] iothread: enable AioContext polling by default

2017-01-27 Thread Paolo Bonzini
On 26/01/2017 18:01, Stefan Hajnoczi wrote: > IOThread AioContexts are likely to consist only of event sources like > virtqueue ioeventfds and LinuxAIO completion eventfds that are pollable > from userspace (without system calls). > > We recently merged the AioContext polling feature but didn't

Re: [Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous special checks for orphaned -drive

2017-01-27 Thread Markus Armbruster
John Snow writes: > On 01/27/2017 06:51 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 01/26/2017 10:09 AM, Markus Armbruster wrote: We've traditionally rejected orphans here and there, but not systematically. For instance, the sun4m

[Qemu-devel] [PULL 02/22] armv7m: MRS/MSR: handle unprivileged access

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The MRS and MSR instruction handling has a number of flaws: * unprivileged accesses should only be able to read CONTROL and the xPSR subfields, and only write APSR (others RAZ/WI) * privileged access should not be able to write xPSR

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-27 Thread Paolo Bonzini
On 27/01/2017 14:57, Igor Mammedov wrote: >> +fadt->reset_register.space_id = 1; >> +fadt->reset_register.bit_width = 8; >> +fadt->reset_register.address= ICH9_RST_CNT_IOPORT; > cpu_to_le64 > > + specify explicitly all fields of GAS structure: reset_register > > + is

[Qemu-devel] [PATCH 9/9] virtio: use VRingMemoryRegionCaches for avail and used rings

2017-01-27 Thread Paolo Bonzini
The virtio-net change is necessary because it uses virtqueue_fill and virtqueue_flush instead of the more convenient virtqueue_push. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- hw/net/virtio-net.c | 14 +- hw/virtio/virtio.c |

[Qemu-devel] [PATCH 6/9] virtio: add MemoryListener to cache ring translations

2017-01-27 Thread Paolo Bonzini
The cached translations are RCU-protected to allow efficient use when processing virtqueues. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- v2->v3: fix instance_finalize when caches where partially uninitialized or

[Qemu-devel] [PULL 06/22] armv7m: Fix reads of CONTROL register bit 1

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The v7m CONTROL register bit 1 is SPSEL, which indicates the stack being used. We were storing this information not in v7m.control but in the separate v7m.other_sp structure field. Unfortunately, the code handling reads of the CONTROL register

[Qemu-devel] [PATCH 7/9] virtio: use VRingMemoryRegionCaches for descriptor ring

2017-01-27 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- hw/virtio/virtio.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 44fe14a..32bf364 100644 ---

[Qemu-devel] [PATCH 2/9] virtio: add virtio_*_phys_cached

2017-01-27 Thread Paolo Bonzini
Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- include/hw/virtio/virtio-access.h | 52 +++ 1 file changed, 52 insertions(+) diff --git a/include/hw/virtio/virtio-access.h

[Qemu-devel] [PULL 15/22] armv7m: Report no-coprocessor faults correctly

2017-01-27 Thread Peter Maydell
For v7M attempts to access a nonexistent coprocessor are reported differently from plain undefined instructions (as UsageFaults of type NOCP rather than type UNDEFINSTR). Split them out into a new EXCP_NOCP so we can report the FSR value correctly. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 3/9] virtio: use address_space_map/unmap to access descriptors

2017-01-27 Thread Paolo Bonzini
This makes little difference, but it makes the code change smaller for the next patch that introduces MemoryRegionCache. This is because map/unmap are similar to MemoryRegionCache init/destroy. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini

[Qemu-devel] [PULL 07/22] armv7m: Clear FAULTMASK on return from non-NMI exceptions

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver FAULTMASK must be cleared on return from all exceptions other than NMI. Signed-off-by: Michael Davidsaver Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 5/9] virtio: use MemoryRegionCache to access descriptors

2017-01-27 Thread Paolo Bonzini
For now, the cache is created on every virtqueue_pop. Later on, direct descriptors will be able to reuse it. Reviewed-by: Stefan Hajnoczi Signed-off-by: Paolo Bonzini --- hw/virtio/virtio.c| 80 +--

[Qemu-devel] [PATCH 1/9] memory: make memory_listener_unregister idempotent

2017-01-27 Thread Paolo Bonzini
Make it easy to unregister a MemoryListener without tracking whether it had been registered before. Signed-off-by: Paolo Bonzini --- v3: new memory.c | 5 + 1 file changed, 5 insertions(+) diff --git a/memory.c b/memory.c index 2bfc37f..8fafd4c 100644 ---

[Qemu-devel] [PATCH v3 0/9] virtio: use MemoryRegionCache for descriptors and rings

2017-01-27 Thread Paolo Bonzini
A few fixes caught by "make check" (yes, brown paper bag). Paolo v2->v3: patch 1 committed already (replaced by new patch 1) fix error handling in patch 3 fix freeing uninitialized VRingMemoryRegionCache (patch 7) new patch 8 Paolo Bonzini (9): memory: make

[Qemu-devel] [PULL 10/22] armv7m_nvic: keep a pointer to the CPU

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Many NVIC operations access the CPU state, so store a pointer in struct nvic_state rather than fetching it via qemu_get_cpu() every time we need it. As with the arm_gicv3_common code, we currently just call qemu_get_cpu() in the NVIC's realize

[Qemu-devel] [PULL 03/22] armv7m: Replace armv7m.hack with unassigned_access handler

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver For v7m we need to catch attempts to execute from special addresses at 0xfff0 and above. Previously we did this with the aid of a hacky special purpose lump of memory in the address space and a check in translate.c for whether we were

[Qemu-devel] [PULL 09/22] target/arm: Drop IS_M() macro

2017-01-27 Thread Peter Maydell
We only use the IS_M() macro in two places, and it's a bit of a namespace grab to put in cpu.h. Drop it in favour of just explicitly calling arm_feature() in the places where it was used. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée

[Qemu-devel] [PULL 05/22] hw/registerfields.h: Pull FIELD etc macros out of hw/register.h

2017-01-27 Thread Peter Maydell
hw/register.h provides macros like FIELD which make it easy to define shift, mask and length constants for the fields within a register. Unfortunately register.h also includes a lot of other things, some of which will only compile in the softmmu build. Pull the FIELD macro and friends out into a

[Qemu-devel] [PULL 01/22] aspeed/smc: handle dummy bytes when doing fast reads in command mode

2017-01-27 Thread Peter Maydell
From: Cédric Le Goater When doing fast read, a certain amount of dummy bytes should be sent before the read. This number is configurable in the controler CE0 Control Register and needs to be modeled using fake transfers to the flash module. This only supports command mode. User

[Qemu-devel] [PULL 08/22] pflash_cfi01: fix per-device sector length in CFI table

2017-01-27 Thread Peter Maydell
For configurations of the pflash_cfi01 device which set it up with a device-width not equal to the width (ie where we are emulating multiple narrow flash devices wired up in parallel), we were giving incorrect values in the CFI data table: (1) the sector length entry should specify the sector

[Qemu-devel] [PULL 12/22] armv7m: implement CCR, CFSR, HFSR, DFSR, BFAR, and MMFAR

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Implement the v7M system registers CCR, CFSR, HFSR, DFSR, BFAR and MMFAR. For the moment these simply read as written (with some basic handling of RAZ/WI bits and W1C semantics). Signed-off-by: Michael Davidsaver

[Qemu-devel] [PULL 17/22] armv7m: FAULTMASK should be 0 on reset

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver For M profile CPUs, FAULTMASK should be 0 on reset, like PRIMASK. QEMU stores FAULTMASK in the PSTATE F bit, so (as with PRIMASK in the I bit) we have to clear these to undo the A profile default of 1. Update the comment accordingly and move it so

[Qemu-devel] [PULL 11/22] armv7m: add state for v7M CCR, CFSR, HFSR, DFSR, MMFAR, BFAR

2017-01-27 Thread Peter Maydell
Add the structure fields, VMState fields, reset code and macros for the v7M system control registers CCR, CFSR, HFSR, DFSR, MMFAR and BFAR. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Message-id:

[Qemu-devel] [PULL 04/22] armv7m: Explicit error for bad vector table

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver Give an explicit error and abort when a load from the vector table fails. Architecturally this should HardFault (which will then immediately fail to load the HardFault vector and go into Lockup). Since we don't model Lockup, just report this guest

[Qemu-devel] [PULL 14/22] armv7m: set CFSR.UNDEFINSTR on undefined instructions

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver When we take an exception for an undefined instruction, set the appropriate CFSR bit. Signed-off-by: Michael Davidsaver Reviewed-by: Alex Bennée Message-id:

[Qemu-devel] [PULL 16/22] armv7m: Honour CCR.USERSETMPEND

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The CCR.USERSETMPEND bit has to be set to permit unprivileged code to write to the Software Triggered Interrupt register; honour this bit rather than letting any code write to the register. Signed-off-by: Michael Davidsaver

[Qemu-devel] [PULL 13/22] armv7m: honour CCR.STACKALIGN on exception entry

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver The CCR.STACKALIGN bit controls whether the CPU is supposed to force 8-alignment of the stack pointer on entry to the exception handler. Signed-off-by: Michael Davidsaver Message-id:

[Qemu-devel] [PULL 18/22] armv7m: R14 should reset to 0xffffffff

2017-01-27 Thread Peter Maydell
For M profile (unlike A profile) the reset value of R14 is specified as 0x. (The rationale is that this is an illegal exception return value, so if guest code tries to return to it it will result in a helpful exception.) Registers r0 to r12 and the flags are architecturally UNKNOWN on

[Qemu-devel] [PULL 19/22] arm: stellaris: make MII accesses complete immediately

2017-01-27 Thread Peter Maydell
From: Michael Davidsaver When the guest attempts to start an MII register access via the MCTL register, clear the START bit, so that when the guest reads it back the register transaction will be signalled as having completed. This avoids the guest spinning as it polls the

[Qemu-devel] [PULL 20/22] hw/char/exynos4210_uart: Drop unused local variable frame_size

2017-01-27 Thread Peter Maydell
The frame_size local variable in exynos4210_uart_update_parameters() is calculated but never used (and has been this way since the device was introduced in commit e5a4914efc7). The qemu_chr_fe_ioctl() doesn't need this information (if it really wanted it it could calculate it from the

[Qemu-devel] [PULL 00/22] target-arm queue

2017-01-27 Thread Peter Maydell
repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20170127 for you to fetch changes up to 146871c33eb70ca7090a0a55e69e5a8f9b5eb102: dma: omap: check dma channel data_type (2017-01-27 15:29:08 +

[Qemu-devel] [PULL 21/22] arm_gicv3: Fix broken logic in ELRSR calculation

2017-01-27 Thread Peter Maydell
Fix a broken expression in the calculation of ELRSR register bits: instead of "(lr & ICH_LR_EL2_HW) == 1" we want to check for != 0, because the HW bit is not bit 0 so a test for == 1 is always false. Fixes: https://bugs.launchpad.net/bugs/1658506 Signed-off-by: Peter Maydell

[Qemu-devel] [PULL 22/22] dma: omap: check dma channel data_type

2017-01-27 Thread Peter Maydell
From: Prasad J Pandit When setting dma channel 'data_type', if (value & 3) == 3, the set 'data_type' is said to be bad. This also leads to an OOB access in 'omap_dma_transfer_generic', while doing cpu_physical_memory_r/w operations. Add check to avoid it. Reported-by:

Re: [Qemu-devel] [PULL v2 00/18] virtio, vhost, pci: fixes, features

2017-01-27 Thread Peter Maydell
On 26 January 2017 at 16:15, Michael S. Tsirkin wrote: > The following changes since commit ae5045ae5b2bbd8ce1335d1b05f9ecacca83a6cf: > > Merge remote-tracking branch 'remotes/rth/tags/pull-nios-20170124' into > staging (2017-01-25 13:30:23 +) > > are available in the git

Re: [Qemu-devel] [PULL 30/30] target-sparc: fix up niagara machine

2017-01-27 Thread Jakub Jermář
Hi Artyom, On 01/23/2017 03:10 PM, Artyom Tarasenko wrote: > On Mon, Jan 23, 2017 at 1:40 PM, Peter Maydell > wrote: >> On 18 January 2017 at 22:38, Artyom Tarasenko wrote: >>> Remove the Niagara stub implementation from sun4u.c and add a machine,

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-27 Thread Laszlo Ersek
On 01/27/17 15:18, Kevin O'Connor wrote: > On Thu, Jan 26, 2017 at 08:59:04PM +0200, Michael S. Tsirkin wrote: >> On Thu, Jan 26, 2017 at 07:25:22PM +0100, Laszlo Ersek wrote: >>> On 01/26/17 19:15, Michael S. Tsirkin wrote: On Thu, Jan 26, 2017 at 06:43:22PM +0100, Laszlo Ersek wrote: >

Re: [Qemu-devel] [PATCH] dma: omap: check dma channel data_type

2017-01-27 Thread Peter Maydell
On 27 January 2017 at 12:05, P J P wrote: > From: Prasad J Pandit > > When setting dma channel 'data_type', if (value & 3) == 3, > the set 'data_type' is said to be bad. This also leads to an > OOB access in 'omap_dma_transfer_generic', while doing >

[Qemu-devel] [Bug 1622547] Re: qemu-system-sparc fatal error Trap 0x29 on Solaris 2.6

2017-01-27 Thread m...@papersolve.com
Yep, this works great for the SS-20 ROM (tested with SS-5 ROM also). Boots all the way to OS (have to use -nographic but that's fine). Thanks! -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1622547

[Qemu-devel] [PATCH] hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet

2017-01-27 Thread Thomas Huth
The "qemu,register" device is just used internally. It's strange to see this device showing up in the "-device ?" help text. Let's mark it with cannot_instantiate_with_device_add_yet to hide it from the users. Signed-off-by: Thomas Huth --- hw/core/register.c | 9 + 1

  1   2   3   >