diff mbox series

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

Message ID 20191101014528.14505-1-richardw.yang@linux.intel.com
State New
Headers show
Series target/i386: return directly from hyperv_init_vcpu() if hyperv not enabled | expand

Commit Message

Wei Yang Nov. 1, 2019, 1:45 a.m. UTC
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.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
---
 target/i386/kvm.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

no-reply@patchew.org Nov. 1, 2019, 2:17 a.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20191101014528.14505-1-richardw.yang@linux.intel.com/



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: 20191101014528.14505-1-richardw.yang@linux.intel.com

=== 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/20191101014528.14505-1-richardw.yang@linux.intel.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
diff mbox series

Patch

diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index bfd09bd441..6532904f0c 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -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"