public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: "Itamar Heim" <itamarh@gmail.com>
To: "'Alexander Graf'" <agraf@suse.de>
Cc: "Avi Kivity" <avi@qumranet.com>, <kvm@vger.kernel.org>,
	<joro@8bytes.org>, <anthony@codemonkey.ws>
Subject: RE: [PATCH 2/2] Allow the SVM CPUID bit in a VM
Date: Tue, 2 Sep 2008 22:36:05 +0300	[thread overview]
Message-ID: <019e01c90d33$2b9f4080$82ddc180$@com> (raw)
In-Reply-To: <484561CE-F0E6-45E9-BBF0-7DBDB8571873@suse.de>

Userspace may know better, for example when you want to allow live migration
between multiple hosts and want to calculate lowest common denominator
between them.

-----Original Message-----
From: kvm-owner@vger.kernel.org [mailto:kvm-owner@vger.kernel.org] On Behalf
Of Alexander Graf
Sent: Tuesday, September 02, 2008 20:54 PM
To: Alexander Graf
Cc: Avi Kivity; kvm@vger.kernel.org; joro@8bytes.org; anthony@codemonkey.ws
Subject: Re: [PATCH 2/2] Allow the SVM CPUID bit in a VM


On Sep 2, 2008, at 7:42 PM, Alexander Graf wrote:

>
> On Sep 1, 2008, at 4:00 PM, Avi Kivity wrote:
>
>> Alexander Graf wrote:
>>> Usually the qemu-kvm-bridge removes the SVM capability flag. Since  
>>> KVM now
>>> supports nested SVM, this is no longer necessary.
>>>
>>> Signed-off-by: Alexander Graf <agraf@suse.de>
>>> ---
>>> qemu/qemu-kvm-x86.c |    3 ---
>>> 1 files changed, 0 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
>>> index 5daedd1..cfc533f 100644
>>> --- a/qemu/qemu-kvm-x86.c
>>> +++ b/qemu/qemu-kvm-x86.c
>>> @@ -489,9 +489,6 @@ static void do_cpuid_ent(struct  
>>> kvm_cpuid_entry *e, uint32_t function,
>>> 	// nx
>>> 	if ((h_edx & 0x00100000) == 0)
>>> 	    e->edx &= ~0x00100000u;
>>> -	// svm
>>> -	if (e->ecx & 4)
>>> -	    e->ecx &= ~4u;
>>>    }
>>>
>>
>> Needs to be predicated on a KVM_CAP_ test, so we don't enable this  
>> on older kvms.
>
> Is this a real problem? We don't allow setting SVME on older kernels  
> anyways.

On a sidenote I'm really not fond of the userspace CPUID capability  
restrictions in the first place. Shouldn't this all be determined in  
the kernel module? It doesn't make since IMHO to restrict NX usage  
from userspace. The kernel module knows best what it's capable of.

Alex

>
>
> Alex
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2008-09-02 19:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-01 11:59 [PATCH 0/2] [RFC] Add support for nested SVM (userspace) Alexander Graf
2008-09-01 11:59 ` [PATCH 1/2] Add SVM CPUID feature define for backwards compatibility Alexander Graf
2008-09-01 11:59   ` [PATCH 2/2] Allow the SVM CPUID bit in a VM Alexander Graf
2008-09-01 14:00     ` Avi Kivity
2008-09-02 17:42       ` Alexander Graf
2008-09-02 17:53         ` Alexander Graf
2008-09-02 19:36           ` Itamar Heim [this message]
2008-09-03  7:55           ` Gerd Hoffmann
2008-09-03  8:04             ` Alexander Graf
2008-09-03  9:19               ` Avi Kivity
2008-09-03  9:13         ` Avi Kivity

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='019e01c90d33$2b9f4080$82ddc180$@com' \
    --to=itamarh@gmail.com \
    --cc=agraf@suse.de \
    --cc=anthony@codemonkey.ws \
    --cc=avi@qumranet.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox