Re: [Qemu-devel] [PATCH 0/2] scsi: remove legacy esp_init() function

2018-06-27 Thread Hervé Poussineau
Le 27/06/2018 à 22:01, Mark Cave-Ayland a écrit : On 13/06/18 10:47, Mark Cave-Ayland wrote: Something else that came out of reviewing Laurent's q800 patchset: after my SPARC cleanups last year, MIPS Jazz is the last remaining user of the legacy esp_init() function. Patch 1 switches

Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

2018-06-27 Thread Guenter Roeck
On 06/27/2018 09:12 PM, Edgar E. Iglesias wrote: On Wed, Jun 27, 2018 at 05:34:15PM -0700, Guenter Roeck wrote: Hi Edgar, On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote: Hi Guenter, Re: ml605 The thing to watch out for with kernel configs for microblaze systems is the physmem address

Re: [Qemu-devel] [PATCH] hw/arm: Add SBSA machine type

2018-06-27 Thread Hongbo Zhang
On 27 June 2018 at 20:31, Dr. David Alan Gilbert wrote: > * Hongbo Zhang (hongbo.zh...@linaro.org) wrote: >> This patch introduces a new Arm machine type 'SBSA' with features: >> - Based on legacy 'virt' machine type. >> - Newly designed memory map. >> - EL2 and EL3 are enabled by default. >>

Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

2018-06-27 Thread Edgar E. Iglesias
On Wed, Jun 27, 2018 at 05:34:15PM -0700, Guenter Roeck wrote: > Hi Edgar, > > On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote: > > > > > Hi Guenter, > > > > Re: ml605 > > The thing to watch out for with kernel configs for microblaze systems is the > > physmem address setting. Unfortunately

Re: [Qemu-devel] [PATCH 01/13] target/ppc: Add do_unaligned_access hook

2018-06-27 Thread David Gibson
On Wed, Jun 27, 2018 at 06:52:49AM -0700, Richard Henderson wrote: > On 06/27/2018 02:09 AM, David Gibson wrote: > > On Tue, Jun 26, 2018 at 09:19:09AM -0700, Richard Henderson wrote: > >> This allows faults from MO_ALIGN to have the same effect > >> as from gen_check_align. > >> > >>

Re: [Qemu-devel] [PATCH] ppc/pnv: Add model for Power8 PHB3 PCIe Host bridge

2018-06-27 Thread David Gibson
On Wed, Jun 27, 2018 at 12:22:31PM +0200, Andrea Bolognani wrote: > On Tue, 2018-06-26 at 19:02 +0200, Cédric Le Goater wrote: > > On 06/26/2018 05:57 PM, Andrea Bolognani wrote: > > > On Tue, 2018-06-26 at 15:59 +0200, Cédric Le Goater wrote: > > > > This is a model of the PCIe host bridge found

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2 0/5] rework the ICS classes inheritance tree

2018-06-27 Thread David Gibson
On Wed, Jun 27, 2018 at 08:34:22AM +0200, Cédric Le Goater wrote: > On 06/27/2018 02:14 AM, David Gibson wrote: > > On Tue, Jun 26, 2018 at 06:37:12PM +0200, Cédric Le Goater wrote: > > 1;5202;0c> On 06/26/2018 03:27 PM, Greg Kurz wrote: > >>> On Mon, 25 Jun 2018 11:17:13 +0200 > >>> Cédric Le

Re: [Qemu-devel] [PATCH] vhost-user-test: added proper TestServer *dest initialization in test_migrate()

2018-06-27 Thread Philippe Mathieu-Daudé
Hi Emanuele, On 06/26/2018 11:18 AM, Emanuele Giuseppe Esposito wrote: > server->bus in _test_server_free() could be NULL, since TestServer *dest in > test_migrate() was not properly initialized like TestServer *s. > Added init_virtio_dev(dest) and uninit_virtio_dev(dest), so the fields are >

[Qemu-devel] [RFC PATCH v2 10/12] linux-user/strace: Add print_sockaddr_ptr() to handle plain/pointer addrlen

2018-06-27 Thread Philippe Mathieu-Daudé
While very similar to send()/recv(), the format used by sendto()/recvfrom() is slightly different: the 'addrlen' is not a plain sockaddr_t but a pointer to it. Split the current function to handle both formats. Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther ---

Re: [Qemu-devel] [PATCH 02/13] target/ppc: Use atomic load for LQ and LQARX

2018-06-27 Thread David Gibson
On Tue, Jun 26, 2018 at 09:19:10AM -0700, Richard Henderson wrote: > Section 1.4 of the Power ISA v3.0B states that both of these > instructions are single-copy atomic. As we cannot (yet) issue > 128-bit loads within TCG, use the generic helpers provided. > > Since TCG cannot (yet) return a

Re: [Qemu-devel] [PATCH 03/13] target/ppc: Use atomic store for STQ

2018-06-27 Thread David Gibson
On Tue, Jun 26, 2018 at 09:19:11AM -0700, Richard Henderson wrote: > Section 1.4 of the Power ISA v3.0B states that this insn is > single-copy atomic. As we cannot (yet) issue 128-bit loads nit: s/loads/stores/ > within TCG, use the generic helpers provided. > > Signed-off-by: Richard

[Qemu-devel] [PATCH v2 09/12] linux-user/strace: Let print_sockaddr() have a 'last' argument

2018-06-27 Thread Philippe Mathieu-Daudé
If the format is not the syscall last argument, a comma is append. Signed-off-by: Philippe Mathieu-Daudé --- linux-user/strace.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 3690754be6..1bacf75213 100644 ---

[Qemu-devel] [PATCH v2 06/12] linux-user/strace: Improve recvmsg() output

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier --- linux-user/strace.list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index 9b477b7730..70e89d423c 100644 ---

[Qemu-devel] [PATCH v2 11/12] linux-user/strace: Improve getsockname() output

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther --- linux-user/strace.c| 13 + linux-user/strace.list | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 5a52d98f3b..3c3f684b3e 100644 ---

[Qemu-devel] [PATCH v2 05/12] linux-user/strace: Dump AF_NETLINK sockaddr content

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther --- linux-user/syscall_defs.h | 7 +++ linux-user/strace.c | 34 ++ linux-user/syscall.c | 6 -- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PATCH v2 04/12] linux-user/strace: Improve gettimeofday() and settimeofday() output

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther --- linux-user/strace.c| 13 + linux-user/strace.list | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index b43a21f48b..955fe80ef2 100644 ---

[Qemu-devel] [PATCH v2 12/12] linux-user/strace: Improve recvfrom() output

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther --- linux-user/strace.c| 16 linux-user/strace.list | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/linux-user/strace.c b/linux-user/strace.c index 3c3f684b3e..b31e9077c8 100644 ---

[Qemu-devel] [PATCH v2 02/12] linux-user/strace: Improve capget()/capset() output

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier --- linux-user/strace.list | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux-user/strace.list b/linux-user/strace.list index 2bc5ba04d4..afe4db07f3 100644 ---

[Qemu-devel] [PATCH v2 00/12] linux-user: strace improvements

2018-06-27 Thread Philippe Mathieu-Daudé
Hi Laurent, Few patches I'v been writting while trying to figure out this issue: http://lists.nongnu.org/archive/html/qemu-arm/2018-01/msg00514.html As usual with linux-user files, this series will trigger some checkpatch benign warnings. Regards, Phil. Since v1: - addressed Laurent comments

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 3/4] Add "Group Identifier" support to Red Hat PCI bridge.

2018-06-27 Thread Venu Busireddy
On 2018-06-28 05:14:50 +0300, Michael S. Tsirkin wrote: > On Wed, Jun 27, 2018 at 06:07:59PM -0500, Venu Busireddy wrote: > > On 2018-06-26 23:08:12 -0500, Venu Busireddy wrote: > > > On 2018-06-27 07:02:36 +0300, Michael S. Tsirkin wrote: > > > > On Tue, Jun 26, 2018 at 10:49:33PM -0500, Venu

[Qemu-devel] [PATCH v2 01/12] linux-user/syscall: Verify recvfrom(addr) is user-writable

2018-06-27 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Tested-By: Guido Günther Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 5 + 1 file changed, 5 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 2117fb13b4..ad40682cee 100644 --- a/linux-user/syscall.c +++

Re: [Qemu-devel] [PATCH v2 0/4] Use of unique identifier for pairing virtio and passthrough devices...

2018-06-27 Thread Venu Busireddy
On 2018-06-28 04:54:16 +0300, Michael S. Tsirkin wrote: > On Wed, Jun 27, 2018 at 05:34:17PM -0500, Venu Busireddy wrote: > > On 2018-06-27 23:12:12 +0300, Michael S. Tsirkin wrote: > > > On Wed, Jun 27, 2018 at 02:59:01PM -0500, Venu Busireddy wrote: > > > > On 2018-06-27 22:47:05 +0300, Michael

[Qemu-devel] [PATCH v3 22/23] linux-user: Implement signals for openrisc

2018-06-27 Thread Richard Henderson
All of the existing code was boilerplate from elsewhere, and would crash the guest upon the first signal. Signed-off-by: Richard Henderson --- v2: Add a comment to the new definition of target_pt_regs. Install the signal mask into the ucontext. v3: Incorporate feedback from Laurent. ---

[Qemu-devel] [PATCH v3 23/23] linux-user: Fix struct sigaltstack for openrisc

2018-06-27 Thread Richard Henderson
Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- linux-user/openrisc/target_signal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/openrisc/target_signal.h b/linux-user/openrisc/target_signal.h index c352a8b333..8283eaf544 100644 ---

[Qemu-devel] [PATCH v3 18/23] target/openrisc: Stub out handle_mmu_fault for softmmu

2018-06-27 Thread Richard Henderson
This hook is only used by CONFIG_USER_ONLY. Signed-off-by: Richard Henderson --- target/openrisc/mmu.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index a4613e9ae4..f4c0a3e217 100644 ---

[Qemu-devel] [PATCH v3 20/23] target/openrisc: Reorg tlb lookup

2018-06-27 Thread Richard Henderson
While openrisc has a split i/d tlb, qemu does not. Perform a lookup on both i & d tlbs in parallel and put the composite rights into qemu's tlb. This avoids ping-ponging the qemu tlb between EXEC and READ. Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 8 --

[Qemu-devel] [PATCH v3 21/23] target/openrisc: Add support in scripts/qemu-binfmt-conf.sh

2018-06-27 Thread Richard Henderson
Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- scripts/qemu-binfmt-conf.sh | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index d7eefda0b8..a5cb96d79a 100755 ---

[Qemu-devel] [PATCH v3 17/23] target/openrisc: Use identical sizes for ITLB and DTLB

2018-06-27 Thread Richard Henderson
The sizes are already the same, however, we can improve things if they are identical by design. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/cpu.h| 10 -- target/openrisc/machine.c| 4 ++-- target/openrisc/mmu.c| 4 ++--

[Qemu-devel] [PATCH v3 16/23] target/openrisc: Fix cpu_mmu_index

2018-06-27 Thread Richard Henderson
The code in cpu_mmu_index does not properly honor SR_DME. This bug has workarounds elsewhere in that we flush the tlb more often than necessary, on the state changes that should be reflected in a change of mmu_index. Fixing this means that we can respect the mmu_index that is given to tlb_flush.

[Qemu-devel] [PATCH v3 19/23] target/openrisc: Increase the TLB size

2018-06-27 Thread Richard Henderson
The architecture supports 128 TLB entries. There is no reason not to provide all of them. In the process we need to fix a bug that failed to parameterize the configuration register that tells the operating system the number of entries. Signed-off-by: Richard Henderson --- v2: - Change

[Qemu-devel] [PATCH v3 11/23] target/openrisc: Merge tlb allocation into CPUOpenRISCState

2018-06-27 Thread Richard Henderson
There is no reason to allocate this separately. This was probably copied from target/mips which makes the same mistake. While doing so, move tlb into the clear-on-reset range. While not all of the TLB bits are guaranteed zero on reset, all of the valid bits are cleared, and the rest of the bits

[Qemu-devel] [PATCH v3 14/23] target/openrisc: Reduce tlb to a single dimension

2018-06-27 Thread Richard Henderson
While we had defines for *_WAYS, we didn't define more than 1. Reduce the complexity by eliminating this unused dimension. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/cpu.h| 6 ++ target/openrisc/machine.c| 6 ++

[Qemu-devel] [PATCH v3 15/23] target/openrisc: Fix tlb flushing in mtspr

2018-06-27 Thread Richard Henderson
The previous code was confused, avoiding the flush of the old entry if the new entry is invalid. We need to flush the old page if the old entry is valid and the new page if the new entry is valid. This bug was masked by over-flushing elsewhere. Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v3 12/23] target/openrisc: Remove indirect function calls for mmu

2018-06-27 Thread Richard Henderson
There is no reason to use an indirect branch instead of simply testing the SR bits that control mmu state. Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 11 - target/openrisc/cpu.c | 4 -- target/openrisc/interrupt.c| 2 -

[Qemu-devel] [PATCH v3 07/23] target/openrisc: Link more translation blocks

2018-06-27 Thread Richard Henderson
Track direct jumps via dc->jmp_pc_imm. Use that in preference to jmp_pc when possible. Emit goto_tb in that case, and lookup_and_goto_tb otherwise. Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 96 + 1 file

[Qemu-devel] [PATCH v3 08/23] target/openrisc: Split out is_user

2018-06-27 Thread Richard Henderson
This allows us to limit the amount of ifdefs and isolate the test for usermode. Reviewed-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-)

[Qemu-devel] [PATCH v3 10/23] target/openrisc: Form the spr index from tcg

2018-06-27 Thread Richard Henderson
Rather than pass base+offset to the helper, pass the full index. In most cases the base is r0 and optimization yields a constant. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/helper.h | 4 ++-- target/openrisc/sys_helper.c | 9 +++--

[Qemu-devel] [PATCH v3 13/23] target/openrisc: Merge mmu_helper.c into mmu.c

2018-06-27 Thread Richard Henderson
With tlb_fill in mmu.c, we can simplify things further. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/mmu.c | 11 ++ target/openrisc/mmu_helper.c | 40 --- target/openrisc/Makefile.objs | 2 +- 3 files

[Qemu-devel] [PATCH v3 06/23] target/openrisc: Fix singlestep_enabled

2018-06-27 Thread Richard Henderson
We failed to store to cpu_pc before raising the exception, which caused us to re-execute the same insn that we stepped. Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 35 +-- 1 file changed, 17 insertions(+), 18

[Qemu-devel] [PATCH v3 09/23] target/openrisc: Exit the TB after l.mtspr

2018-06-27 Thread Richard Henderson
A store to SR changes interrupt state, which should return to the main loop to recognize that state. Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/target/openrisc/translate.c

[Qemu-devel] [PATCH v3 04/23] target/openrisc: Remove DISAS_JUMP & DISAS_TB_JUMP

2018-06-27 Thread Richard Henderson
These values are unused. Reviewed-by: Stafford Horne Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/translate.c | 4 1 file changed, 4 deletions(-) diff --git a/target/openrisc/translate.c b/target/openrisc/translate.c index

[Qemu-devel] [PATCH v3 02/23] target/openrisc: Add print_insn_or1k

2018-06-27 Thread Richard Henderson
Rather than emit disassembly while translating, reuse the generated decoder to build a separate disassembler. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/cpu.h | 1 + target/openrisc/cpu.c | 6 ++ target/openrisc/disas.c |

[Qemu-devel] [PATCH v3 00/23] target/openrisc improvements

2018-06-27 Thread Richard Henderson
Changes since v2: * Fix missing mtspr break. * Reorg print_insn_or1k and interrupt logging to the start. * Adjust exit after mtspr; fixing smp kernel crash. * Fix signals patch based on Larent's review. r~ Richard Henderson (23): target/openrisc: Fix mtspr shadow gprs

[Qemu-devel] [PATCH v3 05/23] target/openrisc: Use exit_tb instead of CPU_INTERRUPT_EXITTB

2018-06-27 Thread Richard Henderson
No need to use the interrupt mechanisms when we can simply exit the tb directly. Reviewed-by: Stafford Horne Signed-off-by: Richard Henderson --- target/openrisc/interrupt_helper.c | 3 +-- target/openrisc/translate.c| 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH v3 01/23] target/openrisc: Fix mtspr shadow gprs

2018-06-27 Thread Richard Henderson
Missing break. Signed-off-by: Richard Henderson --- target/openrisc/sys_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/openrisc/sys_helper.c b/target/openrisc/sys_helper.c index b284064381..2f337363ec 100644 --- a/target/openrisc/sys_helper.c +++

[Qemu-devel] [PATCH v3 03/23] target/openrisc: Log interrupts

2018-06-27 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/openrisc/interrupt.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c index 3959671c59..25351d5de3 100644

Re: [Qemu-devel] [virtio-dev] Re: [PATCH v2 3/4] Add "Group Identifier" support to Red Hat PCI bridge.

2018-06-27 Thread Michael S. Tsirkin
On Wed, Jun 27, 2018 at 06:07:59PM -0500, Venu Busireddy wrote: > On 2018-06-26 23:08:12 -0500, Venu Busireddy wrote: > > On 2018-06-27 07:02:36 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jun 26, 2018 at 10:49:33PM -0500, Venu Busireddy wrote: > > > > Add the "Vendor-Specific" capability to

Re: [Qemu-devel] [PATCH v2 0/4] Use of unique identifier for pairing virtio and passthrough devices...

2018-06-27 Thread Michael S. Tsirkin
On Wed, Jun 27, 2018 at 05:34:17PM -0500, Venu Busireddy wrote: > On 2018-06-27 23:12:12 +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 27, 2018 at 02:59:01PM -0500, Venu Busireddy wrote: > > > On 2018-06-27 22:47:05 +0300, Michael S. Tsirkin wrote: > > > > On Wed, Jun 27, 2018 at 02:29:58PM

Re: [Qemu-devel] [PATCH 03/11] linux-user/strace: add print_sockaddr_ptr() to handle plain/pointer addrlen

2018-06-27 Thread Philippe Mathieu-Daudé
Hi Laurent, On 02/17/2018 03:10 PM, Laurent Vivier wrote: > Le 24/01/2018 à 14:01, Philippe Mathieu-Daudé a écrit : >> since this argument differs between sendto()/recvfrom() >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> linux-user/strace.c | 17 +++-- >> 1 file changed, 15

Re: [Qemu-devel] [PATCH 08/11] linux-user/strace: improve gettimeofday() output

2018-06-27 Thread Philippe Mathieu-Daudé
Hi Laurent, On 02/17/2018 02:21 PM, Laurent Vivier wrote: > Le 24/01/2018 à 14:01, Philippe Mathieu-Daudé a écrit : >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> linux-user/strace.c| 13 + >> linux-user/strace.list | 2 +- >> 2 files changed, 14 insertions(+), 1

[Qemu-devel] [Bug 1779017] [NEW] qemu-system-arm: crashes raspian kernels with divide-by-zero

2018-06-27 Thread Thorsten Otto
Public bug reported: While trying to boot a arm kernel for a raspi2 machine (kernel7-4.9.41-stretch.img in my case, but applies to other versions, too) the kernel crash with a division by zero. The output on the sreial console is: [ 10.022377] [<8011d344>] (__warn) from [<8011d42c>]

Re: [Qemu-devel] [PATCH v2 13/22] target/openrisc: Fix cpu_mmu_index

2018-06-27 Thread Richard Henderson
On 06/27/2018 04:08 PM, Stafford Horne wrote: > I am still getting failures on SMP, this time the kernel is jumping to some > unknown address, maybe an itlb issue, I will continue to debug. Bisecting it > is > exposing some other issues (the mmu handlers were not getting init'd during > one >

Re: [Qemu-devel] [PATCH V5] migration: add capability to bypass the shared memory

2018-06-27 Thread Liang Li
On Mon, Apr 16, 2018 at 11:00:11PM +0800, Lai Jiangshan wrote: > > migration/migration.c | 22 ++ > migration/migration.h | 1 + > migration/ram.c | 27 ++- > qapi/migration.json | 6 +- > 4 files changed, 46 insertions(+), 10

[Qemu-devel] [PATCH v9 31/31] iotests: Test json:{} filenames of internal BDSs

2018-06-27 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/224 | 139 + tests/qemu-iotests/224.out | 18 + tests/qemu-iotests/group | 1 + 3 files changed, 158 insertions(+) create mode 100755 tests/qemu-iotests/224 create mode 100644

Re: [Qemu-devel] Linux kernel configurations for various Microblaze systems

2018-06-27 Thread Guenter Roeck
Hi Edgar, On 06/27/2018 03:47 PM, Edgar E. Iglesias wrote: Hi Guenter, Re: ml605 The thing to watch out for with kernel configs for microblaze systems is the physmem address setting. Unfortunately the kernel does not auto-detect this. I'm attaching a kernelconfig for the ml605 that works

[Qemu-devel] [PATCH v9 24/31] block: Purify .bdrv_refresh_filename()

2018-06-27 Thread Max Reitz
Currently, BlockDriver.bdrv_refresh_filename() is supposed to both refresh the filename (BDS.exact_filename) and set BDS.full_open_options. Now that we have generic code in the central bdrv_refresh_filename() for creating BDS.full_open_options, we can drop the latter part from all

[Qemu-devel] [PATCH v9 28/31] block/curl: Implement bdrv_refresh_filename()

2018-06-27 Thread Max Reitz
Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia --- block/curl.c | 21 + 1 file changed, 21 insertions(+) diff --git a/block/curl.c b/block/curl.c index f095fe4664..37a7da7815 100644 --- a/block/curl.c +++ b/block/curl.c @@ -961,6 +961,23 @@ static int64_t

[Qemu-devel] [PATCH v9 27/31] block/curl: Harmonize option defaults

2018-06-27 Thread Max Reitz
Both of the defaults we currently have in the curl driver are named based on a slightly different schema, let's unify that and call both CURL_BLOCK_OPT_${NAME}_DEFAULT. While at it, we can add a macro for the third option for which a default exists, namely "sslverify". Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v9 22/31] block: Add BlockDriver.bdrv_gather_child_options

2018-06-27 Thread Max Reitz
Some follow-up patches will rework the way bs->full_open_options is refreshed in bdrv_refresh_filename(). The new implementation will remove the need for the block drivers' bdrv_refresh_filename() implementations to set bs->full_open_options; instead, it will be generic and use static information

[Qemu-devel] [PATCH v9 25/31] block: Do not copy exact_filename from format file

2018-06-27 Thread Max Reitz
If a format BDS's file BDS is in turn a format BDS, we cannot simply use the same filename, because when opening a BDS tree based on a filename alone, qemu will create only one format node on top of one protocol node (disregarding a potential backing file). Signed-off-by: Max Reitz --- block.c

[Qemu-devel] [PATCH v9 17/31] block/nbd: Make bdrv_dirname() return NULL

2018-06-27 Thread Max Reitz
The generic bdrv_dirname() implementation would be able to generate some form of directory name for many NBD nodes, but it would be always wrong. Therefore, we have to explicitly make it an error (until NBD has some form of specification for export paths, if it ever will). Signed-off-by: Max

[Qemu-devel] [PATCH v9 29/31] block/null: Generate filename even with latency-ns

2018-06-27 Thread Max Reitz
While we cannot represent the latency-ns option in a filename, it is not a strong option so not being able to should not stop us from generating a filename nonetheless. Signed-off-by: Max Reitz --- block/null.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/null.c

[Qemu-devel] [PATCH v9 21/31] block: Add strong_runtime_opts to BlockDriver

2018-06-27 Thread Max Reitz
This new field can be set by block drivers to list the runtime options they accept that may influence the contents of the respective BDS. As of a follow-up patch, this list will be used by the common bdrv_refresh_filename() implementation to decide which options to put into BDS.full_open_options

[Qemu-devel] [PATCH v9 15/31] blkverify: Make bdrv_dirname() return NULL

2018-06-27 Thread Max Reitz
blkverify's BDSs have a file BDS, but we do not want this to be preferred over the raw node. There is no way to decide between the two (and not really a reason to, either), so just return NULL in blkverify's implementation of bdrv_dirname(). Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PATCH v9 20/31] iotests: Add quorum case to test 110

2018-06-27 Thread Max Reitz
Test 110 tests relative backing filenames for complex BDS trees. Now that the originally supposedly failing test passes, let us add a new failing test: Quorum can never work automatically (without detecting whether all child nodes have the same base directory, but that would be rather

[Qemu-devel] [PATCH v9 14/31] block: Add bdrv_dirname()

2018-06-27 Thread Max Reitz
This function may be implemented by block drivers to derive a directory name from a BDS. Concatenating this g_free()-able string with a relative filename must result in a valid (not necessarily existing) filename, so this is a function that should generally be not implemented by format drivers,

[Qemu-devel] [PATCH v9 13/31] block: Fix bdrv_find_backing_image()

2018-06-27 Thread Max Reitz
bdrv_find_backing_image() should use bdrv_get_full_backing_filename() or bdrv_make_absolute_filename() instead of trying to do what those functions do by itself. path_combine_deprecated() can now be dropped, so let's do that. Signed-off-by: Max Reitz --- block.c | 33

[Qemu-devel] [PATCH v9 19/31] block: Use bdrv_dirname() for relative filenames

2018-06-27 Thread Max Reitz
bdrv_get_full_backing_filename_from_filename() breaks down when it comes to JSON filenames. Using bdrv_dirname() as the basis is better because since we have BDS, we can descend through the BDS tree to the protocol layer, which gives us a greater probability of finding a non-JSON name; also,

[Qemu-devel] [PATCH v9 11/31] block: bdrv_get_full_backing_filename's ret. val.

2018-06-27 Thread Max Reitz
Make bdrv_get_full_backing_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz --- include/block/block.h | 3 +-- block.c | 48 +++ block/qapi.c | 12 ++-

[Qemu-devel] [PATCH v9 12/31] block: Add bdrv_make_absolute_filename()

2018-06-27 Thread Max Reitz
This is a general function for making a filename that is relative to a certain BDS absolute. It calls bdrv_get_full_backing_filename_from_filename() for now, but that will be changed in a follow-up patch. Signed-off-by: Max Reitz --- block.c | 27 --- 1 file changed, 20

[Qemu-devel] [PATCH v9 30/31] block: BDS options may lack the "driver" option

2018-06-27 Thread Max Reitz
When BDSs are created by qemu itself (e.g. as filters in block jobs), they may not have a "driver" option in their options QDict. When generating a json:{} filename, however, it must always be present. Signed-off-by: Max Reitz --- block.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[Qemu-devel] [PATCH v9 16/31] quorum: Make bdrv_dirname() return NULL

2018-06-27 Thread Max Reitz
While the common implementation for bdrv_dirname() should return NULL for quorum BDSs already (because they do not have a file node and their exact_filename field should be empty), there is no reason not to make that explicit. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v9 08/31] iotests: Add test for backing file overrides

2018-06-27 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/223 | 235 + tests/qemu-iotests/223.out | 84 + tests/qemu-iotests/group | 1 + 3 files changed, 320 insertions(+) create mode 100755 tests/qemu-iotests/223 create mode 100644

[Qemu-devel] [PATCH v9 06/31] iotests.py: Add filter_imgfmt()

2018-06-27 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 4e67fbbe96..5c45788dac 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -246,6

[Qemu-devel] [PATCH v9 26/31] block/nvme: Fix bdrv_refresh_filename()

2018-06-27 Thread Max Reitz
Currently, nvme's bdrv_refresh_filename() is an exact copy of null's implementation. However, for null, "null-co://" and "null-aio://" are indeed valid filenames -- for nvme, they are not, as a device address is still required. The correct implementation should generate a filename of the form

[Qemu-devel] [PATCH v9 10/31] block: bdrv_get_full_backing_filename_from_...'s ret. val.

2018-06-27 Thread Max Reitz
Make bdrv_get_full_backing_filename_from_filename() return an allocated string instead of placing the result in a caller-provided buffer. Signed-off-by: Max Reitz --- include/block/block.h | 7 +++--- block.c | 53 ++- block/vmdk.c

[Qemu-devel] [PATCH v9 05/31] block: Respect backing bs in bdrv_refresh_filename

2018-06-27 Thread Max Reitz
Basically, bdrv_refresh_filename() should respect all children of a BlockDriverState. However, generally those children are driver-specific, so this function cannot handle the general case. On the other hand, there are only few drivers which use other children than @file and @backing (that being

[Qemu-devel] [PATCH v9 04/31] block: Add BDS.auto_backing_file

2018-06-27 Thread Max Reitz
If the backing file is overridden, this most probably does change the guest-visible data of a BDS. Therefore, we will need to consider this in bdrv_refresh_filename(). To see whether it has been overridden, we might want to compare bs->backing_file and bs->backing->bs->filename. However,

[Qemu-devel] [PATCH v9 23/31] block: Generically refresh runtime options

2018-06-27 Thread Max Reitz
Instead of having every block driver which implements bdrv_refresh_filename() copy all of the strong runtime options over to bs->full_open_options, implement this process generically in bdrv_refresh_filename(). This patch only adds this new generic implementation, it does not remove the old

[Qemu-devel] [PATCH v9 09/31] block: Make path_combine() return the path

2018-06-27 Thread Max Reitz
Besides being safe for arbitrary path lengths, after some follow-up patches all callers will want a freshly allocated buffer anyway. In the meantime, path_combine_deprecated() is added which has the same interface as path_combine() had before this patch. All callers to that function will be

[Qemu-devel] [PATCH v9 07/31] iotests.py: Add node_info()

2018-06-27 Thread Max Reitz
This function queries a node; since we cannot do that right now, it executes query-named-block-nodes and returns the matching node's object. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v9 03/31] block: Skip implicit nodes for filename info

2018-06-27 Thread Max Reitz
bdrv_refresh_filename() should simply skip all implicit nodes. They are supposed to be invisible to the user, so they should not appear in filename information. Signed-off-by: Max Reitz --- block.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH v9 18/31] block/nfs: Implement bdrv_dirname()

2018-06-27 Thread Max Reitz
While the basic idea is obvious and could be handled by the default bdrv_dirname() implementation, we cannot generate a directory name if the gid or uid are set, so we have to explicitly return NULL in those cases. Signed-off-by: Max Reitz --- block/nfs.c | 15 +++ 1 file changed,

[Qemu-devel] [PATCH v9 01/31] block: Use bdrv_refresh_filename() to pull

2018-06-27 Thread Max Reitz
Before this patch, bdrv_refresh_filename() is used in a pushing manner: Whenever the BDS graph is modified, the parents of the modified edges are supposed to be updated (recursively upwards). However, that is unviable, considering that we want child changes not to concern parents. Also, in the

[Qemu-devel] [PATCH v9 00/31] block: Fix some filename generation issues

2018-06-27 Thread Max Reitz
Once more, I’ll spare both me and you another iteration of the cover letter, so see here: http://lists.nongnu.org/archive/html/qemu-block/2017-09/msg01030.html (Although this series no longer includes a @base-directory option.) In regards to the last version, the biggest change is that I

[Qemu-devel] [PATCH v9 02/31] block: Use children list in bdrv_refresh_filename

2018-06-27 Thread Max Reitz
bdrv_refresh_filename() should invoke itself recursively on all children, not just on file. With that change, we can remove the manual invocations in blkverify, quorum, commit, and mirror. Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia Reviewed-by: Kevin Wolf --- block.c | 9

[Qemu-devel] [RFC v3 10/10] hw/m68k: define Macintosh Quadra 800

2018-06-27 Thread Laurent Vivier
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- MAINTAINERS | 19 ++ default-configs/m68k-softmmu.mak | 14 ++ hw/intc/Makefile.objs| 1 + hw/intc/q800_irq.c | 73

[Qemu-devel] [RFC v3 07/10] hw/m68k: add Nubus support

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/Makefile.objs| 1 + hw/display/macfb.c | 56 ++ hw/nubus/Makefile.objs | 4 + hw/nubus/mac-nubus-bridge.c | 45

[Qemu-devel] [RFC v3 01/10] hw/m68k: add via support

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/misc/Makefile.objs | 1 + hw/misc/mac_via.c | 675 ++ include/hw/misc/mac_via.h | 106 3 files changed, 782 insertions(+)

[Qemu-devel] [RFC v3 08/10] hw/m68k: add a dummy SWIM floppy controller

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/block/Makefile.objs | 1 + hw/block/swim.c | 284 include/hw/block/swim.h | 53 + 3 files changed, 338 insertions(+)

[Qemu-devel] [RFC v3 04/10] hw/m68k: add video card

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- arch_init.c | 4 + hw/display/Makefile.objs| 1 + hw/display/macfb-template.h | 158 +++ hw/display/macfb.c | 252

[Qemu-devel] [RFC v3 06/10] ESP: add pseudo-DMA as used by Macintosh

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/mips/mips_jazz.c | 2 +- hw/scsi/esp.c | 297 -- include/hw/scsi/esp.h | 11 +- 3 files changed, 276 insertions(+), 34

[Qemu-devel] [RFC v3 05/10] hw/m68k: Apple Sound Chip (ASC) emulation

2018-06-27 Thread Laurent Vivier
This is broken as the linux driver seems broken too... Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/audio/Makefile.objs | 1 + hw/audio/asc.c | 463 + include/hw/audio/asc.h |

[Qemu-devel] [RFC v3 09/10] dp8393x: manage big endian bus

2018-06-27 Thread Laurent Vivier
This is needed by Quadra 800, this card can run on little-endian or big-endian bus. Signed-off-by: Laurent Vivier Tested-by: Hervé Poussineau --- hw/net/dp8393x.c | 88 1 file changed, 57 insertions(+), 31 deletions(-) diff --git

[Qemu-devel] [RFC v3 02/10] ADB: VIA probes ADB bus when it is idle

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/input/adb-kbd.c| 4 ++ hw/input/adb-mouse.c | 4 ++ hw/input/adb.c| 115 ++ hw/misc/mac_via.c | 56

[Qemu-devel] [RFC v3 00/10] hw/m68k: add Apple Machintosh Quadra 800 machine

2018-06-27 Thread Laurent Vivier
I'm rebasing some of these patches for seven years now, too many years... if you want to test the machine, I'm sorry, it doesn't boot a MacROM, but you can boot a linux kernel from the command line. You can install your own disk using debian-installer, with: ... -M q800 \ -serial

[Qemu-devel] [C v2 10/10] hw/m68k: define Macintosh Quadra 800

2018-06-27 Thread Laurent Vivier
From: Laurent Vivier Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- MAINTAINERS | 19 ++ default-configs/m68k-softmmu.mak | 14 ++ hw/intc/Makefile.objs| 1 + hw/intc/q800_irq.c | 73

[Qemu-devel] [C v2 06/10] ESP: add pseudo-DMA as used by Macintosh

2018-06-27 Thread Laurent Vivier
Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/mips/mips_jazz.c | 2 +- hw/scsi/esp.c | 297 -- include/hw/scsi/esp.h | 11 +- 3 files changed, 276 insertions(+), 34

[Qemu-devel] [C v2 05/10] hw/m68k: Apple Sound Chip (ASC) emulation

2018-06-27 Thread Laurent Vivier
This is broken as the linux driver seems broken too... Co-developed-by: Mark Cave-Ayland Signed-off-by: Mark Cave-Ayland Signed-off-by: Laurent Vivier --- hw/audio/Makefile.objs | 1 + hw/audio/asc.c | 463 + include/hw/audio/asc.h |

[Qemu-devel] [RFC v3 03/10] escc: introduce a selector for the register bit

2018-06-27 Thread Laurent Vivier
On Sparc and PowerMac, the bit 0 of the address selects the register type (control or data) and bit 1 selects the channel (B or A). On m68k Macintosh, the bit 0 selects the channel and bit 1 the register type. This patch introduces a new parameter (bit_swap) to the device interface to indicate

  1   2   3   4   5   >