Displaying 14 results from an estimated 14 matches for "vmi_clobber_extend".
Did you mean:
vmi_clobber_extended
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...struction. In addition, even input operations may clobber
+ * hardware mapped memory.
+ */
+
+static inline void vmi_outl(const VMI_UINT32 value, const VMI_UINT16 port)
+{
+ vmi_wrap_call(
+ OUT, "out %0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void vmi_outb(const VMI_UINT8 value, const VMI_UINT16 port)
+{
+ vmi_wrap_call(
+ OUTB, "outb %b0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory&...
2007 Apr 18
1
[RFC, PATCH 16/24] i386 Vmi io header
...struction. In addition, even input operations may clobber
+ * hardware mapped memory.
+ */
+
+static inline void vmi_outl(const VMI_UINT32 value, const VMI_UINT16 port)
+{
+ vmi_wrap_call(
+ OUT, "out %0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void vmi_outb(const VMI_UINT8 value, const VMI_UINT16 port)
+{
+ vmi_wrap_call(
+ OUTB, "outb %b0, %w1",
+ VMI_NO_OUTPUT,
+ 2, XCONC("a"(value), "d"(port)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory&...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
.../
+
+#ifndef __MACH_DESC_H
+#define __MACH_DESC_H
+
+#include <vmi.h>
+
+#if !defined(CONFIG_X86_VMI)
+# error invalid sub-arch include
+#endif
+
+static inline void load_gdt(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(
+ SetGDT, "lgdt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void load_idt(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(
+ SetIDT, "lidt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void load_ldt(const VMI_SELECTOR...
2007 Apr 18
3
[RFC, PATCH 10/24] i386 Vmi descriptor changes
.../
+
+#ifndef __MACH_DESC_H
+#define __MACH_DESC_H
+
+#include <vmi.h>
+
+#if !defined(CONFIG_X86_VMI)
+# error invalid sub-arch include
+#endif
+
+static inline void load_gdt(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(
+ SetGDT, "lgdt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void load_idt(VMI_DTR *const dtr)
+{
+ vmi_wrap_call(
+ SetIDT, "lidt (%0)",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1 (dtr),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void load_ldt(const VMI_SELECTOR...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...mbridge, MA 02139, USA.
+ *
+ * Send feedback to zach@vmware.com
+ *
+ */
+
+
+#ifndef _MACH_SYSTEM_H
+#define _MACH_SYSTEM_H
+
+#include <vmi.h>
+
+static inline void write_cr0(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR0, "mov %0, %%cr0",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void write_cr2(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR2, "mov %0, %%cr2",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void write_cr3(const u32 val)
+{...
2007 Apr 18
0
[RFC, PATCH 13/24] i386 Vmi system header
...mbridge, MA 02139, USA.
+ *
+ * Send feedback to zach@vmware.com
+ *
+ */
+
+
+#ifndef _MACH_SYSTEM_H
+#define _MACH_SYSTEM_H
+
+#include <vmi.h>
+
+static inline void write_cr0(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR0, "mov %0, %%cr0",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void write_cr2(const u32 val)
+{
+ vmi_wrap_call(
+ SetCR2, "mov %0, %%cr2",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(val),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline void write_cr3(const u32 val)
+{...
2007 Apr 18
0
[RFC, PATCH 18/24] i386 Vmi tlbflush header
...* Send feedback to zach@vmware.com
+ *
+ */
+
+
+#ifndef _MACH_TLBFLUSH_H
+#define _MACH_TLBFLUSH_H
+
+#include <vmi.h>
+
+static inline void __flush_tlb(void)
+{
+ vmi_wrap_call(
+ FlushTLB, "mov %%cr3, %%eax; mov %%eax, %%cr3",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(VMI_FLUSH_TLB),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "eax", "memory"));
+}
+
+static inline void __flush_tlb_global(void)
+{
+ vmi_wrap_call(
+ FlushTLB, "mov %%cr4, %%eax; \n"
+ "andb $0x7f, %%al; \n"
+ "mov %%eax, %%cr4; \n"
+ "orb $0x80, %%al; \n"
+ "...
2007 Apr 18
0
[RFC, PATCH 18/24] i386 Vmi tlbflush header
...* Send feedback to zach@vmware.com
+ *
+ */
+
+
+#ifndef _MACH_TLBFLUSH_H
+#define _MACH_TLBFLUSH_H
+
+#include <vmi.h>
+
+static inline void __flush_tlb(void)
+{
+ vmi_wrap_call(
+ FlushTLB, "mov %%cr3, %%eax; mov %%eax, %%cr3",
+ VMI_NO_OUTPUT,
+ 1, VMI_IREG1(VMI_FLUSH_TLB),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "eax", "memory"));
+}
+
+static inline void __flush_tlb_global(void)
+{
+ vmi_wrap_call(
+ FlushTLB, "mov %%cr4, %%eax; \n"
+ "andb $0x7f, %%al; \n"
+ "mov %%eax, %%cr4; \n"
+ "orb $0x80, %%al; \n"
+ "...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...f CONFIG_X86_LOCAL_APIC
+#include <vmi.h>
+
+static inline void apic_write(unsigned long reg, unsigned long value)
+{
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICWrite, "movl %1, (%0)",
+ VMI_NO_OUTPUT,
+ 2, XCONC(VMI_IREG1(addr), VMI_IREG2(value)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+#define apic_write_atomic(r,v) apic_write(r,v)
+
+static inline unsigned long apic_read(unsigned long reg)
+{
+ unsigned long value;
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICRead, "movl (%0), %%eax",
+ VMI_OREG1(...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...f CONFIG_X86_LOCAL_APIC
+#include <vmi.h>
+
+static inline void apic_write(unsigned long reg, unsigned long value)
+{
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICWrite, "movl %1, (%0)",
+ VMI_NO_OUTPUT,
+ 2, XCONC(VMI_IREG1(addr), VMI_IREG2(value)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+#define apic_write_atomic(r,v) apic_write(r,v)
+
+static inline unsigned long apic_read(unsigned long reg)
+{
+ unsigned long value;
+ void *addr = (void *)(APIC_BASE + reg);
+ vmi_wrap_call(
+ APICRead, "movl (%0), %%eax",
+ VMI_OREG1(...
2007 Apr 18
2
[RFC, PATCH 17/24] i386 Vmi msr patch
...); \
+ val1 = (u32)_val; \
+ val2 = (u32)(_val >> 32); \
+} while (0)
+
+static inline void wrmsr(const u32 msr, const u32 valLo, const u32 valHi)
+{
+ vmi_wrap_call(
+ WRMSR, "wrmsr",
+ VMI_NO_OUTPUT,
+ 3, XCONC("a"(valLo), "d"(valHi), "c"(msr)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline u64 vmi_rdtsc(void)
+{
+ u64 ret;
+ vmi_wrap_call(
+ RDTSC, "rdtsc",
+ VMI_OREG64 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(TWO_RETURNS));
+ return ret;
+}
+
+#define rdtsc(low,high) \
+do { \
+ u64 _val = vmi_rdtsc(); \
+ low =...
2007 Apr 18
2
[RFC, PATCH 17/24] i386 Vmi msr patch
...); \
+ val1 = (u32)_val; \
+ val2 = (u32)(_val >> 32); \
+} while (0)
+
+static inline void wrmsr(const u32 msr, const u32 valLo, const u32 valHi)
+{
+ vmi_wrap_call(
+ WRMSR, "wrmsr",
+ VMI_NO_OUTPUT,
+ 3, XCONC("a"(valLo), "d"(valHi), "c"(msr)),
+ VMI_CLOBBER_EXTENDED(ZERO_RETURNS, "memory"));
+}
+
+static inline u64 vmi_rdtsc(void)
+{
+ u64 ret;
+ vmi_wrap_call(
+ RDTSC, "rdtsc",
+ VMI_OREG64 (ret),
+ 0, VMI_NO_INPUT,
+ VMI_CLOBBER(TWO_RETURNS));
+ return ret;
+}
+
+#define rdtsc(low,high) \
+do { \
+ u64 _val = vmi_rdtsc(); \
+ low =...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...;
+#define VMI_CLOBBER_ONE_RETURN "cc", "edx"
+#define VMI_CLOBBER_TWO_RETURNS "cc"
+#define VMI_CLOBBER_FOUR_RETURNS "cc"
+#else
+#error "No VMI calling convention defined"
+#endif
+
+#define VMI_CLOBBER(saved) XCONC(VMI_CLOBBER_##saved)
+#define VMI_CLOBBER_EXTENDED(saved, extras...) XCONC(VMI_CLOBBER_##saved, extras)
+
+#if defined(CONFIG_VMI_REGPARM)
+#define VMI_IREG1 "a"
+#define VMI_IREG2 "d"
+#define VMI_IREG3 "c"
+#else
+#define VMI_IREG1 "ir"
+#define VMI_IREG2 "ir"
+#define VMI_IREG3 "ir"
+...
2007 Apr 18
3
[RFC, PATCH 4/24] i386 Vmi inline implementation
...;
+#define VMI_CLOBBER_ONE_RETURN "cc", "edx"
+#define VMI_CLOBBER_TWO_RETURNS "cc"
+#define VMI_CLOBBER_FOUR_RETURNS "cc"
+#else
+#error "No VMI calling convention defined"
+#endif
+
+#define VMI_CLOBBER(saved) XCONC(VMI_CLOBBER_##saved)
+#define VMI_CLOBBER_EXTENDED(saved, extras...) XCONC(VMI_CLOBBER_##saved, extras)
+
+#if defined(CONFIG_VMI_REGPARM)
+#define VMI_IREG1 "a"
+#define VMI_IREG2 "d"
+#define VMI_IREG3 "c"
+#else
+#define VMI_IREG1 "ir"
+#define VMI_IREG2 "ir"
+#define VMI_IREG3 "ir"
+...