Re: [Qemu-devel] [PATCH for-4.1] hw/arm/sbsa-ref: Remove unnecessary check for secure_sysmem == NULL

2019-07-05 Thread Philippe Mathieu-Daudé
On 7/4/19 4:20 PM, Peter Maydell wrote: > In the virt machine, we support TrustZone being either present or > absent, and so the code must deal with the secure_sysmem pointer > possibly being NULL. In the sbsa-ref machine, TrustZone is always > present, but some code and comments copied from virt

[Qemu-devel] [PATCH v22 07/22] target/rx: RX disassembler

2019-07-05 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

[Qemu-devel] [PATCH v22 17/22] hw/rx: RX Target hardware definition

2019-07-05 Thread Yoshinori Sato
rx62n - RX62N cpu. rx-virt - RX QEMU virtual target. v21 changes. rx_load_image move to rx-virt.c 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:

[Qemu-devel] [PATCH v22 21/22] BootLinuxConsoleTest: Test the RX-Virt machine

2019-07-05 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

[Qemu-devel] [PATCH v22 04/22] target/rx: TCG translation

2019-07-05 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:

[Qemu-devel] [PATCH v22 20/22] Add rx-softmmu

2019-07-05 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

[Qemu-devel] [PATCH v22 14/22] hw/intc: RX62N interrupt controller (ICUa)

2019-07-05 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:

[Qemu-devel] [PATCH v22 06/22] target/rx: CPU definition

2019-07-05 Thread Yoshinori Sato
v21 changes Add cpu-param.h Remove CPU_COMMON rx_load_image move to rx-virt. 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

[Qemu-devel] [PATCH v22 11/22] target/rx: Emit all disassembly in one prt()

2019-07-05 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>

[Qemu-devel] [PATCH v22 16/22] hw/char: RX62N serial communication interface (SCI)

2019-07-05 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:

[Qemu-devel] [PATCH v22 13/22] target/rx: Dump bytes for each insn during disassembly

2019-07-05 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:

[Qemu-devel] [PATCH v22 12/22] target/rx: Collect all bytes during disassembly

2019-07-05 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

[Qemu-devel] [PATCH v22 18/22] hw/rx: Honor -accel qtest

2019-07-05 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é

[Qemu-devel] [PATCH v22 08/22] target/rx: Disassemble rx_index_addr into a string

2019-07-05 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:

[Qemu-devel] [PATCH v22 22/22] target/rx: remove unused functions.

2019-07-05 Thread Yoshinori Sato
Signed-off-by: Yoshinori Sato --- target/rx/monitor.c | 38 -- target/rx/Makefile.objs | 1 - 2 files changed, 39 deletions(-) delete mode 100644 target/rx/monitor.c diff --git a/target/rx/monitor.c b/target/rx/monitor.c deleted file mode 100644 index

[Qemu-devel] [PATCH v22 05/22] target/rx: TCG helper

2019-07-05 Thread Yoshinori Sato
v21 changes Use cpu_env 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:

[Qemu-devel] [PATCH v22 09/22] target/rx: Replace operand with prt_ldmi in disassembler

2019-07-05 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:

[Qemu-devel] [PATCH v22 00/22] Add RX archtecture support

2019-07-05 Thread Yoshinori Sato
Hello. This patch series is added Renesas RX target emulation. Changes for v21. rebase latest master. Remove unneeded hmp_info_tlb. Chanegs for v20. Reorderd patches. Squashed v19 changes. Changes for v19. Follow tcg changes. Cleanup cpu.c. simplify rx_cpu_class_by_name and rx_load_image move

[Qemu-devel] [PATCH v22 03/22] hw/registerfields.h: Add 8bit and 16bit register macros

2019-07-05 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

[Qemu-devel] [PATCH v22 19/22] hw/rx: Restrict the RX62N microcontroller to the RX62N CPU core

2019-07-05 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 | 8 1 file changed, 8 insertions(+) diff --git

[Qemu-devel] [PATCH v22 10/22] target/rx: Use prt_ldmi for XCHG_mr disassembly

2019-07-05 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:

[Qemu-devel] [PATCH v22 02/22] qemu/bitops.h: Add extract8 and extract16

2019-07-05 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

[Qemu-devel] [PATCH v22 01/22] MAINTAINERS: Add RX

2019-07-05 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

Re: [Qemu-devel] [PATCH] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Paolo Bonzini
On 04/07/19 20:03, Julio Montes wrote: > How about a new header file with all devices? (see below patch) Yes, looks good. Paolo > --- > Makefile.target | 5 + > hw/i386/pc_piix.c | 11 --- > include/qemu/osdep.h | 1 + > scripts/create_config | 2 ++ > 4 files

Re: [Qemu-devel] [PATCH] hw/i386: Fix linker error when ISAPC is disabled

2019-07-05 Thread Paolo Bonzini
On 04/07/19 20:03, Julio Montes wrote: > How about a new header file with all devices? (see below patch) Yes, looks good. Paolo > --- > Makefile.target | 5 + > hw/i386/pc_piix.c | 11 --- > include/qemu/osdep.h | 1 + > scripts/create_config | 2 ++ > 4 files

Re: [Qemu-devel] [RFC PATCH-for-4.2] tracing: Allow to tune tracing options via the environment

2019-07-05 Thread Stefan Hajnoczi
On Thu, Jul 04, 2019 at 11:28:37AM +0100, Daniel P. Berrangé wrote: > On Thu, Jul 04, 2019 at 11:24:57AM +0100, Stefan Hajnoczi wrote: > > On Wed, Jul 03, 2019 at 06:25:01PM +0100, Daniel P. Berrangé wrote: > > > On Wed, Jul 03, 2019 at 07:10:05PM +0200, Philippe Mathieu-Daudé wrote: > > > > @@

Re: [Qemu-devel] question:about introduce a new feature named “I/O hang”

2019-07-05 Thread Kevin Wolf
Am 04.07.2019 um 17:16 hat wangjie (P) geschrieben: > Hi, everybody: > > I developed a feature named "I/O hang",my intention is to solve the problem > like that: > If the backend storage media of VM disk is far-end storage like IPSAN or > FCSAN, storage net link will always disconnection and >

Re: [Qemu-devel] [Qemu-block] [RFC, v1] Namespace Management Support

2019-07-05 Thread Klaus Birkelund
On Tue, Jul 02, 2019 at 10:39:36AM -0700, Matt Fitzpatrick wrote: > Adding namespace management support to the nvme device. Namespace creation > requires contiguous block space for a simple method of allocation. > > I wrote this a few years ago based on Keith's fork and nvmeqemu fork and > have

Re: [Qemu-devel] [PATCH] usbredir: fix buffer-overflow on migration load

2019-07-05 Thread Marc-André Lureau
Hi On Fri, Jul 5, 2019 at 11:40 AM Marc-André Lureau wrote: > > NO_INTERFACE_INFO (255) is used to indicate no info. > > /home/elmarco/src/qemu/hw/usb/redirect.c:1504:71: runtime error: index 32 out > of bounds for type 'uint8_t [32]' > /home/elmarco/src/qemu/hw/usb/redirect.c:1503:71: runtime

Re: [Qemu-devel] [PULL 41/46] target/arm/vfp_helper: Extract vfp_set_fpscr_to_host()

2019-07-05 Thread Laurent Desnogues
Hello, On Tue, Jul 2, 2019 at 4:18 AM Peter Maydell wrote: > > From: Philippe Mathieu-Daudé > > The vfp_set_fpscr() helper contains code specific to the host > floating point implementation (here the SoftFloat library). > Extract this code to vfp_set_fpscr_to_host(). > > Signed-off-by: Philippe

[Qemu-devel] [PATCH 16/16] nvme: support multiple namespaces

2019-07-05 Thread Klaus Birkelund Jensen
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 device. This changes how an nvme device is created. Example with

[Qemu-devel] [PATCH] usbredir: fix buffer-overflow on migration load

2019-07-05 Thread Marc-André Lureau
NO_INTERFACE_INFO (255) is used to indicate no info. /home/elmarco/src/qemu/hw/usb/redirect.c:1504:71: runtime error: index 32 out of bounds for type 'uint8_t [32]' /home/elmarco/src/qemu/hw/usb/redirect.c:1503:71: runtime error: index 32 out of bounds for type 'uint8_t [32]'

[Qemu-devel] [PATCH 02/16] nvme: move device parameters to separate struct

2019-07-05 Thread Klaus Birkelund Jensen
Move device configuration parameters to separate struct to make it explicit what is configurable and what is set internally. Also, clean up some includes. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 54 +++-- hw/block/nvme.h | 16

[Qemu-devel] [PATCH 13/16] nvme: simplify dma/cmb mappings

2019-07-05 Thread Klaus Birkelund Jensen
Instead of handling both QSGs and IOVs in multiple places, simply use QSGs everywhere by assuming that the request does not involve the controller memory buffer (CMB). If the request is found to involve the CMB, convert the QSG to an IOV and issue the I/O. The QSG is converted to an IOV by the dma

[Qemu-devel] [PATCH 08/16] nvme: refactor device realization

2019-07-05 Thread Klaus Birkelund Jensen
Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 196 ++-- hw/block/nvme.h | 11 +++ 2 files changed, 152 insertions(+), 55 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 4b9ff51868c0..eb6af6508e2d 100644 ---

[Qemu-devel] [PATCH 15/16] nvme: support scatter gather lists

2019-07-05 Thread Klaus Birkelund Jensen
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 Birkelund Jensen --- block/nvme.c | 18 +- hw/block/nvme.c | 390 +++---

[Qemu-devel] [PATCH 14/16] nvme: support multiple block requests per request

2019-07-05 Thread Klaus Birkelund Jensen
Currently, the device only issues a single block backend request per NVMe request, but as we move towards supporting metadata (and discontiguous vector requests supported by OpenChannel 2.0) it will be required to issue multiple block backend requests per NVMe request. With this patch the NVMe

[Qemu-devel] [PATCH 05/16] nvme: populate the mandatory subnqn and ver fields

2019-07-05 Thread Klaus Birkelund Jensen
Required for compliance with NVMe revision 1.2.1 or later. See NVM Express 1.2.1, Section 5.11 ("Identify command"), Figure 90 and Section 7.9 ("NVMe Qualified Names"). This also bumps the supported version to 1.2.1. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 8 +++- 1

[Qemu-devel] [PATCH 11/16] nvme: add missing mandatory Features

2019-07-05 Thread Klaus Birkelund Jensen
Add support for returning a resonable response to Get/Set Features of mandatory features. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 49 --- hw/block/trace-events | 2 ++ include/block/nvme.h | 3 ++- 3 files changed, 50

[Qemu-devel] [PATCH 06/16] nvme: support completion queue in cmb

2019-07-05 Thread Klaus Birkelund Jensen
While not particularly useful, allow completion queues in the controller memory buffer. Could be useful for testing. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c

[Qemu-devel] [PATCH 09/16] nvme: support Asynchronous Event Request command

2019-07-05 Thread Klaus Birkelund Jensen
Required for compliance with NVMe revision 1.2.1. See NVM Express 1.2.1, Section 5.2 ("Asynchronous Event Request command"). Modified from Keith's qemu-nvme tree. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 88 ++- hw/block/nvme.h

[Qemu-devel] [PATCH 10/16] nvme: support Get Log Page command

2019-07-05 Thread Klaus Birkelund Jensen
Add support for the Get Log Page command and stub/dumb implementations of the mandatory Error Information, SMART/Health Information and Firmware Slot Information log pages. Required for compliance with NVMe revision 1.2.1. See NVM Express 1.2.1, Section 5.10 ("Get Log Page command").

[Qemu-devel] [PATCH 07/16] nvme: support Abort command

2019-07-05 Thread Klaus Birkelund Jensen
Required for compliance with NVMe revision 1.2.1. See NVM Express 1.2.1, Section 5.1 ("Abort command"). Extracted from Keith's qemu-nvme tree. Modified to only consider queued and not executing commands. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 56

[Qemu-devel] [PATCH 03/16] nvme: fix lpa field

2019-07-05 Thread Klaus Birkelund Jensen
The Log Page Attributes in the Identify Controller structure indicates that the controller supports the SMART / Health Information log page on a per namespace basis. It does not, given that neither this log page or the Get Log Page command is implemented. Signed-off-by: Klaus Birkelund Jensen

[Qemu-devel] [PATCH 12/16] nvme: bump supported NVMe revision to 1.3d

2019-07-05 Thread Klaus Birkelund Jensen
Add the new Namespace Identification Descriptor List (CNS 03h) and track creation of queues to enable the controller to return Command Sequence Error if Set Features is called for Number of Queues after any queues have been created. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c

[Qemu-devel] [PATCH 01/16] nvme: simplify namespace code

2019-07-05 Thread Klaus Birkelund Jensen
The device model currently only supports a single namespace and also specifically sets num_namespaces to 1. Take this into account and simplify the code. Signed-off-by: Klaus Birkelund Jensen --- hw/block/nvme.c | 26 +++--- hw/block/nvme.h | 2 +- 2 files changed, 8

[Qemu-devel] [PATCH 00/16] nvme: support NVMe v1.3d, SGLs and multiple namespaces

2019-07-05 Thread Klaus Birkelund Jensen
Matt Fitzpatrick's post ("[RFC,v1] Namespace Management Support") pushed me to finally get my head out of my a** and post this series. This is basically a follow-up to my previous series ("nvme: v1.3, sgls, metadata and new 'ocssd' device"), but I'm not tagging it as a v2 because the patches for

[Qemu-devel] [PATCH 04/16] nvme: add missing fields in identify controller

2019-07-05 Thread Klaus Birkelund Jensen
Not used by the device model but added for completeness. See NVM Express 1.2.1, Section 5.11 ("Identify command"), Figure 90. Signed-off-by: Klaus Birkelund Jensen --- include/block/nvme.h | 34 +- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] doc: document that the monitor console is a privileged control interface

2019-07-05 Thread Markus Armbruster
Daniel P. Berrangé writes: > A supposed exploit of QEMU was recently announced as CVE-2019-12928 > claiming that the monitor console was insecure because the "migrate" > comand enabled arbitrary command execution for a remote attacker. > > For this to be a flaw the user launching QEMU must have

<    1   2   3   4