[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] SVM: Fix segment attribute clobbering
From: |
Alexander Graf |
Subject: |
[Qemu-devel] [PATCH] SVM: Fix segment attribute clobbering |
Date: |
Mon, 09 Jun 2008 14:42:46 +0200 |
User-agent: |
Thunderbird 2.0.0.12 (X11/20071114) |
When SVM segment flags get stored in the VMCB, there is a certain chance
that they get clobbered by garbage bits. This patch ANDs the wanted bits
correctly and thus makes SVM work again.
Alex
Index: target-i386/op_helper.c
===================================================================
--- target-i386/op_helper.c (revision 4707)
+++ target-i386/op_helper.c (working copy)
@@ -4767,7 +4767,7 @@
stl_phys(addr + offsetof(struct vmcb_seg, limit),
sc->limit);
stw_phys(addr + offsetof(struct vmcb_seg, attrib),
- (sc->flags >> 8) | ((sc->flags >> 12) & 0x0f00));
+ ((sc->flags >> 8) & 0xff) | ((sc->flags >> 12) & 0x0f00));
}
static inline void svm_load_seg(target_phys_addr_t addr, SegmentCache *sc)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [PATCH] SVM: Fix segment attribute clobbering,
Alexander Graf <=