From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>
Subject: Re: [PATCH] KVM: x86: Save&restore interrupt shadow mask
Date: Sun, 14 Feb 2010 18:06:07 +0100 [thread overview]
Message-ID: <4B782D7F.2040102@web.de> (raw)
In-Reply-To: <4B782B66.4090205@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]
Avi Kivity wrote:
> On 02/14/2010 06:49 PM, Jan Kiszka wrote:
>> From: Jan Kiszka<jan.kiszka@siemens.com>
>>
>> The interrupt shadow created by STI or MOV-SS-like operations is part of
>> the VCPU state and must be preserved across migration. Transfer it in
>> the spare padding field of kvm_vcpu_events.interrupt.
>>
>> As a side effect we now have to make vmx_set_interrupt_shadow robust
>> against both shadow types being set. Give MOV SS a higher priority and
>> skip STI in that case to avoid that VMX throws a fault on next entry.
>>
>>
>> diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h
>> index f46b79f..4dd01e2 100644
>> --- a/arch/x86/include/asm/kvm.h
>> +++ b/arch/x86/include/asm/kvm.h
>> @@ -258,6 +258,9 @@ struct kvm_reinject_control {
>> #define KVM_VCPUEVENT_VALID_NMI_PENDING 0x00000001
>> #define KVM_VCPUEVENT_VALID_SIPI_VECTOR 0x00000002
>>
>> +#define X86_SHADOW_INT_MOV_SS 1
>> +#define X86_SHADOW_INT_STI 2
>> +
>>
>
> svm doesn't make a difference. Is it worth exposing this to userspace
> (and thus providing wrong information on svm)?
SVM already folds both reasons into one. Don't know if we should do it
at the generic layer already - probably.
>
> (in any case, needs a KVM_ prefix).
...and then this is no longer required. OK, will export this with
boolean meaning.
>
> Needs a KVM_CAP_ and flags bit.
Why if merged before 2.6.33? We haven't released KVM_CAP_VCPU_EVENTS yet.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2010-02-14 17:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-14 16:49 [PATCH] KVM: x86: Save&restore interrupt shadow mask Jan Kiszka
2010-02-14 16:57 ` Avi Kivity
2010-02-14 17:06 ` Jan Kiszka [this message]
2010-02-15 6:33 ` 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=4B782D7F.2040102@web.de \
--to=jan.kiszka@web.de \
--cc=avi@redhat.com \
--cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox