]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
kvm: kvm__setup_sregs initialize more registers
authorAsias He <asias.hejun@gmail.com>
Fri, 28 May 2010 07:48:17 +0000 (15:48 +0800)
committerCyrill Gorcunov <gorcunov@gmail.com>
Fri, 28 May 2010 17:45:26 +0000 (21:45 +0400)
This allow to boot bzImage

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
tools/kvm/kvm.c

index cf18be7a917763f05cc8218e7bced92545af1e77..5752fc55db122298d805299c6c2b6c4461a72a6a 100644 (file)
@@ -496,6 +496,16 @@ static void kvm__setup_sregs(struct kvm *self)
                die_perror("KVM_GET_SREGS failed");
        self->sregs.cs.selector = self->boot_selector;
        self->sregs.cs.base = selector_to_base(self->boot_selector);
+       self->sregs.ss.selector = self->boot_selector;
+       self->sregs.ss.base = selector_to_base(self->boot_selector);
+       self->sregs.ds.selector = self->boot_selector;
+       self->sregs.ds.base = selector_to_base(self->boot_selector);
+       self->sregs.es.selector = self->boot_selector;
+       self->sregs.es.base = selector_to_base(self->boot_selector);
+       self->sregs.fs.selector = self->boot_selector;
+       self->sregs.fs.base = selector_to_base(self->boot_selector);
+       self->sregs.gs.selector = self->boot_selector;
+       self->sregs.gs.base = selector_to_base(self->boot_selector);
        if (ioctl(self->vcpu_fd, KVM_SET_SREGS, &self->sregs) < 0)
                die_perror("KVM_SET_SREGS failed");
 }