Patchwork QEMU-KVM missing bits for E820 handling.

login
register
mail settings
Submitter Jes Sorensen
Date March 9, 2010, 5:24 p.m.
Message ID <4B96846A.4080003@redhat.com>
Download mbox | patch
Permalink /patch/47176/
State New
Headers show

Comments

Jes Sorensen - March 9, 2010, 5:24 p.m.
Hi,

This is the last piece needed for QEMU-KVM to match the changes that
went into upstream QEMU.

Cheers,
Jes
Use qemu-cfg to provide the BIOS with an optional table of e820 entries.

The missing bits for qemu-kvm.git to match what qemu does.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

---
 qemu-kvm-x86.c |    7 +++++++
 1 file changed, 7 insertions(+)
Avi Kivity - March 11, 2010, 12:35 p.m.
On 03/09/2010 07:24 PM, Jes Sorensen wrote:
> Hi,
>
> This is the last piece needed for QEMU-KVM to match the changes that
> went into upstream QEMU.
>

Applied, thanks.

Patch

Index: qemu-kvm/qemu-kvm-x86.c
===================================================================
--- qemu-kvm.orig/qemu-kvm-x86.c
+++ qemu-kvm/qemu-kvm-x86.c
@@ -37,6 +37,13 @@  int kvm_set_tss_addr(kvm_context_t kvm, 
 {
 #ifdef KVM_CAP_SET_TSS_ADDR
 	int r;
+        /*
+         * Tell fw_cfg to notify the BIOS to reserve the range.
+         */
+        if (e820_add_entry(addr, 0x4000, E820_RESERVED) < 0) {
+            perror("e820_add_entry() table is full");
+            exit(1);
+        }
 
 	r = kvm_ioctl(kvm_state, KVM_CHECK_EXTENSION, KVM_CAP_SET_TSS_ADDR);
 	if (r > 0) {