kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: Heads up: More user-unaccessible x86 states?
Date: Sun, 04 Oct 2009 21:07:46 +0200	[thread overview]
Message-ID: <4AC8F282.3090307@web.de> (raw)
In-Reply-To: <4AC88BF2.7080200@redhat.com>

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

Avi Kivity wrote:
> On 10/04/2009 12:50 PM, Jan Kiszka wrote:
>> Avi Kivity wrote:
>>   
>>> On 10/04/2009 10:59 AM, Jan Kiszka wrote:
>>>     
>>>> Hi,
>>>>
>>>> while preparing new IOCTLs to let user space query&   set the yet
>>>> unaccessible NMI states (pending and masked) I also came across the
>>>> interrupt shadow masks. Unless I missed something I would say that
>>>> we so
>>>> far break them in the rare case that a migration happens right while
>>>> any
>>>> of them is asserted. So I guess I should extend my interface and stuff
>>>> them in as well.
>>>>
>>>> Do we have more of such unaccessible states on x86 that could be
>>>> included, too? Would be a good chance...
>>>>
>>>>        
>>> There's some hidden state in the cpuid mechanism.  I think we expose it
>>> though (just don't use it in qemu).
>>>      
>> Do you have more details on this?
>>    
> 
> Some cpuid leaves return different information based on an internal
> counter.  This is indicated by KVM_CPUID_FLAG_STATEFUL_FUNC.
> 
>> The PDPTRs are hidden state that we should save/restore, though no sane
>> guest relies on them.
>>    A quick glance at SVM makes me think that those registered are not
>> exposed there. So when keeping in mind that we may only help VMX guests,
>> I think i makes even less sense to "fix" this, does it?
>>    
> 
> Yes.  With npt the PDPTRs are essentially gone.
> 
>>> I think we can lose information if we migrate during a SIPI
>>> (sipi_vector), though that might be fixable without exposing it.
>>>      
>> Hmm, I see. But even it it's not fixable, such an extension would be an
>> in-kernel irqchip thing.
>>    
> 
> Yes.
> 
>>> We'll might also lost debug traps.
>>>
>>> We drop pending exceptions; normally that's fine since they'll reinject
>>> themselves, but MCE will not.
>>>      
>> So would it make sense and fix those two issues when we simply save and
>> restore the pending exception?
>>    
> 
> Yes.
> 
> btw, instead of adding a new ioctl, perhaps it makes sense to define a
> new KVM_VCPU_STATE structure that holds all current and future state
> (with generous reserved space), instead of separating state over a dozen
> ioctls.
> 

OK, makes sense. With our without lapic state? How much "future space"?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]

       reply	other threads:[~2009-10-04 19:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4AC86404.3090209@web.de>
     [not found] ` <4AC87299.4040508@redhat.com>
     [not found]   ` <4AC87E08.5070908@web.de>
     [not found]     ` <4AC88BF2.7080200@redhat.com>
2009-10-04 19:07       ` Jan Kiszka [this message]
2009-10-05  6:18         ` Heads up: More user-unaccessible x86 states? Avi Kivity
2009-10-05  7:43           ` Jan Kiszka
2009-10-05  8:55             ` Avi Kivity
2009-10-05 11:18               ` Jan Kiszka
2009-10-05 12:05                 ` Avi Kivity
2009-10-05 12:18                   ` Jan Kiszka
2009-10-05 12:34                     ` Avi Kivity
2009-10-05 12:42                       ` Jan Kiszka
2009-10-05 12:55                         ` 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=4AC8F282.3090307@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).