* kvm-76 --std-vga problem
@ 2008-09-28 21:44 Michael Malone
2008-09-29 12:37 ` Martin Maurer
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Michael Malone @ 2008-09-28 21:44 UTC (permalink / raw)
To: kvm mailing list
Hi Everyone,
I just downloaded and ran the new kvm-76 (upgrading from kvm-74) and I
have a few issues.
I am running Ubuntu 8.04 (Hardy) as my host and Windows XP as my guest.
I am using VT-d and the kernel modules loaded correctly.
Here is the command I use to start kvm:
kvm-bridge -hda windows2.img -boot c -m 1000 -serial /dev/ttyUSB0
-serial file:serial.out -smp 2 -usb -usbdevice "tablet" -full-screen
-cdrom /dev/cdrom
kvm-bridge is a script that configures my network and passes the other
options straight through to qemu-system-x86_64
1) what is the difference between running qemu-system-x86_64 and kvm
directly?
Because, when I run kvm directly, I get this error:
Traceback (most recent call last):
File "/home/malonem/kvm-76/kvm", line 20, in <module>
external_module = config.get('shell', 'want_module')
File "/usr/lib/python2.5/ConfigParser.py", line 511, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'shell'
2) (this has been around for quite some time, I just haven't done
anything about it)
Even though I start up with -smp 2, windows only reads 1 cpu
3) When I run it using the --std-vga parameter, windows boots to just
before it gets to the "welcome" screen and hangs. The output shows a
multitude of "kvm: get_dirty_pages returned -2" Is this something to do
with the kernel version I am using? I am using the standard Ubuntu
Hardy Kernel 2.6.24-19-generic. I read the release notes about the
kernel version with kvm-76 but didn't really understand them and
presumed that I am using the kernel modules supplied with kvm. (I
rmmod'd kvm-intel and kvm before I compiled and installed, then
modprobe'd the modules afterwards and everything seemed to go ok)
Any help or insight would be much appreciated,
Michael
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: kvm-76 --std-vga problem
2008-09-28 21:44 kvm-76 --std-vga problem Michael Malone
@ 2008-09-29 12:37 ` Martin Maurer
2008-09-29 12:50 ` Brian Jackson
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Martin Maurer @ 2008-09-29 12:37 UTC (permalink / raw)
To: kvm mailing list; +Cc: Michael Malone
I can confirm problems with --std-vga.
I had 4 running win xp sp3 guest with --std-vga (KVM-75).
Now, after upgrading to KVM-76 the screen goes black, just before the "welcome" and hangs.
Im using a 2.6.24 kernel (Debian 64)
Best Regards,
Martin Maurer
martin@proxmox.com
http://www.proxmox.com
> -----Original Message-----
> From: kvm-owner@vger.kernel.org [mailto:kvm-owner@vger.kernel.org] On
> Behalf Of Michael Malone
> Sent: Sonntag, 28. September 2008 23:45
> To: kvm mailing list
> Subject: kvm-76 --std-vga problem
>
> Hi Everyone,
>
> I just downloaded and ran the new kvm-76 (upgrading from kvm-74) and I
> have a few issues.
> I am running Ubuntu 8.04 (Hardy) as my host and Windows XP as my guest.
> I am using VT-d and the kernel modules loaded correctly.
>
> Here is the command I use to start kvm:
> kvm-bridge -hda windows2.img -boot c -m 1000 -serial /dev/ttyUSB0
> -serial file:serial.out -smp 2 -usb -usbdevice "tablet" -full-screen
> -cdrom /dev/cdrom
>
> kvm-bridge is a script that configures my network and passes the other
> options straight through to qemu-system-x86_64
>
> 1) what is the difference between running qemu-system-x86_64 and kvm
> directly?
> Because, when I run kvm directly, I get this error:
> Traceback (most recent call last):
> File "/home/malonem/kvm-76/kvm", line 20, in <module>
> external_module = config.get('shell', 'want_module')
> File "/usr/lib/python2.5/ConfigParser.py", line 511, in get
> raise NoSectionError(section)
> ConfigParser.NoSectionError: No section: 'shell'
>
> 2) (this has been around for quite some time, I just haven't done
> anything about it)
> Even though I start up with -smp 2, windows only reads 1 cpu
>
> 3) When I run it using the --std-vga parameter, windows boots to just
> before it gets to the "welcome" screen and hangs. The output shows a
> multitude of "kvm: get_dirty_pages returned -2" Is this something to do
> with the kernel version I am using? I am using the standard Ubuntu
> Hardy Kernel 2.6.24-19-generic. I read the release notes about the
> kernel version with kvm-76 but didn't really understand them and
> presumed that I am using the kernel modules supplied with kvm. (I
> rmmod'd kvm-intel and kvm before I compiled and installed, then
> modprobe'd the modules afterwards and everything seemed to go ok)
>
> Any help or insight would be much appreciated,
>
> Michael
>
> =======================================================================
> This email, including any attachments, is only for the intended
> addressee. It is subject to copyright, is confidential and may be
> the subject of legal or other privilege, none of which is waived or
> lost by reason of this transmission.
> If the receiver is not the intended addressee, please accept our
> apologies, notify us by return, delete all copies and perform no
> other act on the email.
> Unfortunately, we cannot warrant that the email has not been
> altered or corrupted during transmission.
> =======================================================================
>
> --
> 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] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-09-28 21:44 kvm-76 --std-vga problem Michael Malone
2008-09-29 12:37 ` Martin Maurer
@ 2008-09-29 12:50 ` Brian Jackson
2008-09-29 17:29 ` Glauber Costa
2008-10-01 7:47 ` Avi Kivity
3 siblings, 0 replies; 10+ messages in thread
From: Brian Jackson @ 2008-09-29 12:50 UTC (permalink / raw)
To: Michael Malone; +Cc: kvm mailing list
On Sunday 28 September 2008 4:44:30 pm Michael Malone wrote:
> Hi Everyone,
>
> I just downloaded and ran the new kvm-76 (upgrading from kvm-74) and I
> have a few issues.
> I am running Ubuntu 8.04 (Hardy) as my host and Windows XP as my guest.
> I am using VT-d and the kernel modules loaded correctly.
>
> Here is the command I use to start kvm:
> kvm-bridge -hda windows2.img -boot c -m 1000 -serial /dev/ttyUSB0
> -serial file:serial.out -smp 2 -usb -usbdevice "tablet" -full-screen
> -cdrom /dev/cdrom
>
> kvm-bridge is a script that configures my network and passes the other
> options straight through to qemu-system-x86_64
>
> 1) what is the difference between running qemu-system-x86_64 and kvm
> directly?
> Because, when I run kvm directly, I get this error:
> Traceback (most recent call last):
> File "/home/malonem/kvm-76/kvm", line 20, in <module>
> external_module = config.get('shell', 'want_module')
> File "/usr/lib/python2.5/ConfigParser.py", line 511, in get
> raise NoSectionError(section)
> ConfigParser.NoSectionError: No section: 'shell'
That's a python qemu wrapper (which is unfortunately named kvm). That is not
the same as the kvm binary which most distros install. You'll want to use the
qemu-system-x86_64 binary in the qemu/x86_64-softmmu dir if you want to run
directly from the source dir. But it looks like you've already installed it
to the system, so I wouldn't bother.
>
> 2) (this has been around for quite some time, I just haven't done
> anything about it)
> Even though I start up with -smp 2, windows only reads 1 cpu
You probably installed the guest with -smp 1. In which case, XP would have
installed the Uniprocessor HAL. You'd have to change that out or reinstall
the guest to be able to use more than one CPU.
>
> 3) When I run it using the --std-vga parameter, windows boots to just
> before it gets to the "welcome" screen and hangs. The output shows a
> multitude of "kvm: get_dirty_pages returned -2" Is this something to do
> with the kernel version I am using? I am using the standard Ubuntu
> Hardy Kernel 2.6.24-19-generic. I read the release notes about the
> kernel version with kvm-76 but didn't really understand them and
> presumed that I am using the kernel modules supplied with kvm. (I
> rmmod'd kvm-intel and kvm before I compiled and installed, then
> modprobe'd the modules afterwards and everything seemed to go ok)
I don't know about this, but it seems that someone else verified, so hopefully
the devs will be on it soon.
>
> Any help or insight would be much appreciated,
>
> Michael
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-09-28 21:44 kvm-76 --std-vga problem Michael Malone
2008-09-29 12:37 ` Martin Maurer
2008-09-29 12:50 ` Brian Jackson
@ 2008-09-29 17:29 ` Glauber Costa
2008-09-29 18:08 ` Glauber Costa
2008-10-01 7:47 ` Avi Kivity
3 siblings, 1 reply; 10+ messages in thread
From: Glauber Costa @ 2008-09-29 17:29 UTC (permalink / raw)
To: Michael Malone; +Cc: kvm mailing list
On Sun, Sep 28, 2008 at 6:44 PM, Michael Malone
<michael.malone@tait.co.nz> wrote:
> 2) (this has been around for quite some time, I just haven't done anything
> about it)
> Even though I start up with -smp 2, windows only reads 1 cpu
>
> 3) When I run it using the --std-vga parameter, windows boots to just before
> it gets to the "welcome" screen and hangs. The output shows a multitude of
> "kvm: get_dirty_pages returned -2" Is this something to do with the kernel
> version I am using? I am using the standard Ubuntu Hardy Kernel
No. It's a regression introduced in last version. It should work using
cirrus vga (can you confirm, please?)
It happens because for the specific range std vga is relying the
memory will be, it do a cpu_register_physical_mem().
When kvm tries to create a new piece of memory in this place, it's
marked as already existant.
There are some quick hacks, but I'll be trying to work on a proper fix
in the following days.
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-09-29 17:29 ` Glauber Costa
@ 2008-09-29 18:08 ` Glauber Costa
0 siblings, 0 replies; 10+ messages in thread
From: Glauber Costa @ 2008-09-29 18:08 UTC (permalink / raw)
To: Michael Malone; +Cc: kvm mailing list
[-- Attachment #1: Type: text/plain, Size: 1291 bytes --]
On Mon, Sep 29, 2008 at 2:29 PM, Glauber Costa <glommer@gmail.com> wrote:
> On Sun, Sep 28, 2008 at 6:44 PM, Michael Malone
> <michael.malone@tait.co.nz> wrote:
>> 2) (this has been around for quite some time, I just haven't done anything
>> about it)
>> Even though I start up with -smp 2, windows only reads 1 cpu
>>
>> 3) When I run it using the --std-vga parameter, windows boots to just before
>> it gets to the "welcome" screen and hangs. The output shows a multitude of
>> "kvm: get_dirty_pages returned -2" Is this something to do with the kernel
>> version I am using? I am using the standard Ubuntu Hardy Kernel
>
> No. It's a regression introduced in last version. It should work using
> cirrus vga (can you confirm, please?)
>
> It happens because for the specific range std vga is relying the
> memory will be, it do a cpu_register_physical_mem().
> When kvm tries to create a new piece of memory in this place, it's
> marked as already existant.
>
> There are some quick hacks, but I'll be trying to work on a proper fix
> in the following days.
This is a band aid, but proves the general idea. Can you confirm that
it fixes the problem for you ?
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: band-aid.patch --]
[-- Type: text/x-patch; name=band-aid.patch, Size: 1211 bytes --]
diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c
index dfa63bb..6abb3b9 100644
--- a/libkvm/libkvm.c
+++ b/libkvm/libkvm.c
@@ -399,8 +399,7 @@ int kvm_create(kvm_context_t kvm, unsigned long phys_mem_bytes, void **vm_mem)
return 0;
}
-
-void *kvm_create_phys_mem(kvm_context_t kvm, unsigned long phys_start,
+void *kvm_set_phys_mem(kvm_context_t kvm, unsigned long phys_start,
unsigned long len, int log, int writable)
{
int r;
@@ -441,6 +440,23 @@ void *kvm_create_phys_mem(kvm_context_t kvm, unsigned long phys_start,
return ptr;
}
+void *kvm_create_phys_mem(kvm_context_t kvm, unsigned long phys_start,
+ unsigned long len, int log, int writable)
+{
+ int slot = get_container_slot(phys_start, len);
+ int flags = log ? KVM_MEM_LOG_DIRTY_PAGES : 0;
+
+ if (slot == -1) {
+ return kvm_set_phys_mem(kvm, phys_start, len, log, writable);
+ }
+ if (slots[slot].flags == flags) {
+ return slots[slot].userspace_addr;
+ } else {
+ kvm_destroy_phys_mem(kvm, phys_start, len);
+ return kvm_set_phys_mem(kvm, phys_start, len, log, writable);
+ }
+}
+
int kvm_register_phys_mem(kvm_context_t kvm,
unsigned long phys_start, void *userspace_addr,
unsigned long len, int log)
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-09-28 21:44 kvm-76 --std-vga problem Michael Malone
` (2 preceding siblings ...)
2008-09-29 17:29 ` Glauber Costa
@ 2008-10-01 7:47 ` Avi Kivity
2008-10-01 19:52 ` Michael Malone
3 siblings, 1 reply; 10+ messages in thread
From: Avi Kivity @ 2008-10-01 7:47 UTC (permalink / raw)
To: Michael Malone; +Cc: kvm mailing list
Michael Malone wrote:
>
> 1) what is the difference between running qemu-system-x86_64 and kvm
> directly?
> Because, when I run kvm directly, I get this error:
>
The kvm script was mostly a development tool. I don't actually use it
anymore. The main drawback is that you have to teach it about all qemu
options, and there are many; the only value it provides is reloading the
module (useful when you make changes), and not requiring the bios to be
installed.
> 2) (this has been around for quite some time, I just haven't done
> anything about it)
> Even though I start up with -smp 2, windows only reads 1 cpu
What HAL does Windows use? (Device Manager, properties on the Computer
object)
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-10-01 7:47 ` Avi Kivity
@ 2008-10-01 19:52 ` Michael Malone
0 siblings, 0 replies; 10+ messages in thread
From: Michael Malone @ 2008-10-01 19:52 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm mailing list
Avi Kivity wrote:
> Michael Malone wrote:
>>
>> 1) what is the difference between running qemu-system-x86_64 and kvm
>> directly?
>> Because, when I run kvm directly, I get this error:
>>
>
> The kvm script was mostly a development tool. I don't actually use it
> anymore. The main drawback is that you have to teach it about all
> qemu options, and there are many; the only value it provides is
> reloading the module (useful when you make changes), and not requiring
> the bios to be installed.
>
>> 2) (this has been around for quite some time, I just haven't done
>> anything about it)
>> Even though I start up with -smp 2, windows only reads 1 cpu
>
> What HAL does Windows use? (Device Manager, properties on the Computer
> object)
>
Yes, Glauber Costa pointed that one out to me. It is using the
Uniprocessor HAL and I am about to re-install Windows to get around that
one. Thanks though!
Michael
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
@ 2008-10-06 0:52 duck
2008-10-06 7:35 ` Niels Berglund
2008-10-06 16:16 ` Glauber Costa
0 siblings, 2 replies; 10+ messages in thread
From: duck @ 2008-10-06 0:52 UTC (permalink / raw)
To: kvm
Michael Malone wrote:
>>> When I run [kvm-76] it using the --std-vga parameter,
>>> windows boots to just before it gets to the "welcome"
>>> screen and hangs. The output shows a multitude of
>>> "kvm: get_dirty_pages returned -2"
[...]
Glauber Costa replied:
>> It's a regression introduced in last version. It should work using
>> cirrus vga (can you confirm, please?)
>>
>> There are some quick hacks, but I'll be trying to work on a proper
>> fix in the following days.
Then Glauber Coster additionally replied:
> This is a band aid, but proves the general idea. Can you
> confirm that it fixes the problem for you ?
When I use kvm-76 with -std-vga (I am booting an XP3 guest under a Linux
32-bit PAE host) I see this:
kvm_create_phys_mem: File existsset_vram_mapping: cannot allocate memory: File exists
set_vram_mapping failed
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
...zillions of this line...
When I omit -std-vga and use Cirrus VGA, it works fine.
When I apply glommer's abovementioned band aid patch and use -std-vga then
the problem is different, but not fixed. I no longer see the
kvm_create_phys_mem error, nor the set_vram_mapping error, but the:
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
kvm: get_dirty_pages returned -2
...zillions of this line...
still appears.
kvm-75 shows none of these issues and appears to work just fine.
HtH.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-10-06 0:52 duck
@ 2008-10-06 7:35 ` Niels Berglund
2008-10-06 16:16 ` Glauber Costa
1 sibling, 0 replies; 10+ messages in thread
From: Niels Berglund @ 2008-10-06 7:35 UTC (permalink / raw)
To: kvm
duck <duck <at> roaming.ath.cx> writes:
> Michael Malone wrote:
[snip
> Glauber Costa replied:
[snip]
> > This is a band aid, but proves the general idea. Can you
> > confirm that it fixes the problem for you ?
>
> When I apply glommer's abovementioned band aid patch and use -std-vga then
> the problem is different, but not fixed. I no longer see the
> kvm_create_phys_mem error, nor the set_vram_mapping error, but the:
>
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> ...zillions of this line...
>
> still appears.
I'm seeing the same issue as duck above, i.e the get_dirty_pages issue still
exist aftr having applied the patch. For me it's not a showstopper though, I
just run kvm without the -std-vga flag for the time being.
Niels
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: kvm-76 --std-vga problem
2008-10-06 0:52 duck
2008-10-06 7:35 ` Niels Berglund
@ 2008-10-06 16:16 ` Glauber Costa
1 sibling, 0 replies; 10+ messages in thread
From: Glauber Costa @ 2008-10-06 16:16 UTC (permalink / raw)
To: duck; +Cc: kvm
On Sun, Oct 5, 2008 at 9:52 PM, duck <duck@roaming.ath.cx> wrote:
> Michael Malone wrote:
>
>>>> When I run [kvm-76] it using the --std-vga parameter,
>>>> windows boots to just before it gets to the "welcome"
>>>> screen and hangs. The output shows a multitude of
>>>> "kvm: get_dirty_pages returned -2"
>
> [...]
>
> Glauber Costa replied:
>
>>> It's a regression introduced in last version. It should work using
>>> cirrus vga (can you confirm, please?)
>>>
>>> There are some quick hacks, but I'll be trying to work on a proper
>>> fix in the following days.
>
> Then Glauber Coster additionally replied:
>
>> This is a band aid, but proves the general idea. Can you
>> confirm that it fixes the problem for you ?
>
> When I use kvm-76 with -std-vga (I am booting an XP3 guest under a Linux
> 32-bit PAE host) I see this:
>
> kvm_create_phys_mem: File existsset_vram_mapping: cannot allocate memory: File exists
> set_vram_mapping failed
>
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> ...zillions of this line...
>
> When I omit -std-vga and use Cirrus VGA, it works fine.
>
> When I apply glommer's abovementioned band aid patch and use -std-vga then
> the problem is different, but not fixed. I no longer see the
> kvm_create_phys_mem error, nor the set_vram_mapping error, but the:
yeah, I saw this part of the problem going away for me, and thought it
could be fixed.
I'm testing it with fedora, so maybe that's why. I still have to dig a
little deeper, but I'm
travelling for the Linux Kongress right now, and won't be hacking on
this until late this week.
Stay tuned. Meanwhile, if any of you can bisect it to determine the
exact git commit caused this, it would be really helpful. Maybe it
even become obvious.
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> kvm: get_dirty_pages returned -2
> ...zillions of this line...
>
> still appears.
>
> kvm-75 shows none of these issues and appears to work just fine.
>
> HtH.
> --
> 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
>
--
Glauber Costa.
"Free as in Freedom"
http://glommer.net
"The less confident you are, the more serious you have to act."
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-10-06 16:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-28 21:44 kvm-76 --std-vga problem Michael Malone
2008-09-29 12:37 ` Martin Maurer
2008-09-29 12:50 ` Brian Jackson
2008-09-29 17:29 ` Glauber Costa
2008-09-29 18:08 ` Glauber Costa
2008-10-01 7:47 ` Avi Kivity
2008-10-01 19:52 ` Michael Malone
-- strict thread matches above, loose matches on Subject: below --
2008-10-06 0:52 duck
2008-10-06 7:35 ` Niels Berglund
2008-10-06 16:16 ` Glauber Costa
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.