xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Egger <Christoph.Egger@amd.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Boris Ostrovsky <boris.ostrovsky@amd.com>,
	xen-devel@lists.xensource.com, keir@xen.org
Subject: Re: [PATCH] x86/AMD: Add support for AMD's OSVW feature in guests
Date: Tue, 31 Jan 2012 11:36:07 +0100	[thread overview]
Message-ID: <4F27C417.2070209@amd.com> (raw)
In-Reply-To: <4F27CCE40200007800070120@nat28.tlf.novell.com>

On 01/31/12 11:13, Jan Beulich wrote:
>> --- a/xen/arch/x86/platform_hypercall.c	Thu Jan 26 17:43:31 2012 +0000
>> +++ b/xen/arch/x86/platform_hypercall.c	Mon Jan 30 18:00:50 2012 +0100
>> @@ -166,7 +166,17 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
>>               break;
>>
>>           guest_from_compat_handle(data, op->u.microcode.data);
>> +
>> +        while ( !domctl_lock_acquire() )
>
> It's not clear to me what you're trying to protect against here. I don't
> think this prevents guests from making progress (and hence possibly
> seeing the intermediate [and wrong] OSVW state between
> svm_host_osvw_reset() and svm_host_osvw_init()).

The reason is because when we allocated VCPUs (via XEN_DOMCTL_max_vcpus 
and possibly other controls) we call svm_vcpu_initialise() -> 
svm_guest_osvw_init(). If we are in the middle of microcode update then 
osvw_length/osvw_status may be in an inconsistent state.

Christoph

> Jan
>
>> +            if ( hypercall_preempt_check() )
>> +            {
>> +                ret = hypercall_create_continuation(
>> +                    __HYPERVISOR_platform_op, "h", u_xenpf_op);
>> +                goto out;
>> +            }
>> +
>>           ret = microcode_update(data, op->u.microcode.length);
>> +        domctl_lock_release();
>>       }
>>       break;
>>
>
>
>


-- 
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

  reply	other threads:[~2012-01-31 10:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 17:05 [PATCH] x86/AMD: Add support for AMD's OSVW feature in guests Boris Ostrovsky
2012-01-31 10:13 ` Jan Beulich
2012-01-31 10:36   ` Christoph Egger [this message]
2012-01-31 10:39     ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2012-01-16 21:11 Boris Ostrovsky
2012-01-17  8:26 ` Jan Beulich
2012-01-17 17:54   ` Boris Ostrovsky
2012-01-18  9:50     ` Jan Beulich
2012-01-18 18:26       ` Boris Ostrovsky
2012-01-19  8:10         ` Jan Beulich
2012-01-19  8:46           ` Keir Fraser
2012-01-19 15:57             ` Boris Ostrovsky
2012-01-19 15:22           ` Boris Ostrovsky
2012-01-19 16:29             ` Jan Beulich

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=4F27C417.2070209@amd.com \
    --to=christoph.egger@amd.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@amd.com \
    --cc=keir@xen.org \
    --cc=xen-devel@lists.xensource.com \
    /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).