All of lore.kernel.org
 help / color / mirror / Atom feed
From: Avi Kivity <avi@redhat.com>
To: Glauber Costa <glommer@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	"H. Peter Anvin" <hpa@zytor.com>, Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow
Date: Tue, 12 May 2009 21:11:24 +0300	[thread overview]
Message-ID: <4A09BBCC.80801@redhat.com> (raw)
In-Reply-To: <1242141230-22514-2-git-send-email-glommer@redhat.com>

Glauber Costa wrote:
> This patch replaces drop_interrupt_shadow with the more
> general set_interrupt_shadow, that can either drop or raise
> it, depending on its parameter.
>
>  }
>  
> +static u32 svm_get_interrupt_shadow(struct kvm_vcpu *vcpu, int mask)
> +{
> +	struct vcpu_svm *svm = to_svm(vcpu);
> +	u32 ret = 0;
> +
> +	if (svm->vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK)
> +		ret |= X86_SHADOW_INT_STI && X86_SHADOW_INT_MOV_SS;
> +	return ret & mask;
> +}
>   

&& -> |.

> +
> +static void vmx_set_interrupt_shadow(struct kvm_vcpu *vcpu, int mask)
> +{
> +	u32 interruptibility_old = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO);
> +	u32 interruptibility = interruptibility_old;
> +
> +	interruptibility &= ~((GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS));
>   

May drop one layer of parentheses.



-- 
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.


  parent reply	other threads:[~2009-05-12 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-12 15:13 [PATCH 0/2] Deal with shadow interrupts after emulated instructions Glauber Costa
2009-05-12 15:13 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-12 15:13   ` [PATCH 2/2] deal with interrupt shadow state for emulated instruction Glauber Costa
2009-05-12 18:14     ` Avi Kivity
2009-05-12 18:11   ` Avi Kivity [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-05-12 20:21 [PATCH 0/2] Deal with shadow interrupts after emulated instructions Glauber Costa
2009-05-12 20:21 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-08 20:23 [PATCH 0/2] Deal with shadow interrupts after emulated instructions Glauber Costa
2009-05-08 20:23 ` [PATCH 1/2] replace drop_interrupt_shadow by set_interrupt_shadow Glauber Costa
2009-05-10 13:07   ` Avi Kivity

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=4A09BBCC.80801@redhat.com \
    --to=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=glommer@redhat.com \
    --cc=hpa@zytor.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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.