To represent the USER-MSR bitmap access, a new segment type needs
introducing, behaving like x86_seg_none in terms of address treatment,
but behaving like a system segment for page walk purposes (implicit
supervisor-mode access).
While there also add x86_seg_none handling to the test harness'es
read() hook, as will be needed for MSR-LIST support.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
default:
if ( !is_x86_user_segment(seg) )
return X86EMUL_UNHANDLEABLE;
+ case x86_seg_sys:
+ case x86_seg_none:
bytes_read += bytes;
break;
}
int okay;
unsigned long reps = 1;
- if ( seg == x86_seg_none )
+ if ( seg == x86_seg_none || seg == x86_seg_sys )
{
*linear = offset;
return X86EMUL_OKAY;
* It is expected that the access rights of reg are suitable for seg (and
* that this is enforced at the point that seg is loaded).
*/
- ASSERT(seg < x86_seg_none);
+ ASSERT(seg < x86_seg_sys);
/* However, check that insn fetches only ever specify CS. */
ASSERT(access_type != hvm_access_insn_fetch || seg == x86_seg_cs);
vmcb->ldtr = *reg;
break;
+ case x86_seg_sys:
case x86_seg_none:
ASSERT_UNREACHABLE();
break;
x86_seg_ldtr,
x86_seg_gdtr,
x86_seg_idtr,
- /* No Segment: For accesses which are already linear. */
+ /* No Segment: For (system/normal) accesses which are already linear. */
+ x86_seg_sys,
x86_seg_none
};