* Passthrough VIA CPU Features
@ 2010-12-27 12:37 Nico Prenzel
2010-12-27 12:54 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Nico Prenzel @ 2010-12-27 12:37 UTC (permalink / raw)
To: kvm
Hello KVM developers,
I've recently bought such a nice low-power board from VIA (EPIA M-850).
The included VIA cpu (VIA NANO U3100) contains of in-silicon features (esp. AES and SHA encryption):
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
#define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
#define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */
#define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */
#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
#define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */
#define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */
#define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */
#define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */
#define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */
#define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */
Now, I'd like to use these features in one of my linux driven kvm-guests to gain the performance of in-silicon encryption.
See some benchmark what performance gain to expect: http://www.logix.cz/michal/devel/padlock/bench.xp
I've found some useful informations about how to pass cpu features to kvm guests in generally. But they simply won't work if I try to pass the phe(_en)/pmm(_en) feautres to a kvm guest.
So my questions by now, would be: Is it generally possible to passthrough these features?
Thanks a lot.
NicoP.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Passthrough VIA CPU Features
2010-12-27 12:37 Passthrough VIA CPU Features Nico Prenzel
@ 2010-12-27 12:54 ` Avi Kivity
2010-12-27 14:05 ` Antwort: " Nico Prenzel
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2010-12-27 12:54 UTC (permalink / raw)
To: Nico Prenzel; +Cc: kvm
On 12/27/2010 02:37 PM, Nico Prenzel wrote:
> Hello KVM developers,
>
> I've recently bought such a nice low-power board from VIA (EPIA M-850).
> The included VIA cpu (VIA NANO U3100) contains of in-silicon features (esp. AES and SHA encryption):
>
> /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
> #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
> #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */
> #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */
> #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
> #define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */
> #define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */
> #define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */
> #define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */
> #define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */
> #define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */
>
>
> Now, I'd like to use these features in one of my linux driven kvm-guests to gain the performance of in-silicon encryption.
> See some benchmark what performance gain to expect: http://www.logix.cz/michal/devel/padlock/bench.xp
>
> I've found some useful informations about how to pass cpu features to kvm guests in generally. But they simply won't work if I try to pass the phe(_en)/pmm(_en) feautres to a kvm guest.
>
> So my questions by now, would be: Is it generally possible to passthrough these features?
In general cpu features are easy to pass through. Sometimes all that is
needed is to enable the cpuid bits in the virtual cpu, sometimes more
support is needed (generally when extra registers or new bits in
existing registers are defined). Someone needs to read the
documentation and check what's needed to be done for each feature.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* Antwort: Re: Passthrough VIA CPU Features
2010-12-27 12:54 ` Avi Kivity
@ 2010-12-27 14:05 ` Nico Prenzel
2010-12-27 14:18 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Nico Prenzel @ 2010-12-27 14:05 UTC (permalink / raw)
To: avi; +Cc: kvm
Hello Avi,
thanks for your quick respone. That doesn't sound bad!
I've found the needed documentation (I think):
http://www.via.com.tw/en/downloads/whitepapers/initiatives/padlock/programming_guide.pdf
As my C knowloedge isn't hardware related, i don't understand what to look for. Of course, I'll read through it to gather some informations.
But I don't think I'll finish... Pherhaps someone could grab this and implements the needed changes.
Thanks a lot.
NicoP.
-----Avi Kivity <avi@redhat.com> schrieb: -----
An: Nico Prenzel <nico.prenzel@pn-systeme.de>
Von: Avi Kivity <avi@redhat.com>
Datum: 27.12.2010 13:58
Kopie: kvm@vger.kernel.org
Betreff: Re: Passthrough VIA CPU Features
On 12/27/2010 02:37 PM, Nico Prenzel wrote:
> Hello KVM developers,
>
> I've recently bought such a nice low-power board from VIA (EPIA M-850).
> The included VIA cpu (VIA NANO U3100) contains of in-silicon features (esp. AES and SHA encryption):
>
> /* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
> #define X86_FEATURE_XSTORE (5*32+ 2) /* on-CPU RNG present (xstore insn) */
> #define X86_FEATURE_XSTORE_EN (5*32+ 3) /* on-CPU RNG enabled */
> #define X86_FEATURE_XCRYPT (5*32+ 6) /* on-CPU crypto (xcrypt insn) */
> #define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
> #define X86_FEATURE_ACE2 (5*32+ 8) /* Advanced Cryptography Engine v2 */
> #define X86_FEATURE_ACE2_EN (5*32+ 9) /* ACE v2 enabled */
> #define X86_FEATURE_PHE (5*32+ 10) /* PadLock Hash Engine */
> #define X86_FEATURE_PHE_EN (5*32+ 11) /* PHE enabled */
> #define X86_FEATURE_PMM (5*32+ 12) /* PadLock Montgomery Multiplier */
> #define X86_FEATURE_PMM_EN (5*32+ 13) /* PMM enabled */
>
>
> Now, I'd like to use these features in one of my linux driven kvm-guests to gain the performance of in-silicon encryption.
> See some benchmark what performance gain to expect: http://www.logix.cz/michal/devel/padlock/bench.xp
>
> I've found some useful informations about how to pass cpu features to kvm guests in generally. But they simply won't work if I try to pass the phe(_en)/pmm(_en) feautres to a kvm guest.
>
> So my questions by now, would be: Is it generally possible to passthrough these features?
In general cpu features are easy to pass through. Sometimes all that is
needed is to enable the cpuid bits in the virtual cpu, sometimes more
support is needed (generally when extra registers or new bits in
existing registers are defined). Someone needs to read the
documentation and check what's needed to be done for each feature.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-27 14:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-27 12:37 Passthrough VIA CPU Features Nico Prenzel
2010-12-27 12:54 ` Avi Kivity
2010-12-27 14:05 ` Antwort: " Nico Prenzel
2010-12-27 14:18 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox