Documentation/virtual/kvm/devices/xics.txt

Chinese translated version of Documentation/virtual/kvm/devices/xics.txt

If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.

Chinese maintainer:Luo Yangyang <794436342@qq.com>
---------------------------------------------------------------------
Documentation/virtual/kvm/devices/xics.txt的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。

中文版维护者: 罗秧秧  <794436342@qq.com>
中文版翻译者: 罗秧秧  <794436342@qq.com>
中文版校译者: 罗秧秧  <794436342@qq.com>

以下为正文
---------------------------------------------------------------------

XICS interrupt controller
XICS中断控制器

Device type supported: KVM_DEV_TYPE_XICS
支持的设备类型: KVM_DEV_TYPE_XICS

Groups:
  KVM_DEV_XICS_SOURCES
  Attributes: One per interrupt source, indexed by the source number.

组:
  KVM_DEV_XICS_SOURCES
  属性:每一个中断源,由信源号索引。

This device emulates the XICS (eXternal Interrupt Controller
Specification) defined in PAPR.  The XICS has a set of interrupt
sources, each identified by a 20-bit source number, and a set of
Interrupt Control Presentation (ICP) entities, also called "servers",
each associated with a virtual CPU.

该装置模拟定义在PAPR里的XICS (外部中断控制器
规范)。该XICS有一组中断
源,每个由一个20位的信源号和一组
中断控制演示( ICP )实体确定,也被称为“服务器”,
每个都与虚拟中央处理器相关。

The ICP entities are created by enabling the KVM_CAP_IRQ_ARCH
capability for each vcpu, specifying KVM_CAP_IRQ_XICS in args[0] and
the interrupt server number (i.e. the vcpu number from the XICS's
point of view) in args[1] of the kvm_enable_cap struct.  Each ICP has
64 bits of state which can be read and written using the
KVM_GET_ONE_REG and KVM_SET_ONE_REG ioctls on the vcpu.  The 64 bit
state word has the following bitfields, starting at the
least-significant end of the word:

通过使每个VCPU有KVM_CAP_IRQ_ARCH的功能
,指定在参数数组args[0]中的KVM_CAP_IRQ_XICS和在参数数组
args[1]中的中断服务器的数(即从XICS的
的角度来看VCPU数),参数数组在kvm_enable_cap结构体中,这样,
ICP实体被创建了。每个ICP有64位的状态,可以通过使用在VCPU上的
I/O通道管理函数KVM_GET_ONE_REG和KVM_SET_ONE_REG 被读取和写入。从64位
状态字这个词的最末端开始,具有以下位域:

* Unused, 16 bits
* Pending interrupt priority, 8 bits
  Zero is the highest priority, 255 means no interrupt is pending.
* Pending IPI (inter-processor interrupt) priority, 8 bits
  Zero is the highest priority, 255 means no IPI is pending.
* Pending interrupt source number, 24 bits
  Zero means no interrupt pending, 2 means an IPI is pending
* Current processor priority, 8 bits
  Zero is the highest priority, meaning no interrupts can be
  delivered, and 255 is the lowest priority.

*未使用, 16位


*未定的中断优先级,8位
  0是最高优先级,255表示没有中断是未决定的。

*未定的IPI (处理器间中断)优先级, 8位
  0是最高优先级,255表示没有处理器间中断是未决定的。

*未定的中断源号,24位
  0表示没有中断是未定的,2表示有一个处理器间中断是未决定的。

*当前处理器优先级, 8位
  0是处理器优先级是最高的,这意味着没有中断可以
  被交付(不可交付的),255是最低优先级。

Each source has 64 bits of state that can be read and written using
the KVM_GET_DEVICE_ATTR and KVM_SET_DEVICE_ATTR ioctls, specifying the
KVM_DEV_XICS_SOURCES attribute group, with the attribute number being
the interrupt source number.  The 64 bit state word has the following
bitfields, starting from the least-significant end of the word:

每个源都有64位的状态,可以通过使用I/O通道管理函数
KVM_GET_DEVICE_ATTR 和 KVM_SET_DEVICE_ATTR被读取和写入的,指定
KVM_DEV_XICS_SOURCES属性组,属性编号为
中断源号。从64位状态字这个词的最末端开始,具有以下位域:

* Destination (server number), 32 bits
  This specifies where the interrupt should be sent, and is the
  interrupt server number specified for the destination vcpu.

* Priority, 8 bits
  This is the priority specified for this interrupt source, where 0 is
  the highest priority and 255 is the lowest.  An interrupt with a
  priority of 255 will never be delivered.

* Level sensitive flag, 1 bit
  This bit is 1 for a level-sensitive interrupt source, or 0 for
  edge-sensitive (or MSI).

* Masked flag, 1 bit
  This bit is set to 1 if the interrupt is masked (cannot be delivered
  regardless of its priority), for example by the ibm,int-off RTAS
  call, or 0 if it is not masked.

* Pending flag, 1 bit
  This bit is 1 if the source has a pending interrupt, otherwise 0.

*目的地(服务器编号),32位
  这个指明中断应该被发送的地点,并且这个是
  为目的地VCPU指定的中断服务器编号。

*优先级,8位
  这是指明该中断源的优先级,其中0是
  最高优先级,255是最低的。优先级值为255
  的中断永远不会被交付。

*电平敏感标志, 1位
  该位是1表示是电平敏感的中断源,要么0表示
  边沿敏感(或MSI) 。

*屏蔽标志,1位
  如果中断屏蔽(不管它的优先级都不能交付),
  则该位被设置为1 ,就像通过IBM,诠释了实时分析系统
  的命令,如果没有被屏蔽则被设置为0。

*未定的标志,1位
   如果信源有一个未决的中断,则该位是1,否则为0。

Only one XICS instance may be created per VM.
每个虚拟机只能有一个XICS实例可以被创建。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值