From patchwork Fri Dec 13 06:08:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 3338371 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE47B9F44E for ; Fri, 13 Dec 2013 06:05:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0AFF7207EF for ; Fri, 13 Dec 2013 06:05:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F3C3207CE for ; Fri, 13 Dec 2013 06:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751996Ab3LMGFB (ORCPT ); Fri, 13 Dec 2013 01:05:01 -0500 Received: from tama500.ecl.ntt.co.jp ([129.60.39.148]:57276 "EHLO tama500.ecl.ntt.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209Ab3LMGE7 (ORCPT ); Fri, 13 Dec 2013 01:04:59 -0500 Received: from mfs5.rdh.ecl.ntt.co.jp (mfs5.rdh.ecl.ntt.co.jp [129.60.39.144]) by tama500.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id rBD64wMQ027292 for ; Fri, 13 Dec 2013 15:04:58 +0900 Received: from mfs5.rdh.ecl.ntt.co.jp (localhost.localdomain [127.0.0.1]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id 08F9DE015F for ; Fri, 13 Dec 2013 15:04:58 +0900 (JST) Received: from imail2.m.ecl.ntt.co.jp (imail2.m.ecl.ntt.co.jp [129.60.5.247]) by mfs5.rdh.ecl.ntt.co.jp (Postfix) with ESMTP id E7BB6E0157 for ; Fri, 13 Dec 2013 15:04:57 +0900 (JST) Received: from yshpad ([129.60.241.119]) by imail2.m.ecl.ntt.co.jp (8.13.8/8.13.8) with SMTP id rBD64ubf032044 for ; Fri, 13 Dec 2013 15:04:56 +0900 Date: Fri, 13 Dec 2013 15:08:38 +0900 From: Takuya Yoshikawa To: kvm@vger.kernel.org Subject: [PATCH 2/2] KVM: x86: Add comment on vcpu_enter_guest()'s return value Message-Id: <20131213150838.023cd398.yoshikawa_takuya_b1@lab.ntt.co.jp> In-Reply-To: <20131213150721.ea310a8e.yoshikawa_takuya_b1@lab.ntt.co.jp> References: <20131213150721.ea310a8e.yoshikawa_takuya_b1@lab.ntt.co.jp> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.4; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-TM-AS-MML: No Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Giving proper names to the 0 and 1 was once suggested. But since 0 is returned to the userspace, giving it another name can introduce extra confusion. This patch just explains the meanings instead. Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/x86.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 21748bb..65499fc 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -5834,6 +5834,11 @@ static void vcpu_scan_ioapic(struct kvm_vcpu *vcpu) kvm_apic_update_tmr(vcpu, tmr); } +/* + * Returns 1 to let __vcpu_run() continue the guest execution loop without + * exiting to the userspace. Otherwise, the value will be returned to the + * userspace. + */ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) { int r;