Skip to contentSkip to conversation

KVM: Segment access cleanup

PATCH New Avi Kivity 1 participant 1 message Nov 12, 2006 KVM

lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 KVM: Segment access cleanup

Instead of using pasting macros, put the vmx segment field indices into an array and use the array to access the fields indirectly. Cleaner code as well as ~200 bytes saved.

drivers/kvm/kvm.h +2 -2
Index: linux-2.6/drivers/kvm/kvm.h
===================================================================
@@ -195,10 +195,10 @@ struct kvm_vcpu {
 	unsigned char mmio_data[8];
 	gpa_t mmio_phys_addr;
 
-	struct{
+	struct {
 		int active;
 		u8 save_iopl;
-		struct {
+		struct kvm_save_segment {
 			u16 selector;
 			unsigned long base;
 			u32 limit;
drivers/kvm/kvm_main.c +149 -107

335 lines not on this page · raw message

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642