From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjwop-0003Ba-CV for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjwol-0007HI-9u for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:08:47 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:36075) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjwol-0007H7-2M for qemu-devel@nongnu.org; Tue, 13 Sep 2016 19:08:43 -0400 Received: by mail-wm0-f65.google.com with SMTP id b184so583800wma.3 for ; Tue, 13 Sep 2016 16:08:43 -0700 (PDT) Sender: Paolo Bonzini References: <147377800565.11859.4411044563640180545.stgit@brijesh-build-machine> <147377817920.11859.9423132506504837623.stgit@brijesh-build-machine> From: Paolo Bonzini Message-ID: <859d1705-0a8c-21d4-6abb-d33b62a77a14@redhat.com> Date: Wed, 14 Sep 2016 01:07:39 +0200 MIME-Version: 1.0 In-Reply-To: <147377817920.11859.9423132506504837623.stgit@brijesh-build-machine> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH v1 17/22] target-i386: add cpuid Fn8000_001f List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Brijesh Singh , ehabkost@redhat.com, crosthwaite.peter@gmail.com, armbru@redhat.com, mst@redhat.com, p.fedin@samsung.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, rth@twiddle.net On 13/09/2016 16:49, Brijesh Singh wrote: > Fn8000_001f cpuid provides the memory encryption (aka C-bit) > > Signed-off-by: Brijesh Singh > --- > target-i386/cpu.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target-i386/cpu.c b/target-i386/cpu.c > index 6a1afab..e039c08 100644 > --- a/target-i386/cpu.c > +++ b/target-i386/cpu.c > @@ -2625,6 +2625,9 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count, > *edx = 0; > } > break; > + case 0x8000001F: > + host_cpuid(index, 0, eax, ebx, ecx, edx); > + break; > case 0xC0000000: > *eax = env->cpuid_xlevel2; > *ebx = 0; > > > This should only be visible to a SEV-enabled guest. Also, the xlevel should be bumped to 0x8000001F for SEV-enabled guests. Paolo