Re: [PATCH v6 38/42] nvme: support multiple namespaces

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:59, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus 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

Re: [PATCH v6 36/42] nvme: add support for scatter gather lists

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:58, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus 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)"). > > > >

Re: [PATCH v6 35/42] nvme: handle dma errors

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:58, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Handling DMA errors gracefully is required for the device to pass the > > block/011 test ("disable PCI device while doing I/O") in the blktests > > suite. > > > > With

Re: [PATCH v6 29/42] nvme: refactor request bounds checking

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:56, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 28 ++-- > > 1 file changed, 22 insertions(+), 6 deletions(-) > > > > diff --git

Re: [PATCH v6 32/42] nvme: allow multiple aios per command

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:57, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > This refactors how the device issues asynchronous block backend > > requests. The NvmeRequest now holds a queue of NvmeAIOs that are > > associated with the command.

Re: [PATCH v6 24/42] nvme: remove redundant has_sg member

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:45, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Remove the has_sg member from NvmeRequest since it's redundant. > > To be honest this patch also replaces the dma_acct_start with block_acct_start > which looks right

Re: [PATCH v6 31/42] nvme: add check for prinfo

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:57, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Check the validity of the PRINFO field. > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 50 --- > >

Re: [PATCH v6 23/42] nvme: add mapping helpers

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:45, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add nvme_map_addr, nvme_map_addr_cmb and nvme_addr_to_cmb helpers and > > use them in nvme_map_prp. > > > > This fixes a bug where in the case of a CMB transfer, the

Re: [PATCH v6 14/42] nvme: add missing mandatory features

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:41, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for returning a resonable response to Get/Set Features of > > mandatory features. > > > > Signed-off-by: Klaus Jensen > > Acked-by: Keith Busch > > --- >

Re: [PATCH v6 12/42] nvme: add support for the get log page command

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:40, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add support for the Get Log Page command and basic implementations of > > the mandatory Error Information, SMART / Health Information and Firmware > > Slot Information

Re: [PATCH v6 19/42] nvme: enforce valid queue creation sequence

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:43, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:29 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Support returning Command Sequence Error if Set Features on Number of > > Queues is called after queues have been created. > > > > Signed-off-by: Klaus Jensen > > ---

Re: [PATCH v6 10/42] nvme: refactor device realization

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:40, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > This patch splits up nvme_realize into multiple individual functions, > > each initializing a different subset of the device. > > > > Signed-off-by: Klaus Jensen > >

Re: [PATCH v6 06/42] nvme: add identify cns values in header

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:37, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/hw/block/nvme.c

Re: [PATCH v6 09/42] nvme: add max_ioqpairs device parameter

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:39, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > The num_queues device paramater has a slightly confusing meaning because > > it accounts for the admin queue pair which is not really optional. > > Secondly, it is

Re: [PATCH v6 11/42] nvme: add temperature threshold feature

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:40, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > It might seem wierd to implement this feature for an emulated device, > > but it is mandatory to support and the feature is useful for testing > > asynchronous event

Re: [PATCH v6 07/42] nvme: refactor nvme_addr_read

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:38, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Pull the controller memory buffer check to its own function. The check > > will be used on its own in later patches. > > > > Signed-off-by: Klaus Jensen > > Acked-by:

Re: [PATCH v6 04/42] nvme: bump spec data structures to v1.3

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:37, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Add missing fields in the Identify Controller and Identify Namespace > > data structures to bring them in line with NVMe v1.3. > > > > This also adds data structures

Re: [PATCH v6 05/42] nvme: use constant for identify data size

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:37, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Signed-off-by: Klaus Jensen > > --- > > hw/block/nvme.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/hw/block/nvme.c

Re: [PATCH v6 01/42] nvme: rename trace events to nvme_dev

2020-03-30 Thread Klaus Birkelund Jensen
On Mar 25 12:36, Maxim Levitsky wrote: > On Mon, 2020-03-16 at 07:28 -0700, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Change the prefix of all nvme device related trace events to 'nvme_dev' > > to not clash with trace events from the nvme block driver. > > > > Signed-off-by: Klaus

Re: [PATCH RFC 8/9] target/riscv: Handler KVM_EXIT_RISCV_SBI exit

2020-03-30 Thread Anup Patel
On Fri, Mar 13, 2020 at 9:23 AM Yifei Jiang wrote: > > Use char-fe handler console sbi call, which implement early > console io while apply 'earlycon=sbi' into kernel parameters. > > Signed-off-by: Yifei Jiang > Signed-off-by: Yipeng Yin > --- > target/riscv/kvm.c | 54

Re: [PATCH] spapr: Don't allow unplug of NVLink2 devices

2020-03-30 Thread Alexey Kardashevskiy
On 31/03/2020 14:27, David Gibson wrote: > Currently, we can't properly handle unplug of NVLink2 devices, because we > don't have code to tear down their special memory resources. There's not > a lot of impetus to implement that: since hardware NVLink2 devices can't > be hot unplugged, the

RE: [PATCH v2 04/22] hw/iommu: introduce HostIOMMUContext

2020-03-30 Thread Liu, Yi L
Hi Eric, > From: Auger Eric < eric.au...@redhat.com > > Sent: Tuesday, March 31, 2020 1:23 AM > To: Liu, Yi L ; qemu-devel@nongnu.org; > Subject: Re: [PATCH v2 04/22] hw/iommu: introduce HostIOMMUContext > > Yi, > > On 3/30/20 6:24 AM, Liu Yi L wrote: > > Currently, many platform vendors

[PULL for-5.0 10/10] decodetree: Use Python3 floor division operator

2020-03-30 Thread Richard Henderson
From: Philippe Mathieu-Daudé This script started using Python2, where the 'classic' division operator returns the floor result. In commit 3d004a371 we started to use Python3, where the division operator returns the float result ('true division'). To keep the same behavior, use the 'floor

[PULL for-5.0 09/10] tcg/i386: Fix INDEX_op_dup2_vec

2020-03-30 Thread Richard Henderson
We were only constructing the 64-bit element, and not replicating the 64-bit element across the rest of the vector. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.inc.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git

[PULL for-5.0 08/10] target/mips: Fix loongson multimedia condition instructions

2020-03-30 Thread Richard Henderson
From: Jiaxun Yang Loongson multimedia condition instructions were previously implemented as write 0 to rd due to lack of documentation. So I just confirmed with Loongson about their encoding and implemented them correctly. Signed-off-by: Jiaxun Yang Acked-by: Huacai Chen Reviewed-by: Richard

[PULL for-5.0 04/10] configure: Always detect -no-pie toolchain support

2020-03-30 Thread Richard Henderson
The CFLAGS_NOPIE and LDFLAGS_NOPIE variables are used in pc-bios/optionrom/Makefile, which has nothing to do with the PIE setting of the main qemu executables. This overrides any operating system default to build all executables as PIE, which is important for ROMs. Reviewed-by: Philippe

[PULL for-5.0 06/10] configure: Override the os default with --disable-pie

2020-03-30 Thread Richard Henderson
Some distributions, e.g. Ubuntu 19.10, enable PIE by default. If for some reason one wishes to build a non-pie binary, we must provide additional options to override. At the same time, reorg the code to an elif chain. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

[PATCH for-5.0] tcg/i386: Fix INDEX_op_dup2_vec

2020-03-30 Thread Richard Henderson
We were only constructing the 64-bit element, and not replicating the 64-bit element across the rest of the vector. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- This bug is visible running RISU for aarch64 on x86_32. r~ --- tcg/i386/tcg-target.inc.c | 10 +++--- 1

[PULL for-5.0 02/10] tcg: Remove softmmu code_gen_buffer fixed address

2020-03-30 Thread Richard Henderson
The commentary talks about "in concert with the addresses assigned in the relevant linker script", except there is no linker script for softmmu, nor has there been for some time. (Do not confuse the user-only linker script editing that was removed in the previous patch, because user-only does not

[PULL for-5.0 05/10] configure: Unnest detection of -z, relro and -z, now

2020-03-30 Thread Richard Henderson
There is nothing about these options that is related to PIE. Use them unconditionally. Reviewed-by: Alex Bennée Reviewed-by: Fangrui Song Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- v2: Do not split into two tests. v3: Update to QEMU_LDFLAGS. --- configure | 9

[PULL for-5.0 07/10] configure: Support -static-pie if requested

2020-03-30 Thread Richard Henderson
Recent toolchains support static and pie at the same time. As with normal dynamic builds, allow --static to default to PIE if supported by the toolchain. Allow --enable/--disable-pie to override the default. Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- v2: Fix --disable-pie

[PULL for-5.0 00/10] tcg patch queue

2020-03-30 Thread Richard Henderson
repository at: https://github.com/rth7680/qemu.git tags/pull-tcg-20200330 for you to fetch changes up to b412378785c1bd95e3461c1373dd8938bc54fb4e: decodetree: Use Python3 floor division operator (2020-03-30 11:44:04 -0700) Improve PIE

[PULL for-5.0 01/10] configure: Drop adjustment of textseg

2020-03-30 Thread Richard Henderson
This adjustment was random and unnecessary. The user mode startup code in probe_guest_base() will choose a value for guest_base that allows the host qemu binary to not conflict with the guest binary. With modern distributions, this isn't even used, as the default is PIE, which does the same job

[PULL for-5.0 03/10] configure: Do not force pie=no for non-x86

2020-03-30 Thread Richard Henderson
PIE is supported on many other hosts besides x86. The default for non-x86 is now the same as x86: pie is used if supported, and may be forced via --enable/--disable-pie. The original commit (40d6444e91c) said: "Non-x86 are not changed, as they require TCG changes" but I think that's wrong --

[PATCH] spapr: Don't allow unplug of NVLink2 devices

2020-03-30 Thread David Gibson
Currently, we can't properly handle unplug of NVLink2 devices, because we don't have code to tear down their special memory resources. There's not a lot of impetus to implement that: since hardware NVLink2 devices can't be hot unplugged, the guest side drivers don't usually support unplug anyway.

Re: [RFC for-5.1 4/4] spapr: Don't allow unplug of NVLink2 devices

2020-03-30 Thread David Gibson
On Sat, Mar 28, 2020 at 11:32:18PM +1100, Alexey Kardashevskiy wrote: > > > On 26/03/2020 16:40, David Gibson wrote: > > Currently, we can't properly handle unplug of NVLink2 devices, because we > > don't have code to tear down their special memory resources. There's not > > a lot of impetus to

Re: [PATCH 2/5] ppc/pnv: Add support for NMI interface

2020-03-30 Thread David Gibson
On Tue, Mar 31, 2020 at 02:07:42PM +1100, Alexey Kardashevskiy wrote: > > > On 26/03/2020 01:41, Nicholas Piggin wrote: > > This implements the NMI interface for the PNV machine, similarly to > > commit 3431648272d ("spapr: Add support for new NMI interface") for > > SPAPR. > > > >

Re: [PATCH 2/5] ppc/pnv: Add support for NMI interface

2020-03-30 Thread Alexey Kardashevskiy
On 26/03/2020 01:41, Nicholas Piggin wrote: > This implements the NMI interface for the PNV machine, similarly to > commit 3431648272d ("spapr: Add support for new NMI interface") for > SPAPR. > > Signed-off-by: Nicholas Piggin > --- > hw/ppc/pnv.c | 30 +- > 1

Re: [PATCH v2] qtest: add tulip test case

2020-03-30 Thread Jason Wang
On 2020/3/30 下午10:52, Li Qiang wrote: The tulip networking card emulation has an OOB issue in 'tulip_copy_tx_buffers' when the guest provide malformed descriptor. This test will trigger a ASAN heap overflow crash. To trigger this issue we can construct the data as following: 1. construct a

Re: [PATCH 0/4] spapr: Get rid of CAS reboot flag

2020-03-30 Thread Alexey Kardashevskiy
On 31/03/2020 11:44, David Gibson wrote: > On Wed, Mar 25, 2020 at 04:25:24PM +0100, Greg Kurz wrote: >> The CAS reboot flag was introduced in QEMU 2.10 to allow the guest >> to be presented a new boot-time device tree after CAS negotiation. >> CAS-generated resets rely on

RE: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Zhao, Yan Y
> -Original Message- > From: kvm-ow...@vger.kernel.org On Behalf > Of Alex Williamson > Sent: Tuesday, March 31, 2020 10:38 AM > To: Zhao, Yan Y > Cc: Kirti Wankhede ; c...@nvidia.com; Tian, Kevin > ; Yang, Ziye ; Liu, Changpeng > ; Liu, Yi L ; > mlevi...@redhat.com;

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Alex Williamson
On Mon, 30 Mar 2020 21:16:21 -0400 Yan Zhao wrote: > On Tue, Mar 31, 2020 at 09:12:59AM +0800, Alex Williamson wrote: > > On Mon, 30 Mar 2020 20:50:47 -0400 > > Yan Zhao wrote: > > > > > On Tue, Mar 31, 2020 at 08:53:47AM +0800, Alex Williamson wrote: > > > > On Mon, 30 Mar 2020 19:51:31

Re: [PATCH] hw/vfio: let readonly flag take effect for mmaped regions

2020-03-30 Thread Yan Zhao
On Mon, Mar 30, 2020 at 10:59:23PM +0800, Alex Williamson wrote: > On Mon, 30 Mar 2020 02:34:02 -0400 > Yan Zhao wrote: > > > On Mon, Mar 30, 2020 at 09:35:27AM +0800, Yan Zhao wrote: > > > On Sat, Mar 28, 2020 at 01:25:37AM +0800, Alex Williamson wrote: > > > > On Fri, 27 Mar 2020 11:19:34

Re: [PATCH] i386: hvf: Reset IRQ inhibition after moving RIP

2020-03-30 Thread Cameron Esfahani via
Reviewed-by: Cameron Esfahani LGTM. Cameron Esfahani di...@apple.com "There are times in the life of a nation when the only place a decent man can find himself is in prison." > On Mar 28, 2020, at 10:44 AM, Roman Bolshakov wrote: > > The sequence of instructions exposes an issue: > sti

[Bug 1868116] Re: QEMU monitor no longer works

2020-03-30 Thread Bug Watch Updater
** Changed in: qemu (Debian) Status: Unknown => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1868116 Title: QEMU monitor no longer works Status in QEMU: New Status in qemu package

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Yan Zhao
On Tue, Mar 31, 2020 at 09:12:59AM +0800, Alex Williamson wrote: > On Mon, 30 Mar 2020 20:50:47 -0400 > Yan Zhao wrote: > > > On Tue, Mar 31, 2020 at 08:53:47AM +0800, Alex Williamson wrote: > > > On Mon, 30 Mar 2020 19:51:31 -0400 > > > Yan Zhao wrote: > > > > > > > On Mon, Mar 30, 2020 at

RE: [PATCH v4 2/2] net/colo-compare.c: handling of the full primary or secondary queue

2020-03-30 Thread Zhang, Chen
> Subject: [PATCH v4 2/2] net/colo-compare.c: handling of the full primary or > secondary queue > > The pervious handling of the full primary or queue is only dropping the > packet. If there are lots of clients to the guest VM, the "drop" will lead to > the > lost of the networking connection

RE: [PATCH v4 1/2] net/colo-compare.c: Fix memory leak in packet_enqueue()

2020-03-30 Thread Zhang, Chen
> -Original Message- > From: Derek Su > Sent: Saturday, March 28, 2020 8:47 PM > To: qemu-devel@nongnu.org > Cc: Zhang, Chen ; lizhij...@cn.fujitsu.com; > jasow...@redhat.com; ctch...@qnap.com; chy...@qnap.com; > jwsu1...@gmail.com; Derek Su > Subject: [PATCH v4 1/2]

Re: [PATCH 4/7] target/ppc: Introduce ppc_radix64_xlate() for Radix tree translation

2020-03-30 Thread David Gibson
On Mon, Mar 30, 2020 at 05:34:40PM +0200, Cédric Le Goater wrote: > >>> +/* No valid pte or access denied due to protection */ > >>> +if (cause_excp) { > >>> +ppc_radix64_raise_si(cpu, rwx, eaddr, fault_cause); > >>> +} > >>> +return 1; > >>> +} >

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Alex Williamson
On Mon, 30 Mar 2020 20:50:47 -0400 Yan Zhao wrote: > On Tue, Mar 31, 2020 at 08:53:47AM +0800, Alex Williamson wrote: > > On Mon, 30 Mar 2020 19:51:31 -0400 > > Yan Zhao wrote: > > > > > On Mon, Mar 30, 2020 at 09:49:21PM +0800, Kirti Wankhede wrote: > > > > > > > > > > > > On 3/30/2020

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Yan Zhao
On Tue, Mar 31, 2020 at 08:53:47AM +0800, Alex Williamson wrote: > On Mon, 30 Mar 2020 19:51:31 -0400 > Yan Zhao wrote: > > > On Mon, Mar 30, 2020 at 09:49:21PM +0800, Kirti Wankhede wrote: > > > > > > > > > On 3/30/2020 8:54 AM, Yan Zhao wrote: > > > > On Fri, Mar 27, 2020 at 01:28:13PM

Re: [PATCH 3/7] target/ppc: Assert if HV mode is set when running under a pseries machine

2020-03-30 Thread David Gibson
On Mon, Mar 30, 2020 at 11:49:42AM +0200, Cédric Le Goater wrote: > Signed-off-by: Suraj Jitindar Singh > Signed-off-by: Cédric Le Goater Applied to ppc-for-5.1. > --- > target/ppc/mmu-radix64.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/target/ppc/mmu-radix64.c

Re: [PATCH 1/7] target/ppc: Enforce that the root page directory size must be at least 5

2020-03-30 Thread David Gibson
On Mon, Mar 30, 2020 at 11:49:40AM +0200, Cédric Le Goater wrote: > From: Suraj Jitindar Singh > > According to the ISA the root page directory size of a radix tree for > either process- or partition-scoped translation must be >= 5. > > Thus add this to the list of conditions checked when

Re: [PATCH 2/7] target/ppc: Introduce a relocation bool in ppc_radix64_handle_mmu_fault()

2020-03-30 Thread David Gibson
On Mon, Mar 30, 2020 at 11:49:41AM +0200, Cédric Le Goater wrote: > It will ease the introduction of new routines for partition-scoped > Radix translation. > > Signed-off-by: Suraj Jitindar Singh > Signed-off-by: Cédric Le Goater Applied to ppc-for-5.1. > --- > target/ppc/mmu-radix64.c | 5

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Alex Williamson
On Mon, 30 Mar 2020 19:51:31 -0400 Yan Zhao wrote: > On Mon, Mar 30, 2020 at 09:49:21PM +0800, Kirti Wankhede wrote: > > > > > > On 3/30/2020 8:54 AM, Yan Zhao wrote: > > > On Fri, Mar 27, 2020 at 01:28:13PM +0800, Kirti Wankhede wrote: > > >> Hit send button little early. > > >> > > >>

Re: [PATCH 0/4] spapr: Get rid of CAS reboot flag

2020-03-30 Thread David Gibson
On Wed, Mar 25, 2020 at 04:25:24PM +0100, Greg Kurz wrote: > The CAS reboot flag was introduced in QEMU 2.10 to allow the guest > to be presented a new boot-time device tree after CAS negotiation. > CAS-generated resets rely on qemu_system_reset_request() which has > the particularity of dropping

Re: [PATCH 3/5] nmi: add MCE class for implementing machine check injection commands

2020-03-30 Thread David Gibson
On Thu, Mar 26, 2020 at 12:41:45AM +1000, Nicholas Piggin wrote: > Like commit 9cb805fd26 ("cpus: Define callback for QEMU "nmi" command") > this implements a machine check injection command framework and defines > a monitor command for ppc. > > Signed-off-by: Nicholas Piggin So, AFAICT, both

Re: Qemu TCG Plugins - how to access guest registers?

2020-03-30 Thread Benjamin
On Mon, Mar 30, 2020 at 1:37 PM Alex Bennée wrote: > > Benjamin writes: > > > Thanks for your quick response. > > > > On Mon, Mar 30, 2020 at 9:15 AM Alex Bennée > wrote: > > > >> > >> Lukas Straub writes: > >> > >> >> My question is, how do I access the guest memory and registers from > the

Re: [PATCH v17 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Yan Zhao
On Tue, Mar 31, 2020 at 05:19:09AM +0800, Alex Williamson wrote: > On Mon, 30 Mar 2020 22:20:41 +0530 > Kirti Wankhede wrote: > > > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > > - Start dirty pages tracking while migration is active > > - Stop dirty pages tracking. > > - Get dirty

[PATCH v1 3/3] hvf: Support AVX512 guests on capable hardware

2020-03-30 Thread Cameron Esfahani via
macOS lazily enables AVX512. Explicitly enable it if the processor supports it. cpu_x86_cpuid() tries to handle OSXSAVE but refers to env->cr[4] for the guest copy of CR4. HVF doesn't support caching CPUID values like KVM, so we need to track it ourselves. Signed-off-by: Cameron Esfahani ---

[PATCH v1 1/3] hvf: use standard CR0 and CR4 register definitions

2020-03-30 Thread Cameron Esfahani via
Signed-off-by: Cameron Esfahani --- target/i386/cpu.h | 2 ++ target/i386/hvf/hvf.c | 1 + target/i386/hvf/vmx.h | 15 --- target/i386/hvf/x86.c | 6 +++--- target/i386/hvf/x86.h | 34 -- target/i386/hvf/x86_mmu.c | 2

[PATCH v1 0/3] hvf: Support AVX512 guests and cleanup

2020-03-30 Thread Cameron Esfahani via
HVF had its own copy of the CR0 and CR4 register definitions. Remove them in favor of the definitions in target/i386/cpu.h. Change long mode enter and exit code to be clearer. Support AVX512 guests on capable hardware. This involves two separate changes: - Correctly manage the OSXSAVE bit in

[PATCH v1 2/3] hvf: Make long mode enter and exit code clearer.

2020-03-30 Thread Cameron Esfahani via
Signed-off-by: Cameron Esfahani --- target/i386/hvf/vmx.h | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/target/i386/hvf/vmx.h b/target/i386/hvf/vmx.h index 8ec2e6414e..1a1b150c97 100644 --- a/target/i386/hvf/vmx.h +++ b/target/i386/hvf/vmx.h @@ -121,6 +121,7 @@

[PATCH v10 09/14] iotests: limit line length to 79 chars

2020-03-30 Thread John Snow
79 is the PEP8 recommendation. This recommendation works well for reading patch diffs in TUI email clients. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 64 +++ tests/qemu-iotests/pylintrc | 6 +++- 2 files changed, 47

[PATCH v10 10/14] iotests: add hmp helper with logging

2020-03-30 Thread John Snow
Minor cleanup for HMP functions; helps with line length and consolidates HMP helpers through one implementation function. Although we are adding a universal toggle to turn QMP logging on or off, many existing callers to hmp functions don't expect that output to be logged, which causes quite a few

[PATCH v10 14/14] iotests: use python logging for iotests.log()

2020-03-30 Thread John Snow
We can turn logging on/off globally instead of per-function. Remove use_log from run_job, and use python logging to turn on diffable output when we run through a script entry point. iotest 245 changes output order due to buffering reasons. An extended note on python logging: A NullHandler is

[PATCH v10 07/14] iotests: drop pre-Python 3.4 compatibility code

2020-03-30 Thread John Snow
We no longer need to accommodate <3.4, drop this code. (The lines were > 79 chars and it stood out.) Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/qemu-iotests/iotests.py

[PATCH v10 12/14] iotest 258: use script_main

2020-03-30 Thread John Snow
Since this one is nicely factored to use a single entry point, use script_main to run the tests. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz --- tests/qemu-iotests/258 | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Yan Zhao
On Mon, Mar 30, 2020 at 09:49:21PM +0800, Kirti Wankhede wrote: > > > On 3/30/2020 8:54 AM, Yan Zhao wrote: > > On Fri, Mar 27, 2020 at 01:28:13PM +0800, Kirti Wankhede wrote: > >> Hit send button little early. > >> > >> > > >> > I checked v12, it's not like what I said. > >> > In v12,

[PATCH v10 04/14] iotests: replace mutable list default args

2020-03-30 Thread John Snow
It's bad hygiene: if we modify this list, it will be modified across all invocations. (Remaining bad usages are fixed in a subsequent patch which changes the function signature anyway.) Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz ---

[PATCH v10 01/14] iotests: do a light delinting

2020-03-30 Thread John Snow
This doesn't fix everything in here, but it does help clean up the pylint report considerably. This should be 100% style changes only; the intent is to make pylint more useful by working on establishing a baseline for iotests that we can gate against in the future. Signed-off-by: John Snow

[PATCH v10 03/14] iotests: ignore import warnings from pylint

2020-03-30 Thread John Snow
The right way to solve this is to come up with a virtual environment infrastructure that sets all the paths correctly, and/or to create installable python modules that can be imported normally. That's hard, so just silence this error for now. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max

[PATCH v10 11/14] iotests: add script_initialize

2020-03-30 Thread John Snow
Like script_main, but doesn't require a single point of entry. Replace all existing initialization sections with this drop-in replacement. This brings debug support to all existing script-style iotests. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/149| 3 +-

[PATCH v10 08/14] iotests: touch up log function signature

2020-03-30 Thread John Snow
Representing nested, recursive data structures in mypy is notoriously difficult; the best we can reliably do right now is denote the leaf types as "Any" while describing the general shape of the data. Regardless, this fully annotates the log() function. Typing notes: TypeVar is a Type variable

[PATCH v10 06/14] iotests: alphabetize standard imports

2020-03-30 Thread John Snow
I had to fix a merge conflict, so do this tiny harmless thing while I'm here. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/iotests.py | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/iotests.py

[PATCH v10 05/14] iotests: add pylintrc file

2020-03-30 Thread John Snow
This allows others to get repeatable results with pylint. If you run `pylint iotests.py`, you should see a 100% pass. Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/pylintrc | 22 ++ 1 file changed, 22 insertions(+) create mode 100644

[PATCH v10 13/14] iotests: Mark verify functions as private

2020-03-30 Thread John Snow
Mark the verify functions as "private" with a leading underscore, to discourage their use. Update type signatures while we're here. (Also, make pending patches not yet using the new entry points fail in a very obvious way.) Signed-off-by: John Snow --- tests/qemu-iotests/iotests.py | 23

[PATCH v10 02/14] iotests: don't use 'format' for drive_add

2020-03-30 Thread John Snow
It shadows (with a different type) the built-in format. Use something else. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Max Reitz --- tests/qemu-iotests/055| 3 ++- tests/qemu-iotests/iotests.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-)

[PATCH v10 00/14] iotests: use python logging

2020-03-30 Thread John Snow
This series uses python logging to enable output conditionally on iotests.log(). We unify an initialization call (which also enables debugging output for those tests with -d) and then make the switch inside of iotests. It will help alleviate the need to create logged/unlogged versions of all the

Re: [PATCH v16 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Yan Zhao
On Tue, Mar 31, 2020 at 04:47:20AM +0800, Alex Williamson wrote: > On Sun, 29 Mar 2020 22:07:08 -0400 > Yan Zhao wrote: > > > On Fri, Mar 27, 2020 at 01:07:38PM +0800, Kirti Wankhede wrote: > > > > > > > > > On 3/27/2020 6:00 AM, Yan Zhao wrote: > > > > On Fri, Mar 27, 2020 at 05:39:01AM

Re: [PATCH-for-5.0?] decodetree: Use Python3 floor division operator

2020-03-30 Thread Richard Henderson
On 3/30/20 4:28 PM, Aleksandar Markovic wrote: > Richard, great, could you please pick up the LMI patch from the other day > together with this patch in your tcg-5.0 queue? Yes, I've got it. r~

Re: [PATCH for-5.0] hw/ppc/ppc440_uc.c: Remove incorrect iothread locking from dcr_write_pcie()

2020-03-30 Thread David Gibson
On Mon, Mar 30, 2020 at 01:52:28PM +0100, Peter Maydell wrote: > In dcr_write_pcie() we take the iothread lock around a call to > pcie_host_mmcfg_udpate(). This is an incorrect attempt to deal with > the bug fixed in commit 235352ee6e73d7716, where we were not taking > the iothread lock before

Re: [PATCH v7 00/61] target/riscv: support vector extension v0.7.1

2020-03-30 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200330153633.15298-1-zhiwei_...@c-sky.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v7 00/61] target/riscv: support vector extension v0.7.1 Message-id:

Re: [PATCH-for-5.0?] decodetree: Use Python3 floor division operator

2020-03-30 Thread Aleksandar Markovic
20:47 Pon, 30.03.2020. Richard Henderson је написао/ла: > > On 3/30/20 10:14 AM, Richard Henderson wrote: > > On 3/30/20 5:13 AM, Philippe Mathieu-Daudé wrote: > >> This script started using Python2, where the 'classic' division > >> operator returns the floor result. In commit 3d004a371 we

[Bug 1867786] Re: Qemu PPC64 freezes with multi-core CPU

2020-03-30 Thread carlosedp
I just built from latest master and got the kernel trace below. ❯ qemu-system-ppc64 --version QEMU emulator version 4.2.90 (v4.2.0-2811-g83019e81d1-dirty) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers qemu-system-ppc64 \ -nographic -nodefaults -monitor pty -serial

Re: linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-03-30 Thread Brice Goglin
Le 31/03/2020 à 00:05, Philippe Mathieu-Daudé a écrit : > On 3/30/20 9:07 PM, Brice Goglin wrote: >> When the program name is very long, qemu-user may truncate it in >> /proc/self/stat. However the truncation must keep the ending ") " >> to conform to the proc manpage which says: >> (2) comm 

[Bug 1867786] Re: Qemu PPC64 freezes with multi-core CPU

2020-03-30 Thread carlosedp
Hi, any news about this? Can I provide any additional info since it might be a Mac issue. Thanks -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1867786 Title: Qemu PPC64 freezes with multi-core

Massive memory leak in 4.2.0

2020-03-30 Thread Alexander Yuriev
Hello, I was wondering if there is any interest in getting detailed reports/having a tester for a reproducible massive memory leak in qemu 4.2.0 running a guest with X11 via virgl-0.8.1 acceleration to host using sdl. Guest limited to 2Gb has qemu RES grow to over 10Gb with while running Chrome

Re: [PATCH] gdbstub: add support to Xfer:auxv:read: packet

2020-03-30 Thread Lirong Yuan
On Mon, Mar 30, 2020 at 12:47 PM Alex Bennée wrote: > > Lirong Yuan writes: > > > On Sat, Mar 21, 2020 at 6:56 AM Alex Bennée > wrote: > > > >> > >> Lirong Yuan writes: > >> > >> > On Fri, Mar 20, 2020 at 2:17 AM Alex Bennée > >> wrote: > >> > >> >> > >> >> Sorry I missed this on my radar.

Re: linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-03-30 Thread Philippe Mathieu-Daudé
On 3/30/20 9:07 PM, Brice Goglin wrote: When the program name is very long, qemu-user may truncate it in /proc/self/stat. However the truncation must keep the ending ") " to conform to the proc manpage which says: (2) comm %s The filename of the executable, in parentheses.

Re: [PATCH] Makes softmmu compile with clang at HEAD

2020-03-30 Thread Alex Bennée
Shu-Chun Weng writes: > With clang at HEAD, linking fails with "undefined symbol: > qemu_build_not_reached". It's because `store_helper` and > `helper_ret_stb_mmu` are mutually recursive and clang inlined latter > inside the former, making `store_helper` a recursive function and no > longer

[PATCH v1] usb: Add read support for HCIVERSION register to XHCI

2020-03-30 Thread Cameron Esfahani via
macOS will read HCIVERSION separate from CAPLENGTH. Add a distinct handler for that register. Signed-off-by: Cameron Esfahani --- hw/usb/hcd-xhci.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index b330e36fe6..061f8438de 100644 ---

Re: [PATCH v17 Kernel 5/7] vfio iommu: Update UNMAP_DMA ioctl to get dirty bitmap before unmap

2020-03-30 Thread Alex Williamson
On Mon, 30 Mar 2020 22:20:42 +0530 Kirti Wankhede wrote: > DMA mapped pages, including those pinned by mdev vendor drivers, might > get unpinned and unmapped while migration is active and device is still > running. For example, in pre-copy phase while guest driver could access > those pages,

Re: [PATCH v17 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-30 Thread Alex Williamson
On Mon, 30 Mar 2020 22:20:41 +0530 Kirti Wankhede wrote: > VFIO_IOMMU_DIRTY_PAGES ioctl performs three operations: > - Start dirty pages tracking while migration is active > - Stop dirty pages tracking. > - Get dirty pages bitmap. Its user space application's responsibility to > copy content

[PATCH 4/4] target/arm: Implement ARMv8.2-TTS2UXN

2020-03-30 Thread Peter Maydell
The ARMv8.2-TTS2UXN feature extends the XN field in stage 2 translation table descriptors from just bit [54] to bits [54:53], allowing stage 2 to control execution permissions separately for EL0 and EL1. Implement the new semantics of the XN field and enable the feature for our 'max' CPU.

[PATCH 2/4] target/arm: Use enum constant in get_phys_addr_lpae() call

2020-03-30 Thread Peter Maydell
The access_type argument to get_phys_addr_lpae() is an MMUAccessType; use the enum constant MMU_DATA_LOAD rather than a literal 0 when we call it in S1_ptw_translate(). Signed-off-by: Peter Maydell --- target/arm/helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 0/4] arm: Implement ARMv8.2-TTS2UXN

2020-03-30 Thread Peter Maydell
This is obviously not 5.0 material, but I figured it would be better to push it out for review now rather than hang on to it and forget... TTS2UXN is an ARMv8.2 extension which changes the 'XN' field in stage 2 translation table descriptors from just bit [54] to bits [54:53], allowing stage 2 to

[PATCH 3/4] target/arm: Add new 's1_is_el0' argument to get_phys_addr_lpae()

2020-03-30 Thread Peter Maydell
For ARMv8.2-TTS2UXN, the stage 2 page table walk wants to know whether the stage 1 access is for EL0 or not, because whether exec permission is given can depend on whether this is an EL0 or EL1 access. Add a new argument to get_phys_addr_lpae() so the call sites can pass this information in.

[PATCH 1/4] target/arm: Don't use a TLB for ARMMMUIdx_Stage2

2020-03-30 Thread Peter Maydell
We define ARMMMUIdx_Stage2 as being an MMU index which uses a QEMU TLB. However we never actually use the TLB -- all stage 2 lookups are done by direct calls to get_phys_addr_lpae() followed by a physical address load via address_space_ld*(). Remove Stage2 from the list of ARM MMU indexes which

linux-user: keep the name-ending parenthesis in /proc/self/stat

2020-03-30 Thread Brice Goglin
When the program name is very long, qemu-user may truncate it in /proc/self/stat. However the truncation must keep the ending ") " to conform to the proc manpage which says: (2) comm %s The filename of the executable, in parentheses. This is visible whether or not the

  1   2   3   4   >