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,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 8A82CC00A89 for ; Thu, 5 Nov 2020 13:03:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B1DD20756 for ; Thu, 5 Nov 2020 13:03:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604581404; bh=0AXaulBY/90pxUS9mtS7AMho9tYU/Li0HNUEeLEWX2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=cx461//Na1u1yOldBn6AqnkqKD3NsV5IiL9fDX+H2OwyITjagSzAh0bnWpHIAu9VX Qq76mv7AzMW03O2I1aVE/8ZTOrbVfvI5j50E4IFMM89ZSmtQJ2J6ZeeKZ4pb1NkwVL hC8pZK7HwD3s3Yv6+nYPY8ts1yyG2pn/RFE5IoeY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730553AbgKENDX (ORCPT ); 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