Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp526394pxu; Tue, 1 Dec 2020 18:17:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwPPR9CSoh79UprhU5OgjmrXcSHLayf4JkzLIYBWLhOsNrnPFtrZwUoz/ibEZE1vftGMDMz X-Received: by 2002:a17:906:1a01:: with SMTP id i1mr236549ejf.315.1606875452009; Tue, 01 Dec 2020 18:17:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606875452; cv=none; d=google.com; s=arc-20160816; b=EvPp9fZn1f0WDGvCpr9TL6XBfejaRfaYujSfrjYO4OdqGtQCQ8A4BbLf/Lkg5PlW+L uy+dV+8LRBJnD+cuRf1+5yfE1uVEpor75RHeO0Z5ZIDiGNKRXHKGkfK6iurGaO3fhW1e CfqmyHoOedyHfMDVbhQuNXgV3O0kshj/1+4Ap6FhGjAlZ29U3nw3/WHOGVySC9+TWau/ xqjoBROzQ0/crbm+BS8BoVTOYAIUX2dpGKcJU0jLFSMuxh4BrEkDIoaN1tAVJfmD3tWu iz18v0UWVe0wrVFbO0ikZatCZlRk0LQG2tzyHookAIBYn2Q69BDftDrIZjophPbv7TYg IYsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=tg2a6S+eZ0du0lfpuUTW596toBOs14ZAwnxc+Hou9Ts=; b=Kq5w9U7QpBnZdK7jottaENQnjbpbZazptwDbBi/Bir7aHNBnopiKO+KeKe7PSwdOnG lAWVcdhn7RpCN5P3YL2w6UptoQwYY1JyIFAnspSs+JpcfLKiHVkaNfYKqwV4f2FOCi6H yniCk07XS/wLeTjROijUEayMYA9SC6tcXAe+6oxOJW59DVH1UGGkpF8QaAmWF4JkH23S C5q1MhpLyFzZeNcCHGECHzHP6VNcVP0/L9WfDPVIBggErkT641kUzS0wXPjU6Pfz/vuV KpCWsdS42dCAlw12+q4WrTQaNM5oqiz8g0bU6Z1KcWDCK/qUlh+MyLjFypqe7cBzOKM3 ll+g== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si147568eda.78.2020.12.01.18.17.09; Tue, 01 Dec 2020 18:17:31 -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; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728115AbgLBCPT (ORCPT + 99 others); Tue, 1 Dec 2020 21:15:19 -0500 Received: from mga17.intel.com ([192.55.52.151]:40430 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727126AbgLBCPT (ORCPT ); Tue, 1 Dec 2020 21:15:19 -0500 IronPort-SDR: qINJZtn3GCGvS7UUYBGQfjFtkDaROOReGQnkEqpgxsWg0wdaEndeaTgXM83fxmGT1Riq2WNG+0 9i548VVBaJdA== X-IronPort-AV: E=McAfee;i="6000,8403,9822"; a="152769583" X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="152769583" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 18:14:35 -0800 IronPort-SDR: VE2kQQ2u+jXZZF/lF1p4onHQnSaV04KS7/IW+cjbSLejICEyKPW0/Pmpfwo+I+gDG3CynyANxr DzW0Stt/oy4g== X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="549835606" Received: from shuo-intel.sh.intel.com (HELO localhost) ([10.239.154.30]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 18:14:31 -0800 Date: Wed, 2 Dec 2020 10:14:29 +0800 From: Shuo A Liu To: Greg Kroah-Hartman 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 v6 06/18] virt: acrn: Introduce VM management interfaces Message-ID: <20201202021429.GL17702@shuo-intel.sh.intel.com> References: <20201201093853.12070-1-shuo.a.liu@intel.com> <20201201093853.12070-7-shuo.a.liu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 1.Dec'20 at 11:09:47 +0100, Greg Kroah-Hartman wrote: >On Tue, Dec 01, 2020 at 05:38:41PM +0800, shuo.a.liu@intel.com wrote: >> + vm_param->reserved0 = 0; >> + vm_param->reserved1 = 0; > >NO! > >This means that userspace can put whatever crud they want in those >fields, and you will happily zero it out. Then, when those reserved >fields are wanted to be used in the future, you will take those values >from userspace and accept them as a valid value. But, since userspace >was sending crud before, now you will take that crud and do something >with it. > >TEST IT to verify that it is zero, that way userspace gets it right the >first time, and you don't get it wrong later, as you can not change it >later. OK. Thanks for the elaboration. I will test it and return -EINVAL if it is not zero.