* [PATCH 1/3] Update qemu-kvm bios to allow for a larger bios image.
@ 2009-07-16 18:02 Jordan Justen
2009-07-16 18:02 ` [PATCH 2/3] Move qemu-kvm 'VMC TSS Pages' to allow a larger BIOS image Jordan Justen
0 siblings, 1 reply; 7+ messages in thread
From: Jordan Justen @ 2009-07-16 18:02 UTC (permalink / raw)
To: kvm-devel; +Cc: Jordan Justen
The bios will now reserve more memory via the E820 functions.
Previously we reserved:
0xfffbc000-0xfffbcfff - 4KB - KVM kernel module, EPT identity pages tables
0xfffbd000-0xfffbffff - 12KB - KVM bios, VMC TSS Pages
0xfffc0000-0xffffffff - 256KB - Max KVM bios.bin (usually top 128KB is used)
Now we will reserve:
0xfeffc000-0xfeffcfff - 4KB - KVM kernel module, EPT identity pages tables
0xfeffd000-0xfeffffff - 12KB - KVM bios, VMC TSS Pages
0xff000000-0xffffffff - 16MB - Max KVM bios.bin
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
kvm/bios/rombios.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kvm/bios/rombios.c b/kvm/bios/rombios.c
index 6186199..2d0c153 100644
--- a/kvm/bios/rombios.c
+++ b/kvm/bios/rombios.c
@@ -4596,14 +4596,14 @@ ASM_END
case 5:
/* 4 pages before the bios, 3 pages for vmx tss pages,
* the other page for EPT real mode pagetable */
- set_e820_range(ES, regs.u.r16.di, 0xfffbc000L,
- 0xfffc0000L, 0, 0, 2);
+ set_e820_range(ES, regs.u.r16.di, 0xfeffc000L,
+ 0xff000000L, 0, 0, 2);
regs.u.r32.ebx = 6;
break;
case 6:
- /* 256KB BIOS area at the end of 4 GB */
+ /* 16MB BIOS area at the end of 4 GB */
set_e820_range(ES, regs.u.r16.di,
- 0xfffc0000L, 0x00000000L ,0, 0, 2);
+ 0xff000000L, 0x00000000L ,0, 0, 2);
if (extra_highbits_memory_size || extra_lowbits_memory_size)
regs.u.r32.ebx = 7;
else
--
1.6.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] Move qemu-kvm 'VMC TSS Pages' to allow a larger BIOS image.
2009-07-16 18:02 [PATCH 1/3] Update qemu-kvm bios to allow for a larger bios image Jordan Justen
@ 2009-07-16 18:02 ` Jordan Justen
2009-07-16 18:02 ` [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code Jordan Justen
0 siblings, 1 reply; 7+ messages in thread
From: Jordan Justen @ 2009-07-16 18:02 UTC (permalink / raw)
To: kvm-devel; +Cc: Jordan Justen
Move qemu-kvm 'VMC TSS Pages' from:
0xfffbd000-0xfffbffff
to:
0xfeffd000-0xfeffffff
The step is required to free up the 0xff000000-0xffffffff (16MB) range
for use with bios.bin.
This change depends upon a change to kvm/bios/rombios.c so the bios
INT15-E820 function will properly reserve the new location.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
qemu-kvm-x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index daf60b6..b5306aa 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -63,7 +63,7 @@ static int kvm_init_tss(kvm_context_t kvm)
* this address is 3 pages before the bios, and the bios should present
* as unavaible memory
*/
- r = kvm_set_tss_addr(kvm, 0xfffbd000);
+ r = kvm_set_tss_addr(kvm, 0xfeffd000);
if (r < 0) {
fprintf(stderr, "kvm_init_tss: unable to set tss addr\n");
return r;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.
2009-07-16 18:02 ` [PATCH 2/3] Move qemu-kvm 'VMC TSS Pages' to allow a larger BIOS image Jordan Justen
@ 2009-07-16 18:02 ` Jordan Justen
2009-07-16 18:18 ` Marcelo Tosatti
0 siblings, 1 reply; 7+ messages in thread
From: Jordan Justen @ 2009-07-16 18:02 UTC (permalink / raw)
To: kvm-devel; +Cc: Jordan Justen
Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within
qemu-kvm, this change mirrors a similar change in the kernel kvm code.
The purpose is to move the KVM 'EPT Identity Pages' from:
0xfffbc000-0xfffbcfff
to:
0xfeffc000-0xfeffcfff
The step is required to free up the 0xff000000-0xffffffff (16MB) range
for use with bios.bin.
The KVM kernel change depends upon a change to kvm/bios/rombios.c so the bios
INT15-E820 function will properly reserve the new location.
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
---
kvm/include/x86/asm/vmx.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/kvm/include/x86/asm/vmx.h b/kvm/include/x86/asm/vmx.h
index df8d4f9..99e2bb9 100644
--- a/kvm/include/x86/asm/vmx.h
+++ b/kvm/include/x86/asm/vmx.h
@@ -403,7 +403,7 @@ enum vmcs_field {
#define VMX_EPT_EXECUTABLE_MASK 0x4ull
#define VMX_EPT_IGMT_BIT (1ull << 6)
-#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
+#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfeffc000ul
#define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
--
1.6.0.4
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.
2009-07-16 18:02 ` [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code Jordan Justen
@ 2009-07-16 18:18 ` Marcelo Tosatti
2009-07-16 18:48 ` Jordan Justen
0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2009-07-16 18:18 UTC (permalink / raw)
To: Jordan Justen; +Cc: kvm-devel
On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote:
> Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within
> qemu-kvm, this change mirrors a similar change in the kernel kvm code.
>
> The purpose is to move the KVM 'EPT Identity Pages' from:
> 0xfffbc000-0xfffbcfff
> to:
> 0xfeffc000-0xfeffcfff
>
> The step is required to free up the 0xff000000-0xffffffff (16MB) range
> for use with bios.bin.
>
> The KVM kernel change depends upon a change to kvm/bios/rombios.c so the bios
> INT15-E820 function will properly reserve the new location.
>
> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> ---
> kvm/include/x86/asm/vmx.h | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kvm/include/x86/asm/vmx.h b/kvm/include/x86/asm/vmx.h
> index df8d4f9..99e2bb9 100644
> --- a/kvm/include/x86/asm/vmx.h
> +++ b/kvm/include/x86/asm/vmx.h
> @@ -403,7 +403,7 @@ enum vmcs_field {
> #define VMX_EPT_EXECUTABLE_MASK 0x4ull
> #define VMX_EPT_IGMT_BIT (1ull << 6)
>
> -#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
> +#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfeffc000ul
Won't this conflict with an older BIOS? (the e820 reserved entry on
older qemu-kvm+bios will not cover the EPT identity table on kernels
with this patch).
Perhaps add a new ioctl (similar to the tss one) to so userspace can set
the address?
>
>
> #define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
> --
> 1.6.0.4
>
> --
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.
2009-07-16 18:18 ` Marcelo Tosatti
@ 2009-07-16 18:48 ` Jordan Justen
2009-07-16 19:14 ` Marcelo Tosatti
0 siblings, 1 reply; 7+ messages in thread
From: Jordan Justen @ 2009-07-16 18:48 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm-devel
On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote:
> On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote:
> > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within
> > qemu-kvm, this change mirrors a similar change in the kernel kvm code.
> >
> > The purpose is to move the KVM 'EPT Identity Pages' from:
> > 0xfffbc000-0xfffbcfff
> > to:
> > 0xfeffc000-0xfeffcfff
> >
> > The step is required to free up the 0xff000000-0xffffffff (16MB) range
> > for use with bios.bin.
> >
> > The KVM kernel change depends upon a change to kvm/bios/rombios.c so the bios
> > INT15-E820 function will properly reserve the new location.
> >
> > Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> > ---
> > kvm/include/x86/asm/vmx.h | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/kvm/include/x86/asm/vmx.h b/kvm/include/x86/asm/vmx.h
> > index df8d4f9..99e2bb9 100644
> > --- a/kvm/include/x86/asm/vmx.h
> > +++ b/kvm/include/x86/asm/vmx.h
> > @@ -403,7 +403,7 @@ enum vmcs_field {
> > #define VMX_EPT_EXECUTABLE_MASK 0x4ull
> > #define VMX_EPT_IGMT_BIT (1ull << 6)
> >
> > -#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
> > +#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfeffc000ul
>
> Won't this conflict with an older BIOS? (the e820 reserved entry on
> older qemu-kvm+bios will not cover the EPT identity table on kernels
> with this patch).
>
> Perhaps add a new ioctl (similar to the tss one) to so userspace can set
> the address?
I am not very familiar with the reasons why the EPT identity
page-table setup is happening within the kernel.
As it stands, there is the shared knowledge that the qemu-kvm bios
just happens to know that the kvm kernel code has reserved a
particular page of the address space.
It would be much easier to coordinate all the pieces if it were
all setup on the qemu-kvm side.
Is this possible?
> >
> >
> > #define ASM_VMX_VMCLEAR_RAX ".byte 0x66, 0x0f, 0xc7, 0x30"
> > --
> > 1.6.0.4
> >
> > --
> > 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
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.
2009-07-16 18:48 ` Jordan Justen
@ 2009-07-16 19:14 ` Marcelo Tosatti
2009-07-17 2:24 ` Yang, Sheng
0 siblings, 1 reply; 7+ messages in thread
From: Marcelo Tosatti @ 2009-07-16 19:14 UTC (permalink / raw)
To: Jordan Justen; +Cc: kvm-devel, Yang, Sheng
On Thu, Jul 16, 2009 at 11:48:46AM -0700, Jordan Justen wrote:
> On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote:
> > On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote:
> > > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used within
> > > qemu-kvm, this change mirrors a similar change in the kernel kvm code.
> > >
> > > The purpose is to move the KVM 'EPT Identity Pages' from:
> > > 0xfffbc000-0xfffbcfff
> > > to:
> > > 0xfeffc000-0xfeffcfff
> > >
> > > The step is required to free up the 0xff000000-0xffffffff (16MB) range
> > > for use with bios.bin.
> > >
> > > The KVM kernel change depends upon a change to kvm/bios/rombios.c so the bios
> > > INT15-E820 function will properly reserve the new location.
> > >
> > > Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> > > ---
> > > kvm/include/x86/asm/vmx.h | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/kvm/include/x86/asm/vmx.h b/kvm/include/x86/asm/vmx.h
> > > index df8d4f9..99e2bb9 100644
> > > --- a/kvm/include/x86/asm/vmx.h
> > > +++ b/kvm/include/x86/asm/vmx.h
> > > @@ -403,7 +403,7 @@ enum vmcs_field {
> > > #define VMX_EPT_EXECUTABLE_MASK 0x4ull
> > > #define VMX_EPT_IGMT_BIT (1ull << 6)
> > >
> > > -#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
> > > +#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfeffc000ul
> >
> > Won't this conflict with an older BIOS? (the e820 reserved entry on
> > older qemu-kvm+bios will not cover the EPT identity table on kernels
> > with this patch).
> >
> > Perhaps add a new ioctl (similar to the tss one) to so userspace can set
> > the address?
>
> I am not very familiar with the reasons why the EPT identity
> page-table setup is happening within the kernel.
>
> As it stands, there is the shared knowledge that the qemu-kvm bios
> just happens to know that the kvm kernel code has reserved a
> particular page of the address space.
>
> It would be much easier to coordinate all the pieces if it were
> all setup on the qemu-kvm side.
>
> Is this possible?
It is possible but all of the EPT implementation is in the kernel, so it
does not make much sense to have the details of the identity table in
qemu-kvm.
The address of it though can be controlled by qemu-kvm.
Sheng?
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code.
2009-07-16 19:14 ` Marcelo Tosatti
@ 2009-07-17 2:24 ` Yang, Sheng
0 siblings, 0 replies; 7+ messages in thread
From: Yang, Sheng @ 2009-07-17 2:24 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Justen, Jordan L, kvm-devel
On Friday 17 July 2009 03:14:54 Marcelo Tosatti wrote:
> On Thu, Jul 16, 2009 at 11:48:46AM -0700, Jordan Justen wrote:
> > On Thu, 2009-07-16 at 11:18 -0700, Marcelo Tosatti wrote:
> > > On Thu, Jul 16, 2009 at 11:02:22AM -0700, Jordan Justen wrote:
> > > > Although VMX_EPT_IDENTITY_PAGETABLE_ADDR does not appear to be used
> > > > within qemu-kvm, this change mirrors a similar change in the kernel
> > > > kvm code.
> > > >
> > > > The purpose is to move the KVM 'EPT Identity Pages' from:
> > > > 0xfffbc000-0xfffbcfff
> > > > to:
> > > > 0xfeffc000-0xfeffcfff
> > > >
> > > > The step is required to free up the 0xff000000-0xffffffff (16MB)
> > > > range for use with bios.bin.
> > > >
> > > > The KVM kernel change depends upon a change to kvm/bios/rombios.c so
> > > > the bios INT15-E820 function will properly reserve the new location.
> > > >
> > > > Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
> > > > ---
> > > > kvm/include/x86/asm/vmx.h | 2 +-
> > > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > > >
> > > > diff --git a/kvm/include/x86/asm/vmx.h b/kvm/include/x86/asm/vmx.h
> > > > index df8d4f9..99e2bb9 100644
> > > > --- a/kvm/include/x86/asm/vmx.h
> > > > +++ b/kvm/include/x86/asm/vmx.h
> > > > @@ -403,7 +403,7 @@ enum vmcs_field {
> > > > #define VMX_EPT_EXECUTABLE_MASK 0x4ull
> > > > #define VMX_EPT_IGMT_BIT (1ull << 6)
> > > >
> > > > -#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfffbc000ul
> > > > +#define VMX_EPT_IDENTITY_PAGETABLE_ADDR 0xfeffc000ul
> > >
> > > Won't this conflict with an older BIOS? (the e820 reserved entry on
> > > older qemu-kvm+bios will not cover the EPT identity table on kernels
> > > with this patch).
> > >
> > > Perhaps add a new ioctl (similar to the tss one) to so userspace can
> > > set the address?
> >
> > I am not very familiar with the reasons why the EPT identity
> > page-table setup is happening within the kernel.
> >
> > As it stands, there is the shared knowledge that the qemu-kvm bios
> > just happens to know that the kvm kernel code has reserved a
> > particular page of the address space.
> >
> > It would be much easier to coordinate all the pieces if it were
> > all setup on the qemu-kvm side.
> >
> > Is this possible?
>
> It is possible but all of the EPT implementation is in the kernel, so it
> does not make much sense to have the details of the identity table in
> qemu-kvm.
>
> The address of it though can be controlled by qemu-kvm.
>
> Sheng?
Put the identity map into kernel space because we want older version QEmu can
also work with EPT.
Yes, we need a new CAP for address. Would do it soon.
--
regards
Yang, Sheng
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-07-17 2:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-16 18:02 [PATCH 1/3] Update qemu-kvm bios to allow for a larger bios image Jordan Justen
2009-07-16 18:02 ` [PATCH 2/3] Move qemu-kvm 'VMC TSS Pages' to allow a larger BIOS image Jordan Justen
2009-07-16 18:02 ` [PATCH 3/3] Update VMX_EPT_IDENTITY_PAGETABLE_ADDR to synchronize with kernel code Jordan Justen
2009-07-16 18:18 ` Marcelo Tosatti
2009-07-16 18:48 ` Jordan Justen
2009-07-16 19:14 ` Marcelo Tosatti
2009-07-17 2:24 ` Yang, Sheng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox