[PATCH v3] icount: make dma reads deterministic

2020-06-02 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses. This leads to the following structure of iov for the block driver: addr size1 addr size2 addr size3 It means that three adjacent disk blocks should be read into the same memory buffer. Windows

[PATCH v3] hw/adc/stm32f2xx_adc: Correct memory region size and access size

2020-06-02 Thread Philippe Mathieu-Daudé
The ADC region size is 256B, split as: - [0x00 - 0x4f] defined - [0x50 - 0xff] reserved All registers are 32-bit (thus when the datasheet mentions the last defined register is 0x4c, it means its address range is 0x4c .. 0x4f. This model implementation is also 32-bit. Set MemoryRegionOps 'impl'

Re: [PATCH v2] icount: make dma reads deterministic

2020-06-02 Thread Pavel Dovgalyuk
On 02.06.2020 18:54, Kevin Wolf wrote: Am 30.04.2020 um 11:02 hat Pavel Dovgalyuk geschrieben: From: Pavel Dovgalyuk Windows guest sometimes makes DMA requests with overlapping target addresses. This leads to the following structure of iov for the block driver: addr size1 addr size2 addr

Re: [PATCH v8 30/62] target/riscv: Update fp_status when float rounding mode changes

2020-06-02 Thread LIU Zhiwei
On 2020/6/3 12:27, Richard Henderson wrote: On 5/21/20 2:43 AM, LIU Zhiwei wrote: @@ -174,6 +175,9 @@ static int write_frm(CPURISCVState *env, int csrno, target_ulong val) env->mstatus |= MSTATUS_FS; #endif env->frm = val & (FSR_RD >> FSR_RD_SHIFT); +if

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-06-02 Thread Yan Zhao
On Tue, Jun 02, 2020 at 09:55:28PM -0600, Alex Williamson wrote: > On Tue, 2 Jun 2020 23:19:48 -0400 > Yan Zhao wrote: > > > On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote: > > > On Wed, 29 Apr 2020 20:39:50 -0400 > > > Yan Zhao wrote: > > > > > > > On Wed, Apr 29, 2020 at

[PATCH 2/2] hw: arm: Set vendor property for IMX SDHCI emulations

2020-06-02 Thread Guenter Roeck
Set vendor property to IMX to enable IMX specific functionality in sdhci code. Signed-off-by: Guenter Roeck --- hw/arm/fsl-imx25.c | 2 ++ hw/arm/fsl-imx6.c | 2 ++ hw/arm/fsl-imx6ul.c | 2 ++ hw/arm/fsl-imx7.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/hw/arm/fsl-imx25.c

[PATCH 1/2] sd: sdhci: Implement basic vendor specific register support

2020-06-02 Thread Guenter Roeck
The Linux kernel's IMX code now uses vendor specific commands. This results in endless warnings when booting the Linux kernel. sdhci-esdhc-imx 2194000.usdhc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!. Implement support for the vendor specific command

[PATCH 0/2] sd: sdhci: Implement basic vendor specific register support

2020-06-02 Thread Guenter Roeck
The Linux kernel's IMX code now uses vendor specific commands. This results in endless warnings when booting the Linux kernel. sdhci-esdhc-imx 2194000.usdhc: esdhc_wait_for_card_clock_gate_off: card clock still not gate off in 100us!. Implement support for the vendor specific command

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Cindy Lu
On Wed, Jun 3, 2020 at 10:54 AM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > Consider the significant modification based on the original patch. > > I think you may change the other to yourslef and keep the sobs for both > Tiwei and Lingshan. > > Thanks >

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Cindy Lu
Hi Jason, On Wed, Jun 3, 2020 at 10:52 AM Jason Wang wrote: > > > On 2020/5/29 下午10:06, Cindy Lu wrote: > > From: Tiwei Bie > > > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purpose, > > this vDPA

[PATCH] tcg: Sanitize shift constants on ppc64le so that shift operations with large constants don't generate invalid instructions.

2020-06-02 Thread agrecascino123
From: "Catherine A. Frederick" Signed-off-by: "Catherine A. Frederick" --- tcg/ppc/tcg-target.inc.c | 4 1 file changed, 4 insertions(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index ee1f9227c1..a5450a5e67 100644 --- a/tcg/ppc/tcg-target.inc.c +++

Re: [PATCH] hw/isa/apm: Convert debug printf()s to trace events

2020-06-02 Thread Philippe Mathieu-Daudé
ping for review? On 5/24/20 6:48 PM, Philippe Mathieu-Daudé wrote: > Convert APM_DPRINTF() to trace events and remove ifdef'ry. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/isa/apm.c| 15 +-- > hw/isa/trace-events | 4 > 2 files changed, 9 insertions(+), 10

Re: [PATCH 1/1] util/oslib: Returns real thread identifier on FreeBSD and NetBSD

2020-06-02 Thread Philippe Mathieu-Daudé
ping? On 5/26/20 9:29 AM, David CARLIER wrote: > From 792fbcd9114f43bd80fd1ef5b25cd9935a536f9f Mon Sep 17 00:00:00 2001 > From: David Carlier > Date: Tue, 26 May 2020 08:25:26 +0100 > Subject: [PATCH] util/oslib: Returns the real thread identifier on FreeBSD and > NetBSD > > getpid is good

Re: [PATCH] tcg: Sanitize shift constants on ppc64le so that shift operations with large constants don't generate invalid instructions.

2020-06-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200603044701.10748-1-agrecascino...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200603044701.10748-1-agrecascino...@gmail.com Subject: [PATCH] tcg: Sanitize shift constants

Re: [PATCH] tcg: Sanitize shift constants on ppc64le so that shift operations with large constants don't generate invalid instructions.

2020-06-02 Thread Catherine A. Frederick / mptcultist
Oh dear, it appears that git send-email ate the formatting, hang on. On Wed, Jun 3, 2020 at 12:47 AM wrote: > > From: "Catherine A. Frederick" > > --- > tcg/ppc/tcg-target.inc.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c >

Re: [PATCH] .mailmap: Update Fred Konrad email address

2020-06-02 Thread Philippe Mathieu-Daudé
ping? On 5/18/20 12:39 PM, Philippe Mathieu-Daudé wrote: > Update Fred Konrad email address to avoid emails bouncing. > > Signed-off-by: Philippe Mathieu-Daudé > --- > .mailmap | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.mailmap b/.mailmap > index 6412067bde..4c7f4b7d03 100644 >

Re: [PATCH] net: Do not include a newline in the id of -nic devices

2020-06-02 Thread Philippe Mathieu-Daudé
On 5/18/20 9:43 AM, Thomas Huth wrote: > The '\n' sneaked in by accident here, an "id" string should really > not contain a newline character at the end. > > Fixes: 78cd6f7bf6b ('net: Add a new convenience option "--nic" ...') > Signed-off-by: Thomas Huth > --- > net/net.c | 2 +- > 1 file

Re: [PATCH] hw/i386/vmport: Drop superfluous parenthesis around function typedef

2020-06-02 Thread Philippe Mathieu-Daudé
On 5/5/20 4:28 PM, Philippe Mathieu-Daudé wrote: > Drop superfluous parenthesis around VMPortReadFunc typedef > (added in d67f679d99, missed to remove when moved in e595112985). > > Suggested-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/vmport.h | 2 +- > 1

[PATCH] tcg: Sanitize shift constants on ppc64le so that shift operations with large constants don't generate invalid instructions.

2020-06-02 Thread agrecascino123
From: "Catherine A. Frederick" --- tcg/ppc/tcg-target.inc.c | 4 1 file changed, 4 insertions(+) diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c index ee1f9227c1..a5450a5e67 100644 --- a/tcg/ppc/tcg-target.inc.c +++ b/tcg/ppc/tcg-target.inc.c @@ -790,21 +790,25 @@ static

Re: [PATCH v8 30/62] target/riscv: Update fp_status when float rounding mode changes

2020-06-02 Thread Richard Henderson
On 5/21/20 2:43 AM, LIU Zhiwei wrote: > @@ -174,6 +175,9 @@ static int write_frm(CPURISCVState *env, int csrno, > target_ulong val) > env->mstatus |= MSTATUS_FS; > #endif > env->frm = val & (FSR_RD >> FSR_RD_SHIFT); > +if (!riscv_cpu_set_rounding_mode(env, env->frm)) { > +

[Bug 1805256] Autopkgtest regression report (qemu/1:4.0+dfsg-0ubuntu9.7)

2020-06-02 Thread Ubuntu SRU Bot
All autopkgtests for the newly accepted qemu (1:4.0+dfsg-0ubuntu9.7) for eoan have finished running. The following regressions have been reported in tests triggered by the package: edk2/0~20190606.20d2e5a1-2ubuntu1.1 (amd64, armhf) Please visit the excuses page listed below and investigate the

Re: [PATCH v7 00/42] target/arm: Implement ARMv8.5-MemTag, system mode

2020-06-02 Thread Richard Henderson
On 6/2/20 7:15 PM, no-re...@patchew.org wrote: > This series seems to have some coding style problems. Hmph, some of these are real. I'll fix for v8, with other review. r~

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-06-02 Thread Alex Williamson
On Tue, 2 Jun 2020 23:19:48 -0400 Yan Zhao wrote: > On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote: > > On Wed, 29 Apr 2020 20:39:50 -0400 > > Yan Zhao wrote: > > > > > On Wed, Apr 29, 2020 at 05:48:44PM +0800, Dr. David Alan Gilbert wrote: > > > > > > > > > > > > > > > >

Re: [PATCH v5 0/4] introduction of migration_version attribute for VFIO live migration

2020-06-02 Thread Yan Zhao
On Tue, Jun 02, 2020 at 04:55:27PM -0600, Alex Williamson wrote: > On Wed, 29 Apr 2020 20:39:50 -0400 > Yan Zhao wrote: > > > On Wed, Apr 29, 2020 at 05:48:44PM +0800, Dr. David Alan Gilbert wrote: > > > > > > > > > > > > > > > > > An mdev type is meant to define a software > > > > > > > > > >

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Jason Wang
On 2020/5/29 下午10:06, Cindy Lu wrote: From: Tiwei Bie Consider the significant modification based on the original patch. I think you may change the other to yourslef and keep the sobs for both Tiwei and Lingshan. Thanks Currently we have 2 types of vhost backends in QEMU: vhost

Re: [RFC v3 7/8] vhost-vdpa: introduce vhost-vdpa backend

2020-06-02 Thread Jason Wang
On 2020/5/29 下午10:06, Cindy Lu wrote: From: Tiwei Bie Currently we have 2 types of vhost backends in QEMU: vhost kernel and vhost-user. The above patch provides a generic device for vDPA purpose, this vDPA device exposes to user space a non-vendor-specific configuration interface for setting

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Eric Blake
On 6/2/20 9:07 PM, Richard Henderson wrote: On 6/2/20 6:36 PM, Eric Blake wrote: --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -176,11 +176,9 @@ extern unsigned long reserved_va; * avoid setting bits at the top of guest addresses that might need * to be used for tags. */

Re: [PATCH v7 00/42] target/arm: Implement ARMv8.5-MemTag, system mode

2020-06-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200603011317.473934-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200603011317.473934-1-richard.hender...@linaro.org Subject: [PATCH v7 00/42] target/arm:

Re: [PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-02 Thread Richard Henderson
On 6/2/20 7:02 PM, Ying Fang wrote: > Virtual time adjustment was implemented for virt-5.0 machine type, > but the cpu property was enabled only for host-passthrough and > max cpu model. Let's add it for arm cpu which has the gernic "generic" > timer feature enabled. > > > Signed-off-by: Ying

Re: [PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Richard Henderson
On 6/2/20 6:36 PM, Eric Blake wrote: > --- a/include/exec/cpu-all.h > +++ b/include/exec/cpu-all.h > @@ -176,11 +176,9 @@ extern unsigned long reserved_va; > * avoid setting bits at the top of guest addresses that might need > * to be used for tags. > */ > -#if

[PATCH v2] target/arm/cpu: adjust virtual time for arm cpu

2020-06-02 Thread Ying Fang
Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cpu which has the gernic timer feature enabled. Signed-off-by: Ying Fang --- v2: - move kvm_arm_add_vcpu_properties into

Re: [PATCH] virtiofsd: Use clone() and not unshare(), support non-root

2020-06-02 Thread Colin Walters
On Tue, Jun 2, 2020, at 5:55 AM, Stefan Hajnoczi wrote: > > Ping Colin. It would be great if you have time to share your thoughts on > this discussion and explain how you are using this patch. Yeah sorry about not replying in this thread earlier, this was just a quick Friday side project for

[PATCH v3] osdep: Make MIN/MAX evaluate arguments only once

2020-06-02 Thread Eric Blake
I'm not aware of any immediate bugs in qemu where a second runtime evalution of the arguments to MIN() or MAX() causes a problem, but proactively preventing such abuse is easier than falling prey to an unintended case down the road. At any rate, here's the conversation that sparked the current

[PATCH v7 40/42] target/arm: Cache the Tagged bit for a page in MemTxAttrs

2020-06-02 Thread Richard Henderson
This "bit" is a particular value of the page's MemAttr. Signed-off-by: Richard Henderson --- v6: Test HCR_EL2.{DC,DCT}; test Stage2 attributes. --- target/arm/helper.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git

[PATCH v7 38/42] target/arm: Set PSTATE.TCO on exception entry

2020-06-02 Thread Richard Henderson
D1.10 specifies that exception handlers begin with tag checks overridden. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Only set if MTE feature present. --- target/arm/helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/arm/helper.c

[PATCH v7 35/42] target/arm: Add mte helpers for sve scatter/gather memory ops

2020-06-02 Thread Richard Henderson
Because the elements are non-sequential, we cannot eliminate many tests straight away like we can for sequential operations. But we often have the PTE details handy, so we can test for Tagged. Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 285

[PATCH v7 37/42] target/arm: Implement data cache set allocation tags

2020-06-02 Thread Richard Henderson
This is DC GVA and DC GZVA, and the tag check for DC ZVA. Signed-off-by: Richard Henderson --- v2: Use allocation_tag_mem + memset. v3: Require pre-cleaned addresses. v6: Move DCZ block size assert to cpu realize. Perform a tag check for DC ZVA. --- target/arm/cpu.h | 4 +++-

[PATCH v7 32/42] target/arm: Add mte helpers for sve scalar + int stores

2020-06-02 Thread Richard Henderson
Because the elements are sequential, we can eliminate many tests all at once when the tag hits TCMA, or if the page(s) are not Tagged. Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 47 +++ target/arm/sve_helper.c| 95 --

[PATCH v7 42/42] target/arm: Add allocation tag storage for system mode

2020-06-02 Thread Richard Henderson
Look up the physical address for the given virtual address, convert that to a tag physical address, and finally return the host address that backs it. Signed-off-by: Richard Henderson --- target/arm/mte_helper.c | 128 1 file changed, 128 insertions(+)

[PATCH v7 41/42] target/arm: Create tagged ram when MTE is enabled

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v5: Assign cs->num_ases to the final value first. Downgrade to ID_AA64PFR1.MTE=1 if tag memory is not available. v6: Add secure tag memory for EL3. --- target/arm/cpu.h | 6 ++ hw/arm/virt.c| 52

[PATCH v7 33/42] target/arm: Add mte helpers for sve scalar + int ff/nf loads

2020-06-02 Thread Richard Henderson
Because the elements are sequential, we can eliminate many tests all at once when the tag hits TCMA, or if the page(s) are not Tagged. Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 98 target/arm/sve_helper.c| 98 ++--

[PATCH v7 39/42] target/arm: Enable MTE

2020-06-02 Thread Richard Henderson
We now implement all of the components of MTE, without actually supporting any tagged memory. All MTE instructions will work, trivially, so we can enable support. Signed-off-by: Richard Henderson --- v6: Delay user-only cpu reset bits to the user-only patch set. --- target/arm/cpu64.c | 1 + 1

[PATCH v7 23/42] target/arm: Add gen_mte_check1

2020-06-02 Thread Richard Henderson
Replace existing uses of check_data_tbi in translate-a64.c that perform a single logical memory access. Leave the helper blank for now to reduce the patch size. Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 1 + target/arm/internals.h | 8

[PATCH v7 36/42] target/arm: Complete TBI clearing for user-only for SVE

2020-06-02 Thread Richard Henderson
There are a number of paths by which the TBI is still intact for user-only in the SVE helpers. Because we currently always set TBI for user-only, we do not need to pass down the actual TBI setting from above, and we can remove the top byte in the inner-most primitives, so that none are forgotten.

[PATCH v7 22/42] target/arm: Move regime_tcr to internals.h

2020-06-02 Thread Richard Henderson
We will shortly need this in mte_helper.c as well. Signed-off-by: Richard Henderson --- target/arm/internals.h | 9 + target/arm/helper.c| 9 - 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index

[PATCH v7 34/42] target/arm: Handle TBI for sve scalar + int memory ops

2020-06-02 Thread Richard Henderson
We still need to handle tbi for user-only when mte is inactive. Signed-off-by: Richard Henderson --- target/arm/translate-a64.h | 1 + target/arm/translate-a64.c | 2 +- target/arm/translate-sve.c | 6 -- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git

[PATCH v7 31/42] target/arm: Add mte helpers for sve scalar + int loads

2020-06-02 Thread Richard Henderson
Because the elements are sequential, we can eliminate many tests all at once when the tag hits TCMA, or if the page(s) are not Tagged. Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 58 ++ target/arm/internals.h | 6 + target/arm/sve_helper.c| 218

[PATCH v7 25/42] target/arm: Implement helper_mte_check1

2020-06-02 Thread Richard Henderson
Fill out the stub that was added earlier. Signed-off-by: Richard Henderson --- target/arm/internals.h | 47 +++ target/arm/mte_helper.c | 126 +++- 2 files changed, 172 insertions(+), 1 deletion(-) diff --git a/target/arm/internals.h

[PATCH v7 30/42] target/arm: Use mte_check1 for sve LD1R

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index e515646db2..4b3b879815 100644 --- a/target/arm/translate-sve.c +++

[PATCH v7 29/42] target/arm: Use mte_checkN for sve unpredicated stores

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 1 + target/arm/sve_helper.c| 63 ++- target/arm/translate-sve.c | 88 ++ 3 files changed, 94 insertions(+), 58 deletions(-) diff --git a/target/arm/helper-sve.h

[PATCH v7 24/42] target/arm: Add gen_mte_checkN

2020-06-02 Thread Richard Henderson
Replace existing uses of check_data_tbi in translate-a64.c that perform multiple logical memory access. Leave the helper blank for now to reduce the patch size. Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 1 + target/arm/translate-a64.h | 2 ++ target/arm/mte_helper.c

[PATCH v7 21/42] target/arm: Move regime_el to internals.h

2020-06-02 Thread Richard Henderson
We will shortly need this in mte_helper.c as well. Signed-off-by: Richard Henderson --- target/arm/internals.h | 36 target/arm/helper.c| 36 2 files changed, 36 insertions(+), 36 deletions(-) diff --git

[PATCH v7 27/42] target/arm: Add helper_mte_check_zva

2020-06-02 Thread Richard Henderson
Use a special helper for DC_ZVA, rather than the more general mte_checkN. Leave the helper blank for now. Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 1 + target/arm/mte_helper.c| 106 + target/arm/translate-a64.c | 16 +- 3

[PATCH v7 16/42] target/arm: Implement the STGP instruction

2020-06-02 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Handle atomicity, require pre-cleaned address. v6: Fix constant offset shift, non-checked address, use pre-computed ata. --- target/arm/translate-a64.c | 29 ++--- 1 file changed, 26 insertions(+), 3

[PATCH v7 28/42] target/arm: Use mte_checkN for sve unpredicated loads

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 2 + target/arm/sve_helper.c| 70 +++- target/arm/translate-sve.c | 93 -- 3 files changed, 109 insertions(+), 56 deletions(-) diff --git a/target/arm/helper-sve.h

[PATCH v7 20/42] target/arm: Implement the access tag cache flushes

2020-06-02 Thread Richard Henderson
Like the regular data cache flushes, these are nops within qemu. Signed-off-by: Richard Henderson --- v6: Split out and handle el0 cache ops properly. --- target/arm/helper.c | 65 + 1 file changed, 65 insertions(+) diff --git a/target/arm/helper.c

[PATCH v7 19/42] target/arm: Implement the LDGM, STGM, STZGM instructions

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v3: Require pre-cleaned addresses. v6: Check full mte enabled. Reorg the helpers. --- target/arm/helper-a64.h| 3 ++ target/arm/translate.h | 2 + target/arm/mte_helper.c| 84 ++ target/arm/translate-a64.c |

[PATCH v7 13/42] target/arm: Define arm_cpu_do_unaligned_access for user-only

2020-06-02 Thread Richard Henderson
We need this to raise unaligned exceptions from user mode. Signed-off-by: Richard Henderson --- v6: Use EXCP_UNALIGNED for user-only and update cpu_loop.c. --- linux-user/aarch64/cpu_loop.c | 7 ++ linux-user/arm/cpu_loop.c | 7 ++ target/arm/cpu.c | 2 +-

[PATCH v7 12/42] target/arm: Implement the SUBP instruction

2020-06-02 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Fix extraction length. --- target/arm/translate-a64.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index

[PATCH v7 26/42] target/arm: Implement helper_mte_checkN

2020-06-02 Thread Richard Henderson
Fill out the stub that was added earlier. Signed-off-by: Richard Henderson --- v7: Fix page crossing test (szabolcs nagy). --- target/arm/internals.h | 1 + target/arm/mte_helper.c | 165 +++- 2 files changed, 165 insertions(+), 1 deletion(-) diff --git

[PATCH v7 17/42] target/arm: Restrict the values of DCZID.BS under TCG

2020-06-02 Thread Richard Henderson
We can simplify our DC_ZVA if we recognize that the largest BS that we actually use in system mode is 64. Let us just assert that it fits within TARGET_PAGE_SIZE. For DC_GVA and STZGM, we want to be able to write whole bytes of tag memory, so assert that BS is >= 2 * TAG_GRANULE, or 32.

[PATCH v7 11/42] target/arm: Implement the GMI instruction

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v6: Inline the operation. --- target/arm/translate-a64.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index a18d71ad98..7d0b7d5b58 100644 --- a/target/arm/translate-a64.c +++

[PATCH v7 14/42] target/arm: Add helper_probe_access

2020-06-02 Thread Richard Henderson
Raise an exception if the given virtual memory is not accessible. Signed-off-by: Richard Henderson --- target/arm/helper.h| 2 ++ target/arm/op_helper.c | 16 target/arm/translate-a64.c | 13 + 3 files changed, 31 insertions(+) diff --git

[PATCH v7 09/42] target/arm: Implement the IRG instruction

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v2: Update to 00eac5. Merge choose_random_nonexcluded_tag into helper_irg since that pseudo function no longer exists separately. v6: Remove obsolete logical/physical tag distinction; implement inline for !ATA. --- target/arm/helper-a64.h| 2

[PATCH v7 15/42] target/arm: Implement LDG, STG, ST2G instructions

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v2: Split out allocation_tag_mem. Handle atomicity of stores. v3: Add X[t] input to these insns; require pre-cleaned addresses. v5: Fix !32-byte aligned operation of st2g. v6: Fix op2 extract, stg pre/post-index, stores vs sp, commentary; use pre-computed

[PATCH v7 10/42] target/arm: Implement the ADDG, SUBG instructions

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v2: Shift offset in translate; use extract32. v6: Implement inline for !ATA. --- target/arm/helper-a64.h| 1 + target/arm/internals.h | 9 + target/arm/mte_helper.c| 10 ++ target/arm/translate-a64.c | 36

[PATCH v7 18/42] target/arm: Simplify DC_ZVA

2020-06-02 Thread Richard Henderson
Now that we know that the operation is on a single page, we need not loop over pages while probing. Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 94 +++-- 1 file changed, 25 insertions(+), 69 deletions(-) diff --git

[PATCH v7 07/42] target/arm: Add MTE system registers

2020-06-02 Thread Richard Henderson
This is TFSRE0_EL1, TFSR_EL1, TFSR_EL2, TFSR_EL3, RGSR_EL1, GCR_EL1, GMID_EL1, and PSTATE.TCO. Signed-off-by: Richard Henderson --- v3: Add GMID; add access_mte. v4: Define only TCO at mte_insn_reg. v6: Define RAZ/WI version of TCO at mte_insn_reg; honor TID5 for GMID_EL1; fix TFS crn/crm;

[PATCH v7 08/42] target/arm: Add MTE bits to tb_flags

2020-06-02 Thread Richard Henderson
Cache the composite ATA setting. Cache when MTE is fully enabled, i.e. access to tags are enabled and tag checks affect the PE. Do this for both the normal context and the UNPRIV context. Signed-off-by: Richard Henderson --- v3: Remove stub helper_mte_check; moved to a later patch. v6: Add

[PATCH v7 04/42] target/arm: Add support for MTE to HCR_EL2 and SCR_EL3

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/helper.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index 7862bf502d..f2ead07ead 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -2021,6 +2021,9 @@ static void

[PATCH v7 05/42] target/arm: Rename DISAS_UPDATE to DISAS_UPDATE_EXIT

2020-06-02 Thread Richard Henderson
Emphasize that the is_jmp option exits to the main loop. Signed-off-by: Richard Henderson --- target/arm/translate.h | 14 -- target/arm/translate-a64.c | 8 target/arm/translate-vfp.inc.c | 2 +- target/arm/translate.c | 12 ++-- 4 files

[PATCH v7 06/42] target/arm: Add DISAS_UPDATE_NOCHAIN

2020-06-02 Thread Richard Henderson
Add an option that writes back the PC, like DISAS_UPDATE_EXIT, but does not exit back to the main loop. Signed-off-by: Richard Henderson --- target/arm/translate.h | 2 ++ target/arm/translate-a64.c | 3 +++ target/arm/translate.c | 4 3 files changed, 9 insertions(+) diff --git

[PATCH v7 01/42] target/arm: Add isar tests for mte

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 677584e5da..f8ac11e73b 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3814,6 +3814,16 @@ static inline bool

[PATCH v7 02/42] target/arm: Improve masking of SCR RES0 bits

2020-06-02 Thread Richard Henderson
Protect reads of aa64 id registers with ARM_CP_STATE_AA64. Use this as a simpler test than arm_el_is_aa64, since EL3 cannot change mode. Signed-off-by: Richard Henderson --- target/arm/helper.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git

[PATCH v7 00/42] target/arm: Implement ARMv8.5-MemTag, system mode

2020-06-02 Thread Richard Henderson
Version 6 was back in March: https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg03790.html Version 7 is a rebase on master, which now contains all prereqs. In addition, two bugs fixed, pointed out by users of the branch. I've done light testing against

[PATCH v7 03/42] target/arm: Add support for MTE to SCTLR_ELx

2020-06-02 Thread Richard Henderson
This does not attempt to rectify all of the res0 bits, but does clear the mte bits when not enabled. Since there is no high-part mapping of SCTLR, aa32 mode cannot write to these bits. Signed-off-by: Richard Henderson --- target/arm/helper.c | 23 +-- 1 file changed, 17

[PATCH v5] linux-user: syscall: ioctls: support DRM_IOCTL_VERSION

2020-06-02 Thread chengang
From: Chen Gang Another DRM_IOCTL_* commands will be done later. Signed-off-by: Chen Gang --- configure | 10 linux-user/ioctls.h| 5 ++ linux-user/syscall.c | 117 + linux-user/syscall_defs.h | 15 +

Re: [PATCH] target/arm/cpu: adjust virtual time for cortex series cpu

2020-06-02 Thread Ying Fang
On 2020/6/1 20:41, Peter Maydell wrote: On Sat, 30 May 2020 at 10:22, Ying Fang wrote: Virtual time adjustment was implemented for virt-5.0 machine type, but the cpu property was enabled only for host-passthrough and max cpu model. Let's add it for arm cortex series cpu which has the

Re: [PATCH] docs/system: Document Aspeed boards

2020-06-02 Thread Andrew Jeffery
> > >> + * Hash/Crypto Engine > >> + * PCI-Express 1 Controller > >> + * Graphic Display Controller > >> + * PECI Controller > >> + * MCTP Controller > >> + * Mailbox Controller > >> + * Virtual UART > > > > Uh what is that? :) > > It is the host console. > To explain a little more, a

[PATCH 5/7] python/qemu: add pylint to pipenv

2020-06-02 Thread John Snow
A bug in pylint 2.5.1 and 2.5.2 causes false positives for relative imports. This version is pinned at 2.5.0 until a fix is available. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 123 2 files changed, 124

[PATCH 4/7] python/qemu: Add pipenv support

2020-06-02 Thread John Snow
pipenv is a tool used for managing virtual environments with precisely specified dependencies. It is separate from the dependencies listed in setup.py, which are (by 'best practices') not supposed to be pinned. Note that pipenv is not required to install or use this module; this is just a

[PATCH 6/7] python/qemu: Add flake8 to pipenv

2020-06-02 Thread John Snow
Versions older than 3.6.0 do not appear to work with either pylint 2.5.0 or the type hint syntax in general. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 39 ++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git

[PATCH 7/7] python/qemu: add mypy to pipenv

2020-06-02 Thread John Snow
0.730 appears to be about the oldest version that works with the features we want, including nice human readable output (to make sure iotest 297 passes), and type-parameterized Popen generics. Signed-off-by: John Snow --- python/Pipfile | 1 + python/Pipfile.lock | 37

[PATCH 2/7] python/qemu: formalize as package

2020-06-02 Thread John Snow
NB: I am choosing Python 3.6 here. Although our minimum requirement is 3.5, this code is used only by iotests (so far) under which we have been using a minimum version of 3.6. 3.6 is being preferred here for variable type hint capability, which enables us to use mypy for this package. RFC: This

[PATCH 1/7] python/qemu: create qemu.lib module

2020-06-02 Thread John Snow
move python/qemu/*.py to python/qemu/core/*.py. To create a namespace package, the 'qemu' directory itself shouldn't have module files in it. Thus, these files will go under a 'lib' package directory instead. Bolster the core/__init__.py file a little bit, Make the top-level classes and

[PATCH 3/7] python/qemu: add README.rst

2020-06-02 Thread John Snow
Add a short readme that explains the package hierarchy, which will be visible while browsing the source on e.g. gitlab/github. Signed-off-by: John Snow --- python/qemu/README.rst | 8 1 file changed, 8 insertions(+) create mode 100644 python/qemu/README.rst diff --git

[PATCH 0/7] python: create installable package

2020-06-02 Thread John Snow
Based-on: 20200602214528.12107-1-js...@redhat.com This series factors the python/qemu directory as an installable module. As a developer, you can install this to your virtual environment and then always have access to the classes contained within without needing to wrangle python import path

RE: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-02 Thread Babu Moger
> -Original Message- > From: Eduardo Habkost > Sent: Tuesday, June 2, 2020 6:01 PM > To: Moger, Babu > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > m...@redhat.com; imamm...@redhat.com; qemu-devel@nongnu.org > Subject: Re: [PATCH v7 07/13] hw/386: Add EPYC

[PATCH v2 6/8] decodetree: Implement non-overlapping groups

2020-06-02 Thread Richard Henderson
Intended to be nested within overlapping groups. Reviewed-by: Philippe Mathieu-Daudé Suggested-by: Peter Maydell Signed-off-by: Richard Henderson --- scripts/decodetree.py | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/scripts/decodetree.py

[PATCH v2 4/8] decodetree: Allow group covering the entire insn space

2020-06-02 Thread Richard Henderson
This is an edge case for sure, but the logic that disallowed this case was faulty. Further, a few fixes scattered about can allow this to work. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- ...est1.decode => succ_pattern_group_nest2.decode} | 2 +- scripts/decodetree.py

[PATCH v2 8/8] target/arm: Use a non-overlapping group for misc control

2020-06-02 Thread Richard Henderson
The miscellaneous control instructions are mutually exclusive within the t32 decode sub-group. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/t32.decode | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/t32.decode

[PATCH v2 3/8] decodetree: Split out MultiPattern from IncMultiPattern

2020-06-02 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- scripts/decodetree.py | 37 ++--- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 7af6b3056d..ea313bcdea 100755 ---

[PATCH v2 2/8] decodetree: Rename MultiPattern to IncMultiPattern

2020-06-02 Thread Richard Henderson
Name the current node for "inclusive" multi-pattern, in preparation for adding a node for "exclusive" multi-pattern. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- scripts/decodetree.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH v2 0/8] decodetree: Add non-overlapping groups

2020-06-02 Thread Richard Henderson
This is a feature that Peter requested for completing the neon decodetree conversion. Changes for v2: - Rebase on master, which includes some generic python cleanups. - Indentation error message restored. - 4 new testcases r~ Richard Henderson (8): decodetree: Tidy error_with_file

[PATCH v2 1/8] decodetree: Tidy error_with_file

2020-06-02 Thread Richard Henderson
Use proper varargs to print the arguments. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- scripts/decodetree.py | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index

[PATCH v2 5/8] decodetree: Move semantic propagation into classes

2020-06-02 Thread Richard Henderson
Create ExcMultiPattern to hold an set of non-overlapping patterns. The body of build_tree, prop_format become member functions on this class. Add minimal member functions to Pattern and MultiPattern to allow recusion through the tree. Move the bulk of build_incmulti_pattern to prop_masks and

[PATCH v2 7/8] tests/decode: Test non-overlapping groups

2020-06-02 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tests/decode/err_pattern_group_nest1.decode | 14 ++ tests/decode/err_pattern_group_nest2.decode | 6 ++ tests/decode/err_pattern_group_nest3.decode | 14 ++ tests/decode/succ_pattern_group_nest3.decode | 11 +++ 4

Re: [PATCH v7 07/13] hw/386: Add EPYC mode topology decoding functions

2020-06-02 Thread Eduardo Habkost
On Tue, Jun 02, 2020 at 04:59:19PM -0500, Babu Moger wrote: > > > > -Original Message- > > From: Eduardo Habkost > > Sent: Tuesday, June 2, 2020 12:19 PM > > To: Moger, Babu > > Cc: marcel.apfelb...@gmail.com; pbonz...@redhat.com; r...@twiddle.net; > > m...@redhat.com;

[Bug 1805256] Please test proposed package

2020-06-02 Thread Brian Murray
Hello dann, or anyone else affected, Accepted qemu into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:2.11+dfsg- 1ubuntu7.27 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See

[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-06-02 Thread Brian Murray
Hello dann, or anyone else affected, Accepted qemu into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qemu/1:4.2-3ubuntu6.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See

  1   2   3   4   >