34 #define COND(_32, _64) _32 36 #define COND(_32, _64) _64 40 #define __TEST_CS64 (GDTE_AVAIL0 << 3) 52 static unsigned int count;
53 extern unsigned long restart[]
asm (
"restart");
56 panic(
"Evtchn livelock\n");
58 regs->ip =
_u(restart);
73 GDTE_SYM(0, 0xfffff, COMMON, CODE, DPL3, R, L));
90 return xtf_error(
"Error trying to remap t1 as read-only\n");
93 return xtf_error(
"Error trying to remap t2 as read-only\n");
121 COND(
"int $0x82;",
"syscall;")
126 COND(
"=b",
"=D") (tmp),
127 COND(
"=c",
"=S") (tmp),
147 " vulnerable to XSA-296\n");
150 return xtf_error(
"Error: Insufficient vcpus\n");
153 return xtf_error(
"Error: unexpected result %d\n", rc);
#define __HYPERVISOR_vcpu_op
#define IS_DEFINED(x)
Evalute whether the CONFIG_ token x is defined.
static intpte_t t1[L1_PT_ENTRIES]
static long hypercall_update_va_mapping(unsigned long linear, uint64_t npte, enum XEN_UVMF flags)
#define __page_aligned_bss
void do_evtchn(struct cpu_regs *regs)
May be implemented by a guest to handle Event Channel upcalls.
intpte_t pte_from_virt(const void *va, uint64_t flags)
void panic(const char *fmt,...)
struct vcpu_info vcpu_info[32]
#define _u(v)
Express an arbitrary value v as unsigned long.
#define PF_SYM(...)
Create pagetable entry flags based on mnemonics.
void xtf_success(const char *fmt,...)
Report test success.
static unsigned int xen_pfn_to_cr3(unsigned int pfn)
user_desc gdt[NR_GDT_ENTRIES]
void test_main(void)
To be implemented by each test, as its entry point.
#define VCPUOP_initialise
static unsigned long virt_to_gfn(const void *va)
static void update_desc(user_desc *ptr, const user_desc new)
Helper to update a live LDT/GDT entry.
static intpte_t t2[L1_PT_ENTRIES]
const char test_title[]
The title of the test.
void xtf_error(const char *fmt,...)
Report a test error.
uint8_t evtchn_upcall_mask
uint8_t evtchn_upcall_pending
#define GDTE_SYM(base, limit,...)
As INIT_GDTE_SYM(), but creates a user_desc object.
static xen_vcpu_guest_context_t vcpu1_ctx