From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Riepe Subject: Re: Plan 9 install problems Date: Sun, 17 Dec 2006 13:28:16 +0100 Message-ID: <458537E0.8040800@mr511.de> References: <4583A71D.50300@qumranet.com> <458434C0.5010800@mr511.de> <458507E9.7080509@qumranet.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080202000204000405020703" Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: To: Avi Kivity In-Reply-To: <458507E9.7080509-atKUWr5tajBWk0Htik3J/w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org This is a multi-part message in MIME format. --------------080202000204000405020703 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi there! Avi Kivity wrote: > Michael Riepe wrote: > >> Hi! >> >> Avi Kivity wrote: >> >> >> >>> The way to fix is to add handling to {svm,vmx}_get_msr() for msr 1 >>> (and any other pointless msrs the guest reads or writes). From a >>> cursory reading of the machine check docs, returning 0 should be fine >>> for msr 1. Done, see mce-handling.patch. The AMD part is not tested yet (I don't have access to an SVM capable machine). >> Yep. >> >> But that doesn't help with Plan9 (just checked it). The installer fails >> at VM entry later because it tries to use a "big" code segment (limit = >> 0xffffffff). The same is true for OpenSolaris (cs limit = 0xfffff), by >> the way. >> > > > Okay. Can someone with an AMD machine test these two OSes? There > shouldn't be any problems with real mode there. OpenSolaris runs on Intel with a simple modification: force the CS limit to 0xffff in real mode (I wonder why that didn't happen already). Plan9, on the other hand, seems to execute code outside the 64K range. With cs-limit.patch, it dies at RIP 0x100212. I'm afraid we will need a full-blown real mode instruction emulator to handle that. Please apply cs-limit.patch first in order to avoid fuzz. -- Michael "Tired" Riepe X-Tired: Each morning I get up I die a little --------------080202000204000405020703 Content-Type: text/plain; name="cs-limit.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="cs-limit.patch" Signed-off-by: Michael Riepe Index: vmx.c =================================================================== --- vmx.c (revision 4118) +++ vmx.c (working copy) @@ -726,6 +726,7 @@ vmcs_write32(GUEST_SS_AR_BYTES, 0xf3); vmcs_write32(GUEST_CS_AR_BYTES, 0xf3); + vmcs_write32(GUEST_CS_LIMIT, 0xffff); vmcs_write16(GUEST_CS_SELECTOR, vmcs_readl(GUEST_CS_BASE) >> 4); fix_rmode_seg(VCPU_SREG_ES, &vcpu->rmode.es); --------------080202000204000405020703 Content-Type: text/plain; name="mce-handling.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mce-handling.patch" Signed-off-by: Michael Riepe Index: svm.c =================================================================== --- svm.c (revision 4117) +++ svm.c (working copy) @@ -1073,6 +1073,8 @@ static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) { switch (ecx) { + case MSR_IA32_P5_MC_ADDR: + case MSR_IA32_P5_MC_TYPE: case MSR_IA32_MC0_CTL: case MSR_IA32_MCG_STATUS: case MSR_IA32_MCG_CAP: Index: vmx.c =================================================================== --- vmx.c (revision 4117) +++ vmx.c (working copy) @@ -359,6 +359,8 @@ case MSR_IA32_SYSENTER_ESP: data = vmcs_read32(GUEST_SYSENTER_ESP); break; + case MSR_IA32_P5_MC_ADDR: + case MSR_IA32_P5_MC_TYPE: case MSR_IA32_MC0_CTL: case MSR_IA32_MCG_STATUS: case MSR_IA32_MCG_CAP: --------------080202000204000405020703 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV --------------080202000204000405020703 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kvm-devel mailing list kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/kvm-devel --------------080202000204000405020703--