[PATCH 03/15] KVM: Initialize PIO I/O count
This allows userspace to ignore the io.rep field. No a big deal, but friendly. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- drivers/kvm/svm.c |1 + drivers/kvm/vmx.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index b176f5a..c35b8c8 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -1037,6 +1037,7 @@ static int io_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) kvm_run->io.size = ((io_info & SVM_IOIO_SIZE_MASK) >> SVM_IOIO_SIZE_SHIFT); kvm_run->io.string = (io_info & SVM_IOIO_STR_MASK) != 0; kvm_run->io.rep = (io_info & SVM_IOIO_REP_MASK) != 0; + kvm_run->io.count = 1; if (kvm_run->io.string) { unsigned addr_mask; diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 7fd572a..d4c9f33 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1459,6 +1459,7 @@ static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) = (vmcs_readl(GUEST_RFLAGS) & X86_EFLAGS_DF) != 0; kvm_run->io.rep = (exit_qualification & 32) != 0; kvm_run->io.port = exit_qualification >> 16; + kvm_run->io.count = 1; if (kvm_run->io.string) { if (!get_io_count(vcpu, _run->io.count)) return 1; -- 1.5.0.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH 03/15] KVM: Initialize PIO I/O count
This allows userspace to ignore the io.rep field. No a big deal, but friendly. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- drivers/kvm/svm.c |1 + drivers/kvm/vmx.c |1 + 2 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index b176f5a..c35b8c8 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -1037,6 +1037,7 @@ static int io_interception(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) kvm_run-io.size = ((io_info SVM_IOIO_SIZE_MASK) SVM_IOIO_SIZE_SHIFT); kvm_run-io.string = (io_info SVM_IOIO_STR_MASK) != 0; kvm_run-io.rep = (io_info SVM_IOIO_REP_MASK) != 0; + kvm_run-io.count = 1; if (kvm_run-io.string) { unsigned addr_mask; diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index 7fd572a..d4c9f33 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -1459,6 +1459,7 @@ static int handle_io(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) = (vmcs_readl(GUEST_RFLAGS) X86_EFLAGS_DF) != 0; kvm_run-io.rep = (exit_qualification 32) != 0; kvm_run-io.port = exit_qualification 16; + kvm_run-io.count = 1; if (kvm_run-io.string) { if (!get_io_count(vcpu, kvm_run-io.count)) return 1; -- 1.5.0.2 - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/