From: Paolo Bonzini <pbonzini@redhat.com>
To: Janakarajan Natarajan <Janakarajan.Natarajan@amd.com>,
kvm@vger.kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org
Cc: Radim Krcmar <rkrcmar@redhat.com>, Joerg Roedel <joro@8bytes.org>,
Andy Lutomirski <luto@kernel.org>,
Tony Luck <tony.luck@intel.com>, Piotr Luc <piotr.luc@intel.com>,
Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H . Peter Anvin" <hpa@zytor.com>,
Yazen Ghannam <yazen.ghannam@amd.com>
Subject: Re: [PATCH v2 0/2] KVM: SVM: Virtual GIF
Date: Wed, 23 Aug 2017 18:37:50 +0200 [thread overview]
Message-ID: <0db8738e-9f33-1157-e1a8-861d6b5e178f@redhat.com> (raw)
In-Reply-To: <cover.1503439949.git.Janakarajan.Natarajan@amd.com>
On 23/08/2017 16:57, Janakarajan Natarajan wrote:
> This patchset adds support for the Virtual GIF (vGIF) feature. This
> feature allows the STGI and CLGI instructions to be executed in the
> Guest Mode and not require a #VMEXIT. With this, virtual interrupts
> can be controlled in the Guest Mode while still allowing physical
> interrupts to be intercepted by the hypervisor.
>
> In order to provide this ability, two new bits are added to the VMCB
> at offset 60h:
>
> * Bit 9 - VGIF value
> : 0 -> Virtual interrupts are masked
> : 1 -> Virtual interrupts are unmasked
>
> * Bit 25 - AMD Virtual GIF enabled for this guest
> : 0 -> Disabled
> : 1 -> Enabled
>
> When a VMRUN is executed and Bit 25 is set, the processor uses Bit 9
> as the starting value of the virtual GIF. It then provides masking
> capability for when virtual interrupts are taken. Bit 9 is writeable
> by the hypervisor and loaded on VMRUN and saved on #VMEXIT. STGI/CLGI
> executed in the Guest Mode sets or clears the virtual GIF.
>
> The advantage of this feature will be the greatly reduced number of
> world switches to support the STGI and CLGI instructions by the
> outermost hypervisor at Current Privilege Level (CPL) 0.
>
> This has been tested with Xen, Hyper-V and KVM as the nested hypervisor.
>
> v1->v2:
>
> * Updated patch description and changed cpufeature definition to be similar
> to AMD documentation.
>
> * Updated NMI logic. STGI intercept added to assit in opening NMI window.
> Suggested by Radim.
Applied, thanks.
Paolo
> Janakarajan Natarajan (2):
> KVM: SVM: Add Virtual GIF feature definition
> KVM: SVM: Enable Virtual GIF feature
>
> arch/x86/include/asm/cpufeatures.h | 1 +
> arch/x86/include/asm/svm.h | 6 ++++
> arch/x86/kvm/svm.c | 62 +++++++++++++++++++++++++++++++++-----
> 3 files changed, 62 insertions(+), 7 deletions(-)
>
prev parent reply other threads:[~2017-08-23 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 14:57 Janakarajan Natarajan
2017-08-23 14:57 ` [PATCH v2 1/2] KVM: SVM: Add Virtual GIF feature definition Janakarajan Natarajan
2017-08-23 15:35 ` Borislav Petkov
2017-08-23 14:57 ` [PATCH v2 2/2] KVM: SVM: Enable Virtual GIF feature Janakarajan Natarajan
2017-08-23 16:37 ` Paolo Bonzini [this message]
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=0db8738e-9f33-1157-e1a8-861d6b5e178f@redhat.com \
--to=pbonzini@redhat.com \
--cc=Janakarajan.Natarajan@amd.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=piotr.luc@intel.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
--cc=yazen.ghannam@amd.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
Powered by JetHome