forked from luck/tmp_suning_uos_patched
KVM: Fix compound mmio
mmio_index should be taken into account when copying data from userspace. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
This commit is contained in:
parent
4947e7cd0e
commit
0004c7c257
@ -5576,7 +5576,8 @@ static int complete_mmio(struct kvm_vcpu *vcpu)
|
||||
if (vcpu->mmio_needed) {
|
||||
vcpu->mmio_needed = 0;
|
||||
if (!vcpu->mmio_is_write)
|
||||
memcpy(vcpu->mmio_data, run->mmio.data, 8);
|
||||
memcpy(vcpu->mmio_data + vcpu->mmio_index,
|
||||
run->mmio.data, 8);
|
||||
vcpu->mmio_index += 8;
|
||||
if (vcpu->mmio_index < vcpu->mmio_size) {
|
||||
run->exit_reason = KVM_EXIT_MMIO;
|
||||
|
Loading…
Reference in New Issue
Block a user