Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2107395pxa; Fri, 7 Aug 2020 03:23:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoEZ6LC0YkDf2U9dlBrGh+w9R4Xy+RyEyV2p1R1axtqUSgAbsgF095AbBHTei1LwOo7I62 X-Received: by 2002:a05:6402:1643:: with SMTP id s3mr8440494edx.185.1596795797950; Fri, 07 Aug 2020 03:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596795797; cv=none; d=google.com; s=arc-20160816; b=sJ+eVl3m5Ve+IMeDCeq8YtY19H6Na9bbjtdNqiIf/doru9xEYDEdSBcZ/OZN8HzQJr JeSYkykSh886Z73TkFFRCHTM+8+yLClq71pi7mwqZ9SmrU7ZubAt7uQCc2qzWkUtaMtj EqAEU6Yfal00L9SqClxYzvHJeqbP18mlpenImnkKrUgVIU2wShG8xG2TybhX4jJXcVIX mZMYyDeQxeRCc8KyWm+EIlFmoHsUnR3VWig6ZDnvGpveUCjPzw7Ppsw/3HemjdFlfNk+ p4ONQKdH1j3YJS0HxRH7BNziS95/0h+h0Ydy/i1SRdlkWvZN0dqhZjOWynwZSSbjS6Y/ vJ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=4/VCHM/wzhSgd4qyRAmAC4AWdDxulH6gS0+92poTPxI=; b=Tn6fLKcxBZkAWMOAvCP6U5aRv7zTaRqB9Q+qFQkMvR5nV+VIBMYjHs906Gbou1wuFu PIXtHQLCswgy88EKQcCRJBWvDV+S1exlRaeId919duC73ab20Cfk8mbahE3AHvd8LpO9 Bx9SnwH0smSMOOhgKX39DX7PCOPq03q7zkQ5TN6Q+nU84a2zHocQsc1eeJtumTAQMiBq OSLvoue0IGIMfMLcZN44Ap7vyPS9NiZXYfHO2vDODBRcyRRlp5U5PDt86YAe9/Kq1Y1K KOkU2GA1S3B1YrRQ0NcuyOVi0sRrWg3NpQlcZkTuOzFUd7jORKn0oTuT+k7xb9MQqVpR RfbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XJSka808; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si5028180ejb.69.2020.08.07.03.22.52; Fri, 07 Aug 2020 03:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XJSka808; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728019AbgHGKWT (ORCPT + 99 others); Fri, 7 Aug 2020 06:22:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726511AbgHGKWS (ORCPT ); Fri, 7 Aug 2020 06:22:18 -0400 Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65F76C061574 for ; Fri, 7 Aug 2020 03:22:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Transfer-Encoding: Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description; bh=4/VCHM/wzhSgd4qyRAmAC4AWdDxulH6gS0+92poTPxI=; b=XJSka808E+4ltstGU3BqwdVOtZ hXkd+8kwG+mMF3YBC9gYdFKqQ0shdnwEeGlVgLK2rKX9zQM0cV+cX2kJ4LmaDy9pbGemoN/OFohKt qnuXOPc82zBE1eZRt+Hlbu7DoTyuXW9ud2aYWjPMUx5Dw/3JDO4mQ3YCdTM4HEoCeY/awHrW5ttq7 yGPXiF6gmAUlT3tKwYWzxUSDGRDD8KGANnAswpVZO8evJINZiqIYWUR2sglBnT5anAp66EWDa3CPF 1DOFDSa4vUFlAE+qdQ+8lQ3yc5sir2LRPdpMuROK+/SSyWXy9+HBgPYjDo4knnSw2IjRdxZeDX7ZH TrODYMfA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k3zVg-0002mK-4n; Fri, 07 Aug 2020 10:22:00 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id A12A33012DC; Fri, 7 Aug 2020 12:21:58 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 89ED32B84E245; Fri, 7 Aug 2020 12:21:58 +0200 (CEST) Date: Fri, 7 Aug 2020 12:21:58 +0200 From: peterz@infradead.org To: =?iso-8859-1?Q?J=FCrgen_Gro=DF?= Cc: xen-devel@lists.xenproject.org, x86@kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Andy Lutomirski , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Deep Shah , "VMware, Inc." , Boris Ostrovsky , Stefano Stabellini Subject: Re: [PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL Message-ID: <20200807102158.GG2674@hirez.programming.kicks-ass.net> References: <20200807083826.16794-1-jgross@suse.com> <20200807083826.16794-5-jgross@suse.com> <20200807093916.GF2674@hirez.programming.kicks-ass.net> <3a0712ee-efca-5684-d321-3b789e01fc16@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3a0712ee-efca-5684-d321-3b789e01fc16@suse.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 07, 2020 at 12:02:59PM +0200, J?rgen Gro? wrote: > On 07.08.20 11:39, peterz@infradead.org wrote: > > On Fri, Aug 07, 2020 at 10:38:23AM +0200, Juergen Gross wrote: > > > > > -# else > > > - const unsigned char cpu_iret[1]; > > > -# endif > > > }; > > > static const struct patch_xxl patch_data_xxl = { > > > @@ -42,7 +38,6 @@ static const struct patch_xxl patch_data_xxl = { > > > .irq_save_fl = { 0x9c, 0x58 }, // pushf; pop %[re]ax > > > .mmu_read_cr2 = { 0x0f, 0x20, 0xd0 }, // mov %cr2, %[re]ax > > > .mmu_read_cr3 = { 0x0f, 0x20, 0xd8 }, // mov %cr3, %[re]ax > > > -# ifdef CONFIG_X86_64 > > > .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 > > > .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq > > > .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd > > > @@ -50,19 +45,11 @@ static const struct patch_xxl patch_data_xxl = { > > > 0x48, 0x0f, 0x07 }, // swapgs; sysretq > > > .cpu_swapgs = { 0x0f, 0x01, 0xf8 }, // swapgs > > > .mov64 = { 0x48, 0x89, 0xf8 }, // mov %rdi, %rax > > > -# else > > > - .mmu_write_cr3 = { 0x0f, 0x22, 0xd8 }, // mov %eax, %cr3 > > > - .irq_restore_fl = { 0x50, 0x9d }, // push %eax; popf > > > - .cpu_iret = { 0xcf }, // iret > > > -# endif > > > > I was looking at x86_64 paravirt the other day and found we actually > > have pv_ops.cpu.iret users there.. > > On x86_64 we have (without PARAVIRT_XXL): > > #define INTERRUPT_RETURN jmp native_iret > > and with PARAVIRT_XXL this is basically a jmp *pv_ops.cpu.iret which > will then be patched to either jmp native_iret or jmp xen_iret. Ah, okay. Clearly I didn't look hard enough. Thanks!