From patchwork Wed Sep 5 08:31:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 1406481 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 02CB2DF264 for ; Wed, 5 Sep 2012 08:32:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757519Ab2IEIcM (ORCPT ); Wed, 5 Sep 2012 04:32:12 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:62330 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999Ab2IEIcD (ORCPT ); Wed, 5 Sep 2012 04:32:03 -0400 Received: by wgbdr13 with SMTP id dr13so388118wgb.1 for ; Wed, 05 Sep 2012 01:32:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=RK6JzPXPVRCkAwPZIwQ8+iv+xTQtvG3gR9soD8g7Cz8=; b=VWtdOQZqjHxjASOd+rHwrMxXO2ajKHVs18ubQcrnta8qovvhGjAJtMXvW3+cxEYPfq /biB7JPWL/1wRGUNmxJxgP9yCuviE0+cSpK5BX6R3Pmh7qLq0Q5dtMU3GrkxN79t8y8S lO/FTiV3FjJ+MstlgtQfjFqhcewYVeKdrp+9uEVo1GAREdKub+/mYFsm/3gCiJbRlEMC NrCVmownXVO3XFUTOcs4w6ap/e/0vs0QMlVsysuPukLW+FINGEUJwDpADywY9XAPCDCn J2vo2iDMOI2w12XuEcvgL/syqCHyMobhuYDOtOmu6k6RtikjxzU2HBMiNgjqcY+pYc0G B3HQ== Received: by 10.216.140.104 with SMTP id d82mr3323144wej.130.1346833921885; Wed, 05 Sep 2012 01:32:01 -0700 (PDT) Received: from lappy.capriciverd.com (20.Red-80-59-140.staticIP.rima-tde.net. [80.59.140.20]) by mx.google.com with ESMTPS id q4sm27971068wix.9.2012.09.05.01.31.59 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Sep 2012 01:32:00 -0700 (PDT) From: Sasha Levin To: penberg@kernel.org Cc: asias.hejun@gmail.com, mingo@elte.hu, gorcunov@openvz.org, kvm@vger.kernel.org, Sasha Levin Subject: [PATCH 05/33] kvm tools: remove redundancy between kvm_config and kvm Date: Wed, 5 Sep 2012 10:31:39 +0200 Message-Id: <1346833927-15740-6-git-send-email-levinsasha928@gmail.com> X-Mailer: git-send-email 1.7.12 In-Reply-To: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> References: <1346833927-15740-1-git-send-email-levinsasha928@gmail.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Remove some redundant members between struct kvm_config and struct kvm since options are now contained within struct kvm. Signed-off-by: Sasha Levin --- tools/kvm/builtin-run.c | 2 -- tools/kvm/hw/rtc.c | 2 +- tools/kvm/include/kvm/kvm.h | 3 --- tools/kvm/kvm-cpu.c | 2 +- 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index a8926dd..8221c22 100644 --- a/tools/kvm/builtin-run.c +++ b/tools/kvm/builtin-run.c @@ -1040,8 +1040,6 @@ static int kvm_cmd_run_init(int argc, const char **argv) if (r) goto fail; - kvm->single_step = kvm->cfg.single_step; - r = ioeventfd__init(kvm); if (r < 0) { pr_err("ioeventfd__init() failed with error %d\n", r); diff --git a/tools/kvm/hw/rtc.c b/tools/kvm/hw/rtc.c index b4f9f1f..4941daf 100644 --- a/tools/kvm/hw/rtc.c +++ b/tools/kvm/hw/rtc.c @@ -134,4 +134,4 @@ int rtc__exit(struct kvm *kvm) ioport__unregister(0x0071); return 0; -} \ No newline at end of file +} diff --git a/tools/kvm/include/kvm/kvm.h b/tools/kvm/include/kvm/kvm.h index 167693e..ca4375a 100644 --- a/tools/kvm/include/kvm/kvm.h +++ b/tools/kvm/include/kvm/kvm.h @@ -42,15 +42,12 @@ struct kvm { int nrcpus; /* Number of cpus to run */ u32 mem_slots; /* for KVM_SET_USER_MEMORY_REGION */ - u64 ram_size; void *ram_start; u64 ram_pagesize; bool nmi_disabled; - bool single_step; - const char *vmlinux; struct disk_image **disks; int nr_disks; diff --git a/tools/kvm/kvm-cpu.c b/tools/kvm/kvm-cpu.c index 12791dd..dbd14b7 100644 --- a/tools/kvm/kvm-cpu.c +++ b/tools/kvm/kvm-cpu.c @@ -92,7 +92,7 @@ int kvm_cpu__start(struct kvm_cpu *cpu) kvm_cpu__reset_vcpu(cpu); - if (cpu->kvm->single_step) + if (cpu->kvm->cfg.single_step) kvm_cpu__enable_singlestep(cpu); while (cpu->is_running) {