Re: [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation

2014-07-01 Thread Joerg Roedel
On Mon, Jun 30, 2014 at 10:54:17AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com First, kvm_read_guest returns 0 on success. And then we need to take the access size into account when testing the bitmap: intercept if any of bits corresponding to the access is set.

Re: [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation

2014-07-01 Thread Jan Kiszka
On 2014-07-01 17:23, Joerg Roedel wrote: On Mon, Jun 30, 2014 at 10:54:17AM +0200, Jan Kiszka wrote: From: Jan Kiszka jan.kis...@siemens.com First, kvm_read_guest returns 0 on success. And then we need to take the access size into account when testing the bitmap: intercept if any of bits

[PATCH] KVM: nSVM: Fix IOIO bitmap evaluation

2014-06-30 Thread Jan Kiszka
From: Jan Kiszka jan.kis...@siemens.com First, kvm_read_guest returns 0 on success. And then we need to take the access size into account when testing the bitmap: intercept if any of bits corresponding to the access is set. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- This does not yet

Re: [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation

2014-06-30 Thread Paolo Bonzini
Il 30/06/2014 10:54, Jan Kiszka ha scritto: + SVM_IOIO_SIZE_SHIFT; gpa = svm-nested.vmcb_iopm + (port / 8); - bit = port % 8; - val = 0; + start_bit = port % 8; + iopm_len = (start_bit + size 8) ? 2 : 1; + mask = (0xf (4 - size))

Re: [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation

2014-06-30 Thread Jan Kiszka
On 2014-06-30 17:08, Paolo Bonzini wrote: Il 30/06/2014 10:54, Jan Kiszka ha scritto: +SVM_IOIO_SIZE_SHIFT; gpa = svm-nested.vmcb_iopm + (port / 8); -bit = port % 8; -val = 0; +start_bit = port % 8; +iopm_len = (start_bit + size 8) ? 2 : 1; +mask = (0xf