Re: KVM: x86: Push potential exception error code on task switches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jan Kiszka wrote:
> Avi Kivity wrote:
>> On 04/14/2010 03:11 PM, Jan Kiszka wrote:
>>> When a fault triggers a task switch, the error code, if it exists, has
>>> to be pushed on the new task's stack. Implement the missing bits.
>>>
>>>
>>> @@ -2416,12 +2417,23 @@ static int emulator_do_task_switch(struct x86_emulate_ctxt *ctxt,
>>>   	ops->set_cached_descriptor(&next_tss_desc, VCPU_SREG_TR, ctxt->vcpu);
>>>   	ops->set_segment_selector(tss_selector, VCPU_SREG_TR, ctxt->vcpu);
>>>
>>> +	if (ret == X86EMUL_CONTINUE&&  has_error_code) {
>>> +		struct decode_cache *c =&ctxt->decode;
>>> +
>>> +		c->op_bytes = c->ad_bytes = (next_tss_desc.type&  8) ? 4 : 2;
>>>    
>> Don't these depend on the attributes of the segment as well?
> 
> Not on the segment, but actually on the gate size. Will fix.

Err, non-sense. Nothing to fix, that's already the case.

Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux