From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Npdyq-0002Rc-SH for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:57 -0500 Received: from [199.232.76.173] (port=55597 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Npdyp-0002R3-Vc for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:56 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Npdyp-0003ZH-8Z for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:37288) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Npdyo-0003ZD-Q5 for qemu-devel@nongnu.org; Thu, 11 Mar 2010 03:42:55 -0500 Message-ID: <4B98AD0B.7080500@redhat.com> Date: Thu, 11 Mar 2010 10:42:51 +0200 From: Avi Kivity MIME-Version: 1.0 References: <20100309015343.901738854@redhat.com> <20100309015644.272624611@redhat.com> In-Reply-To: <20100309015644.272624611@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [patch 3/3] kvm: allow qemu to set EPT identity mapping address List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 03/09/2010 03:53 AM, Marcelo Tosatti wrote: > From: Sheng Yang > > If we use larger BIOS image than current 256KB, we would need move reserved > TSS and EPT identity mapping pages. Currently TSS support this, but not > EPT. > > Signed-off-by: Marcelo Tosatti > > Index: qemu-kvm/target-i386/kvm.c > =================================================================== > --- qemu-kvm.orig/target-i386/kvm.c > +++ qemu-kvm/target-i386/kvm.c > @@ -341,6 +341,24 @@ static int kvm_has_msr_star(CPUState *en > return 0; > } > > +static int kvm_init_identity_map_page(KVMState *s) > +{ > +#ifdef KVM_CAP_SET_IDENTITY_MAP_ADDR > + int ret; > + uint64_t addr = 0xfffbc000; > + > + if (!kvm_check_extension(s, KVM_CAP_SET_IDENTITY_MAP_ADDR)) > + return 0; > { braces } > + > + ret = kvm_vm_ioctl(s, KVM_SET_IDENTITY_MAP_ADDR,&addr); > + if (ret< 0) { > + fprintf(stderr, "kvm_set_identity_map_addr: %s\n", strerror(ret)); > + return ret; > + } > +#endif > + return 0; > +} > + > int kvm_arch_init(KVMState *s, int smp_cpus) > { > int ret; > @@ -368,7 +386,11 @@ int kvm_arch_init(KVMState *s, int smp_c > perror("e820_add_entry() table is full"); > exit(1); > } > - return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000); > + ret = kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, 0xfffbd000); > + if (ret< 0) > + return ret; > { } > + > + return kvm_init_identity_map_page(s); > } > > static void set_v8086_seg(struct kvm_segment *lhs, const SegmentCache *rhs) > > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- error compiling committee.c: too many arguments to function