xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Mukesh Rathor <mukesh.rathor@oracle.com>, xen-devel@lists.xenproject.org
Cc: keir@xen.org, Aravind.Gopalakrishnan@amd.com, jbeulich@suse.com,
	suravee.suthikulpanit@amd.com
Subject: Re: [V0 PATCH 5/6] AMD-PVH: Support TSC_MODE_NEVER_EMULATE for PVH
Date: Mon, 18 Aug 2014 21:43:08 -0400	[thread overview]
Message-ID: <53F2ABAC.8030101@oracle.com> (raw)
In-Reply-To: <53F2AA9B.40200@oracle.com>

On 08/18/2014 09:38 PM, Boris Ostrovsky wrote:
> On 08/15/2014 09:53 PM, Mukesh Rathor wrote:
>> On AMD, MSR_AMD64_TSC_RATIO must be set for rdtsc instruction in guest
>> to properly read the cpu tsc. To that end, set tsc_khz in struct domain.
>>
>> Signed-off-by: Mukesh Rathor <mukesh.rathor@oracle.com>
>> ---
>>   xen/arch/x86/time.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
>> index bd89219..7512aa4 100644
>> --- a/xen/arch/x86/time.c
>> +++ b/xen/arch/x86/time.c
>> @@ -1908,6 +1908,7 @@ void tsc_set_info(struct domain *d,
>>            * but "always_emulate" does not for some reason. Figure out
>>            * why.
>>            */
>> +        d->arch.tsc_khz = cpu_khz;
>>           switch ( tsc_mode )
>>           {
>>           case TSC_MODE_NEVER_EMULATE:
>
> I suspect that TSC_MODE DEFAULT may actually work for PVH: since we 
> don't support migration it should be equivalent to NEVER_EMULATE.
>
> If you replace in tsc_set_info() is_hvm_domain() with 
> is_hvm_container_domain() and allow TSC_MODE_DEFAULT along with 
> TSC_MODE_NEVER_EMULATE under 'if (is_pvh_domain())' then it seems to 
> me that things should be fine.

(hit RET too soon)

... and if TSC_MODE DEFAULT does work then you don't need to set khz 
above since it (as well as some other things) will be set from 
arch_domain_create().

-boris

  reply	other threads:[~2014-08-19  1:43 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-16  1:53 [V0 PATCH 0/6] AMD-PVH: xen domU support Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 1/6] AMD-PVH: construct vmcb changes Mukesh Rathor
2014-08-18  9:10   ` Roger Pau Monné
2014-08-18 23:46     ` Mukesh Rathor
2014-08-19  0:59       ` Boris Ostrovsky
2014-08-19  1:10         ` Mukesh Rathor
2014-08-22  9:39   ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 2/6] AMD-PVH: cpuid intercept Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 3/6] AMD-PVH: call hvm_emulate_one instead of handle_mmio Mukesh Rathor
2014-08-22  9:50   ` Jan Beulich
2014-08-22 18:52     ` Mukesh Rathor
2014-08-25  7:10       ` Jan Beulich
2014-08-26  1:53         ` Mukesh Rathor
2014-08-26  7:17           ` Jan Beulich
2014-08-28  1:07             ` Mukesh Rathor
2014-08-28  7:09               ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 4/6] AMD-PVH: Do not get/set vlapic TPR Mukesh Rathor
2014-08-19  1:16   ` Boris Ostrovsky
2014-08-20 12:11     ` Jan Beulich
2014-08-22  9:52   ` Jan Beulich
2014-08-16  1:53 ` [V0 PATCH 5/6] AMD-PVH: Support TSC_MODE_NEVER_EMULATE for PVH Mukesh Rathor
2014-08-19  1:38   ` Boris Ostrovsky
2014-08-19  1:43     ` Boris Ostrovsky [this message]
2014-08-19  1:43     ` Mukesh Rathor
2014-08-16  1:53 ` [V0 PATCH 6/6] AMD-PVH: enable pvh if requirements met Mukesh Rathor
2014-09-30 16:04 ` [V0 PATCH 0/6] AMD-PVH: xen domU support Roger Pau Monné
2014-09-30 21:38   ` Mukesh Rathor
2014-09-30 21:49     ` Mukesh Rathor
  -- strict thread matches above, loose matches on Subject: below --
2014-12-13  2:58 [AMD PVH]: Partial/domU xen patches Mukesh Rathor
2014-12-13  2:58 ` [V0 PATCH 5/6] AMD-PVH: Support TSC_MODE_NEVER_EMULATE for PVH Mukesh Rathor

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=53F2ABAC.8030101@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=jbeulich@suse.com \
    --cc=keir@xen.org \
    --cc=mukesh.rathor@oracle.com \
    --cc=suravee.suthikulpanit@amd.com \
    --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).