All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Zhihui Zhang <zzhsuny@gmail.com>,
	gleb@redhat.com, pbonzini@redhat.com, hpa@zytor.com
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH] Check use I/O bitmap first before unconditional I/O exit
Date: Tue, 31 Dec 2013 09:55:11 +0100	[thread overview]
Message-ID: <52C2866F.5070101@web.de> (raw)
In-Reply-To: <1388436989-8597-1-git-send-email-zzhsuny@gmail.com>

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

On 2013-12-30 21:56, Zhihui Zhang wrote:
> According to Table C-1 of Intel SDM 3C, a VM exit happens on an I/O instruction when
> "use I/O bitmaps" VM-execution control was 0 _and_ the "unconditional I/O exiting"
> VM-execution control was 1. So we can't just check "unconditional I/O exiting" alone.
> This patch was improved by suggestion from Jan Kiszka.
> 
> Signed-off-by: Zhihui Zhang <zzhsuny@gmail.com>
> ---
>  arch/x86/kvm/vmx.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index b2fe1c2..45617db 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -6460,11 +6460,8 @@ static bool nested_vmx_exit_handled_io(struct kvm_vcpu *vcpu,
>  	int size;
>  	u8 b;
>  
> -	if (nested_cpu_has(vmcs12, CPU_BASED_UNCOND_IO_EXITING))
> -		return 1;
> -
>  	if (!nested_cpu_has(vmcs12, CPU_BASED_USE_IO_BITMAPS))
> -		return 0;
> +		return nested_cpu_has(vmcs12, CPU_BASED_UNCOND_IO_EXITING);
>  
>  	exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
>  
> 

Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>



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

  reply	other threads:[~2013-12-31  8:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-30 20:56 [PATCH] Check use I/O bitmap first before unconditional I/O exit Zhihui Zhang
2013-12-31  8:55 ` Jan Kiszka [this message]
2014-01-08 21:01 ` Marcelo Tosatti
  -- strict thread matches above, loose matches on Subject: below --
2013-12-30 15:09 Zhihui Zhang
2013-12-30 19:35 ` Jan Kiszka

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=52C2866F.5070101@web.de \
    --to=jan.kiszka@web.de \
    --cc=gleb@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=zzhsuny@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.