From patchwork Fri Jan 25 11:42:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asias He X-Patchwork-Id: 2044311 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 81FBF3FDD1 for ; Fri, 25 Jan 2013 11:40:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757132Ab3AYLkz (ORCPT ); Fri, 25 Jan 2013 06:40:55 -0500 Received: from mail-pa0-f45.google.com ([209.85.220.45]:45379 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755513Ab3AYLkx (ORCPT ); Fri, 25 Jan 2013 06:40:53 -0500 Received: by mail-pa0-f45.google.com with SMTP id bg2so216942pad.18 for ; Fri, 25 Jan 2013 03:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=e/XTut3DCYuZxQfPNMdYi+akTSyh8UCdqWy0WkPpXlc=; b=yv0zoYkCQ7/JJx3Q15TmCZ0Z1eC47KLXUwPR2bK3zvaceCT/SZHX5Eexf+sooCsKaA nkviTrSOk+6P3wa8r/1G/jIf27VKw+HqKUU9XXd0lnm60o0dsFARanGFXIapgQQOh5pl WoncQzvj3JkfgL6eeLRCwCr4eFW8JyF8h8Usl5Mg/nKS+sscGACIeXIRbcTc1FlecRCE pl6FLDBqx8WGvZUfkUpA1U9OquB1MS6epJMP/ynllrQXzLl8vB1pXoVtFpy04Q5s6wlo Qb+UaZujW193DXWtY142PUjEsXIYd9rHZZwGxw4ybBOOWp9CTafUk9YCoenMGhP1auyB CfpA== X-Received: by 10.66.84.3 with SMTP id u3mr12691166pay.51.1359114053493; Fri, 25 Jan 2013 03:40:53 -0800 (PST) Received: from hj.localdomain ([219.236.95.252]) by mx.google.com with ESMTPS id d8sm728255pax.23.2013.01.25.03.40.46 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Jan 2013 03:40:51 -0800 (PST) From: Asias He To: Pekka Enberg Cc: Sasha Levin , Ingo Molnar , Cyrill Gorcunov , kvm@vger.kernel.org Subject: [PATCH] kvm tools: Fix SDL and VNC by setting vidmode correctly Date: Fri, 25 Jan 2013 19:42:02 +0800 Message-Id: <1359114122-25313-1-git-send-email-asias.hejun@gmail.com> X-Mailer: git-send-email 1.8.1 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org In commit dfefbe9d4894efc44c39b2041bd667d0dea43eca kvm tools: allow arch's to provide their own command-line options, vidmode is not setup correctly. Signed-off-by: Asias He --- tools/kvm/x86/kvm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/kvm/x86/kvm.c b/tools/kvm/x86/kvm.c index 687e6b7..2ba1db0 100644 --- a/tools/kvm/x86/kvm.c +++ b/tools/kvm/x86/kvm.c @@ -294,13 +294,13 @@ bool load_bzimage(struct kvm *kvm, int fd_kernel, int fd_initrd, memcpy(p, kernel_cmdline, cmdline_size - 1); } - if (!kvm->cfg.arch.vidmode) - vidmode = -1; /* vidmode should be either specified or set by default */ if (kvm->cfg.vnc || kvm->cfg.sdl) { - if (vidmode == -1) + if (!kvm->cfg.arch.vidmode) vidmode = 0x312; + else + vidmode = kvm->cfg.arch.vidmode; } else { vidmode = 0; }