From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4516C63697 for ; Mon, 16 Nov 2020 16:30:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6B95C20776 for ; Mon, 16 Nov 2020 16:30:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqOsYI+0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732129AbgKPQa4 (ORCPT ); Mon, 16 Nov 2020 11:30:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:56494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730302AbgKPQay (ORCPT ); Mon, 16 Nov 2020 11:30:54 -0500 Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C868A223BD for ; Mon, 16 Nov 2020 16:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605544254; bh=2O3LBp1HPw0KQ1G2spNpvOUgelxUM0n8eKWWsC7ds30=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dqOsYI+0YGbb9NsAnIzVJVzN0+ZCeTcljVXkHY3Ca9c9X+hnuCJH8G2FUn67vfd9U obw74aqxw/UPBefBUp/bAQMVgF7JOQ9WyTuYSFtDMR4oweOAreMWzRFjeNPN566/DC MYCetQ39nn4CSqfi8ZhF3wCBDvpGh7bvgBDqVpPc= Received: by mail-wr1-f41.google.com with SMTP id o15so19352282wru.6 for ; Mon, 16 Nov 2020 08:30:53 -0800 (PST) X-Gm-Message-State: AOAM532T53J/onkMI4e9wpuQnxt2DDbHaoaIYDZ/XcDq7FWW0Vre9qvP e/D/QScROTYaMxnp/YXdR6Rd1TY0N76sPoDo/ajiuw== X-Google-Smtp-Source: ABdhPJxRrSLHlH4ScZov5CaCHz95dre2M6ViQYOjxHY5oh3r9MUJXokIlLxakAYO4Hpet3isswmFWL/5m9Ab6jgvvwU= X-Received: by 2002:a5d:5482:: with SMTP id h2mr9404192wrv.18.1605544252224; Mon, 16 Nov 2020 08:30:52 -0800 (PST) MIME-Version: 1.0 References: <20201116152301.24558-1-jgross@suse.com> <20201116152301.24558-5-jgross@suse.com> In-Reply-To: <20201116152301.24558-5-jgross@suse.com> From: Andy Lutomirski Date: Mon, 16 Nov 2020 08:30:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] x86/xen: drop USERGS_SYSRET64 paravirt call To: Juergen Gross Cc: xen-devel , X86 ML , LKML , Linux Virtualization , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Deep Shah , "VMware, Inc." , Boris Ostrovsky , Stefano Stabellini Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 16, 2020 at 7:23 AM Juergen Gross wrote: > > USERGS_SYSRET64 is used to return from a syscall via sysret, but > a Xen PV guest will nevertheless use the iret hypercall, as there > is no sysret PV hypercall defined. > > So instead of testing all the prerequisites for doing a sysret and > then mangling the stack for Xen PV again for doing an iret just use > the iret exit from the beginning. > > This can easily be done via an ALTERNATIVE like it is done for the > sysenter compat case already. > > While at it remove to stale sysret32 remnants. s/to/the/ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22EEEC6369E for ; Mon, 16 Nov 2020 16:30:59 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F3FA221F8 for ; Mon, 16 Nov 2020 16:30:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqOsYI+0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F3FA221F8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 07DD086650; Mon, 16 Nov 2020 16:30:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lPC2-xjvWDNg; Mon, 16 Nov 2020 16:30:57 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 84529865D0; Mon, 16 Nov 2020 16:30:57 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 6D495C0800; Mon, 16 Nov 2020 16:30:57 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 96483C07FF for ; Mon, 16 Nov 2020 16:30:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8BD46870B9 for ; Mon, 16 Nov 2020 16:30:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g43IrwOfAT2Q for ; Mon, 16 Nov 2020 16:30:54 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by hemlock.osuosl.org (Postfix) with ESMTPS id 60C98870A2 for ; Mon, 16 Nov 2020 16:30:54 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id B3D8921527 for ; Mon, 16 Nov 2020 16:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605544254; bh=2O3LBp1HPw0KQ1G2spNpvOUgelxUM0n8eKWWsC7ds30=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dqOsYI+0YGbb9NsAnIzVJVzN0+ZCeTcljVXkHY3Ca9c9X+hnuCJH8G2FUn67vfd9U obw74aqxw/UPBefBUp/bAQMVgF7JOQ9WyTuYSFtDMR4oweOAreMWzRFjeNPN566/DC MYCetQ39nn4CSqfi8ZhF3wCBDvpGh7bvgBDqVpPc= Received: by mail-wr1-f49.google.com with SMTP id j7so19347231wrp.3 for ; Mon, 16 Nov 2020 08:30:53 -0800 (PST) X-Gm-Message-State: AOAM530Sr7N3zOviGIj+mqdmSxj6pvUuUauspvxjCWIYnQW9TIw6enn4 56DIWRUzqhrrjrGsXsySNKfBrxST1a70mLsj40ByUg== X-Google-Smtp-Source: ABdhPJxRrSLHlH4ScZov5CaCHz95dre2M6ViQYOjxHY5oh3r9MUJXokIlLxakAYO4Hpet3isswmFWL/5m9Ab6jgvvwU= X-Received: by 2002:a5d:5482:: with SMTP id h2mr9404192wrv.18.1605544252224; Mon, 16 Nov 2020 08:30:52 -0800 (PST) MIME-Version: 1.0 References: <20201116152301.24558-1-jgross@suse.com> <20201116152301.24558-5-jgross@suse.com> In-Reply-To: <20201116152301.24558-5-jgross@suse.com> From: Andy Lutomirski Date: Mon, 16 Nov 2020 08:30:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] x86/xen: drop USERGS_SYSRET64 paravirt call To: Juergen Gross Cc: Stefano Stabellini , "VMware, Inc." , X86 ML , LKML , Linux Virtualization , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , xen-devel , Thomas Gleixner , Boris Ostrovsky X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Mon, Nov 16, 2020 at 7:23 AM Juergen Gross wrote: > > USERGS_SYSRET64 is used to return from a syscall via sysret, but > a Xen PV guest will nevertheless use the iret hypercall, as there > is no sysret PV hypercall defined. > > So instead of testing all the prerequisites for doing a sysret and > then mangling the stack for Xen PV again for doing an iret just use > the iret exit from the beginning. > > This can easily be done via an ALTERNATIVE like it is done for the > sysenter compat case already. > > While at it remove to stale sysret32 remnants. s/to/the/ _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D423C61DD8 for ; Mon, 16 Nov 2020 16:31:08 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9AF5621527 for ; Mon, 16 Nov 2020 16:31:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="dqOsYI+0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AF5621527 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.28536.57636 (Exim 4.92) (envelope-from ) id 1kehP6-00039T-Gz; Mon, 16 Nov 2020 16:30:56 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 28536.57636; Mon, 16 Nov 2020 16:30:56 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kehP6-00039M-E6; Mon, 16 Nov 2020 16:30:56 +0000 Received: by outflank-mailman (input) for mailman id 28536; Mon, 16 Nov 2020 16:30:55 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kehP5-00039H-Di for xen-devel@lists.xenproject.org; Mon, 16 Nov 2020 16:30:55 +0000 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3e48c782-6f97-48db-a3e1-60d15c4574d2; Mon, 16 Nov 2020 16:30:54 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC8B520776 for ; Mon, 16 Nov 2020 16:30:53 +0000 (UTC) Received: by mail-wr1-f49.google.com with SMTP id s8so19326221wrw.10 for ; Mon, 16 Nov 2020 08:30:53 -0800 (PST) Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kehP5-00039H-Di for xen-devel@lists.xenproject.org; Mon, 16 Nov 2020 16:30:55 +0000 X-Inumbo-ID: 3e48c782-6f97-48db-a3e1-60d15c4574d2 Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 3e48c782-6f97-48db-a3e1-60d15c4574d2; Mon, 16 Nov 2020 16:30:54 +0000 (UTC) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AC8B520776 for ; Mon, 16 Nov 2020 16:30:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605544254; bh=2O3LBp1HPw0KQ1G2spNpvOUgelxUM0n8eKWWsC7ds30=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=dqOsYI+0YGbb9NsAnIzVJVzN0+ZCeTcljVXkHY3Ca9c9X+hnuCJH8G2FUn67vfd9U obw74aqxw/UPBefBUp/bAQMVgF7JOQ9WyTuYSFtDMR4oweOAreMWzRFjeNPN566/DC MYCetQ39nn4CSqfi8ZhF3wCBDvpGh7bvgBDqVpPc= Received: by mail-wr1-f49.google.com with SMTP id s8so19326221wrw.10 for ; Mon, 16 Nov 2020 08:30:53 -0800 (PST) X-Gm-Message-State: AOAM533uDR5uUtsH+0gO/orTWljHAQYcyONIpxXUtiPGPN8BEqsn6PlY gzybpLrYE+3R+s8JBWU4SWkTkIcZLItyo4y0tTNdpw== X-Google-Smtp-Source: ABdhPJxRrSLHlH4ScZov5CaCHz95dre2M6ViQYOjxHY5oh3r9MUJXokIlLxakAYO4Hpet3isswmFWL/5m9Ab6jgvvwU= X-Received: by 2002:a5d:5482:: with SMTP id h2mr9404192wrv.18.1605544252224; Mon, 16 Nov 2020 08:30:52 -0800 (PST) MIME-Version: 1.0 References: <20201116152301.24558-1-jgross@suse.com> <20201116152301.24558-5-jgross@suse.com> In-Reply-To: <20201116152301.24558-5-jgross@suse.com> From: Andy Lutomirski Date: Mon, 16 Nov 2020 08:30:38 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 4/4] x86/xen: drop USERGS_SYSRET64 paravirt call To: Juergen Gross Cc: xen-devel , X86 ML , LKML , Linux Virtualization , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Deep Shah , "VMware, Inc." , Boris Ostrovsky , Stefano Stabellini Content-Type: text/plain; charset="UTF-8" On Mon, Nov 16, 2020 at 7:23 AM Juergen Gross wrote: > > USERGS_SYSRET64 is used to return from a syscall via sysret, but > a Xen PV guest will nevertheless use the iret hypercall, as there > is no sysret PV hypercall defined. > > So instead of testing all the prerequisites for doing a sysret and > then mangling the stack for Xen PV again for doing an iret just use > the iret exit from the beginning. > > This can easily be done via an ALTERNATIVE like it is done for the > sysenter compat case already. > > While at it remove to stale sysret32 remnants. s/to/the/