On 17.06.19 14:37, Ralf Ramsauer wrote:
So far, the MSR bitmap intercepted writes to 0x803 (APIC_REG_LVR). But
we need to intercept reads. We don't have a real x2apic, so we need to
forward reads to the apic.
Interestingly, APIC_REG_LVR reads via MSR never happened so far:
Root-Cell Linux won't use x2apic's MSR-based access, as, of course, it
doesn't see a x2apic in case of an AMD.
On the other hand, we emulate and use x2apic for non-root inmates. But
our inmate library won't issue REG_LVR.
The correctness of the comments of rest of the list was checked with a
short helper tool.
There's also a read-intercepted area that can be zipped.
Signed-off-by: Ralf Ramsauer <[email protected]>
---
hypervisor/arch/x86/svm.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/hypervisor/arch/x86/svm.c b/hypervisor/arch/x86/svm.c
index 9c3e971b..f2db518d 100644
--- a/hypervisor/arch/x86/svm.c
+++ b/hypervisor/arch/x86/svm.c
@@ -64,16 +64,11 @@ static u8 __attribute__((aligned(PAGE_SIZE)))
msrpm[][0x2000/4] = {
[ 0x2fc/4 ... 0x2ff/4 ] = 0x80, /* 0x2ff (w) */
[ 0x300/4 ... 0x7ff/4 ] = 0,
/* x2APIC MSRs - emulated if not present */
- [ 0x800/4 ... 0x803/4 ] = 0x90, /* 0x802 (r), 0x803 (r) */
+ [ 0x800/4 ... 0x803/4 ] = 0x50, /* 0x802-0x803 (r) */
[ 0x804/4 ... 0x807/4 ] = 0,
[ 0x808/4 ... 0x80b/4 ] = 0x93, /* 0x808 (rw), 0x80a (r),
0x80b (w) */
[ 0x80c/4 ... 0x80f/4 ] = 0xc8, /* 0x80d (w), 0x80f (rw) */
- [ 0x810/4 ... 0x813/4 ] = 0x55, /* 0x810 - 0x813 (r) */
- [ 0x814/4 ... 0x817/4 ] = 0x55, /* 0x814 - 0x817 (r) */
- [ 0x818/4 ... 0x81b/4 ] = 0x55, /* 0x818 - 0x81b (r) */
- [ 0x81c/4 ... 0x81f/4 ] = 0x55, /* 0x81c - 0x81f (r) */
- [ 0x820/4 ... 0x823/4 ] = 0x55, /* 0x820 - 0x823 (r) */
- [ 0x824/4 ... 0x827/4 ] = 0x55, /* 0x823 - 0x827 (r) */
+ [ 0x810/4 ... 0x827/4 ] = 0x55, /* 0x810 - 0x827 (r) */
[ 0x828/4 ... 0x82b/4 ] = 0x03, /* 0x828 (rw) */
[ 0x82c/4 ... 0x82f/4 ] = 0xc0, /* 0x82f (rw) */
[ 0x830/4 ... 0x833/4 ] = 0xf3, /* 0x830 (rw), 0x832 (rw),
0x833 (rw) */
Thanks, applied.
Jan
--
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
--
You received this message because you are subscribed to the Google Groups
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jailhouse-dev/cda1df93-9d15-a1ea-2627-2bb5c112bb74%40siemens.com.
For more options, visit https://groups.google.com/d/optout.