Re: [PATCH] kvm tools: don't die if sdl wasn't compiled in and we don't try using it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 17, 2012 at 5:14 PM, Kashyap Chamarthy <kashyap.cv@xxxxxxxxx> wrote:
> On Mon, Sep 17, 2012 at 4:46 PM, Sasha Levin <levinsasha928@xxxxxxxxx> wrote:
>> If SDL isn't compiled in we shouldn't die unless we actually try using it.
>>
>> Signed-off-by: Sasha Levin <levinsasha928@xxxxxxxxx>
>> ---
>>  tools/kvm/include/kvm/sdl.h | 10 ++++++++--
>>  1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/kvm/include/kvm/sdl.h b/tools/kvm/include/kvm/sdl.h
>> index 19e1d74..2f0c213 100644
>> --- a/tools/kvm/include/kvm/sdl.h
>> +++ b/tools/kvm/include/kvm/sdl.h
>> @@ -11,11 +11,17 @@ int sdl__exit(struct kvm *kvm);
>>  #else
>>  static inline int sdl__init(struct kvm *kvm)
>>  {
>> -       die("SDL support not compiled in. (install the SDL-dev[el] package)");
>> +       if (kvm->cfg.sdl)
>> +               die("SDL support not compiled in. (install the SDL-dev[el] package)");
>> +
>> +       return 0;
>>  }
>>  static inline int sdl__exit(struct kvm *kvm)
>>  {
>> -       die("SDL support not compiled in. (install the SDL-dev[el] package)");
>> +       if (kvm->cfg.sdl)
>> +               die("SDL support not compiled in. (install the SDL-dev[el] package)");
>> +
>> +       return 0;
>>  }
>>  #endif
>>
>> --
>> 1.7.12
>>
>
> Patch applies.
>
> But when I run the  'lkvm' binary  (after recompiling the kernel and
> kvm tool) , I see this:
>
> #---------------------------------------------------------------------------------------------------------------#
> [kashyap@moon kvm]$ ./lkvm  run  -k ../../arch/x86/boot/bzImage
>   # lkvm run -k ../../arch/x86/boot/bzImage -m 448 -c 4 --name guest-17105
> PPrroobbiinngg  EEDDDD  ((eedddd==ooffff  ttoo  ddiissaabbllee))......  ookk
> .
> .
> .
>
>
> [    1.492530]      host=192.168.33.15, domain=, nis-domain=(none)
> [    1.493443]      bootserver=192.168.33.1, rootserver=0.0.0.0, rootpath=
> [    1.494458] ALSA device list:
> [    1.494901]   No soundcards found.
> [    1.497106] VFS: Mounted root (9p filesystem) on device 0:13.
> [    1.498617] devtmpfs: mounted
> [    1.500555] Freeing unused kernel memory: 512k freed
> [    1.501981] Write protecting the kernel read-only data: 12288k
> [    1.511605] Freeing unused kernel memory: 1820k freed
> [    1.520470] Freeing unused kernel memory: 1576k freed
> Mounting...
> [    1.533811] KGDB: BP remove failed: ffffffff8105212f
> #---------------------------------------------------------------------------------------------------------------#
>
> Any hints?

Discussed w/ Sasha  on #pv. He pointed  I had the directive
CONFIG_KGDB_TESTS_ON_BOOT set . (Silly me!)

Builds fine, once booted, guest shell access over a serial console is
presented successfully.
 #---------------------------------------------------------------------------------------------------------------#
[kashyap@moon kvm]$ ./kvm run --balloon -k ../../arch/x86/boot/bzImage
  # kvm run -k ../../arch/x86/boot/bzImage -m 448 -c 4 --name guest-4418
PPrroobbiinngg  EEDDDD  ((eedddd==ooffff  ttoo  ddiissaabbllee))......  ookk


Decompressing Linux... Parsing ELF... done.
Booting the kernel.
.
.
.

[    1.466336]      device=eth0, addr=192.168.33.15,
mask=255.255.255.0, gw=192.168.33.1
[    1.467964]      host=192.168.33.15, domain=, nis-domain=(none)
[    1.469212]      bootserver=192.168.33.1, rootserver=0.0.0.0, rootpath=
[    1.470599] ALSA device list:
[    1.471257]   No soundcards found.
[    1.473453] VFS: Mounted root (9p filesystem) on device 0:13.
[    1.474961] devtmpfs: mounted
[    1.477103] Freeing unused kernel memory: 512k freed
[    1.478598] Write protecting the kernel read-only data: 12288k
[    1.488213] Freeing unused kernel memory: 1820k freed
[    1.497327] Freeing unused kernel memory: 1576k freed
Mounting...
sh-4.2#
 #---------------------------------------------------------------------------------------------------------------#

ACK.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux