task_switch.c (4c87aefe) | task_switch.c (154972af) |
---|---|
1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2014 Neel Natu <neel@freebsd.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 34 unchanged lines hidden (view full) --- 43#include <errno.h> 44#include <stdbool.h> 45#include <stdio.h> 46#include <stdlib.h> 47 48#include <vmmapi.h> 49 50#include "bhyverun.h" | 1/*- 2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD 3 * 4 * Copyright (c) 2014 Neel Natu <neel@freebsd.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 34 unchanged lines hidden (view full) --- 43#include <errno.h> 44#include <stdbool.h> 45#include <stdio.h> 46#include <stdlib.h> 47 48#include <vmmapi.h> 49 50#include "bhyverun.h" |
51#include "debug.h" |
|
51 52/* 53 * Using 'struct i386tss' is tempting but causes myriad sign extension 54 * issues because all of its fields are defined as signed integers. 55 */ 56struct tss32 { 57 uint16_t tss_link; 58 uint16_t rsvd1; --- 779 unchanged lines hidden (view full) --- 838 if (reason == TSR_IRET || reason == TSR_JMP) { 839 ot_desc.sd_type &= ~0x2; 840 error = desc_table_write(ctx, vcpu, &sup_paging, ot_sel, 841 &ot_desc, &fault); 842 CHKERR(error, fault); 843 } 844 845 if (nt_type == SDT_SYS286BSY || nt_type == SDT_SYS286TSS) { | 52 53/* 54 * Using 'struct i386tss' is tempting but causes myriad sign extension 55 * issues because all of its fields are defined as signed integers. 56 */ 57struct tss32 { 58 uint16_t tss_link; 59 uint16_t rsvd1; --- 779 unchanged lines hidden (view full) --- 839 if (reason == TSR_IRET || reason == TSR_JMP) { 840 ot_desc.sd_type &= ~0x2; 841 error = desc_table_write(ctx, vcpu, &sup_paging, ot_sel, 842 &ot_desc, &fault); 843 CHKERR(error, fault); 844 } 845 846 if (nt_type == SDT_SYS286BSY || nt_type == SDT_SYS286TSS) { |
846 fprintf(stderr, "Task switch to 16-bit TSS not supported\n"); | 847 EPRINTLN("Task switch to 16-bit TSS not supported"); |
847 return (VMEXIT_ABORT); 848 } 849 850 /* Save processor state in old TSS */ 851 tss32_save(ctx, vcpu, task_switch, eip, &oldtss, ot_iov); 852 853 /* 854 * If the task switch was triggered for any reason other than IRET --- 87 unchanged lines hidden --- | 848 return (VMEXIT_ABORT); 849 } 850 851 /* Save processor state in old TSS */ 852 tss32_save(ctx, vcpu, task_switch, eip, &oldtss, ot_iov); 853 854 /* 855 * If the task switch was triggered for any reason other than IRET --- 87 unchanged lines hidden --- |