In target/i386/hvf/hvf.c, a break statement was probably missing in `hvf_vcpu_exec()`, in handling EXIT_REASON_HLT.
These lines seemed to be equivalent to `kvm_handle_halt()`.
Signed-off-by: Chen Zhang <tgfbeta@me.com>
---
target/i386/hvf/hvf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 42f9447303..2751c8125c 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -708,6 +708,7 @@ int hvf_vcpu_exec(CPUState *cpu)
!(idtvec_info & VMCS_IDT_VEC_VALID)) {
cpu->halted = 1;
ret = EXCP_HLT;
+ break;
}
ret = EXCP_INTERRUPT;
break;
--
2.21.0
Patchew URL: https://patchew.org/QEMU/087F1D9C-109D-41D1-BE2C-CE5D840C981B@me.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 087F1D9C-109D-41D1-BE2C-CE5D840C981B@me.com Subject: [Qemu-devel] [PATCH] hvf: Add missing break statement === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/087F1D9C-109D-41D1-BE2C-CE5D840C981B@me.com -> patchew/087F1D9C-109D-41D1-BE2C-CE5D840C981B@me.com t [tag update] patchew/20190420091016.213160-1-fengli@smartx.com -> patchew/20190420091016.213160-1-fengli@smartx.com t [tag update] patchew/20190420161446.2274-1-liq3ea@163.com -> patchew/20190420161446.2274-1-liq3ea@163.com t [tag update] patchew/20190420191425.7d1dab82@luklap -> patchew/20190420191425.7d1dab82@luklap Switched to a new branch 'test' 96883b9f2b hvf: Add missing break statement === OUTPUT BEGIN === ERROR: Author email address is mangled by the mailing list #2: Author: Chen Zhang via Qemu-devel <qemu-devel@nongnu.org> total: 1 errors, 0 warnings, 7 lines checked Commit 96883b9f2b8e (hvf: Add missing break statement) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/087F1D9C-109D-41D1-BE2C-CE5D840C981B@me.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On 4/22/19 5:42 AM, Chen Zhang via Qemu-devel wrote:
> In target/i386/hvf/hvf.c, a break statement was probably missing in `hvf_vcpu_exec()`, in handling EXIT_REASON_HLT.
>
> These lines seemed to be equivalent to `kvm_handle_halt()`.
>
Fixes: c97d6d2cdf97
> Signed-off-by: Chen Zhang <tgfbeta@me.com>
> ---
> target/i386/hvf/hvf.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
> index 42f9447303..2751c8125c 100644
> --- a/target/i386/hvf/hvf.c
> +++ b/target/i386/hvf/hvf.c
> @@ -708,6 +708,7 @@ int hvf_vcpu_exec(CPUState *cpu)
> !(idtvec_info & VMCS_IDT_VEC_VALID)) {
> cpu->halted = 1;
> ret = EXCP_HLT;
> + break;
Oops... I'm surprised no compiler warned about this yet...
This probably mean:
- This code is not covered by Continuous Integration
- Upstream maintainers are not building this code
- Upstream is not running this code
Please tell me I'm wrong!
Meanwhile:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> }
> ret = EXCP_INTERRUPT;
> break;
>
On 22/04/19 18:09, Philippe Mathieu-Daudé wrote: > Oops... I'm surprised no compiler warned about this yet... > > This probably mean: > - This code is not covered by Continuous Integration > - Upstream maintainers are not building this code > - Upstream is not running this code > > Please tell me I'm wrong! Indeed I am not building or running this code since it requires a Mac. I am thinking of adding a Patchew builder on macincloud, but I haven't done it yet. However, it is unlikely to be signaled by a compiler---maybe by Coverity. Probably the return value doesn't mean much to the rest of the code, the "cpu->halted = 1" is what counts. I have queued the patch. Paolo
© 2016 - 2026 Red Hat, Inc.