Re: [PATCH 1/2] test: Add IDT framework

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

 



On 06/10/2010 12:55 PM, Sheng Yang wrote:
On Thursday 10 June 2010 17:49:16 Avi Kivity wrote:
On 06/10/2010 06:31 AM, Sheng Yang wrote:
+
+#define EXCEPTION_REGION_BEGIN(r, lb) \
+    asm volatile("pushq $"lb"\n\t" \
+                 "mov $2, %0\n\t" \
+                 : "=r"(r))
+#define EXCEPTION_REGION_END(r, lb) \
+    asm volatile("popq %%rdx\n\t" \
+		 "mov $0, %0\n\t" \
+                 lb":\n\t": \
+                 "=r"(r) :: "%rdx")
These mess up the stack, no?  So if any intervening code uses %rsp based
addressing, it will get incorrect information.
Yes, but I meant to only include instruction directly in the “region”, and support
nobody should touch $rsp then. It's directly and simple enough.

Something like "=m"(blah) can cause access to %rsp, usually when compiling without frame pointers.

I suggest using a special data section like the kernel.
Kind of more complex...

Makes it more fun.  I'll have a go.

--
error compiling committee.c: too many arguments to function

--
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