Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1432997pxb; Thu, 28 Oct 2021 03:41:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+w1pq1hbYoiVXopgWT7GjUahrQ15HCXBq2nPzTvE19mtHZvhtcP21dyF3Nx4tKGRyy0P5 X-Received: by 2002:a17:90b:1806:: with SMTP id lw6mr8809341pjb.222.1635417686253; Thu, 28 Oct 2021 03:41:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635417686; cv=none; d=google.com; s=arc-20160816; b=lG2xZjhLl+JQwPY/fwdqmEvEPq42LdtDDtqxUY5oeGvoNxHX5N1LogydiidCHgnpqb f4L4NRMuDfN/Z3QkIWX0Lyf0bDRW28dIvHtcO/7orssDfaWOLHY79rftlWdqFm0cMIOf CGRzCMpYH8Yl2s2Vlrs2SFBQfZ2wYdarGBCAvbBIZFoy9fH/yziUD+JsYOuXxT8Y/oVT lC+e4O5zJ/Sa37MBNhAO2mORn1ZS1ukyB1CF1ZPy2Ozbi/jdD38NsTnmLFZegOFPilNl /WGJbZrpP5nPmzKGT5bYbWilbkz2kKi5EgyY7YX8g6qXEvsih8z5/zcSwhPe3xY/irU9 L6qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=jhjE6uggRXwcLBz6rtpVFtSWpSJGJ9KkPR5seEmlDps=; b=kgr2+cXVthV6QUzWnNMSnEMmJUX59df6OdETHGR8/Tqg8v0mJ9I9GgdMMmQptiR2nv j9aQmr8dZhqi16Fucm+7iPkDqbNPzkkO6/96KT2TW410NEAb1fs1zb/F5DjSfHYF4SGw +6t7z5458SHjCXXP+oTbPMfv75/WbcWdWLep4XNdV1Xh9UiKzgnGlIEjl2nPI+7yQW9J ba+d0gPpet6tD0ooZZw71SHKMnMtzg+D88mSA6f5kg6qMRyvJosUq5l4F+tkm4dXLqI6 FiBtkBtJxH3JM2JHaGfjluQZ2EeKNrKrR7bQj/f0XvpiMpUsMDHXWWwfHYSIT+3IWtK+ /aGg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mr1si3013125pjb.118.2021.10.28.03.41.13; Thu, 28 Oct 2021 03:41:26 -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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230122AbhJ1KmY (ORCPT + 99 others); Thu, 28 Oct 2021 06:42:24 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:40499 "EHLO mail-wr1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229950AbhJ1KmW (ORCPT ); Thu, 28 Oct 2021 06:42:22 -0400 Received: by mail-wr1-f52.google.com with SMTP id e4so9308428wrc.7; Thu, 28 Oct 2021 03:39:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=jhjE6uggRXwcLBz6rtpVFtSWpSJGJ9KkPR5seEmlDps=; b=fT+ZCh5csaROFP8W8HnEaglIk3MACPzJWi6e1o39Cq9ISd8YdF1R5GcGIGThej+Wsb c4G1eHnjNlUYKpgCkJIyXoYi10tjdO6ElBKNruOmp9CaihpzUW/2ddNwa2sfecZ8980S Ov/lwqLkZNfbir8AW4/EoaKjMVkYoQ2EKrBTzrUDC87I0FULRUPuatXobsE7uTsQXH2+ Hfh8U7SdF9fRJOrqRqv/MvEG67JHkWIug4IgbajsG5TejjpiDp7HzGj9y0sTu18DgLvw ZvqLMu/vBxfdzeW4zAQAaYNgze+v3vQnFovv7Z6jffwycOtbFlUQezPHBBVlWCncHDvw 3CeA== X-Gm-Message-State: AOAM531zTPDLu9brXBLuq3Zf2exMT3HNYAzaCmFjcFV4IAU1AiNruHsn GEUiC7TPO5fhYwB4oKoyqJzXWuxuuxE= X-Received: by 2002:adf:f44e:: with SMTP id f14mr3095256wrp.37.1635417595030; Thu, 28 Oct 2021 03:39:55 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id c16sm2679409wrm.46.2021.10.28.03.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Oct 2021 03:39:54 -0700 (PDT) Date: Thu, 28 Oct 2021 10:39:52 +0000 From: Wei Liu To: Borislav Petkov Cc: Stephen Rothwell , Wei Liu , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Linux Kernel Mailing List , Linux Next Mailing List , Tianyu Lan , Tom Lendacky Subject: Re: linux-next: manual merge of the hyperv tree with the tip tree Message-ID: <20211028103952.olmn4xqnfwnjrdfc@liuwe-devbox-debian-v2> References: <20211026172251.0f655709@canb.auug.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Oct 26, 2021 at 10:27:26AM +0200, Borislav Petkov wrote: > On Tue, Oct 26, 2021 at 05:22:51PM +1100, Stephen Rothwell wrote: > > Hi all, > > > > Today's linux-next merge of the hyperv tree got a conflict in: > > > > arch/x86/mm/pat/set_memory.c > > > > between commit: > > > > e9d1d2bb75b2 ("treewide: Replace the use of mem_encrypt_active() with cc_platform_has()") > > > > from the tip tree and commit: > > > > cf90c4532b92 ("x86/hyperv: Add new hvcall guest address host visibility support") > > > > from the hyperv tree. > > > > I fixed it up (see below) and can carry the fix as necessary. This > > is now fixed as far as linux-next is concerned, but any non trivial > > conflicts should be mentioned to your upstream maintainer when your tree > > is submitted for merging. You may also want to consider cooperating > > with the maintainer of the conflicting tree to minimise any particularly > > complex conflicts. > > > > -- > > Cheers, > > Stephen Rothwell > > > > diff --cc arch/x86/mm/pat/set_memory.c > > index 527957586f3c,525f682ab150..000000000000 > > --- a/arch/x86/mm/pat/set_memory.c > > +++ b/arch/x86/mm/pat/set_memory.c > > @@@ -2024,6 -2025,17 +2026,17 @@@ static int __set_memory_enc_pgtable(uns > > return ret; > > } > > > > + static int __set_memory_enc_dec(unsigned long addr, int numpages, bool enc) > > + { > > + if (hv_is_isolation_supported()) > > + return hv_set_mem_host_visibility(addr, numpages, !enc); > > + > > - if (mem_encrypt_active()) > > ++ if (cc_platform_has(CC_ATTR_MEM_ENCRYPT)) > > + return __set_memory_enc_pgtable(addr, numpages, enc); > > + > > + return 0; > > + } > > + > > int set_memory_encrypted(unsigned long addr, int numpages) > > { > > return __set_memory_enc_dec(addr, numpages, true); > > Looks good, thanks. > > Wei, you could mention this conflict when sending to Linus or you can > simply merge into your branch the tip branch tip:x86/cc which has the > cc_platform_has() changes and then redo the isolation VM stuff ontop. > Boris and Stephen, thanks for the heads-up. Wei. > HTH. > > -- > Regards/Gruss, > Boris. > > SUSE Software Solutions Germany GmbH, GF: Felix Imend?rffer, HRB 36809, AG N?rnberg