Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3191190pxv; Mon, 12 Jul 2021 11:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhgeX/4dJudSdKbM94tTrHsEGcYoT1naesTvV6ngVAgvRj7JIg7+sgfDTJBrNvR/KwywFm X-Received: by 2002:aa7:c412:: with SMTP id j18mr158925edq.119.1626114458331; Mon, 12 Jul 2021 11:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626114458; cv=none; d=google.com; s=arc-20160816; b=BsREU8eGLP7kweSEQ5O/7heJQCInRA9WdnNX9c5Six8OYDwNOALJJCxtiTYj2ui3VG 5G8G/DxGE8kYIlnDU1dm1O5zXwmV4uP2EEfRvohT9Z1X9ARVtVgYB64oBeY8vDjqwYFn WmbPU30CmDtfDyEAPcrOE+ZukO2K/Y2SsKgHraIQxe/3Ue4kqUIruEz0NSRq5peNObvh NmRvWcGve/Iaf7/J4mH/X8AUvYikw23E9Jy7Mzrc2qm6UZ3Cy0+Aufu2SqdMq/QFIiRS Sa2zX951ezZ1KBWDan8sjwg25Ty4+mhSMYT9pa96kzaho7XTNlQvkDN1dwdfZIdM5IdD OKXw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Bh+Pa3oXCjpgXW78zCJeL/+8I2owFHmqqcZPnmGZmAQ=; b=A9t/ZJ0spRBaX+1e5WsuIxqGZDWo3Ps7mch/hr2GUswlckT5+B8X+hnDcN/Zza6Tb9 svrSd9hDHl4tJC43RR0JiHcm77OQf/zHsf74SE/kRWhOiQdBsxa9WOufj10zSZzqq2Rb aZviajinRkSqaLGgdx0KdGnfLzZlmjV/33pymGMpyA6r86VJk3breYlcRw5WDmeWtBEX 5aDKDqvluWnk47L59GDygpElAZ6QjZfVf5Kl71SNEwLNv0vTtXvFO1c26uZFgi2GSTFa 4AytK81doAR2kRuO/hRWp9/6Qb4NHkEw0hVzomXLRjHNCOHeE38yWGL31RxEQgr99Pw+ vKwg== 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 bl4si21335915ejb.689.2021.07.12.11.27.13; Mon, 12 Jul 2021 11:27:38 -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 S235827AbhGLS0y (ORCPT + 99 others); Mon, 12 Jul 2021 14:26:54 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:43794 "EHLO mail-wr1-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230477AbhGLS0x (ORCPT ); Mon, 12 Jul 2021 14:26:53 -0400 Received: by mail-wr1-f52.google.com with SMTP id a13so26874148wrf.10; Mon, 12 Jul 2021 11:24:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Bh+Pa3oXCjpgXW78zCJeL/+8I2owFHmqqcZPnmGZmAQ=; b=N8WvpLyXlLSXAucM3LmUf2peH5b7z3vKs8MsPFRdB1rzcXWayrLcejby+/MFtXNgK3 CNxw8XBvLMOFRayXhkjnigCHAE+zqtmQ1BZlgL5IOTtPY2m+mtJq9LVj5WrHrhaoCUFw ZsOf4/zKT5cMZmKwl3/7s9wEEUBScH7AkUq72WsCIJFC5a8xIQ5kat4aeDr01unt0M1J Ag996mqKyEv1G/u05gm4U0y8VbVYvSNRxYtL+e4NwnKgwB3OBZxZSM/HisoDZ6Y1dQ6u C6rs1xKGG53/BNjbwwAY1QvusVd5wQn/eRalass6aK7V9M7ZABUweWIBCmo4q5scwd7I iojw== X-Gm-Message-State: AOAM533rPt7DMcYxWCtncFW4xncgG0dk2cMOS4Gzoy3Y93NAmedNgPB2 pfjIXUPKWtyBUm6GTGnB8YM= X-Received: by 2002:adf:f848:: with SMTP id d8mr392950wrq.308.1626114242934; Mon, 12 Jul 2021 11:24:02 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id w22sm202821wmc.4.2021.07.12.11.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 11:24:02 -0700 (PDT) Date: Mon, 12 Jul 2021 18:24:00 +0000 From: Wei Liu To: Michael Kelley Cc: sthemmin@microsoft.com, kys@microsoft.com, wei.liu@kernel.org, decui@microsoft.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, x86@kernel.org, hpa@zytor.com, arnd@arndb.de, linux-kernel@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-arch@vger.kernel.org Subject: Re: [PATCH 1/3] Drivers: hv: Make portions of Hyper-V init code be arch neutral Message-ID: <20210712182400.yze3wochnyccaflw@liuwe-devbox-debian-v2> References: <1626060316-2398-1-git-send-email-mikelley@microsoft.com> <1626060316-2398-2-git-send-email-mikelley@microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1626060316-2398-2-git-send-email-mikelley@microsoft.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 11, 2021 at 08:25:14PM -0700, Michael Kelley wrote: [...] > +int hv_common_cpu_init(unsigned int cpu) > +{ > + void **inputarg, **outputarg; > + u64 msr_vp_index; > + gfp_t flags; > + int pgcount = hv_root_partition ? 2 : 1; > + > + /* hv_cpu_init() can be called with IRQs disabled from hv_resume() */ > + flags = irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL; > + > + inputarg = (void **)this_cpu_ptr(hyperv_pcpu_input_arg); > + *inputarg = kmalloc(pgcount * HV_HYP_PAGE_SIZE, flags); This is changed from alloc_pages to kmalloc. Does it ensure the alignment is still correct? Wei.