From patchwork Fri Jan 15 14:59:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 8042321 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9C3179F859 for ; Fri, 15 Jan 2016 15:02:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D30ED20439 for ; Fri, 15 Jan 2016 15:02:51 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0A11720453 for ; Fri, 15 Jan 2016 15:02:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aK5r4-0000pK-5a; Fri, 15 Jan 2016 14:59:58 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aK5r2-0000oY-K8 for xen-devel@lists.xenproject.org; Fri, 15 Jan 2016 14:59:56 +0000 Received: from [85.158.137.68] by server-12.bemta-3.messagelabs.com id CF/70-14900-B6909965; Fri, 15 Jan 2016 14:59:55 +0000 X-Env-Sender: prvs=8150a737c=roger.pau@citrix.com X-Msg-Ref: server-5.tower-31.messagelabs.com!1452869990!16144022!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 18030 invoked from network); 15 Jan 2016 14:59:55 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 15 Jan 2016 14:59:55 -0000 X-IronPort-AV: E=Sophos;i="5.22,299,1449532800"; d="scan'208";a="325418780" From: Roger Pau Monne To: Date: Fri, 15 Jan 2016 15:59:42 +0100 Message-ID: <1452869983-75956-4-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 1.9.5 (Apple Git-50.3) In-Reply-To: <1452869983-75956-1-git-send-email-roger.pau@citrix.com> References: <1452869983-75956-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Andrew Cooper , Jan Beulich , Roger Pau Monne Subject: [Xen-devel] [PATCH v2 3/4] x86/hvm: don't set the BSP as initialised in hvm_vcpu_initialise X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable 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 The BSP will be marked as initialised after hvm_load_cpu_ctxt has loaded the initial state, which is called from the toolstack during domain creation. Previous to my HVMlite series HVM guests were started without setting any explicit CPU state (in fact we placed that horrible jmp at 0x0, because the IP was by default set to 0x0). This is no longer true, and now HVM guests require that a proper CPU context is loaded before starting. This change helps enforce this policy. Signed-off-by: Roger Pau Monné --- Cc: Jan Beulich Cc: Andrew Cooper --- Changes since v1: - Expand commit description. --- xen/arch/x86/hvm/hvm.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index 787b7de..05c3ca1 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2474,10 +2474,6 @@ int hvm_vcpu_initialise(struct vcpu *v) /* Init guest TSC to start from zero. */ hvm_set_guest_tsc(v, 0); - - /* Can start up without SIPI-SIPI or setvcpucontext domctl. */ - v->is_initialised = 1; - clear_bit(_VPF_down, &v->pause_flags); } return 0;