qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: "BrillyWu@viatech.com.cn" <BrillyWu@viatech.com.cn>
Cc: "KaryJin@viatech.com.cn" <KaryJin@viatech.com.cn>,
	"avi@redhat.com" <avi@redhat.com>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] qemu-kvm: Add CPUID support for VIA CPU
Date: Fri, 06 May 2011 09:50:24 +0200	[thread overview]
Message-ID: <4DC3A840.7040906@siemens.com> (raw)
In-Reply-To: <C4F7CD9A92DBFF48AD8779355CD4D7890D88AA@exchsg04.s3graphics.com>

On 2011-05-06 03:06, BrillyWu@viatech.com.cn wrote:
> Hi, Jan
>     Thank you very much for your advice. That's helpful for me.
> 
>> Hi,
>>
>> the subject's tag (qemu-kvm) is misleading. This is actually targeting 
>> the uq/master patch queue, i.e. the upstream kvm staging area.
>>
> 
> If I want to submit a patch for the qemu-kvm-git,  should I use  "[QEMU-DEVEL][Patch]..." as the subject? Or there are other rules for qemu-kvm upstream? If yes, would you like to tell me?. Thanks!

If you really have to target qemu-kvm only, then you tagging is fine.
But this patch does not qualify for such exclusiveness. Rather, your
feature should go into upstream's KVM first and will then be merged back
into qemu-kvm on next update.

> 
>> On 2011-05-05 05:03, BrillyWu@viatech.com.cn wrote:
>>> When KVM is running on VIA CPU with host cpu's model, the
>> feautures of
>>> VIA CPU will be passed into kvm guest by calling the CPUID
>> instruction
>>> for Centaur.
>>>
>>> Signed-off-by: BrillyWu<brillywu@viatech.com.cn>
>>> Signed-off-by: KaryJin<karyjin@viatech.com.cn>
>>> ---
>>>  target-i386/cpu.h   |    7 +++++++
>>>  target-i386/cpuid.c |   48
>>> +++++++++++++++++++++++++++++++++++++++++++++++-
>>
>> You patch is unfortunately line-wrapped.
> 
> Yes, I will be careful the next time.
> 
>>> @@ -721,6 +725,9 @@ typedef struct CPUX86State {
>>>      uint32_t cpuid_ext3_features;
>>>      uint32_t cpuid_apic_id;
>>>      int cpuid_vendor_override;
>>> +    /*Store the results of Centaur's CPUID instructions*/
>>
>> Please format comments like this /* comment text */, ie. with blanks 
>> after/before the /* / */.
> OK, I will check it.
>>
>>> +1050,15 @@ void cpu_x86_cpuid(CPUX86State *env, uin
>>>                     uint32_t *ecx, uint32_t *edx)  {
>>>      /* test if maximum index reached */
>>> -    if (index & 0x80000000) {
>>> +    if ((index & 0xC0000000) == 0xC0000000) {
>>> +	/* Handle the Centaur's CPUID instruction.*
>>> +	* If cpuid_xlevel2 is "0", then put into the*
>>> +	* default case. */
>>> +	if (env->cpuid_xlevel2 == 0)
>>> +	    index = 0xF0000000;
>>> +	else if (index > env->cpuid_xlevel2)
>>> +	    index = env->cpuid_xlevel2;
>>
>> Please validate your patch before posting with scripts/checkpatch.pl.
> 
> OK, I will do it. 
> I found that space is used to code indent other than tab, should I follow it or use tab instead in my patch?
> If I use space, there are some warnings when using scripts/checkpatch.pl to validate the patch. Can I ignore them?

Generally, the advices checkpatch provides are valid and shall be
applied. If you feel like you came across a corner case where the script
reports nonsense, please post your findings to qemu-devel.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

  reply	other threads:[~2011-05-06  7:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-05  3:03 [Qemu-devel] [PATCH] qemu-kvm: Add CPUID support for VIA CPU BrillyWu
2011-05-05  7:45 ` Jan Kiszka
2011-05-06  1:06   ` BrillyWu
2011-05-06  7:50     ` Jan Kiszka [this message]
2011-05-06  9:37       ` BrillyWu
2011-05-06 10:25         ` Jan Kiszka
2011-05-09  5:28           ` BrillyWu

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=4DC3A840.7040906@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=BrillyWu@viatech.com.cn \
    --cc=KaryJin@viatech.com.cn \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --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).