All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	KVM list <kvm@vger.kernel.org>,
	Jin Dongming <jin.dongming@np.css.fujitsu.com>
Subject: Re: [PATCH v2] KVM: IOAPIC: only access APIC registers one dword at a time
Date: Mon, 05 Jul 2010 10:54:20 +0300	[thread overview]
Message-ID: <4C318FAC.8010605@redhat.com> (raw)
In-Reply-To: <4C3155BA.4070903@cn.fujitsu.com>

On 07/05/2010 06:47 AM, Xiao Guangrong wrote:
>
> Avi Kivity wrote:
>    
>> On 07/02/2010 11:00 AM, Xiao Guangrong wrote:
>>      
>>> The IOAPIC spec says:
>>>
>>> When accessing these registers, accesses must be done one dword at a
>>> time.
>>> For example, software should never access byte 2 from the Data
>>> register before
>>> accessing bytes 0 and 1. The hardware will not attempt to recover from
>>> a bad
>>> programming model in this case.
>>>
>>> So, this patch removes other width access
>>>
>>>
>>>        
>> The ioapic code also implements the ia64 iosapic.  I'm guessing that
>> does support 64-bit accesses.  Please check the iosapic documentation.
>>
>>      
> The iosapic also using 32-bit to access registers:
>
> All registers are accessed using 32-bit uncacheable loads and stores to a reserved memory location
> in system memory. This implies that to modify a field (e.g., a bit or a byte) in any register, the
> whole 32-bit register must be read, the field modified, and the 32 bits written back. Partial register
> access, or non-aligned register access, are implementation-defined by the I/O xAPIC and will not
> be compatible across different implementations. Also, registers that are described as 64 bits wide
> are accessed as multiple independent 32-bit registers.
>
> [ From<<  Intel® Itanium® Processor Family Interrupt Architecture Guide>>, P2-6 ]
>    

Ok.

>> There might be guests that use incorrect access despite the
>> documentation; if real hardware supports it, it should work.  So we need
>> to start with just a warning, and allow the access.  Later we can drop
>> the invalid access.
>>      
> If the OS contravene the spec, i thinks it's the OS's bug, also, i have tested some versions
> windows/linux guests, it's no broken, can we directly drop the other wide access?
>    

Well, there's the spec and there's real life, but in this case we can 
try and if we see a problem we'll re-add the other access length.


-- 
error compiling committee.c: too many arguments to function


  parent reply	other threads:[~2010-07-05  7:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-02  4:38 [PATCH] KVM: IOAPIC: only access APIC registers one dword at a time Xiao Guangrong
2010-07-02  7:31 ` Jin Dongming
2010-07-02  7:38   ` Xiao Guangrong
2010-07-02  8:00     ` [PATCH v2] " Xiao Guangrong
2010-07-02 17:42       ` Marcelo Tosatti
2010-07-03  8:20         ` Xiao Guangrong
2010-07-03 10:11       ` Avi Kivity
2010-07-05  3:47         ` Xiao Guangrong
2010-07-05  6:23           ` Gleb Natapov
2010-07-05  7:54           ` Avi Kivity [this message]
2010-07-05  7:56             ` Xiao Guangrong
2010-07-05  8:25               ` Avi Kivity

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=4C318FAC.8010605@redhat.com \
    --to=avi@redhat.com \
    --cc=jin.dongming@np.css.fujitsu.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=xiaoguangrong@cn.fujitsu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.