From owner-svn-src-projects@FreeBSD.ORG Wed Aug 27 08:05:58 2014 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1431D65A; Wed, 27 Aug 2014 08:05:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0010C312B; Wed, 27 Aug 2014 08:05:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7R85vb7022268; Wed, 27 Aug 2014 08:05:57 GMT (envelope-from cherry@FreeBSD.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7R85vgZ022267; Wed, 27 Aug 2014 08:05:57 GMT (envelope-from cherry@FreeBSD.org) Message-Id: <201408270805.s7R85vgZ022267@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cherry set sender to cherry@FreeBSD.org using -f From: "Cherry G. Mathew" Date: Wed, 27 Aug 2014 08:05:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r270697 - projects/amd64_xen_pv/sys/amd64/xen X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 08:05:58 -0000 Author: cherry Date: Wed Aug 27 08:05:57 2014 New Revision: 270697 URL: http://svnweb.freebsd.org/changeset/base/270697 Log: Flag on stack frame that segment registers have been saved. This now completes FreeBSD/Xen pv bringup for UP. Next steps (open list): - Optimise current call paths. (exception.S, amortise across multiple hypercalls etc.) - SMP - vet exception.S (and others) for security. - Bring codebase as close to native as possible, and merge as much code as possible with native and pvhvm. - Merge to -current Approved by: gibbs(implicit) Modified: projects/amd64_xen_pv/sys/amd64/xen/exception.S Modified: projects/amd64_xen_pv/sys/amd64/xen/exception.S ============================================================================== --- projects/amd64_xen_pv/sys/amd64/xen/exception.S Wed Aug 27 06:13:44 2014 (r270696) +++ projects/amd64_xen_pv/sys/amd64/xen/exception.S Wed Aug 27 08:05:57 2014 (r270697) @@ -97,12 +97,16 @@ movq TF_R15(%rsp), %r15 /* Note: %fs/%gs are saved/restored by the hypervisor */ -/* Save generic data segment registers to the stack */ +/* + * Save generic data segment registers to the stack + * Indicate that segments have been saved. + */ #define SAVE_SEGMENT_REGS \ movw %es, TF_ES(%rsp) ; \ movw %ds, TF_DS(%rsp) ; \ movw %fs, TF_FS(%rsp) ; \ movw %gs, TF_FS(%rsp) ; \ + movl $TF_HASSEGS,TF_FLAGS(%rsp) ; \ /* Restore generic data segment registers from the stack */ /* This macro overwrites some general registers */