diff mbox

QEMU-KVM missing bits for E820 handling.

Message ID 4B96846A.4080003@redhat.com
State New
Headers show

Commit Message

Jes Sorensen March 9, 2010, 5:24 p.m. UTC
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(+)

Comments

Avi Kivity March 11, 2010, 12:35 p.m. UTC | #1
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.
diff mbox

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) {