xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Egger, Christoph" <chegger@amazon.de>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	tim@xen.org, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH 1/1 V5] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr
Date: Mon, 12 Aug 2013 16:40:36 +0200	[thread overview]
Message-ID: <5208F3E4.1050308@amazon.de> (raw)
In-Reply-To: <5208EB74.6050507@amd.com>

On 12.08.13 16:04, Suravee Suthikulpanit wrote:
> On 8/12/2013 8:18 AM, Jan Beulich wrote:
>>>>> On 12.08.13 at 13:13, "Egger, Christoph" <chegger@amazon.de> wrote:
>>> On 12.08.13 11:01, Jan Beulich wrote:
>>>>>>> On 12.08.13 at 10:57, "Egger, Christoph" <chegger@amazon.de> wrote:
>>>>> On 08.08.13 08:47, Jan Beulich wrote:
>>>>>> In any case - explaining how nestedhvm_enabled() could end up
>>>>>> returning a value different from hvm_svm_enabled() would help
>>>>>> my understanding.
>>>>> nestedhvm_enabled() returns true when 'nestedhvm=1' in the
>>>>> guest config file.
>>>>>
>>>>> hvm_svm_enabled() returns true when the hvm guest enabled SVM
>>>>> in EFER.
>>>> And the guest should certainly be disallowed to enable SVM in
>>>> EFER when nestedhvm was not 1 in the config file.
>>> That's correct. The guest should also never see SVM available via
>>> cpuid.
>>> Analogous same regarding VMX on Intel.
>> So Suravee, bottom line from this is: Replace the prior checks
>> instead of adding the new ones.
>>
>> Jan
>>
>>
> Ok... I will replace the hvm_svm_enabled() to check the EFER.SVME bit
> instead. 
> I sent out the V6 on Friday which I have separated the patch into two. 
> Would you mind taking one last quick look.

Looking into the how hvm_svm_enabled() is implemented ...

/* True when l1 guest enabled SVM in EFER */
#define hvm_svm_enabled(v) \
    (!!((v)->arch.hvm_vcpu.guest_efer & EFER_SVME))

... it is already doing this.

Christoph

  parent reply	other threads:[~2013-08-12 14:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-05  8:31 [PATCH 1/1 V5] x86/AMD: Fix nested svm crash due to assertion in __virt_to_maddr suravee.suthikulpanit
2013-08-07 13:17 ` Jan Beulich
2013-08-07 22:18   ` Suravee Suthikulanit
2013-08-08  6:47     ` Jan Beulich
2013-08-08 15:55       ` Suravee Suthikulanit
2013-08-12  8:57       ` Egger, Christoph
2013-08-12  9:01         ` Jan Beulich
2013-08-12 11:13           ` Egger, Christoph
2013-08-12 13:18             ` Jan Beulich
2013-08-12 14:04               ` Suravee Suthikulpanit
2013-08-12 14:26                 ` Jan Beulich
2013-08-12 14:40                 ` Egger, Christoph [this message]
2013-08-12 15:26                   ` Jan Beulich
2013-08-08  9:38   ` Tim Deegan
2013-08-08 16:42     ` Suravee Suthikulanit

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=5208F3E4.1050308@amazon.de \
    --to=chegger@amazon.de \
    --cc=JBeulich@suse.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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;
as well as URLs for NNTP newsgroup(s).