Philippe Mathieu-Daudé
6a4e0614c3
x86/cpu: Use definitions from "qemu/units.h"
...
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Acked-by: Eduardo Habkost <ehabkost@redhat.com >
Message-Id: <20180625124238.25339-4-f4bug@amsat.org >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2018-07-02 14:45:23 +02:00
Vitaly Kuznetsov
475120099d
i386/kvm: add support for Hyper-V TLB flush
...
Add support for Hyper-V TLB flush which recently got added to KVM.
Just like regular Hyper-V we announce HV_EX_PROCESSOR_MASKS_RECOMMENDED
regardless of how many vCPUs we have. Windows is 'smart' and uses less
expensive non-EX Hypercall whenever possible (when it wants to flush TLB
for all vCPUs or the maximum vCPU index in the vCPU set requires flushing
is less than 64).
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com >
Message-Id: <20180610184927.19309-1-vkuznets@redhat.com >
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
2018-07-02 14:45:23 +02:00
Peter Maydell
0f02251a30
xtensa: Avoid calling get_page_addr_code() from helper function
...
The xtensa frontend calls get_page_addr_code() from its
itlb_hit_test helper function. This function is really part
of the TCG core's internals, and calling it from a target
helper makes it awkward to make changes to that core code.
It also means that we don't pass the correct retaddr to
tlb_fill(), so we won't correctly handle the case where
an exception is generated.
The helper is used for the instructions IHI, IHU and IPFL.
Change it to call cpu_ldb_code_ra() instead.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-30 12:00:17 -07:00
Richard Henderson
9c509ff94e
target/xtensa: Convert to TranslatorOps
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2018-06-30 12:00:17 -07:00
Richard Henderson
1d38a7011f
target/xtensa: Change gen_intermediate_code dc to pointer
...
This will reduce the size of the patch in the next patch,
where the context will have to be a pointer.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2018-06-30 12:00:17 -07:00
Richard Henderson
3cc18eec0a
target/xtensa: Convert to DisasContextBase
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2018-06-30 12:00:14 -07:00
Richard Henderson
f3531da588
target/xtensa: Replace DISAS_UPDATE with DISAS_NORETURN
...
The usage of DISAS_UPDATE is after noreturn helpers.
It is thus indistinguishable from DISAS_NORETURN.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2018-06-30 11:58:03 -07:00
Max Filippov
f40385c959
target/xtensa: check zero overhead loop alignment
...
ISA book documents that the first instruction of zero overhead loop
must fit completely into naturally aligned region of an instruction
fetch unit size. Check that condition and log a message if it's
violated.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com >
2018-06-30 11:58:02 -07:00
Richard Henderson
802abf4024
target/arm: Add ID_ISAR6
...
This register was added to aa32 state by ARMv8.2.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20180629001538.11415-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:30:54 +01:00
Richard Henderson
0b33968e7f
target/arm: Prune a15 features from max
...
There is no need to re-set these 3 features already
implied by the call to aarch64_a15_initfn.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20180629001538.11415-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:30:54 +01:00
Richard Henderson
156a706536
target/arm: Prune a57 features from max
...
There is no need to re-set these 9 features already
implied by the call to aarch64_a57_initfn.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20180629001538.11415-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:30:54 +01:00
Richard Henderson
11d7870b1b
target/arm: Fix SVE system register access checks
...
Leave ARM_CP_SVE, removing ARM_CP_FPU; the sve_access_check
produced by the flag already includes fp_access_check. If
we also check ARM_CP_FPU the double fp_access_check asserts.
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com >
Message-id: 20180629001538.11415-3-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:30:53 +01:00
Richard Henderson
7e8fafbfd0
target/arm: Fix SVE signed division vs x86 overflow exception
...
We already check for the same condition within the normal integer
sdiv and sdiv64 helpers. Use a slightly different formation that
does not require deducing the expression type.
Fixes: f97cfd596e
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Message-id: 20180629001538.11415-2-richard.henderson@linaro.org
[PMM: reworded a comment]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:28:24 +01:00
Aaron Lindsay
b7d793ad3d
target/arm: Mark PMINTENSET accesses as possibly doing IO
...
This makes it match its AArch64 equivalent, PMINTENSET_EL1
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org >
Message-id: 1529699547-17044-13-git-send-email-alindsay@codeaurora.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:18 +01:00
Aaron Lindsay
a6070648aa
target/arm: Remove redundant DIV detection for KVM
...
KVM implies V7VE, which implies ARM_DIV and THUMB_DIV. The conditional
detection here is therefore unnecessary. Because V7VE is already
unconditionally specified for all KVM hosts, ARM_DIV and THUMB_DIV are
already indirectly specified and do not need to be included here at all.
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org >
Message-id: 1529699547-17044-6-git-send-email-alindsay@codeaurora.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:18 +01:00
Aaron Lindsay
5110e6836b
target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions
...
Signed-off-by: Aaron Lindsay <alindsay@codeaurora.org >
Message-id: 1529699547-17044-5-git-send-email-alindsay@codeaurora.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:17 +01:00
Alex Bennée
26c4a83bd4
target/arm: support reading of CNT[VCT|FRQ]_EL0 from user-space
...
Since kernel commit a86bd139f2 (arm64: arch_timer: Enable CNTVCT_EL0
trap..), released in kernel version v4.12, user-space has been able
to read these system registers. As we can't use QEMUTimer's in
linux-user mode we just directly call cpu_get_clock().
Signed-off-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180625160009.17437-2-alex.bennee@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:16 +01:00
Richard Henderson
26c470a7bb
target/arm: Implement ARMv8.2-DotProd
...
We've already added the helpers with an SVE patch, all that remains
is to wire up the aa64 and aa32 translators. Enable the feature
within -cpu max for CONFIG_USER_ONLY.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-36-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:15 +01:00
Richard Henderson
802ac0e1e9
target/arm: Enable SVE for aarch64-linux-user
...
Enable ARM_FEATURE_SVE for the generic "max" cpu.
Tested-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-35-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:15 +01:00
Richard Henderson
16fcfdc732
target/arm: Implement SVE dot product (indexed)
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20180627043328.11531-34-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:15 +01:00
Richard Henderson
d730ecaae7
target/arm: Implement SVE dot product (vectors)
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-33-richard.henderson@linaro.org
[PMM: moved 'ra=%reg_movprfx' here from following patch]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:13 +01:00
Richard Henderson
18fc240578
target/arm: Implement SVE fp complex multiply add (indexed)
...
Enhance the existing helpers to support SVE, which takes the
index from each 128-bit segment. The change has no effect
for AdvSIMD, since there is only one such segment.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20180627043328.11531-32-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:12 +01:00
Richard Henderson
2cc99919a8
target/arm: Pass index to AdvSIMD FCMLA (indexed)
...
For aa64 advsimd, we had been passing the pre-indexed vector.
However, sve applies the index to each 128-bit segment, so we
need to pass in the index separately.
For aa32 advsimd, the fp32 operation always has index 0, but
we failed to interpret the fp16 index correctly.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20180627043328.11531-31-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:12 +01:00
Richard Henderson
05f48bab30
target/arm: Implement SVE fp complex multiply add
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-30-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:12 +01:00
Richard Henderson
76a9d9cdc4
target/arm: Implement SVE floating-point complex add
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-29-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:11 +01:00
Richard Henderson
a21035822e
target/arm: Implement SVE MOVPRFX
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-28-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:11 +01:00
Richard Henderson
ec5b375bb5
target/arm: Implement SVE floating-point unary operations
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-27-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:11 +01:00
Richard Henderson
cda3c75322
target/arm: Implement SVE floating-point round to integral value
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-26-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:10 +01:00
Richard Henderson
df4de1affc
target/arm: Implement SVE floating-point convert to integer
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-25-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:10 +01:00
Richard Henderson
46d33d1e3c
target/arm: Implement SVE floating-point convert precision
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-24-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:10 +01:00
Richard Henderson
67fcd9ad35
target/arm: Implement SVE floating-point trig multiply-add coefficient
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-23-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:09 +01:00
Richard Henderson
4d2e2a0338
target/arm: Implement SVE FP Compare with Zero Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-22-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:09 +01:00
Richard Henderson
3887c0388d
target/arm: Implement SVE Floating Point Unary Operations - Unpredicated Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-21-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:09 +01:00
Richard Henderson
23fbe79faa
target/arm: Implement SVE FP Fast Reduction Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-20-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:08 +01:00
Richard Henderson
ca40a6e6e3
target/arm: Implement SVE Floating Point Multiply Indexed Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-19-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:08 +01:00
Richard Henderson
cc48affe83
target/arm: Implement SVE floating-point arithmetic with immediate
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-18-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:08 +01:00
Richard Henderson
abfdefd5bd
target/arm: Implement SVE floating-point compare vectors
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-17-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:07 +01:00
Richard Henderson
408ecde97b
target/arm: Implement SVE scatter store vector immediate
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-16-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:07 +01:00
Richard Henderson
ed67eb7fa2
target/arm: Implement SVE first-fault gather loads
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-15-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:06 +01:00
Richard Henderson
673e9fa6c2
target/arm: Implement SVE gather loads
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20180627043328.11531-14-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:06 +01:00
Richard Henderson
dec6cf6b43
target/arm: Implement SVE prefetches
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-13-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:06 +01:00
Richard Henderson
f6dbf62a7e
target/arm: Implement SVE scatter stores
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-12-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:05 +01:00
Richard Henderson
5047c204d0
target/arm: Implement SVE store vector/predicate register
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-11-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:05 +01:00
Richard Henderson
684598640d
target/arm: Implement SVE load and broadcast element
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-10-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:05 +01:00
Richard Henderson
7f9ddf64d5
target/arm: Implement SVE Floating Point Accumulating Reduction Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-9-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:04 +01:00
Richard Henderson
6ceabaad11
target/arm: Implement SVE FP Multiply-Add Group
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Message-id: 20180627043328.11531-8-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:04 +01:00
Richard Henderson
ec3b87c28e
target/arm: Implement SVE floating-point arithmetic (predicated)
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-7-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:04 +01:00
Richard Henderson
8092c6a314
target/arm: Implement SVE integer convert to floating-point
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
[PMM: fixed typo]
Message-id: 20180627043328.11531-6-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:03 +01:00
Richard Henderson
05abe304be
target/arm: Implement SVE load and broadcast quadword
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-5-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:03 +01:00
Richard Henderson
1a039c7e58
target/arm: Implement SVE Memory Contiguous Store Group
...
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-id: 20180627043328.11531-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org >
2018-06-29 15:11:03 +01:00