Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
bc923cc9
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bc923cc9
编写于
5月 13, 2010
作者:
A
Avi Kivity
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
KVM: s390: Centrally lock arch specific vcpu ioctls
Signed-off-by:
N
Avi Kivity
<
avi@redhat.com
>
上级
526b78ad
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
23 deletion
+17
-23
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.c
+17
-23
未找到文件。
arch/s390/kvm/kvm-s390.c
浏览文件 @
bc923cc9
...
...
@@ -363,9 +363,7 @@ int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu)
static
int
kvm_arch_vcpu_ioctl_initial_reset
(
struct
kvm_vcpu
*
vcpu
)
{
vcpu_load
(
vcpu
);
kvm_s390_vcpu_initial_reset
(
vcpu
);
vcpu_put
(
vcpu
);
return
0
;
}
...
...
@@ -415,14 +413,12 @@ static int kvm_arch_vcpu_ioctl_set_initial_psw(struct kvm_vcpu *vcpu, psw_t psw)
{
int
rc
=
0
;
vcpu_load
(
vcpu
);
if
(
atomic_read
(
&
vcpu
->
arch
.
sie_block
->
cpuflags
)
&
CPUSTAT_RUNNING
)
rc
=
-
EBUSY
;
else
{
vcpu
->
run
->
psw_mask
=
psw
.
mask
;
vcpu
->
run
->
psw_addr
=
psw
.
addr
;
}
vcpu_put
(
vcpu
);
return
rc
;
}
...
...
@@ -573,7 +569,7 @@ static int __guestcopy(struct kvm_vcpu *vcpu, u64 guestdest, const void *from,
* KVM_S390_STORE_STATUS_NOADDR: -> 0x1200 on 64 bit
* KVM_S390_STORE_STATUS_PREFIXED: -> prefix
*/
int
__
kvm_s390_vcpu_store_status
(
struct
kvm_vcpu
*
vcpu
,
unsigned
long
addr
)
static
int
kvm_s390_vcpu_store_status
(
struct
kvm_vcpu
*
vcpu
,
unsigned
long
addr
)
{
const
unsigned
char
archmode
=
1
;
int
prefix
;
...
...
@@ -635,45 +631,43 @@ int __kvm_s390_vcpu_store_status(struct kvm_vcpu *vcpu, unsigned long addr)
return
0
;
}
static
int
kvm_s390_vcpu_store_status
(
struct
kvm_vcpu
*
vcpu
,
unsigned
long
addr
)
{
int
rc
;
vcpu_load
(
vcpu
);
rc
=
__kvm_s390_vcpu_store_status
(
vcpu
,
addr
);
vcpu_put
(
vcpu
);
return
rc
;
}
long
kvm_arch_vcpu_ioctl
(
struct
file
*
filp
,
unsigned
int
ioctl
,
unsigned
long
arg
)
{
struct
kvm_vcpu
*
vcpu
=
filp
->
private_data
;
void
__user
*
argp
=
(
void
__user
*
)
arg
;
long
r
;
switch
(
ioctl
)
{
case
KVM_S390_INTERRUPT
:
{
if
(
ioctl
==
KVM_S390_INTERRUPT
)
{
struct
kvm_s390_interrupt
s390int
;
if
(
copy_from_user
(
&
s390int
,
argp
,
sizeof
(
s390int
)))
return
-
EFAULT
;
return
kvm_s390_inject_vcpu
(
vcpu
,
&
s390int
);
}
vcpu_load
(
vcpu
);
switch
(
ioctl
)
{
case
KVM_S390_STORE_STATUS
:
return
kvm_s390_vcpu_store_status
(
vcpu
,
arg
);
r
=
kvm_s390_vcpu_store_status
(
vcpu
,
arg
);
break
;
case
KVM_S390_SET_INITIAL_PSW
:
{
psw_t
psw
;
r
=
-
EFAULT
;
if
(
copy_from_user
(
&
psw
,
argp
,
sizeof
(
psw
)))
return
-
EFAULT
;
return
kvm_arch_vcpu_ioctl_set_initial_psw
(
vcpu
,
psw
);
break
;
r
=
kvm_arch_vcpu_ioctl_set_initial_psw
(
vcpu
,
psw
);
break
;
}
case
KVM_S390_INITIAL_RESET
:
return
kvm_arch_vcpu_ioctl_initial_reset
(
vcpu
);
r
=
kvm_arch_vcpu_ioctl_initial_reset
(
vcpu
);
break
;
default:
;
r
=
-
EINVAL
;
}
return
-
EINVAL
;
vcpu_put
(
vcpu
);
return
r
;
}
/* Section: memory related */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录