Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp467696pxb; Thu, 5 Nov 2020 05:07:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJyp1ZYJv1kDdK/gSy+FUt4BlahYAZrdcdajmyiieKDxzfE3I2nuZ7wpJ5dVGwz2cIQMLs36 X-Received: by 2002:a05:6402:17c2:: with SMTP id s2mr2582286edy.40.1604581620456; Thu, 05 Nov 2020 05:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604581620; cv=none; d=google.com; s=arc-20160816; b=V/XqJxoqD48Rpm5mYS8ww7Sc0lWxtdS6RSxzNrsyPU2TuS4w2Itc0L46qYapklZtII bO9J8lb6VC0520zu3U9ImP+nBG7ztrUVZMTH8v00jqxOEjzqfwfUHtiO70tQ1UYU0KW6 sXM9fzYBud/NBUaVDOvol2I8c4FC2/vuxGktRH8imSNxFzwNVf6ld1TCd0qPrrqbvr8G yhI79UMz4+cqSfhqxtxKmSvq9R0bO0DEpQHz8LOGxir3FUx1g01ouQ2lUOPryVQaOxDv 5gr3j7h1LEfkbFilDb0iq/KHTgp5pqYg7sGHPMgqIQDIr/ibIBe3fYIYSE7Ry79cYEz6 YLjw== 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:dkim-signature; bh=oy56J7gCsGLqSV/korb/IrEf6n1dzo9j1gyhQY4gVGk=; b=WqDbdENBkda4sdRbBf7QobPmW/B7DRUdFYOAQBJOS6WMopdf/0gpuGaOQLUxeEt0y3 ZJG/W2Bh3+GGAImPDPYArPPjTnvGfjEgfqDzUPqmUJPcJIYIaaunrIEcYxLmRpgrzAVM 4lmYy4iNfjKzu4OkceeI08Er/kyQvTffmHoi/eYA3/1mDahJ7BHmPjAQbnFMSfEvjxf7 pNXTQ+XO6K7rSCdpc4ljN8ek+4qCPWjgzUzDSHUt6mSUP1Lx1kqtzonP+7DZJjEl/eMC zuf0u7ujROyiDbgXRtrxHfC+JcWN0XS+sRC0xw2zuDlmCIEcg/OCi0qLo8/tl/KmzZgd ebSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=klbXHrXL; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id be27si1053219edb.518.2020.11.05.05.06.36; Thu, 05 Nov 2020 05:07:00 -0800 (PST) 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=pass header.i=@kernel.org header.s=default header.b=klbXHrXL; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730511AbgKENDX (ORCPT + 99 others); Thu, 5 Nov 2020 08:03:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:33642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725468AbgKENDW (ORCPT ); Thu, 5 Nov 2020 08:03:22 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1EA3D20735; Thu, 5 Nov 2020 13:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604581401; bh=0AXaulBY/90pxUS9mtS7AMho9tYU/Li0HNUEeLEWX2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=klbXHrXLpjN5NX5mdMZ5bxcU9bu2eoq30WzZH9JuOXLcfbYLfV4dCCg5oHhIpWN3w OY2yxjVk3y7r7xoBAWYT9smUaUNtX4fhV24bZ3kZIQqDJ6Lg0vFwazxUwwRl0CPt/Y sfrXNx4/R18Nsbmb3G+0xjwSu8BRlawN5gfh6/tc= Date: Thu, 5 Nov 2020 14:04:10 +0100 From: Greg Kroah-Hartman To: Shuo A Liu Cc: linux-kernel@vger.kernel.org, x86@kernel.org, "H . Peter Anvin" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Sean Christopherson , Yu Wang , Reinette Chatre , Zhi Wang , Zhenyu Wang Subject: Re: [PATCH v5 06/17] virt: acrn: Introduce VM management interfaces Message-ID: <20201105130410.GA412878@kroah.com> References: <20201019061803.13298-1-shuo.a.liu@intel.com> <20201019061803.13298-7-shuo.a.liu@intel.com> <20201104190235.GA2855400@kroah.com> <20201105031029.GB17702@shuo-intel.sh.intel.com> <20201105062907.GA693781@kroah.com> <20201105073545.GD17702@shuo-intel.sh.intel.com> <20201105082639.GB3426404@kroah.com> <20201105090200.GE17702@shuo-intel.sh.intel.com> <20201105091645.GA3436809@kroah.com> <20201105124822.GF17702@shuo-intel.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201105124822.GF17702@shuo-intel.sh.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 08:48:22PM +0800, Shuo A Liu wrote: > > > > > Though i can > > > > > keep some reserved fields for alignment (and to keep same data structure > > > > > layout with the hypervisor), right? > > > > > Documentation/driver-api/ioctl.rst says that explicit reserved fields > > > > > could be used. > > > > > > > > If you need alignment, yes, that is fine, but that's not what you are > > > > saying these are for. And if you need alignment, why not move things > > > > around so they are properly aligned. > > > > > > > > And this structure has nothing to do with the hypervisor structure, > > > > that's a internal-kernel structure, not a userspace-visable thing if you > > > > are doing things correctly. > > > > > > It's the same structure with the one in hypervisor. HSM driver > > > doesn't maintain the VM much, it just pass the data for VM creation from > > > userspace to hypervisor. > > > > That sounds ripe for abuse, good luck! > > The hypervisor will do the sanity check. In this case, HSM driver can be > kept simple. Hah, good luck with the fuzzers, crashing a hypervisor will be fun for them! greg k-h