diff options
| author | Zhang Lei <[email protected]> | 2019-07-03 17:42:50 +0000 |
|---|---|---|
| committer | Paolo Bonzini <[email protected]> | 2019-07-05 10:07:51 +0000 |
| commit | e644fa18e2ffc8895ca30dade503ae10128573a6 (patch) | |
| tree | 7e090af67f4e2b5e91305538daec75be26828cf9 /tools/perf/scripts/python/check-perf-trace.py | |
| parent | KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC (diff) | |
| download | kernel-e644fa18e2ffc8895ca30dade503ae10128573a6.tar.gz kernel-e644fa18e2ffc8895ca30dade503ae10128573a6.zip | |
KVM: arm64/sve: Fix vq_present() macro to yield a bool
The original implementation of vq_present() relied on aggressive
inlining in order for the compiler to know that the code is
correct, due to some const-casting issues. This was causing sparse
and clang to complain, while GCC compiled cleanly.
Commit 0c529ff789bc addressed this problem, but since vq_present()
is no longer a function, there is now no implicit casting of the
returned value to the return type (bool).
In set_sve_vls(), this uncast bit value is compared against a bool,
and so may spuriously compare as unequal when both are nonzero. As
a result, KVM may reject valid SVE vector length configurations as
invalid, and vice versa.
Fix it by forcing the returned value to a bool.
Signed-off-by: Zhang Lei <[email protected]>
Fixes: 0c529ff789bc ("KVM: arm64: Implement vq_present() as a macro")
Signed-off-by: Dave Martin <[email protected]> [commit message rewrite]
Cc: Viresh Kumar <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions
