public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix the updating of PPR after TPR shadow introduced
@ 2007-08-22  7:57 Yang, Sheng
       [not found] ` <DB3BD37E3533EE46BED2FBA80995557F705B34-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Yang, Sheng @ 2007-08-22  7:57 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

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

After TPR Shadow feature introduced, many TPR access won't cause vmexit,
so
the ordinary point of catching TPR and updating PPR is insufficient.

This patch updates PPR everytime when possible reading PPR action
occurs.

Signed-off-by: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 drivers/kvm/lapic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c
index 98a3719..b0665fa 100644
--- a/drivers/kvm/lapic.c
+++ b/drivers/kvm/lapic.c
@@ -496,6 +496,7 @@ static u32 __apic_read(struct kvm_lapic *apic,
unsigned int offset)
 		break;
 
 	default:
+		apic_update_ppr(apic);
 		val = apic_get_reg(apic, offset);
 		break;
 	}
@@ -963,6 +964,7 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu)
 	if (!apic || !apic_enabled(apic))
 		return -1;
 
+	apic_update_ppr(apic);
 	highest_irr = apic_find_highest_irr(apic);
 	if ((highest_irr == -1) ||
 	    ((highest_irr & 0xF0) <= apic_get_reg(apic, APIC_PROCPRI)))
-- 
1.5.2

[-- Attachment #2: Fix-the-updating-of-PPR-after-TPR-shadow-introduced.patch --]
[-- Type: application/octet-stream, Size: 1198 bytes --]

From 0767794e9cf7cc62e46a014140980628d15d719a Mon Sep 17 00:00:00 2001
From: Sheng Yang <sheng.yang@intel.com>
Date: Wed, 22 Aug 2007 13:32:14 +0800
Subject: [PATCH] Fix the updating of PPR after TPR shadow introduced

After TPR Shadow feature introduced, many TPR access won't cause vmexit, so
the ordinary point of catching TPR and updating PPR is insufficient.

This patch updates PPR everytime when possible reading PPR action occurs.

Signed-off-by: Sheng Yang <sheng.yang@intel.com>
---
 drivers/kvm/lapic.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c
index 98a3719..b0665fa 100644
--- a/drivers/kvm/lapic.c
+++ b/drivers/kvm/lapic.c
@@ -496,6 +496,7 @@ static u32 __apic_read(struct kvm_lapic *apic, unsigned int offset)
 		break;
 
 	default:
+		apic_update_ppr(apic);
 		val = apic_get_reg(apic, offset);
 		break;
 	}
@@ -963,6 +964,7 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu)
 	if (!apic || !apic_enabled(apic))
 		return -1;
 
+	apic_update_ppr(apic);
 	highest_irr = apic_find_highest_irr(apic);
 	if ((highest_irr == -1) ||
 	    ((highest_irr & 0xF0) <= apic_get_reg(apic, APIC_PROCPRI)))
-- 
1.5.2


[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the updating of PPR after TPR shadow introduced
@ 2007-08-23  0:52 Yang, Sheng
  0 siblings, 0 replies; 3+ messages in thread
From: Yang, Sheng @ 2007-08-23  0:52 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Sorry for forgot to mention that this patch is for lapic5 tree. And it
replaced the "Reading PPR directly from function rather than apic page"

thanks.

Yang, Sheng wrote:
> After TPR Shadow feature introduced, many TPR access won't cause
vmexit, so
> the ordinary point of catching TPR and updating PPR is insufficient.
> .
> This patch updates PPR everytime when possible reading PPR action
occurs.
> 
> Signed-off-by: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> ---
>  drivers/kvm/lapic.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c
> index 98a3719..b0665fa 100644
> --- a/drivers/kvm/lapic.c
> +++ b/drivers/kvm/lapic.c
> @@ -496,6 +496,7 @@ static u32 __apic_read(struct kvm_lapic *apic,
unsigned
>  		int offset) break;
> 
>  	default:
> +		apic_update_ppr(apic);
>  		val = apic_get_reg(apic, offset);
>  		break;
>  	}
> @@ -963,6 +964,7 @@ int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu)
>  	if (!apic || !apic_enabled(apic))
>  		return -1;
> 
> +	apic_update_ppr(apic);
>  	highest_irr = apic_find_highest_irr(apic);
>  	if ((highest_irr == -1) ||
>  	    ((highest_irr & 0xF0) <= apic_get_reg(apic, APIC_PROCPRI)))

Thanks
Yang, Sheng

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix the updating of PPR after TPR shadow introduced
       [not found] ` <DB3BD37E3533EE46BED2FBA80995557F705B34-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-08-23  7:46   ` Avi Kivity
  0 siblings, 0 replies; 3+ messages in thread
From: Avi Kivity @ 2007-08-23  7:46 UTC (permalink / raw)
  To: Yang, Sheng; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Yang, Sheng wrote:
> After TPR Shadow feature introduced, many TPR access won't cause vmexit,
> so
> the ordinary point of catching TPR and updating PPR is insufficient.
>
> This patch updates PPR everytime when possible reading PPR action
> occurs.
>
>   

I folded this into the TPR shadow patch. Thanks.

-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-23  7:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-22  7:57 [PATCH] Fix the updating of PPR after TPR shadow introduced Yang, Sheng
     [not found] ` <DB3BD37E3533EE46BED2FBA80995557F705B34-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-08-23  7:46   ` Avi Kivity
  -- strict thread matches above, loose matches on Subject: below --
2007-08-23  0:52 Yang, Sheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox