Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH 5/7] Nested VMX: Check whether interrupt is blocked by TPR

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


yang.z.zhang at intel

Aug 9, 2013, 1:49 AM

Post #1 of 4 (14 views)
Permalink
[PATCH 5/7] Nested VMX: Check whether interrupt is blocked by TPR

From: Yang Zhang <yang.z.zhang [at] Intel>

If interrupt is blocked by L1's TPR, L2 should not see it and keep
running. Adding the check before L2 to retrive interrupt.

Signed-off-by: Yang Zhang <yang.z.zhang [at] Intel>
---
xen/arch/x86/hvm/vmx/intr.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
index cb120f2..8853939 100644
--- a/xen/arch/x86/hvm/vmx/intr.c
+++ b/xen/arch/x86/hvm/vmx/intr.c
@@ -165,6 +165,11 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
{
u32 ctrl;

+ /* If blocked by L1's tpr, then do nothing*/
+ if ( nestedhvm_vcpu_in_guestmode(v) &&
+ hvm_interrupt_blocked(v, intack) == hvm_intblk_tpr )
+ return 1;
+
if ( nvmx_intr_blocked(v) != hvm_intblk_none )
{
enable_intr_window(v, intack);
--
1.7.1


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


andrew.cooper3 at citrix

Aug 9, 2013, 3:43 AM

Post #2 of 4 (12 views)
Permalink
Re: [PATCH 5/7] Nested VMX: Check whether interrupt is blocked by TPR [In reply to]

On 09/08/13 09:49, Yang Zhang wrote:
> From: Yang Zhang <yang.z.zhang [at] Intel>
>
> If interrupt is blocked by L1's TPR, L2 should not see it and keep
> running. Adding the check before L2 to retrive interrupt.
>
> Signed-off-by: Yang Zhang <yang.z.zhang [at] Intel>
> ---
> xen/arch/x86/hvm/vmx/intr.c | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
>
> diff --git a/xen/arch/x86/hvm/vmx/intr.c b/xen/arch/x86/hvm/vmx/intr.c
> index cb120f2..8853939 100644
> --- a/xen/arch/x86/hvm/vmx/intr.c
> +++ b/xen/arch/x86/hvm/vmx/intr.c
> @@ -165,6 +165,11 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
> {
> u32 ctrl;
>
> + /* If blocked by L1's tpr, then do nothing*/

As you need to respin, please have a space at the end of the sentence
before */

> + if ( nestedhvm_vcpu_in_guestmode(v) &&
> + hvm_interrupt_blocked(v, intack) == hvm_intblk_tpr )

Alignment

~Andrew

> + return 1;
> +
> if ( nvmx_intr_blocked(v) != hvm_intblk_none )
> {
> enable_intr_window(v, intack);


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


JBeulich at suse

Aug 9, 2013, 5:16 AM

Post #3 of 4 (11 views)
Permalink
Re: [PATCH 5/7] Nested VMX: Check whether interrupt is blocked by TPR [In reply to]

>>> On 09.08.13 at 12:43, Andrew Cooper <andrew.cooper3 [at] citrix> wrote:
>> --- a/xen/arch/x86/hvm/vmx/intr.c
>> +++ b/xen/arch/x86/hvm/vmx/intr.c
>> @@ -165,6 +165,11 @@ static int nvmx_intr_intercept(struct vcpu *v, struct hvm_intack intack)
>> {
>> u32 ctrl;
>>
>> + /* If blocked by L1's tpr, then do nothing*/
>
> As you need to respin, please have a space at the end of the sentence
> before */

And a period. See CODING_STYLE. Also, I think rather than "do
nothing", "nothing to do" would better describe things here.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


yang.z.zhang at intel

Aug 10, 2013, 7:51 PM

Post #4 of 4 (9 views)
Permalink
Re: [PATCH 5/7] Nested VMX: Check whether interrupt is blocked by TPR [In reply to]

Jan Beulich wrote on 2013-08-09:
>>>> On 09.08.13 at 12:43, Andrew Cooper <andrew.cooper3 [at] citrix>
> wrote:
>>> --- a/xen/arch/x86/hvm/vmx/intr.c
>>> +++ b/xen/arch/x86/hvm/vmx/intr.c
>>> @@ -165,6 +165,11 @@ static int nvmx_intr_intercept(struct vcpu *v,
>>> struct hvm_intack intack) {
>>> u32 ctrl;
>>> + /* If blocked by L1's tpr, then do nothing*/
>>
>> As you need to respin, please have a space at the end of the
>> sentence before */
>
> And a period. See CODING_STYLE. Also, I think rather than "do
> nothing", "nothing to do" would better describe things here.
Sure.

Best regards,
Yang



_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.