Journal of Computer Applications ›› 2018, Vol. 38 ›› Issue (7): 1946-1950.DOI: 10.11772/j.issn.1001-9081.2017122890

Previous Articles     Next Articles

Interrupt path optimization method of virtual cryptographic device with reducing context switching

LI Shuai, SUN Lei, GUO Songhui   

  1. Information Engineering University, Zhengzhou Henan 450001, China
  • Received:2017-12-11 Revised:2018-02-06 Online:2018-07-10 Published:2018-07-12
  • Supported by:
    This work is partially supported by the National key Research Program of China (2016YFB0501900).

减少上下文切换的虚拟密码设备中断路径优化方法

李帅, 孙磊, 郭松辉   

  1. 信息工程大学, 郑州 450001
  • 通讯作者: 李帅
  • 作者简介:李帅(1994-),男,河南驻马店人,硕士研究生,主要研究方向:云计算安全;孙磊(1973-),男,江苏靖江人,教授,博士,主要研究方向:云计算基础设施的可信增强和可信虚拟化;郭松辉(1979-),男,四川乐山人,副教授,博士,主要研究方向:云计算安全、虚拟化。
  • 基金资助:
    国家重点研发计划项目(2016YFB0501900)。

Abstract: Aiming at the problem of cryptographic performance being affected by the excessive interrupt transmission cost of the cipher device in virtual environment, an interrupt path optimization method for virtual cryptographic device with Reducing Context Switching (RCS) was proposed. Firstly, a host to Virtual Cipher Machine (VCM) relationship mapping table was established in the kernel of the virtual machine. Then, the types of the interrupt requests that the host transmits to the VCM were judged by the relational mapping table, and the unassigned types in VCM were registered. Finally, the interrupts were handled by the VCM interrupt handler directly. In the process, the system context switching overhead was reduced due to the host intervening and the cryptographic performance was improved. The speed at which the VCM executes the encryption was selected as a performance reference in the experiment. The results show that the speed of VCM using Advanced Encryption Standard (AES) algorithm is increased by 16.35% and that using Secure Hash Algorithm (SHA256) is increased by 12.25%.

Key words: interrupt, Single-Root I/O Virtualization (SR-IOV), Virtual Cipher Machine (VCM), context switching, performance optimization

摘要: 针对虚拟化环境下密码设备中断传输开销过大影响密码运算性能的问题,提出了一种减少上下文切换(RCS)的虚拟密码设备中断路径优化方法。首先,该方法在虚拟密码机(VCM)内核建立了一个由主机到VCM的关系映射表;然后,对传输到VCM的中断请求,由关系映射表判断中断请求类型,并对VCM中不存在的中断类型进行注册;最后,直接交由VCM中断处理器处理。该过程减少了中断处理过程中由于主机介入导致的系统频繁上下文切换开销,提高了VCM的密码运算性能。实验选取VCM执行密码运算的速度作为性能参考指标,结果表明,该机制下VCM使用高级加密标准(AES)算法加密时速度提高了16.35%,使用安全散列算法(SHA256算法)加密时速度提高了12.25%。

关键词: 中断, 单根I/O虚拟化, 虚拟密码机, 上下文切换, 性能优化

CLC Number: