Received: from eggs.gnu.org ([209.51.188.92]:48407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEexD-0007Ye-E9 for qemu-devel@nongnu.org; Thu, 11 Apr 2019 15:01:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEexC-0007Xr-Da for qemu-devel@nongnu.org; Thu, 11 Apr 2019 15:01:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39754) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hEexC-0007X0-6D for qemu-devel@nongnu.org; Thu, 11 Apr 2019 15:01:42 -0400 From: Laszlo Ersek References: <20190411175931.29235-1-brijesh.singh@amd.com> <61c415de-ac47-9818-2b06-b9e46445833f@redhat.com> Message-ID: <33d5a129-52d6-e9d6-6211-59e97aff975e@redhat.com> Date: Thu, 11 Apr 2019 21:01:38 +0200 MIME-Version: 1.0 In-Reply-To: <61c415de-ac47-9818-2b06-b9e46445833f@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Singh, Brijesh" , "qemu-devel@nongnu.org" Cc: Erik Skultety , Markus Armbruster , Paolo Bonzini On 04/11/19 20:10, Laszlo Ersek wrote: > On 04/11/19 19:59, Singh, Brijesh wrote: >> There are limited numbers of the SEV guests that can be run concurrent= ly. >> A management applications may need to know this limit so that it can p= lace >> SEV VMs on hosts which have suitable resources available. >> >> Currently, this limit is not exposed to the application. Add a new >> 'sev-max-guest' field in the query-sev-capabilities to provide this >> information. >> >> Cc: Paolo Bonzini >> Cc: Markus Armbruster >> Cc: Eric Blake >> Cc: Daniel P. Berrang=C3=A9 >> Cc: Laszlo Ersek >> Cc: Erik Skultety >> Signed-off-by: Brijesh Singh >> --- >> qapi/target.json | 6 ++++-- >> target/i386/sev.c | 6 ++++-- >> 2 files changed, 8 insertions(+), 4 deletions(-) >> >> diff --git a/qapi/target.json b/qapi/target.json >> index 1d4d54b600..b45121d30b 100644 >> --- a/qapi/target.json >> +++ b/qapi/target.json >> @@ -183,7 +183,8 @@ >> 'data': { 'pdh': 'str', >> 'cert-chain': 'str', >> 'cbitpos': 'int', >> - 'reduced-phys-bits': 'int'}, >> + 'reduced-phys-bits': 'int', >> + 'sev-max-guests': 'int'}, >=20 > Would it be useful to make this new field optional? E.g. if it was > missing, libvirtd could assume "no limit". >=20 > Again, not sure if that's useful, but it's not hard to introduce the > field as optional now. Removing mandatory fields later is impossible. On second thought, if we're sure the hardware / encryption engine will always have this kind of limitation, then mandatory looks fine. Thanks Laszlo