public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Joerg Roedel <joro@8bytes.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>, kvm <kvm@vger.kernel.org>,
	Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Subject: Re: [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation
Date: Tue, 01 Jul 2014 17:25:17 +0200	[thread overview]
Message-ID: <53B2D2DD.8060502@web.de> (raw)
In-Reply-To: <20140701152349.GJ26537@8bytes.org>

[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]

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.kiszka@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.kiszka@siemens.com>
> 
> Reviewed-by: Joerg Roedel <jroedel@suse.de>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> 
> I have the slight hope that this fixes the issues with L2 Linux guests
> on L1 Windows hypervisors. Have to check that at some point :)
> 
>> -	if (kvm_read_guest(svm->vcpu.kvm, gpa, &val, 1))
>> -		val &= (1 << bit);
>> +	if (kvm_read_guest(svm->vcpu.kvm, gpa, &val, iopm_len))
>> +		return NESTED_EXIT_DONE;
> 
> Not related to that fix, but as a further improvement we should probably
> do a #vmexit(invalid-vmcb) or something if we can't read the iopm.

Yes, thought about this as well when thinking about kvm_read_guest
failing. Some for MSR bitmap.

Jan



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

      reply	other threads:[~2014-07-01 15:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30  8:54 [PATCH] KVM: nSVM: Fix IOIO bitmap evaluation Jan Kiszka
2014-06-30 15:08 ` Paolo Bonzini
2014-06-30 15:15   ` Jan Kiszka
2014-07-01 15:23 ` Joerg Roedel
2014-07-01 15:25   ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B2D2DD.8060502@web.de \
    --to=jan.kiszka@web.de \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=valentine.sinitsyn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox