qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: "Liu, Jinsong" <jinsong.liu@intel.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Avi Kivity <avi@redhat.com>, kvm <kvm@vger.kernel.org>,
	Alexey Zaytsev <alexey.zaytsev@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] Expose tsc deadline timer cpuid to guest
Date: Wed, 28 Dec 2011 20:18:11 +0100	[thread overview]
Message-ID: <4EFB6B73.9060900@web.de> (raw)
In-Reply-To: <DE8DF0795D48FD4CA783C40EC8292335DFF2@SHSMSX101.ccr.corp.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1910 bytes --]

On 2011-12-28 18:35, Liu, Jinsong wrote:
>>> diff --git a/qemu-kvm.h b/qemu-kvm.h
>>> index 2bd5602..8c6c2ea 100644
>>> --- a/qemu-kvm.h
>>> +++ b/qemu-kvm.h
>>> @@ -260,6 +260,7 @@ extern int kvm_irqchip;
>>>  extern int kvm_pit;
>>>  extern int kvm_pit_reinject;
>>>  extern unsigned int kvm_shadow_memory;
>>> +extern int tsc_deadline_timer;
>>>
>>>  int kvm_handle_tpr_access(CPUState *env);
>>>  void kvm_tpr_enable_vapic(CPUState *env);
>>> diff --git a/qemu-options.hx b/qemu-options.hx
>>> index f6df6b9..eff6644 100644
>>> --- a/qemu-options.hx
>>> +++ b/qemu-options.hx
>>> @@ -2619,6 +2619,9 @@ DEF("no-kvm-pit-reinjection", 0,
>>>      QEMU_OPTION_no_kvm_pit_reinjection, "-no-kvm-pit-reinjection\n"
>>>      "                disable KVM kernel mode PIT interrupt
>>> reinjection\n",      QEMU_ARCH_I386) +DEF("no-tsc-deadline-timer",
>>> 0, QEMU_OPTION_no_tsc_deadline_timer, +    "-no-tsc-deadline-timer  
>>> disable tsc deadline timer\n", +    QEMU_ARCH_I386)
>>
>> Hmm, I would really prefer to stop adding switches like this. They
>> won't make it upstream anyway.
> 
> OK, I will try to write a patch w/ better user control cpuid method, i.e. by plus_features and minus_features.

Yep, that would be better.

> 
>>
>> Can't this control be attached to legacy qemu machine models, ie. here
>> anything <= pc-1.0? See how we handle kvmclock.
>>
> 
> You mean, by adding input para like pc_init1(..., kvmclock_enabled, tscdeadline_enabled)?
> I think that's not a good way.

I think it is mandatory as older qemu versions won't expose tscdeadline
to the guest, thus newer versions must not do this when emulating older
machines.

> With more and more cpuid features (N) controlled in this way, machine models would be 2^N.

We likely need a better way to express this via code, I agree. Likely
something declarative as for compat_props.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-12-28 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 20:49 [Qemu-devel] [PATCH] Expose tsc deadline timer cpuid to guest Liu, Jinsong
2011-12-27 15:09 ` Jan Kiszka
2011-12-28 17:35   ` Liu, Jinsong
2011-12-28 19:18     ` Jan Kiszka [this message]
2011-12-29 18:37       ` Liu, Jinsong

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=4EFB6B73.9060900@web.de \
    --to=jan.kiszka@web.de \
    --cc=alexey.zaytsev@gmail.com \
    --cc=avi@redhat.com \
    --cc=jinsong.liu@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.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).