All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] kvm/x86/mmu: don't unnecessarily recalculate table_gfn in *fetch
Date: Thu, 5 Mar 2009 15:36:08 +0100	[thread overview]
Message-ID: <20090305143608.GF8751@amd.com> (raw)
In-Reply-To: <1236255153-4432-4-git-send-email-joerg.roedel@amd.com>

On Thu, Mar 05, 2009 at 01:12:30PM +0100, Joerg Roedel wrote:
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
>  arch/x86/kvm/paging_tmpl.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
> index a0c11ea..79668ba 100644
> --- a/arch/x86/kvm/paging_tmpl.h
> +++ b/arch/x86/kvm/paging_tmpl.h
> @@ -315,7 +315,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
>  			direct = 1;
>  			if (!is_dirty_pte(gw->ptes[level - 1]))
>  				access &= ~ACC_WRITE_MASK;
> -			table_gfn = gpte_to_gfn(gw->ptes[level - 1]);
> +			table_gfn = gw->table_gfn[level - delta];
>  		} else {
>  			direct = 0;
>  			table_gfn = gw->table_gfn[level - 2];

Made a mistake here when rebasing these patches. Updated patch is below:

>From de38a141a0ba44b3d46e333620d518cd831326c0 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <joerg.roedel@amd.com>
Date: Wed, 4 Mar 2009 20:49:15 +0100
Subject: [PATCH 3/6] kvm/x86/mmu: don't unnecessarily recalculate table_gfn in *fetch

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kvm/paging_tmpl.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index a0c11ea..79668ba 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -315,7 +315,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
 			direct = 1;
 			if (!is_dirty_pte(gw->ptes[level - 1]))
 				access &= ~ACC_WRITE_MASK;
-			table_gfn = gpte_to_gfn(gw->ptes[level - 1]);
+			table_gfn = gw->table_gfn[level - 1];
 		} else {
 			direct = 0;
 			table_gfn = gw->table_gfn[level - 2];
-- 
1.5.6.4


-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joerg.roedel@amd.com>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] kvm/x86/mmu: don't unnecessarily recalculate table_gfn in *fetch
Date: Thu, 5 Mar 2009 15:36:08 +0100	[thread overview]
Message-ID: <20090305143608.GF8751@amd.com> (raw)
In-Reply-To: <1236255153-4432-4-git-send-email-joerg.roedel@amd.com>

On Thu, Mar 05, 2009 at 01:12:30PM +0100, Joerg Roedel wrote:
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> ---
>  arch/x86/kvm/paging_tmpl.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
> index a0c11ea..79668ba 100644
> --- a/arch/x86/kvm/paging_tmpl.h
> +++ b/arch/x86/kvm/paging_tmpl.h
> @@ -315,7 +315,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
>  			direct = 1;
>  			if (!is_dirty_pte(gw->ptes[level - 1]))
>  				access &= ~ACC_WRITE_MASK;
> -			table_gfn = gpte_to_gfn(gw->ptes[level - 1]);
> +			table_gfn = gw->table_gfn[level - delta];
>  		} else {
>  			direct = 0;
>  			table_gfn = gw->table_gfn[level - 2];

Made a mistake here when rebasing these patches. Updated patch is below:

From de38a141a0ba44b3d46e333620d518cd831326c0 Mon Sep 17 00:00:00 2001
From: Joerg Roedel <joerg.roedel@amd.com>
Date: Wed, 4 Mar 2009 20:49:15 +0100
Subject: [PATCH 3/6] kvm/x86/mmu: don't unnecessarily recalculate table_gfn in *fetch

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
 arch/x86/kvm/paging_tmpl.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index a0c11ea..79668ba 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -315,7 +315,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
 			direct = 1;
 			if (!is_dirty_pte(gw->ptes[level - 1]))
 				access &= ~ACC_WRITE_MASK;
-			table_gfn = gpte_to_gfn(gw->ptes[level - 1]);
+			table_gfn = gw->table_gfn[level - 1];
 		} else {
 			direct = 0;
 			table_gfn = gw->table_gfn[level - 2];
-- 
1.5.6.4


-- 
           | Advanced Micro Devices GmbH
 Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
 System    | 
 Research  | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
 Center    | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
           | Registergericht München, HRB Nr. 43632


  reply	other threads:[~2009-03-05 14:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05 12:12 [PATCH 0/6] various x86 kvm fixes Joerg Roedel
2009-03-05 12:12 ` [PATCH 1/6] kvm/x86/svm: force new asid on vcpu migration Joerg Roedel
2009-03-05 17:53   ` Marcelo Tosatti
2009-07-26 15:23   ` Avi Kivity
2009-03-05 12:12 ` [PATCH 2/6] kvm/x86/mmu: remove call to kvm_mmu_pte_write from walk_addr Joerg Roedel
2009-03-05 12:12 ` [PATCH 3/6] kvm/x86/mmu: don't unnecessarily recalculate table_gfn in *fetch Joerg Roedel
2009-03-05 14:36   ` Joerg Roedel [this message]
2009-03-05 14:36     ` Joerg Roedel
2009-03-05 12:12 ` [PATCH 4/6] kvm/x86/mmu: handle invlpg on large pages Joerg Roedel
2009-03-05 21:11   ` Marcelo Tosatti
2009-03-06 13:06     ` Joerg Roedel
2009-03-05 12:12 ` [PATCH 5/6] kvm/x86: call kvm_lapic_sync_from_vapic with preemption disabled Joerg Roedel
2009-03-05 21:39   ` Marcelo Tosatti
2009-03-05 12:12 ` [PATCH 6/6] kvm/x86/mmu: include PT_PAGE_SIZE_MASK in PT64_PERM_MASK Joerg Roedel
2009-03-08 12:32   ` Avi Kivity
2009-03-05 21:50 ` [PATCH 0/6] various x86 kvm fixes Marcelo Tosatti
2009-03-06 13:04   ` Joerg Roedel

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=20090305143608.GF8751@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtosatti@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 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.