Skip to contentSkip to conversation

target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled

PATCH New Wei Yang 2 participants 2 messages Nov 1, 2019

lore
Share & tools
lore

Wei Yang

author
#0 lore raw

PATCH 1/1 target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled

If hyperv is not enabled, related features are not set or enabled.

No extra work to do, return directly.

---
First time touch hyperv, hope my understanding is correct.

---
 target/i386/kvm.c | 3 +++
 1 file changed, 3 insertions(+)
target/i386/kvm.c +3 -0
index bfd09bd441..6532904f0c 100644
@@ -1365,6 +1365,9 @@ static int hyperv_init_vcpu(X86CPU *cpu)
     Error *local_err = NULL;
     int ret;
 
+    if (!hyperv_enabled(cpu))
+        return 0;
+
     if (cpu->hyperv_passthrough && hv_passthrough_mig_blocker == NULL) {
         error_setg(&hv_passthrough_mig_blocker,
                    "'hv-passthrough' CPU flag prevents migration, use explicit"
Signature · 1 line
2.17.1
#1 lore raw
Patchew URL: https://patchew.org/QEMU/[email protected]/

Patchew URL: https://patchew.org/QEMU/[email protected]/

Hi,

This series seems to have some coding style problems. See output below for more information:

Subject: [PATCH] target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled
Type: series
Message-id: [email protected]

=== 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
Switched to a new branch 'test'
d7652b4 target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled

=== OUTPUT BEGIN ===
ERROR: Missing Signed-off-by: line(s)

total: 1 errors, 0 warnings, 9 lines checked

Commit d7652b4f28ff (target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled) 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/[email protected]/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to [email protected]