Skip to contentSkip to conversation

xen/x86: Don't try to write syscall-related MSRs for PV guests

PATCH Applied Boris Ostrovsky 3 participants 5 messages Sep 21, 2015 – Sep 28, 2015

Subsystems (2)
lore
Share & tools
lore

Boris Ostrovsky

author reviewer
#0 lore raw

PATCH 1/1 xen/x86: Don't try to write syscall-related MSRs for PV guests

For PV guests these registers are set up by hypervisor and thus should not be written by the guest. The comment in xen_write_msr_safe() says so but we still write the MSRs, causing the hypervisor to print a warning.

---
 arch/x86/xen/enlighten.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/xen/enlighten.c +1 -0
index 30d12af..1f1dbd2 100644
@@ -1077,6 +1077,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
 		/* Fast syscall setup is all done in hypercalls, so
 		   these are all ignored.  Stub them out here to stop
 		   Xen console noise. */
+		break;
 
 	default:
 		if (!pmu_msr_write(msr, low, high, &ret))
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Boris Ostrovsky

For PV guests these registers are set up by hypervisor and thus should not be written by the guest. The comment in xen_write_msr_safe() says so but we still write the MSRs, causing the hypervisor to print a warning.

Quoted 19 lines
---
 arch/x86/xen/enlighten.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/xen/enlighten.c +1 -0
index 30d12af..1f1dbd2 100644
@@ -1077,6 +1077,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
 		/* Fast syscall setup is all done in hypercalls, so
 		   these are all ignored.  Stub them out here to stop
 		   Xen console noise. */
+		break;
 
 	default:
 		if (!pmu_msr_write(msr, low, high, &ret))
Signature · 1 line
2.1.0
Reviewed-by on v1 1/1
#2 lore raw
In reply to Boris Ostrovsky
Quoted 6 lines · Boris Ostrovsky

For PV guests these registers are set up by hypervisor and thus should not be written by the guest. The comment in xen_write_msr_safe() says so but we still write the MSRs, causing the hypervisor to print a warning.

Quoted 19 lines
---
 arch/x86/xen/enlighten.c | 1 +
 1 file changed, 1 insertion(+)
arch/x86/xen/enlighten.c +1 -0
index 30d12af..1f1dbd2 100644
@@ -1077,6 +1077,7 @@ static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high)
 		/* Fast syscall setup is all done in hypercalls, so
 		   these are all ignored.  Stub them out here to stop
 		   Xen console noise. */
+		break;
 
 	default:
 		if (!pmu_msr_write(msr, low, high, &ret))
Signature · 1 line
2.1.0
Applied
#3 lore raw
In reply to Boris Ostrovsky
Quoted 4 lines · Boris Ostrovsky

For PV guests these registers are set up by hypervisor and thus should not be written by the guest. The comment in xen_write_msr_safe() says so but we still write the MSRs, causing the hypervisor to print a warning.

Applied to for-linus-4.3, thanks.

David

Applied
#4 lore raw
In reply to Boris Ostrovsky
Quoted 4 lines · Boris Ostrovsky

For PV guests these registers are set up by hypervisor and thus should not be written by the guest. The comment in xen_write_msr_safe() says so but we still write the MSRs, causing the hypervisor to print a warning.

Applied to for-linus-4.3, thanks.

David