Re: [PATCH] docs: Fix virtiofsd.1 location

2020-02-12 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Wed, 12 Feb 2020 at 13:16, Miroslav Rezanina wrote: > > > > Patch 6a7e2bbee5 docs: add virtiofsd(1) man page introduced new man > > page virtiofsd.1. Unfortunately, wrong file location is used as > > source for install command. This cause

Re: [PATCH v2 01/16] virtio-mem: Prototype

2020-02-12 Thread David Hildenbrand
On 12.02.20 15:15, Eric Blake wrote: > On 2/12/20 7:35 AM, David Hildenbrand wrote: >> Signed-off-by: David Hildenbrand >> --- > > It's at least worth mentioning VirtioMEMDeviceInfo in the commit > message, to make it easier to find which commit introduces a given QAPI > struct when searching

Re: [PATCH] docs: Fix virtiofsd.1 location

2020-02-12 Thread Peter Maydell
On Wed, 12 Feb 2020 at 13:16, Miroslav Rezanina wrote: > > Patch 6a7e2bbee5 docs: add virtiofsd(1) man page introduced new man > page virtiofsd.1. Unfortunately, wrong file location is used as > source for install command. This cause installation of docs fail. > > Fixing wrong location so

Re: [PATCH v2 13/16] qmp/hmp: Expose "managed-size" for memory backends

2020-02-12 Thread Eric Blake
On 2/12/20 7:35 AM, David Hildenbrand wrote: Expose it, and document what it means and when it was added. Signed-off-by: David Hildenbrand --- hw/core/machine-hmp-cmds.c | 2 ++ hw/core/machine-qmp-cmds.c | 3 +++ qapi/machine.json | 6 ++ 3 files changed, 11 insertions(+)

Re: [PATCH v2 01/16] virtio-mem: Prototype

2020-02-12 Thread Eric Blake
On 2/12/20 7:35 AM, David Hildenbrand wrote: Signed-off-by: David Hildenbrand --- It's at least worth mentioning VirtioMEMDeviceInfo in the commit message, to make it easier to find which commit introduces a given QAPI struct when searching the git log. +++ b/qapi/misc.json @@ -1557,19

Re: [PATCH v3 4/4] linux-user: fix use of SIGRTMIN

2020-02-12 Thread Peter Maydell
On Wed, 12 Feb 2020 at 12:57, Laurent Vivier wrote: > > Some RT signals can be in use by glibc, > it's why SIGRTMIN (34) is generally greater than __SIGRTMIN (32). > > So SIGRTMIN cannot be mapped to TARGET_SIGRTMIN. > > Instead of swapping only SIGRTMIN and SIGRTMAX, map all the > range

Re: Summary of Re: Making QEMU easier for management tools and applications

2020-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2020 at 01:54:42PM +, Stefan Hajnoczi wrote: > On Mon, Feb 10, 2020 at 05:43:13PM +0100, Markus Armbruster wrote: > > Stefan Hajnoczi writes: > > > > > On Tue, Feb 4, 2020 at 3:54 PM Markus Armbruster > > > wrote: > > >> = Ways to provide machine-friendly initial

Re: [PATCH] tests: Fix a bug with count variables

2020-02-12 Thread Stefan Hajnoczi
On Fri, Feb 07, 2020 at 07:54:33PM +0800, Tianjia Zhang wrote: > The counting code here should use the local variable n_nodes_local. > Otherwise, the variable n_nodes is counting incorrectly, causing the > counting logic of the code to be wrong. > > Signed-off-by: Tianjia Zhang > --- >

Re: [PATCH v30 00/22] Add RX archtecture support

2020-02-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200212130311.127515-1-ys...@users.sourceforge.jp/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v30 00/22] Add RX archtecture support Message-id:

Re: Summary of Re: Making QEMU easier for management tools and applications

2020-02-12 Thread Stefan Hajnoczi
On Mon, Feb 10, 2020 at 05:43:13PM +0100, Markus Armbruster wrote: > Stefan Hajnoczi writes: > > > On Tue, Feb 4, 2020 at 3:54 PM Markus Armbruster wrote: > >> = Ways to provide machine-friendly initial configuration = > >> > >> Two ways to provide machine-friendly initial configuration on par

Re: [RFC 0/9] Add an interVM memory sharing device

2020-02-12 Thread Stefan Hajnoczi
On Mon, Feb 10, 2020 at 02:01:48PM +0100, Igor Kotrasiński wrote: > On 2/7/20 5:33 PM, Stefan Hajnoczi wrote: > > On Fri, Feb 07, 2020 at 11:04:03AM +0100, Igor Mammedov wrote: > >> On Fri, 7 Feb 2020 10:00:50 +0100 > >> Igor Kotrasiński wrote: > >> > >>> On 2/5/20 3:49 PM, Jan Kiszka wrote: >

[PATCH v2 fixed 13/16] numa: Teach ram block notifiers about resizable ram blocks

2020-02-12 Thread David Hildenbrand
We want to actually resize ram blocks (make everything between used_length and max_length inaccessible) - however, not all ram block notifiers will support that. Let's teach the notifier that ram blocks are indeed resizable, but keep using max_size in the existing notifiers. Supply the max_size

[PATCH v2 fixed 16/16] exec: Ram blocks with resizable anonymous allocations under POSIX

2020-02-12 Thread David Hildenbrand
We can now make use of resizable anonymous allocations to implement actually resizable ram blocks. Resizable anonymous allocations are not implemented under WIN32 yet and are not available when using alternative allocators. Fall back to the existing handling. We also have to fallback to the

[PATCH v2 fixed 12/16] util/mmap-alloc: Implement resizable mmaps

2020-02-12 Thread David Hildenbrand
Implement resizable mmaps. For now, the actual resizing is not wired up. Introduce qemu_ram_mmap_resizable() and qemu_ram_mmap_resize(). Make qemu_ram_mmap() a wrapper of qemu_ram_mmap_resizable(). Cc: Richard Henderson Cc: Igor Kotrasinski Cc: Murilo Opsfelder Araujo Cc: "Michael S. Tsirkin"

[PATCH v2 fixed 07/16] exec: Drop "shared" parameter from ram_block_add()

2020-02-12 Thread David Hildenbrand
Properly store it in the flags of the ram block instead (and the flag even already exists and is used). E.g., qemu_ram_is_shared() now properly succeeds on all ram blocks that are actually shared. Reviewed-by: Igor Kotrasinski Reviewed-by: Richard Henderson Cc: Richard Henderson Cc: Paolo

[PATCH v2 fixed 14/16] util: vfio-helpers: Implement ram_block_resized()

2020-02-12 Thread David Hildenbrand
Let's implement ram_block_resized(), allowing resizable mappings. For resizable mappings, we reserve $max_size IOVA address space, but only map $size of it. When resizing, unmap the old part and remap the new part. We'll need a new ioctl to do this atomically (e.g., to resize while the guest is

[PATCH v2 fixed 11/16] util/mmap-alloc: Prepare for resizable mmaps

2020-02-12 Thread David Hildenbrand
When shrinking a mmap we want to re-reserve the already populated area. When growing a memory region, we want to populate starting with a given fd_offset. Prepare by allowing to pass these parameters. Also, let's make sure we always process full pages, to avoid unmapping/remapping pages that are

[PATCH v2 fixed 09/16] util/mmap-alloc: Factor out reserving of a memory region to mmap_reserve()

2020-02-12 Thread David Hildenbrand
We want to reserve a memory region without actually populating memory. Let's factor that out. Reviewed-by: Igor Kotrasinski Acked-by: Murilo Opsfelder Araujo Reviewed-by: Richard Henderson Cc: "Michael S. Tsirkin" Cc: Greg Kurz Cc: Murilo Opsfelder Araujo Cc: Eduardo Habkost Cc: "Dr. David

[PATCH v2 fixed 00/16] Ram blocks with resizable anonymous allocations under POSIX

2020-02-12 Thread David Hildenbrand
We already allow resizable ram blocks for anonymous memory, however, they are not actually resized. All memory is mmaped() R/W, including the memory exceeding the used_length, up to the max_length. When resizing, effectively only the boundary is moved. Implement actually resizable anonymous

[PATCH v2 fixed 10/16] util/mmap-alloc: Factor out populating of memory to mmap_populate()

2020-02-12 Thread David Hildenbrand
We want to populate memory within a reserved memory region. Let's factor that out. Reviewed-by: Richard Henderson Acked-by: Murilo Opsfelder Araujo Cc: Igor Kotrasinski Cc: "Michael S. Tsirkin" Cc: Greg Kurz Cc: Murilo Opsfelder Araujo Cc: Eduardo Habkost Cc: "Dr. David Alan Gilbert" Cc:

[PATCH v2 fixed 08/16] util/mmap-alloc: Factor out calculation of pagesize to mmap_pagesize()

2020-02-12 Thread David Hildenbrand
Factor it out and add a comment. Reviewed-by: Igor Kotrasinski Acked-by: Murilo Opsfelder Araujo Reviewed-by: Richard Henderson Cc: "Michael S. Tsirkin" Cc: Murilo Opsfelder Araujo Cc: Greg Kurz Cc: Eduardo Habkost Cc: "Dr. David Alan Gilbert" Cc: Igor Mammedov Signed-off-by: David

Re: [PATCH] nbd-client: Support leading / in NBD URI

2020-02-12 Thread Richard W.M. Jones
On Tue, Feb 11, 2020 at 08:31:01PM -0600, Eric Blake wrote: > The NBD URI specification [1] states that only one leading slash at > the beginning of the URI path component is stripped, not all such > slashes. This becomes important to a patch I just proposed to nbdkit > [2], which would allow the

[PATCH v2 fixed 06/16] exec: Reuse qemu_ram_apply_settings() in qemu_ram_remap()

2020-02-12 Thread David Hildenbrand
I don't see why we shouldn't apply all settings to make it look like the surrounding RAM (and enable proper VMA merging). Note: memory backend settings might have overridden these settings. We would need a callback to let the memory backend fix that up. Reviewed-by: Richard Henderson Cc:

Re: [PATCH v2 00/16] Ram blocks with resizable anonymous allocations under POSIX

2020-02-12 Thread David Hildenbrand
On 12.02.20 14:35, David Hildenbrand wrote: > We already allow resizable ram blocks for anonymous memory, however, they > are not actually resized. All memory is mmaped() R/W, including the memory > exceeding the used_length, up to the max_length. > > When resizing, effectively only the boundary

[PATCH v2 fixed 04/16] util: vfio-helpers: Factor out removal from qemu_vfio_undo_mapping()

2020-02-12 Thread David Hildenbrand
Factor it out and properly use it where applicable. Make qemu_vfio_undo_mapping() look like qemu_vfio_do_mapping(), passing the size and iova, not the mapping. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Alex Williamson Cc: Stefan Hajnoczi

Re: [PATCH v30 00/22] Add RX archtecture support

2020-02-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200212130311.127515-1-ys...@users.sourceforge.jp/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v30 00/22] Add RX archtecture support Message-id:

[PATCH v2 fixed 05/16] exec: Factor out setting ram settings (madvise ...) into qemu_ram_apply_settings()

2020-02-12 Thread David Hildenbrand
Factor all settings out into qemu_ram_apply_settings(). For memory_try_enable_merging(), the important bit is that it won't be called with XEN - which is now still the case as new_block->host will remain NULL. Reviewed-by: Richard Henderson Cc: Richard Henderson Cc: Paolo Bonzini Cc: Igor

[PATCH v2 fixed 02/16] util: vfio-helpers: Fix qemu_vfio_close()

2020-02-12 Thread David Hildenbrand
qemu_vfio_undo_mapping() will decrement the number of mappings and reshuffle the array elements to fit into the reduced size. Iterating over all elements like this does not work as expected, let's make sure to remove all mappings properly. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo

[PATCH v2 fixed 03/16] util: vfio-helpers: Remove Error parameter from qemu_vfio_undo_mapping()

2020-02-12 Thread David Hildenbrand
Everybody discards the error. Let's error_report() instead so this error doesn't get lost. Cc: Richard Henderson Cc: Paolo Bonzini Cc: Eduardo Habkost Cc: Marcel Apfelbaum Cc: Alex Williamson Cc: Stefan Hajnoczi Signed-off-by: David Hildenbrand --- util/vfio-helpers.c | 11 +-- 1

Re: [PATCH] nbd-client: Support leading / in NBD URI

2020-02-12 Thread Maxim Levitsky
On Wed, 2020-02-12 at 14:33 +0100, Ján Tomko wrote: > On Tue, Feb 11, 2020 at 08:31:01PM -0600, Eric Blake wrote: > > The NBD URI specification [1] states that only one leading slash at > > the beginning of the URI path component is stripped, not all such > > slashes. This becomes important to a

[PATCH v2 14/16] virtio-mem: Support for resizable memory regions

2020-02-12 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- hw/virtio/virtio-mem.c | 168 ++--- 1 file changed, 109 insertions(+), 59 deletions(-) diff --git a/hw/virtio/virtio-mem.c b/hw/virtio/virtio-mem.c index 093b6eb0bb..d28b501778 100644 --- a/hw/virtio/virtio-mem.c +++

[PATCH v2 fixed 15/16] util: oslib: Resizable anonymous allocations under POSIX

2020-02-12 Thread David Hildenbrand
Introduce qemu_anon_ram_alloc_resizable() and qemu_anon_ram_resize(). Implement them under POSIX and make them return NULL under WIN32. Under POSIX, we make use of resizable mmaps. An implementation under WIN32 is theoretically possible AFAIK and can be added later. In qemu_anon_ram_free(),

[PATCH v2 fixed 01/16] util: vfio-helpers: Factor out and fix processing of existing ram blocks

2020-02-12 Thread David Hildenbrand
Factor it out into common code when a new notifier is registered, just as done with the memory region notifier. This allows us to have the logic about how to process existing ram blocks at a central place (which will be extended soon). Just like when adding a new ram block, we have to register

[PATCH v2 11/16] hostmem: Factor out common checks into host_memory_backend_validate()

2020-02-12 Thread David Hildenbrand
All users want to perform similar checks. Lat's factor it out to prepare for more checks. Signed-off-by: David Hildenbrand --- backends/hostmem.c | 14 ++ hw/mem/pc-dimm.c | 12 +--- hw/misc/ivshmem.c| 11 --- hw/virtio/virtio-mem.c | 15

[PATCH v2 13/16] qmp/hmp: Expose "managed-size" for memory backends

2020-02-12 Thread David Hildenbrand
Expose it, and document what it means and when it was added. Signed-off-by: David Hildenbrand --- hw/core/machine-hmp-cmds.c | 2 ++ hw/core/machine-qmp-cmds.c | 3 +++ qapi/machine.json | 6 ++ 3 files changed, 11 insertions(+) diff --git a/hw/core/machine-hmp-cmds.c

[PATCH v2 08/16] memory: Disallow resizing to 0

2020-02-12 Thread David Hildenbrand
Memory regions / qemu ramblocks always have to have a size > 0. Especially, otherwise, ramblock_ptr() will bail out with an assert. Enforce this. Signed-off-by: David Hildenbrand --- exec.c | 5 + 1 file changed, 5 insertions(+) diff --git a/exec.c b/exec.c index 5bc9b231c4..161e40e16e

[PATCH v2 16/16] kvm: Implement region_resize() for atomic memory section resizes

2020-02-12 Thread David Hildenbrand
virtio-mem wants to resize (esp. grow) memory regions while the guest is already aware of them and makes use of them. Resizing a KVM slot can only currently be done by removing it and re-adding it. While the kvm slot is temporarily removed, VCPUs that try to read from these slots will fault.

[PATCH v2 10/16] hostmem: Factor out applying settings

2020-02-12 Thread David Hildenbrand
We want to reuse the functionality when resizing resizable memory region. Signed-off-by: David Hildenbrand --- backends/hostmem.c | 137 + 1 file changed, 76 insertions(+), 61 deletions(-) diff --git a/backends/hostmem.c b/backends/hostmem.c index

[PATCH v2 05/16] pc: Support for virtio-mem-pci

2020-02-12 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- hw/i386/Kconfig | 1 + hw/i386/pc.c| 42 -- 2 files changed, 25 insertions(+), 18 deletions(-) diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index cdc851598c..e8ce582edd 100644 --- a/hw/i386/Kconfig +++

[PATCH v2 12/16] hostmem: Introduce "managed-size" for memory-backend-ram

2020-02-12 Thread David Hildenbrand
virtio-mem wants to make use of resizable memory regions. Allow to create them by the user by specifying "managed-size". Disallow setting "managed-size" with "prealloc" and "shared". The latter might theoretically be possible, however has to be wired up internally first. Support for

[PATCH v2 09/16] memory-device: properly deal with resizable memory regions

2020-02-12 Thread David Hildenbrand
In case we are dealing with resizable memory regions, we always have to assign space in the physical address space which can fit the maximum region size. Signed-off-by: David Hildenbrand --- hw/mem/memory-device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v2 15/16] memory: Add region_resize() callback to memory notifier

2020-02-12 Thread David Hildenbrand
Let's provide a way for memory notifiers to get notified about a resize. If the region_resize() callback is not implemented by a notifier, we mimic the old behavior by removing the old section and adding the new, resized section. The existing code would remove all sections first and then add the

[PATCH v2 06/16] exec: Provide owner when resizing memory region

2020-02-12 Thread David Hildenbrand
Let's pass the owner in the callback. While touching it, introduce a typedef for the callback. Signed-off-by: David Hildenbrand --- exec.c | 13 + hw/core/loader.c| 3 ++- include/exec/memory.h | 7 --- include/exec/ram_addr.h | 4 +---

[PATCH v2 04/16] numa: Handle virtio-mem in NUMA stats

2020-02-12 Thread David Hildenbrand
Account the memory to the configured nide. Signed-off-by: David Hildenbrand --- hw/core/numa.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index 601cf9f603..4deb27ebee 100644 --- a/hw/core/numa.c +++ b/hw/core/numa.c @@ -855,10

[PATCH v2 01/16] virtio-mem: Prototype

2020-02-12 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- hw/virtio/Kconfig | 11 + hw/virtio/Makefile.objs| 1 + hw/virtio/virtio-mem.c | 805 + include/hw/virtio/virtio-mem.h | 83 qapi/misc.json | 39 +- 5 files changed, 938

[PATCH v2 03/16] hmp: Handle virtio-mem when printing memory device infos

2020-02-12 Thread David Hildenbrand
Print the memory device info just like other memory devices. Signed-off-by: David Hildenbrand --- monitor/hmp-cmds.c | 16 1 file changed, 16 insertions(+) diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c index 558fe06b8f..798aead52e 100644 --- a/monitor/hmp-cmds.c +++

[PATCH v2 00/16] Ram blocks with resizable anonymous allocations under POSIX

2020-02-12 Thread David Hildenbrand
We already allow resizable ram blocks for anonymous memory, however, they are not actually resized. All memory is mmaped() R/W, including the memory exceeding the used_length, up to the max_length. When resizing, effectively only the boundary is moved. Implement actually resizable anonymous

[PATCH v2 07/16] memory: Add memory_region_max_size() and memory_region_is_resizable()

2020-02-12 Thread David Hildenbrand
We want to pass resizable memory regions to devices that can deal with them (and autoamtically resize them). Allow them to easily identify if a region can be resized and what the maximum size is. Add both functions, adding qemu_ram_is_resizable() as a helper. Signed-off-by: David Hildenbrand

[PATCH v2 02/16] virtio-pci: Proxy for virtio-mem

2020-02-12 Thread David Hildenbrand
Signed-off-by: David Hildenbrand --- hw/virtio/Makefile.objs| 1 + hw/virtio/virtio-mem-pci.c | 136 + hw/virtio/virtio-mem-pci.h | 33 + include/hw/pci/pci.h | 1 + 4 files changed, 171 insertions(+) create mode 100644

Re: [PATCH] nbd-client: Support leading / in NBD URI

2020-02-12 Thread Ján Tomko
On Tue, Feb 11, 2020 at 08:31:01PM -0600, Eric Blake wrote: The NBD URI specification [1] states that only one leading slash at the beginning of the URI path component is stripped, not all such slashes. This becomes important to a patch I just proposed to nbdkit [2], which would allow the

Re: [PATCH v30 00/22] Add RX archtecture support

2020-02-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200212130311.127515-1-ys...@users.sourceforge.jp/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v30 00/22] Add RX archtecture support Message-id:

Re: [PATCH v5 01/26] nvme: rename trace events to nvme_dev

2020-02-12 Thread Maxim Levitsky
On Wed, 2020-02-12 at 14:08 +0100, Klaus Birkelund Jensen wrote: > On Feb 12 11:08, Maxim Levitsky wrote: > > On Tue, 2020-02-04 at 10:51 +0100, Klaus Jensen wrote: > > > Change the prefix of all nvme device related trace events to 'nvme_dev' > > > to not clash with trace events from the nvme

Re: [PATCH v5 01/26] nvme: rename trace events to nvme_dev

2020-02-12 Thread Klaus Birkelund Jensen
On Feb 12 11:08, Maxim Levitsky wrote: > On Tue, 2020-02-04 at 10:51 +0100, Klaus Jensen wrote: > > Change the prefix of all nvme device related trace events to 'nvme_dev' > > to not clash with trace events from the nvme block driver. > > Hi Maxim, Thank you very much for your thorough reviews!

[PATCH] docs: Fix virtiofsd.1 location

2020-02-12 Thread Miroslav Rezanina
Patch 6a7e2bbee5 docs: add virtiofsd(1) man page introduced new man page virtiofsd.1. Unfortunately, wrong file location is used as source for install command. This cause installation of docs fail. Fixing wrong location so installation is successful. Signed-off-by: Miroslav Rezanina ---

[PATCH v30 21/22] BootLinuxConsoleTest: Test the RX-Virt machine

2020-02-12 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé Add two tests for the rx-virt machine, based on the recommended test setup from Yoshinori Sato: https://lists.gnu.org/archive/html/qemu-devel/2019-05/msg03586.html - U-Boot prompt - Linux kernel with Sash shell These are very quick tests: $ avocado run -t

[PATCH v30 02/22] qemu/bitops.h: Add extract8 and extract16

2020-02-12 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-10-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/qemu/bitops.h | 38

[PATCH v30 09/22] target/rx: Replace operand with prt_ldmi in disassembler

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson This has consistency with prt_ri(). It loads all data before beginning output. It uses exactly one call to prt() to emit the full instruction. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id:

[PATCH v30 17/22] hw/rx: RX Target hardware definition

2020-02-12 Thread Yoshinori Sato
rx62n - RX62N cpu. rx-virt - RX QEMU virtual target. Signed-off-by: Yoshinori Sato Message-Id: <20190616142836.10614-17-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-9-ys...@users.sourceforge.jp>

[PATCH v30 12/22] target/rx: Collect all bytes during disassembly

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson Collected, to be used in the next patch. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-23-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson

[PATCH v30 15/22] hw/timer: RX62N internal timer modules

2020-02-12 Thread Yoshinori Sato
renesas_tmr: 8bit timer modules. renesas_cmt: 16bit compare match timer modules. This part use many renesas's CPU. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Alex Bennée Reviewed-by:

[PATCH v30 07/22] target/rx: RX disassembler

2020-02-12 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-5-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson --- include/disas/dis-asm.h |5 + target/rx/disas.c | 1480

[PATCH v30 04/22] target/rx: TCG translation

2020-02-12 Thread Yoshinori Sato
This part only supported RXv1 instructions. Instruction manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01us0032ej0120_rxsm.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v30 00/22] Add RX archtecture support

2020-02-12 Thread Yoshinori Sato
and rx_load_image move to rx-virt. My git repository is bellow. git://git.pf.osdn.net/gitroot/y/ys/ysato/qemu.git tags/rx-20200212 Testing binaries bellow. u-boot Download - https://osdn.net/users/ysato/pf/qemu/dl/u-boot.bin.gz starting $ gzip -d u-boot.bin.gz $ qemu-system-rx -bios u-boot.bin linux

[PATCH v30 20/22] Add rx-softmmu

2020-02-12 Thread Yoshinori Sato
Tested-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-17-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson pick ed65c02993 target/rx: Add RX to SysEmuTarget pick 01372568ae tests: Add rx to

[PATCH v30 14/22] hw/intc: RX62N interrupt controller (ICUa)

2020-02-12 Thread Yoshinori Sato
This implementation supported only ICUa. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v30 01/22] MAINTAINERS: Add RX

2020-02-12 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-18-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson --- MAINTAINERS | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v30 19/22] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core

2020-02-12 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé While the VIRT machine can use different microcontrollers, the RX62N microcontroller is tied to the RX62N CPU core. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato --- hw/rx/rx-virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v30 08/22] target/rx: Disassemble rx_index_addr into a string

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson We were eliding all zero indexes. It is only ld==0 that does not have an index in the instruction. This also allows us to avoid breaking the final print into multiple pieces. Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id:

[PATCH v30 11/22] target/rx: Emit all disassembly in one prt()

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson Many of the multi-part prints have been eliminated by previous patches. Eliminate the rest of them. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-22-ys...@users.sourceforge.jp>

[PATCH v30 10/22] target/rx: Use prt_ldmi for XCHG_mr disassembly

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson Note that the ld == 3 case handled by prt_ldmi is decoded as XCHG_rr and cannot appear here. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-21-ys...@users.sourceforge.jp> Tested-by:

[PATCH v30 13/22] target/rx: Dump bytes for each insn during disassembly

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson There are so many different forms of each RX instruction that it will be very useful to be able to look at the bytes to see on which path a bug may lie. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Signed-off-by: Yoshinori Sato Message-Id:

[PATCH v30 22/22] qemu-doc.texi: Add RX section.

2020-02-12 Thread Yoshinori Sato
Describe emulated target specification. And two examples. Signed-off-by: Yoshinori Sato --- qemu-doc.texi | 44 1 file changed, 44 insertions(+) diff --git a/qemu-doc.texi b/qemu-doc.texi index a1ef6b6484..0b2173daa7 100644 --- a/qemu-doc.texi +++

[PATCH v30 05/22] target/rx: TCG helper

2020-02-12 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Message-Id: <20190616142836.10614-3-ys...@users.sourceforge.jp> Reviewed-by: Richard Henderson Message-Id: <20190607091116.49044-3-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson [PMD: Removed tlb_fill, extracted

[PATCH v30 16/22] hw/char: RX62N serial communication interface (SCI)

2020-02-12 Thread Yoshinori Sato
This module supported only non FIFO type. Hardware manual. https://www.renesas.com/us/en/doc/products/mpumcu/doc/rx_family/r01uh0033ej0140_rx62n.pdf Signed-off-by: Yoshinori Sato Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v30 18/22] hw/rx: Honor -accel qtest

2020-02-12 Thread Yoshinori Sato
From: Richard Henderson Issue an error if no kernel, no bios, and not qtest'ing. Fixes make check-qtest-rx: test/qom-test. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Yoshinori Sato Message-Id: <20190607091116.49044-16-ys...@users.sourceforge.jp> Tested-by: Philippe Mathieu-Daudé

[PATCH v30 03/22] hw/registerfields.h: Add 8bit and 16bit register macros

2020-02-12 Thread Yoshinori Sato
From: Philippe Mathieu-Daudé Some RX peripheral using 8bit and 16bit registers. Added 8bit and 16bit APIs. Signed-off-by: Yoshinori Sato Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607091116.49044-11-ys...@users.sourceforge.jp> Tested-by: Philippe

[PATCH v30 06/22] target/rx: CPU definition

2020-02-12 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato Message-Id: <20190616142836.10614-4-ys...@users.sourceforge.jp> Reviewed-by: Richard Henderson Message-Id: <20190607091116.49044-4-ys...@users.sourceforge.jp> Signed-off-by: Richard Henderson [PMD: Use newer QOM style, split cpu-qom.h, restrict access to extable

Re: [PATCH] qapi: Expand documentation for LostTickPolicy

2020-02-12 Thread Ján Tomko
On Tue, Feb 11, 2020 at 07:37:44PM +0100, Andrea Bolognani wrote: The current documentation is fairly terse and not easy to decode for someone who's not intimately familiar with the inner workings of timer devices. Expand on it by providing a somewhat verbose Perchance exorbitantly

[PATCH v3 3/4] linux-user: fix TARGET_NSIG and _NSIG uses

2020-02-12 Thread Laurent Vivier
Valid signal numbers are between 1 (SIGHUP) and SIGRTMAX. System includes define _NSIG to SIGRTMAX + 1, but QEMU (like kernel) defines TARGET_NSIG to TARGET_SIGRTMAX. Fix all the checks involving the signal range. Signed-off-by: Laurent Vivier Reviewed-by: Peter Maydell --- Notes: v2:

[PATCH v3 1/4] linux-user: add missing TARGET_SIGRTMIN for hppa

2020-02-12 Thread Laurent Vivier
This signal is defined for all other targets and we will need it later Signed-off-by: Laurent Vivier [pm: that this was actually an ABI change in the hppa kernel (at kernel version 3.17, kernel commit 1f25df2eff5b25f52c139d). Before that SIGRTMIN was 37... All our other HPPA TARGET_SIG* values

[PATCH v3 4/4] linux-user: fix use of SIGRTMIN

2020-02-12 Thread Laurent Vivier
Some RT signals can be in use by glibc, it's why SIGRTMIN (34) is generally greater than __SIGRTMIN (32). So SIGRTMIN cannot be mapped to TARGET_SIGRTMIN. Instead of swapping only SIGRTMIN and SIGRTMAX, map all the range [TARGET_SIGRTMIN ... TARGET_SIGRTMAX - X] to [__SIGRTMIN + X ...

[PATCH v3 0/4] linux-user: fix use of SIGRTMIN

2020-02-12 Thread Laurent Vivier
This series fixes the problem of the first real-time signals already in use by the glibc that are not available for the target glibc. Instead of reverting the first and last real-time signals we rely on the value provided by the glibc (SIGRTMIN) to know the first available signal and we map all

[PATCH v3 2/4] linux-user: cleanup signal.c

2020-02-12 Thread Laurent Vivier
No functional changes. Prepare the field for future fixes. Remove memset(.., 0, ...) that is useless on a static array Signed-off-by: Laurent Vivier Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell --- Notes: v2: replace i, j by target_sig, host_sig linux-user/signal.c |

[Bug 1857811] Re: qemu user static binary seems to lack support for network namespace.

2020-02-12 Thread crocket
def _configure_loopback_interface(): """ Configure the loopback interface. """ # We add some additional addresses to work around odd behavior in glibc's # getaddrinfo() implementation when the AI_ADDRCONFIG flag is set. # # For example:

[Bug 1857811] Re: qemu user static binary seems to lack support for network namespace.

2020-02-12 Thread crocket
You can obtain portage source code from https://gentoo.osuosl.org/distfiles/portage-2.3.84.tar.bz2 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1857811 Title: qemu user static binary seems to

Re: Cross-project NBD extension proposal: NBD_INFO_INIT_STATE

2020-02-12 Thread Eric Blake
On 2/12/20 6:36 AM, Richard W.M. Jones wrote: Okay, in v2, I will start with just two bits, NBD_INIT_SPARSE (entire image is sparse, nothing is allocated) and NBD_INIT_ZERO (entire image reads as zero), and save any future bits for later additions. Do we think that 16 bits is sufficient for

Re: [PATCH v5 26/26] nvme: make lba data size configurable

2020-02-12 Thread Maxim Levitsky
On Thu, 2020-02-06 at 08:24 +0100, Klaus Birkelund Jensen wrote: > On Feb 5 01:43, Keith Busch wrote: > > On Tue, Feb 04, 2020 at 10:52:08AM +0100, Klaus Jensen wrote: > > > Signed-off-by: Klaus Jensen > > > --- > > > hw/block/nvme-ns.c | 2 +- > > > hw/block/nvme-ns.h | 4 +++- > > >

Re: [PATCH v5 25/26] nvme: remove redundant NvmeCmd pointer parameter

2020-02-12 Thread Maxim Levitsky
On Tue, 2020-02-04 at 10:52 +0100, Klaus Jensen wrote: > The command struct is available in the NvmeRequest that we generally > pass around anyway. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 198 > 1 file changed, 98 insertions(+),

Re: [PATCH v5 24/26] nvme: change controller pci id

2020-02-12 Thread Maxim Levitsky
On Tue, 2020-02-04 at 10:52 +0100, Klaus Jensen wrote: > There are two reasons for changing this: > > 1. The nvme device currently uses an internal Intel device id. > > 2. Since commits "nvme: fix write zeroes offset and count" and "nvme: > support multiple namespaces" the controller

Re: Cross-project NBD extension proposal: NBD_INFO_INIT_STATE

2020-02-12 Thread Richard W.M. Jones
On Wed, Feb 12, 2020 at 06:09:11AM -0600, Eric Blake wrote: > On 2/12/20 1:27 AM, Wouter Verhelst wrote: > >Hi, > > > >On Mon, Feb 10, 2020 at 10:52:55PM +, Richard W.M. Jones wrote: > >>But anyway ... could a flag indicating that the whole image is sparse > >>be useful, either as well as

Re: [PATCH v5 23/26] pci: allocate pci id for nvme

2020-02-12 Thread Maxim Levitsky
On Tue, 2020-02-04 at 10:52 +0100, Klaus Jensen wrote: > The emulated nvme device (hw/block/nvme.c) is currently using an > internal Intel device id. > > Prepare to change that by allocating a device id under the 1b36 (Red > Hat, Inc.) vendor id. > > Signed-off-by: Klaus Jensen > --- >

Re: [PATCH v5 22/26] nvme: support multiple namespaces

2020-02-12 Thread Maxim Levitsky
On Tue, 2020-02-04 at 10:52 +0100, Klaus Jensen wrote: > This adds support for multiple namespaces by introducing a new 'nvme-ns' > device model. The nvme device creates a bus named from the device name > ('id'). The nvme-ns devices then connect to this and registers > themselves with the nvme

Re: [PATCH] console: make QMP screendump use coroutine

2020-02-12 Thread Gerd Hoffmann
Hi, > Thanks to the QMP coroutine support, the screendump handler can > trigger a graphic_hw_update(), yield and let the main loop run until > update is done. Then the handler is resumed, and the ppm_save() will > write the screen image to disk in the coroutine context (thus > non-blocking). >

Re: [PATCH] ui/cocoa: Drop workarounds for pre-10.12 OSX

2020-02-12 Thread Gerd Hoffmann
On Sat, Feb 01, 2020 at 05:05:34PM +, Peter Maydell wrote: > Our official OSX support policy covers the last two released versions. > Currently that is 10.14 and 10.15. We also may work on older versions, but > don't guarantee it. > > In commit 50290c002c045280f8d in mid-2019 we introduced

Re: [PATCH v2 0/2] ui/gtk: Fix gd_refresh_rate_millihz() when widget window is not realized

2020-02-12 Thread Gerd Hoffmann
On Sat, Feb 08, 2020 at 05:10:46PM +0100, Philippe Mathieu-Daudé wrote: > Fix bug report from Jan Kiszka: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg678130.html > https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg02260.html Added to UI queue. thanks, Gerd

[Bug 1857811] Re: qemu user static binary seems to lack support for network namespace.

2020-02-12 Thread Laurent Vivier
The interesting part in emerge.log is: 23473 socket(16,,IPPROTO_IP) = 5 23473 bind(5,274886353720,12,0,1,274889671712) = 0 23473 sendto(5,275542232672,38,0,274886353960,12) = -1 errno=95 (Operation not supported) 23473 close(5) = 0 Unable to configure loopback interface: Operation not

Re: [PATCH] nbd: Fix regression with multiple meta contexts

2020-02-12 Thread Laurent Vivier
Le 12/02/2020 à 13:10, Eric Blake a écrit : > On 2/12/20 3:24 AM, Laurent Vivier wrote: >> Le 06/02/2020 à 18:38, Eric Blake a écrit : >>> Detected by a hang in the libnbd testsuite.  If a client requests >>> multiple meta contexts (both base:allocation and qemu:dirty-bitmap:x) >>> at the same

Re: [PATCH] nbd: Fix regression with multiple meta contexts

2020-02-12 Thread Eric Blake
On 2/12/20 3:24 AM, Laurent Vivier wrote: Le 06/02/2020 à 18:38, Eric Blake a écrit : Detected by a hang in the libnbd testsuite. If a client requests multiple meta contexts (both base:allocation and qemu:dirty-bitmap:x) at the same time, our attempt to silence a false-positive warning about a

Re: Cross-project NBD extension proposal: NBD_INFO_INIT_STATE

2020-02-12 Thread Eric Blake
On 2/12/20 1:27 AM, Wouter Verhelst wrote: Hi, On Mon, Feb 10, 2020 at 10:52:55PM +, Richard W.M. Jones wrote: But anyway ... could a flag indicating that the whole image is sparse be useful, either as well as NBD_INIT_SPARSE or instead of it? You could use it to avoid an initial disk

Re: [PATCH v5 21/26] nvme: add support for scatter gather lists

2020-02-12 Thread Maxim Levitsky
On Tue, 2020-02-04 at 10:52 +0100, Klaus Jensen wrote: > For now, support the Data Block, Segment and Last Segment descriptor > types. > > See NVM Express 1.3d, Section 4.4 ("Scatter Gather List (SGL)"). > > Signed-off-by: Klaus Jensen > Acked-by: Fam Zheng > --- > block/nvme.c | 18

<    1   2   3   4   >