From: Jan Kiszka <jan.kiszka@web.de>
To: Nadav Har'El <nyh@math.technion.ac.il>
Cc: Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
Orit Wasserman <owasserm@redhat.com>
Subject: Re: [PATCH] KVM: nVMX: Improve I/O exit handling
Date: Mon, 11 Feb 2013 11:16:25 +0100 [thread overview]
Message-ID: <5118C4F9.707@web.de> (raw)
In-Reply-To: <20130211100721.GA11107@fermat.math.technion.ac.il>
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
On 2013-02-11 11:07, Nadav Har'El wrote:
> On Sun, Feb 10, 2013, Jan Kiszka wrote about "[PATCH] KVM: nVMX: Improve I/O exit handling":
>> +static bool nested_vmx_exit_handled_io(struct kvm_vcpu *vcpu,
>> + struct vmcs12 *vmcs12)
>> +{
>> + unsigned long exit_qualification;
>> + gpa_t bitmap, last_bitmap;
>> + bool string, rep;
>> + u16 port;
>> + int size;
>> + u8 b;
>> +
>> + if (nested_cpu_has(get_vmcs12(vcpu), CPU_BASED_UNCOND_IO_EXITING))
>> + return 1;
>
> Instead of calling get_vmcs12(vcpu), you can just use "vmcs12" variable
> which you already have. I see I left the same redundant call also in
> nested_vmx_exit_handled_msr :(
Indeed, copy&pasted from there...
>
>> + if (port < 0x8000)
>> + bitmap = vmcs12->io_bitmap_a;
>> + else
>> + bitmap = vmcs12->io_bitmap_b;
>> + bitmap += port / 8;
>
> In the port >= 0x8000, I believe need to subtract 0x8000 from the port
> number before using it as an offset into io_bitmap_b?
Oops. There was already a stupid bug in that path, failed to validate it
again. v2 will follow.
Thanks for reviewing,
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2013-02-11 10:16 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-10 20:42 [PATCH] KVM: nVMX: Improve I/O exit handling Jan Kiszka
2013-02-11 10:07 ` Nadav Har'El
2013-02-11 10:16 ` Jan Kiszka [this message]
2013-02-11 11:19 ` [PATCH v2] " Jan Kiszka
2013-02-14 9:32 ` Gleb Natapov
2013-02-14 11:19 ` Jan Kiszka
2013-02-14 12:11 ` Gleb Natapov
2013-02-14 12:22 ` Jan Kiszka
2013-02-14 12:56 ` Gleb Natapov
2013-02-14 13:54 ` Nadav Har'El
2013-02-14 14:44 ` Gleb Natapov
2013-02-14 18:46 ` [PATCH v3] " Jan Kiszka
2013-02-17 8:55 ` Gleb Natapov
2013-02-18 6:32 ` Jan Kiszka
2013-02-18 6:45 ` [PATCH v4] " Jan Kiszka
2013-02-18 8:44 ` [PATCH v3] " Gleb Natapov
2013-02-18 8:53 ` Jan Kiszka
2013-02-18 8:57 ` Gleb Natapov
2013-02-18 9:17 ` [PATCH v5] " Jan Kiszka
2013-02-18 9:36 ` Gleb Natapov
2013-02-18 10:02 ` Jan Kiszka
2013-02-18 10:21 ` [PATCH v6] " Jan Kiszka
2013-02-18 10:32 ` Gleb Natapov
2013-02-19 2:13 ` Marcelo Tosatti
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=5118C4F9.707@web.de \
--to=jan.kiszka@web.de \
--cc=gleb@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=nyh@math.technion.ac.il \
--cc=owasserm@redhat.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