Re: [PATCH v3 0/9] Generalize memory encryption models

2020-06-25 Thread David Hildenbrand
Does this have any implications when probing with the 'none' machine? >>> >>> I'm not sure. In your case, I guess the cpu bit would still show up >>> as before, so it would tell you base feature availability, but not >>> whether you can use the new configuration option. >>> >>> Since the HTL

[RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-25 Thread Eugenio Pérez
Bug reference: https://bugs.launchpad.net/qemu/+bug/1885175 It is possible to hit this assertion on rhel7 guests if iommu is properly enabled. Signed-off-by: Eugenio Pérez --- memory.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/memory.c b/memory.c index 2f15a4b250..7f789710d2 100644 -

RE: [PATCH v6 5/5] hw/riscv: virt: Allow creating multiple NUMA sockets

2020-06-25 Thread Anup Patel
> -Original Message- > From: Alistair Francis > Sent: 26 June 2020 00:20 > To: Anup Patel > Cc: Anup Patel ; Peter Maydell > ; Palmer Dabbelt ; > Alistair Francis ; Sagar Karandikar > ; Atish Patra ; open > list:RISC-V ; qemu-devel@nongnu.org > Developers > Subject: Re: [PATCH v6 5/5]

[PULL 2/4] spapr: Fix typos in comments and macro indentation

2020-06-25 Thread David Gibson
From: Gustavo Romero This commit fixes typos in spapr_vio_reg_to_irq() comments and a macro indentation. Signed-off-by: Gustavo Romero Message-Id: <1590710681-12873-1-git-send-email-grom...@linux.ibm.com> Acked-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/ppc/spapr_vio.c |

[RFC v2 0/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-25 Thread Eugenio Pérez
I am able to hit this assertion when a Red Hat 7 guest virtio_net device raises an "Invalidation" of all the TLB entries. This happens in the guest's startup if 'intel_iommu=on' argument is passed to the guest kernel and right IOMMU/ATS devices are declared in qemu's command line. Command line: /h

[PULL 0/4] ppc-for-5.1 queue 20200626

2020-06-25 Thread David Gibson
The following changes since commit 63d211993b73ca9ac2bc618afeb61a698e9f5198: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2020-06-25 16:52:42 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-5.1-20200626 for you to

[PULL 4/4] target/ppc: Remove TIDR from POWER10 processor

2020-06-25 Thread David Gibson
From: Cédric Le Goater It is not part of Power ISA Version 3.1. Signed-off-by: Cédric Le Goater Message-Id: <20200623154534.266065-1-...@kaod.org> Signed-off-by: David Gibson --- target/ppc/translate_init.inc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/target/ppc/translate_init.

[PULL 1/4] spapr: Simplify some warning printing paths in spapr_caps.c

2020-06-25 Thread David Gibson
From: Greg Kurz We obviously only want to print a warning in these cases, but this is done in a rather convoluted manner. Just use warn_report() instead. Signed-off-by: Greg Kurz Message-Id: <159188281098.70166.18387926536399257573.st...@bahia.lan> Reviewed-by: Vladimir Sementsov-Ogievskiy Rev

[PULL 3/4] ppc/pnv: Silence missing BMC warning with qtest

2020-06-25 Thread David Gibson
From: Greg Kurz The device introspect test in qtest emits some warnings with the the pnv machine types during the "nodefaults" phase: TEST check-qtest-ppc64: tests/qtest/device-introspect-test qemu-system-ppc64: warning: machine has no BMC device. Use '-device ipmi-bmc-sim,id=bmc0 -device isa-ip

Re: [PATCH 03/46] qdev: Smooth error checking of qdev_realize() & friends

2020-06-25 Thread Markus Armbruster
Vladimir Sementsov-Ogievskiy writes: > 24.06.2020 19:43, Markus Armbruster wrote: >> Convert >> >> foo(..., &err); >> if (err) { >> ... >> } >> >> to >> >> if (!foo(..., &err)) { >> ... >> } >> >> for qdev_realize(), qdev_realize_and_unref(), qbus_realiz

Re: [PATCH v2 3/3] usb/hcd-xhci: Split pci wrapper for xhci base model

2020-06-25 Thread Markus Armbruster
Sai Pavan Boddu writes: > Hi Markus, > >> -Original Message- >> From: Markus Armbruster >> Sent: Thursday, June 25, 2020 1:42 PM >> To: Sai Pavan Boddu >> Cc: Gerd Hoffmann ; Peter Maydell >> ; Thomas Huth ; Eduardo >> Habkost ; qemu-devel@nongnu.org; Alistair Francis >> ; 'Marc-André L

Re: [PATCH v3] build: Haiku build fix

2020-06-25 Thread Thomas Huth
Hi! On 25/06/2020 23.30, David CARLIER wrote: From 78706a28c6aa8b5e522b5781588b38961d79d6f6 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 25 Jun 2020 19:32:42 + Subject: [PATCH] build: haiku system build fix The above header lines should not be part of the e-mail body (otherwi

Re: [PATCH v3 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-06-25 Thread Klaus Jensen
On Jun 25 15:57, Andrzej Jakowski wrote: > On 6/25/20 4:13 AM, Klaus Jensen wrote: > > > > Come to think of it, the above might not even be sufficient since if just > > one > > of the nvme_addr_is_cmb checks fails, we end up issuing an invalid > > pci_dma_read. But I think that it will error out

Re: [PATCH v4 4/8] hw/misc/pca9552: Add a 'description' property for debugging purpose

2020-06-25 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > On 6/25/20 10:12 AM, Philippe Mathieu-Daudé wrote: >> On 6/25/20 8:37 AM, Markus Armbruster wrote: >>> Cédric Le Goater writes: >>> On 6/22/20 10:31 AM, Philippe Mathieu-Daudé wrote: > On 6/22/20 8:27 AM, Cédric Le Goater wrote: >> On 6/21/20 12:58 A

Re: [PATCH v3 0/9] Generalize memory encryption models

2020-06-25 Thread David Gibson
On Thu, Jun 25, 2020 at 09:06:05AM +0200, David Hildenbrand wrote: > >> Still unsure how to bring this new machine property and the cpu feature > >> together. Would be great to have the same interface everywhere, but > >> having two distinct command line objects depend on each other sucks. > > > >

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

2020-06-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626033144.790098-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v9 00/46] target/arm: Implement ARMv8.5-MemTag, system mode Type: series Message-id: 202

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

2020-06-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626033144.790098-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v9 00/46] target/arm: Implement ARMv8.5-MemTag, system mode Type: series Message-id: 202

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

2020-06-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200626033144.790098-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v9 00/46] target/arm: Implement ARMv8.5-MemTag, system mode Type: series Message-id: 202

Re: [PATCH v3 8/8] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions

2020-06-25 Thread David Gibson
On Thu, Jun 25, 2020 at 08:53:54PM -0700, Richard Henderson wrote: > On 6/25/20 2:15 PM, Lijun Pan wrote: > > > > > >> On Jun 25, 2020, at 1:37 PM, Richard Henderson > >> wrote: > >> > >> On 6/25/20 10:00 AM, Lijun Pan wrote: > >>> +#define VDIV_MOD_DO(name, op, element, sign, bit)

Re: [PATCH v3 1/8] target/ppc: Introduce Power ISA 3.1 flag

2020-06-25 Thread Richard Henderson
On 6/25/20 2:12 PM, Lijun Pan wrote: > Do you mean not submiting the second patch until all the instructions are > enabled in the future? Well, I mean not *merging* the second patch until all of the instructions are enabled. r~

[PATCH v9 45/46] target/arm: Enable MTE

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v6: Delay user-only cpu reset bits to the user-only patch set. v9: A

[PATCH v9 44/46] target/arm: Add allocation tag storage for system mode

2020-06-25 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 | 131 1 file changed, 131 insertions(+) d

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

2020-06-25 Thread Richard Henderson
This "bit" is a particular value of the page's MemAttr. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v6: Test HCR_EL2.{DC,DCT}; test Stage2 attributes. v8: Fill in cacheattrs for S1 disabled; retain tagging when combining attributes; set mte_tagging in arm_cpu_tlb_fill. --

[PATCH v9 40/46] target/arm: Set PSTATE.TCO on exception entry

2020-06-25 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 b/target/arm/helper.c

[PATCH v9 38/46] target/arm: Complete TBI clearing for user-only for SVE

2020-06-25 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.

Re: [PATCH v3 8/8] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions

2020-06-25 Thread Richard Henderson
On 6/25/20 2:15 PM, Lijun Pan wrote: > > >> On Jun 25, 2020, at 1:37 PM, Richard Henderson >> wrote: >> >> On 6/25/20 10:00 AM, Lijun Pan wrote: >>> +#define VDIV_MOD_DO(name, op, element, sign, bit) \ >>> +void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b)

[PATCH v9 36/46] target/arm: Handle TBI for sve scalar + int memory ops

2020-06-25 Thread Richard Henderson
We still need to handle tbi for user-only when mte is inactive. Reviewed-by: Peter Maydell 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 --gi

[PATCH v9 32/46] target/arm: Add arm_tlb_bti_gp

2020-06-25 Thread Richard Henderson
Introduce an lvalue macro to wrap target_tlb_bit0. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 13 + target/arm/helper.c| 2 +- target/arm/translate-a64.c | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-25 Thread John G Johnson
> On Jun 23, 2020, at 5:27 AM, Stefan Hajnoczi wrote: > > On Thu, Jun 18, 2020 at 02:38:04PM -0700, John G Johnson wrote: >>> On Jun 15, 2020, at 3:49 AM, Stefan Hajnoczi wrote: >>> An issue with file descriptor passing is that it's hard to revoke access >>> once the file descriptor has been

[PATCH v9 46/46] target/arm: Add arm,armv8.5-memtag to dtb

2020-06-25 Thread Richard Henderson
The mte-v4 linux arm kernel development branch requires these tags. It is still an open question as to whether they will be required for the final commit. Signed-off-by: Richard Henderson --- v9: Split from patch creating the tag memory; sort to the end since it's not yet certain that it's a

[PATCH v9 31/46] target/arm: Tidy trans_LD1R_zpri

2020-06-25 Thread Richard Henderson
Move the variable declarations to the top of the function, but do not create a new label before sve_access_check. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v8: Split out from previous patch (pmm). --- target/arm/translate-sve.c | 12 +++- 1 file changed, 7 insertio

Re: [PATCH v3 4/8] target/ppc: add vmulld instruction

2020-06-25 Thread Richard Henderson
On 6/25/20 2:13 PM, Lijun Pan wrote: >>> case INDEX_op_mul_vec: >>> -    tcg_debug_assert(vece == MO_32 && have_isa_2_07); >>> -    insn = VMULUWM; >>> +    tcg_debug_assert((vece == MO_32 && have_isa_2_07) || >>> + (vece == MO_64 && have_isa_3_10)); >>> +   

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

2020-06-25 Thread Richard Henderson
On 6/25/20 8:30 PM, Richard Henderson wrote: > Version 9 incorporates some review: > > * Adjust some commentary. > * Added an assert for tbi in aarch64_tr_init_disas_context > * Split arm,armv8.5-memtag to a new, final, patch. We might > just leave this one out of qemu mainline until th

[PATCH v9 41/46] target/arm: Always pass cacheattr to get_phys_addr

2020-06-25 Thread Richard Henderson
We need to check the memattr of a page in order to determine whether it is Tagged for MTE. Between Stage1 and Stage2, this becomes simpler if we always collect this data, instead of occasionally being presented with NULL. Use the nonnull attribute to allow the compiler to check that all pointer a

[PATCH v9 26/46] target/arm: Implement helper_mte_checkN

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

[PATCH v9 39/46] target/arm: Implement data cache set allocation tags

2020-06-25 Thread Richard Henderson
This is DC GVA and DC GZVA, and the tag check for DC ZVA. Reviewed-by: Peter Maydell 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

[PATCH v9 25/46] target/arm: Implement helper_mte_check1

2020-06-25 Thread Richard Henderson
Fill out the stub that was added earlier. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v8: Remove ra argument to mte_probe1 (pmm). --- target/arm/internals.h | 48 +++ target/arm/mte_helper.c | 132 +++- 2 files changed, 179 i

[PATCH v9 34/46] target/arm: Add mte helpers for sve scalar + int stores

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 47 +++ target/arm/sve_helper.c| 95 -

[PATCH v9 35/46] target/arm: Add mte helpers for sve scalar + int ff/nf loads

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 98 target/arm/sve_helper.c| 99

[PATCH v9 33/46] target/arm: Add mte helpers for sve scalar + int loads

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/cpu.h | 1 + target/arm/helper-sve.h| 58 ++ target/arm/inte

[PATCH v9 24/46] target/arm: Add gen_mte_checkN

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 1 + target/arm/translate-a64.h | 2 ++

[PATCH v9 30/46] target/arm: Use mte_check1 for sve LD1R

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate-sve.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index 4a613ca689..4fa521989d 100644 --- a/target/arm/translate-sve.c +++ b/

[PATCH v9 29/46] target/arm: Use mte_checkN for sve unpredicated stores

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v8: Drop the out-of-line helper (pmm). --- target/arm/translate-sve.c | 61 +- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve

[PATCH v9 21/46] target/arm: Move regime_el to internals.h

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

[PATCH v9 22/46] target/arm: Move regime_tcr to internals.h

2020-06-25 Thread Richard Henderson
We will shortly need this in mte_helper.c as well. Reviewed-by: Peter Maydell 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/inter

[PATCH v9 20/46] target/arm: Implement the access tag cache flushes

2020-06-25 Thread Richard Henderson
Like the regular data cache flushes, these are nops within qemu. Reviewed-by: Peter Maydell 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 --

[PATCH v9 43/46] target/arm: Create tagged ram when MTE is enabled

2020-06-25 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. v8: Add arm,armv8.5-memtag. v9: Split arm,armv8.5-memtag to another patch; adjust how address spaces are

[PATCH v9 19/46] target/arm: Implement the LDGM, STGM, STZGM instructions

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell 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 ++ ta

[PATCH v9 27/46] target/arm: Add helper_mte_check_zva

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

[PATCH v9 37/46] target/arm: Add mte helpers for sve scatter/gather memory ops

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-sve.h| 285

[PATCH v9 14/46] target/arm: Define arm_cpu_do_unaligned_access for user-only

2020-06-25 Thread Richard Henderson
Use the same code as system mode, so that we generate the same exception + syndrome for the unaligned access. For the moment, if MTE is enabled so that this path is reachable, this would generate a SIGSEGV in the user-only cpu_loop. Decoding the syndrome to produce the proper SIGBUS will be done

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

2020-06-25 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. Reviewed

[PATCH v9 23/46] target/arm: Add gen_mte_check1

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 1 + target/arm/internals.h | 8

[PATCH v9 12/46] target/arm: Implement the GMI instruction

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell 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 2ec02c8a5f..ee9dfa8e43 100644 --- a/target/a

[PATCH v9 16/46] target/arm: Implement the STGP instruction

2020-06-25 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 dele

[PATCH v9 11/46] target/arm: Implement the ADDG, SUBG instructions

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v2: Shift offset in translate; use extract32. v6: Implement inline for !ATA. v8: Use separate decode function. --- target/arm/helper-a64.h| 1 + target/arm/internals.h | 9 +++ target/arm/mte_helper.c| 10

[PATCH v9 18/46] target/arm: Simplify DC_ZVA

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

[PATCH v9 28/46] target/arm: Use mte_checkN for sve unpredicated loads

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v8: Drop the out-of-line helper (pmm). --- target/arm/translate-sve.c | 61 +- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve

[PATCH v9 13/46] target/arm: Implement the SUBP instruction

2020-06-25 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 ee9dfa8e43..abbcdb

[PATCH v9 15/46] target/arm: Implement LDG, STG, ST2G instructions

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell 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, comme

[PATCH v9 09/46] target/arm: Implement the IRG instruction

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell 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. --- targe

[PATCH v9 07/46] target/arm: Add MTE system registers

2020-06-25 Thread Richard Henderson
This is TFSRE0_EL1, TFSR_EL1, TFSR_EL2, TFSR_EL3, RGSR_EL1, GCR_EL1, GMID_EL1, and PSTATE.TCO. Reviewed-by: Peter Maydell 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 G

[PATCH v9 08/46] target/arm: Add MTE bits to tb_flags

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Remove stub helper_mte_check; moved to

[PATCH v9 03/46] target/arm: Add support for MTE to SCTLR_ELx

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.c | 23 +---

[PATCH v9 06/46] target/arm: Add DISAS_UPDATE_NOCHAIN

2020-06-25 Thread Richard Henderson
Add an option that writes back the PC, like DISAS_UPDATE_EXIT, but does not exit back to the main loop. Reviewed-by: Peter Maydell 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

[PATCH v9 05/46] target/arm: Rename DISAS_UPDATE to DISAS_UPDATE_EXIT

2020-06-25 Thread Richard Henderson
Emphasize that the is_jmp option exits to the main loop. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.h | 14 -- target/arm/translate-a64.c | 8 target/arm/translate-vfp.inc.c | 4 ++-- target/arm/translate.c | 1

[PATCH v9 10/46] target/arm: Revise decoding for disas_add_sub_imm

2020-06-25 Thread Richard Henderson
The current Arm ARM has adjusted the official decode of "Add/subtract (immediate)" so that the shift field is only bit 22, and bit 23 is part of the op1 field of the parent category "Data processing - immediate". Reviewed-by: Peter Maydell Suggested-by: Peter Maydell Signed-off-by: Richard Hende

[PATCH v9 01/46] target/arm: Add isar tests for mte

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell 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 cf66b8c7fb..ff70115801 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -3814,6 +3814,16 @@ static inl

[PATCH v9 02/46] target/arm: Improve masking of SCR RES0 bits

2020-06-25 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. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) dif

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

2020-06-25 Thread Richard Henderson
Version 9 incorporates some review: * Adjust some commentary. * Added an assert for tbi in aarch64_tr_init_disas_context * Split arm,armv8.5-memtag to a new, final, patch. We might just leave this one out of qemu mainline until the kernel patch set that requires it gets merged. r~

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

2020-06-25 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v8: Include HCR_DCT. --- target/arm/helper.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/target/arm/helper.c b/target/arm/helper.c index 8a0fb01581..d6c326b58e 100644 --- a/target/arm/helper.c

Re: [PATCH 0/2] target/i386: SSE floating-point fixes

2020-06-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/alpine.deb.2.21.2006252355430.3...@digraph.polyomino.org.uk/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 0/2] target/i386: SSE floating-point fixes Type: series Message-id: alpine.deb.2.

[ANNOUNCE] QEMU 4.2.1 Stable released

2020-06-25 Thread Michael Roth
Hi everyone, I am pleased to announce that the QEMU v4.2.1 stable release is now available: You can grab the tarball from our download page here: https://www.qemu.org/download/#source v4.2.1 is now tagged in the official qemu.git repository, and the stable-4.2 branch has been updated accordin

Qemu installation error from source

2020-06-25 Thread Asmita Jha
Greetings, I had been trying to install qemu from the source. I tried both the methods given on https://www.qemu.org/downloads/#source And also as given on https://wiki.qemu.org/Hosts/Linux But in all cases ,I am getting same error every time. Screenshot attached. Request you all to kindly look in

[PATCH v3 3/3] riscv: Add opensbi firmware dynamic support

2020-06-25 Thread Atish Patra
OpenSBI is the default firmware in Qemu and has various firmware loading options. Currently, qemu loader uses fw_jump which has a compile time pre-defined address where fdt & kernel image must reside. This puts a constraint on image size of the Linux kernel depending on the fdt location and availab

[PATCH v3 1/3] riscv: Unify Qemu's reset vector code path

2020-06-25 Thread Atish Patra
Currently, all riscv machines except sifive_u have identical reset vector code implementations with memory addresses being different for all machines. They can be easily combined into a single function in common code. Move it to common function and let all the machines use the common function. Si

[PATCH v3 2/3] RISC-V: Copy the fdt in dram instead of ROM

2020-06-25 Thread Atish Patra
Currently, the fdt is copied to the ROM after the reset vector. The firmware has to copy it to DRAM. Instead of this, directly copy the device tree to a pre-computed dram address. The device tree load address should be as far as possible from kernel and initrd images. That's why it is kept at the e

[PATCH v3 0/3] Add OpenSBI dynamic firmware support

2020-06-25 Thread Atish Patra
This series adds support OpenSBI dynamic firmware support to Qemu. Qemu loader passes the information about the DT and next stage (i.e. kernel or U-boot) via "a2" register. It allows the user to build bigger OS images without worrying about overwriting DT. It also unifies the reset vector code in r

[PATCH 2/2] target/i386: fix IEEE SSE floating-point exception raising

2020-06-25 Thread Joseph Myers
The SSE instruction implementations all fail to raise the expected IEEE floating-point exceptions because they do nothing to convert the exception state from the softfloat machinery into the exception flags in MXCSR. Fix this by adding such conversions. Unlike for x87, emulated SSE floating-point

[PATCH 1/2] target/i386: set SSE FTZ in correct floating-point state

2020-06-25 Thread Joseph Myers
The code to set floating-point state when MXCSR changes calls set_flush_to_zero on &env->fp_status, so affecting the x87 floating-point state rather than the SSE state. Fix to call it for &env->sse_status instead. Signed-off-by: Joseph Myers --- target/i386/fpu_helper.c | 2 +- 1 file changed,

[PATCH 0/2] target/i386: SSE floating-point fixes

2020-06-25 Thread Joseph Myers
Fix some issues relating to SSE floating-point emulation. The first patch fixes a problem with the handling of the FTZ bit that was found through the testcase written for the second patch. Rather than writing a separate standalone test for that bug, it seemed sufficient for the testcase in the se

Re: [PATCH 1/2] hw/386: Fix uninitialized memory with -device and CPU hotplug

2020-06-25 Thread Babu Moger
On 6/25/20 1:32 PM, Igor Mammedov wrote: > On Thu, 25 Jun 2020 11:41:25 -0500 > Babu Moger wrote: > >> Igor, >> >>> -Original Message- >>> From: Igor Mammedov >>> Sent: Thursday, June 25, 2020 10:19 AM >>> To: Moger, Babu >>> Cc: ehabk...@redhat.com; m...@redhat.com; qemu-devel@nongn

[PATCH] hw/arm: Add 'virtm' hardware

2020-06-25 Thread Keith Packard via
'virtm' is a hardware target that is designed to be used for compiler and library testing on Cortex-M processors. It supports all cortex-m processors and includes sufficient memory to run even large test cases. Signed-off-by: Keith Packard --- MAINTAINERS | 9 +++- hw/arm/Makefile.obj

Re: [PATCH v3 2/2] nvme: allow cmb and pmr to be enabled on same device

2020-06-25 Thread Andrzej Jakowski
On 6/25/20 4:13 AM, Klaus Jensen wrote: > On Jun 22 11:25, Andrzej Jakowski wrote: >> So far it was not possible to have CMB and PMR emulated on the same >> device, because BAR2 was used exclusively either of PMR or CMB. This >> patch places CMB at BAR4 offset so it not conflicts with MSI-X vectors

Re: [PATCH v4 0/8] tpm: Enable usage of TPM TIS with interrupts

2020-06-25 Thread Stefan Berger
On 6/18/20 3:27 AM, Auger Eric wrote: I have to defer this series since there are some things that don't work on the Linux level with IRQ 13 (edge) while they do work fine on the old IRQ 5 (festeoi). I know which changes to make to Linux so that it works on IRQ 13 as well, but I am not sure wh

Re: [PATCH v8 44/45] target/arm: Add allocation tag storage for system mode

2020-06-25 Thread Richard Henderson
On 6/25/20 10:09 AM, Peter Maydell wrote: >>> Comment says we're checking a memory attribute, but the code >>> is checking for TLB_MMIO, which isn't the same thing. >> >> Comment is not trying to allude to Normal vs Device, but "ram" vs "mmio" in >> the >> qemu sense. > > Oh, I see: maybe "if not

[PATCH v6 2/2] target/arm: kvm: Handle misconfigured dabt injection

2020-06-25 Thread Beata Michalska
Injecting external data abort through KVM might trigger an issue on kernels that do not get updated to include the KVM fix. For those and aarch32 guests, the injected abort gets misconfigured to be an implementation defined exception. This leads to the guest repeatedly re-running the faulting instr

[PATCH v6 1/2] target/arm: kvm: Handle DABT with no valid ISS

2020-06-25 Thread Beata Michalska
On ARMv7 & ARMv8 some load/store instructions might trigger a data abort exception with no valid ISS info to be decoded. The lack of decode info makes it at least tricky to emulate those instruction which is one of the (many) reasons why KVM will not even try to do so. Add support for handling tho

[PATCH v6 0/2] target/arm: kvm: Support for KVM DABT with no valid ISS

2020-06-25 Thread Beata Michalska
Some of the ARMv7 & ARMv8 load/store instructions might trigger a data abort exception with no valid ISS info to be decoded. The lack of decode info makes it at least tricky to emulate the instruction which is one of the (many) reasons why KVM will not even try to do so. So far, if a guest made an

QEMU | Pipeline #160234755 has failed for master | 63d21199

2020-06-25 Thread GitLab via
Your pipeline has failed. Project: QEMU ( https://gitlab.com/qemu-project/qemu ) Branch: master ( https://gitlab.com/qemu-project/qemu/-/commits/master ) Commit: 63d21199 ( https://gitlab.com/qemu-project/qemu/-/commit/63d211993b73ca9ac2bc618afeb61a698e9f5198 ) Commit Message: Merge remote-tr

[PATCH v3] build: Haiku build fix

2020-06-25 Thread David CARLIER
>From 78706a28c6aa8b5e522b5781588b38961d79d6f6 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 25 Jun 2020 19:32:42 + Subject: [PATCH] build: haiku system build fix Most of missing features resides in the bsd library. Also defining constant equivalence. Signed-off-by: David Carlier

Re: [PATCH v2] build: Haiku build fix

2020-06-25 Thread no-reply
Patchew URL: https://patchew.org/QEMU/CA+XhMqy_bAnWm3cByobn+4LkVoAEZk3DU2=kwbcdb4m1b2c...@mail.gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH v2] build: Haiku build fix Type: series Message-id: CA+XhMqy_bAnWm3cByobn+

[PATCH v2] build: Haiku build fix

2020-06-25 Thread David CARLIER
>From f249bb9dc67a5d96b55e8b7faef3887c39a6de2c Mon Sep 17 00:00:00 2001 From: David Carlier Date: Thu, 25 Jun 2020 19:32:42 + Subject: [PATCH] build: haiku system build fix Most of missing features resides in the bsd library. Also defining constant equivalence. Signed-off-by: David Carlier

Re: [PATCH v3 8/8] target/ppc: add vdiv{su}{wd} vmod{su}{wd} instructions

2020-06-25 Thread Lijun Pan
> On Jun 25, 2020, at 1:37 PM, Richard Henderson > wrote: > > On 6/25/20 10:00 AM, Lijun Pan wrote: >> +#define VDIV_MOD_DO(name, op, element, sign, bit) \ >> +void helper_v##name(ppc_avr_t *r, ppc_avr_t *a, ppc_avr_t *b) \ >> +{

Re: [PATCH v3 4/8] target/ppc: add vmulld instruction

2020-06-25 Thread Lijun Pan
> On Jun 25, 2020, at 1:25 PM, Richard Henderson > wrote: > > On 6/25/20 10:00 AM, Lijun Pan wrote: >> vmulld: Vector Multiply Low Doubleword. >> >> Signed-off-by: Lijun Pan >> --- >> v3: use tcg_gen_gvec_mul() >> >> target/ppc/translate/vmx-impl.inc.c | 1 + >> target/ppc/translate/vmx-ops.

Re: [PATCH v3 1/8] target/ppc: Introduce Power ISA 3.1 flag

2020-06-25 Thread Lijun Pan
> On Jun 25, 2020, at 12:40 PM, Richard Henderson > wrote: > > On 6/25/20 10:00 AM, Lijun Pan wrote: >> +/* POWER ISA 3.1 >> */ >> +PPC2_ISA310= 0x0010ULL, > > This goes in the first patch, but... > >> #def

Re: [PATCH v3 2/8] target/ppc: add byte-reverse br[dwh] instructions

2020-06-25 Thread Lijun Pan
> On Jun 25, 2020, at 12:42 PM, Richard Henderson > wrote: > > On 6/25/20 10:00 AM, Lijun Pan wrote: >> +static void gen_brh(DisasContext *ctx) >> +{ >> +TCGv_i64 t0 = tcg_temp_new_i64(); >> +TCGv_i64 t1 = tcg_temp_new_i64(); >> +TCGv_i64 t2 = tcg_temp_new_i64(); >> + >> +tcg_

Re: [PULL 00/19] virtio,acpi,pci: fixes, cleanups, tools.

2020-06-25 Thread Peter Maydell
On Thu, 25 Jun 2020 at 00:06, Michael S. Tsirkin wrote: > > The following changes since commit d4b78317b7cf8c0c635b70086503813f79ff21ec: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200623' into staging (2020-06-23 > 18:57:05 +0100) > > are available in the Git r

Re: build: haiky system build fix

2020-06-25 Thread Peter Maydell
On Thu, 25 Jun 2020 at 19:37, David CARLIER wrote: > > From 25adbdcdc17ef51a41759f16576901338ed8a469 Mon Sep 17 00:00:00 2001 > From: David Carlier > Date: Thu, 25 Jun 2020 19:32:42 + > Subject: [PATCH] build: haiku system build fix > > Most of missing features resides in the bsd library. > A

Re: [PATCH v2 1/3] riscv: Unify Qemu's reset vector code path

2020-06-25 Thread Atish Patra
On Thu, Jun 25, 2020 at 12:50 PM Alistair Francis wrote: > > On Thu, Jun 25, 2020 at 11:38 AM Atish Patra wrote: > > > > Currently, all riscv machines except sifive_u have identical reset vector > > code implementations with memory addresses being different for all machines. > > They can be easil

  1   2   3   4   5   >