mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
x86/emul: Add feature check for clzero
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
62cd2f6c88
commit
b988e88cc0
1 file changed
+3
@@ -1604,6 +1604,7 @@ static bool vcpu_has(
|
||||
#define vcpu_has_clwb() vcpu_has( 7, EBX, 24, ctxt, ops)
|
||||
#define vcpu_has_sha() vcpu_has( 7, EBX, 29, ctxt, ops)
|
||||
#define vcpu_has_rdpid() vcpu_has( 7, ECX, 22, ctxt, ops)
|
||||
#define vcpu_has_clzero() vcpu_has(0x80000008, EBX, 0, ctxt, ops)
|
||||
|
||||
#define vcpu_must_have(feat) \
|
||||
generate_exception_if(!vcpu_has_##feat(), EXC_UD)
|
||||
@@ -5183,6 +5184,8 @@ x86_emulate(
|
||||
{
|
||||
unsigned long zero = 0;
|
||||
|
||||
vcpu_must_have(clzero);
|
||||
|
||||
base = ad_bytes == 8 ? _regs.r(ax) :
|
||||
ad_bytes == 4 ? _regs.eax : _regs.ax;
|
||||
limit = 0;
|
||||
|
||||