Upstream qemu-xen, log verbosity and compile errors when enabling debug, filenaming
Hi All,
Yesterday I have tried building and using upstream qemu and seabios. Config.mk:QEMU_UPSTREAM_URL ?= git://git.qemu.org/qemu.gitQEMU_UPSTREAM_REVISION ?= master
SEABIOS_UPSTREAM_URL ?= git://git.qemu.org/seabios.gitSEABIOS_UPSTREAM_TAG ?= master
And i'm happy to say that it works quite ok, even with (secondary pci) pci-passthrough ( using an ATI gfx adapter and windows7 as guest os) :-).
But it seems to have an issue with a USB controller which is trying to use msi-X interrupts, which makes xl dmesg report:
(XEN) [2012-12-06 16:07:24] vmsi.c:108:d32767 Unsupported delivery mode 3
and when "pci_msitranslate=0" is set the error still occurs, only this time the correct domain number is reported, instead of the 32767.
However, when trying to debug, i noticed although making a debug build (make debug=y && make debug=y install), qemu-dm-<guestname>.log stays almost empty. It seems all the defines related to debugging are not set.
- Would it be appropriated to enable them all when making a debug build ?
- Would it be wise to also have some more verbose logging when not running a debug build ?
- And if yes, what would be the nicest way to set the defines ?
- Should the naming of the debug defines be made more consistent ?
When enabling these debug defines by hand:
xen-all.c
#define DEBUG_XEN
xen-mapcache.c
#define MAPCACHE_DEBUG
hw/xen-host-pci-device.c
#define XEN_HOST_PCI_DEVICE_DEBUG
hw/xen_platform.c
#define DEBUG_PLATFORM
hw/xen_pt.h
#define XEN_PT_LOGGING_ENABLED
#define XEN_PT_DEBUG_PCI_CONFIG_ACCESS
I get a lot of compile errors related to wrong types in the debug printf's.
Another thing that occurred to me was that the file naming doesn't seem to be overly consistent:
xen-all.cxen-mapcache.cxen-mapcache.hxen-stub.cxen_apic.chw/xen_backend.chw/xen_backend.hhw/xen_blkif.hhw/xen_common.hhw/xen_console.chw/xen_devconfig.chw/xen_disk.chw/xen_domainbuild.chw/xen_domainbuild.hhw/xenfb.chw/xen.hhw/xen-host-pci-device.chw/xen-host-pci-device.hhw/xen_machine_pv.chw/xen_nic.chw/xen_platform.chw/xen_pt.chw/xen_pt_config_init.chw/xen_pt.hhw/xen_pt_msi.c
Would it be worthwhile to make it:
- consistent all underscore or all minus ?
- allways xen_ (or xen- depending on the above) ?
--
Sander
Quoted 17 lines · Sander Eikelenboom
Hi All,
Yesterday I have tried building and using upstream qemu and seabios. Config.mk:
QEMU_UPSTREAM_URL?=git://git.qemu.org/qemu.gitQEMU_UPSTREAM_REVISION?= master
SEABIOS_UPSTREAM_URL?=git://git.qemu.org/seabios.gitSEABIOS_UPSTREAM_TAG?= masterAnd i'm happy to say that it works quite ok, even with (secondary pci) pci-passthrough ( using an ATI gfx adapter and windows7 as guest os) :-).
But it seems to have an issue with a USB controller which is trying to use msi-X interrupts, which makes xl dmesg report:
(XEN) [2012-12-06 16:07:24] vmsi.c:108:d32767 Unsupported delivery mode 3
and when "pci_msitranslate=0" is set the error still occurs, only this time the correct domain number is reported, instead of the 32767.
Quoted 5 lines
However, when trying to debug, i noticed although making a debug build (make debug=y && make debug=y install), qemu-dm-<guestname>.log stays almost empty. It seems all the defines related to debugging are not set.
- Would it be appropriated to enable them all when making a debug build ?
- Would it be wise to also have some more verbose logging when not running a debug build ?
Yes and yes
Quoted 1 line
- And if yes, what would be the nicest way to set the defines ?
My guess is that it would be enough to turn on XEN_PT_LOGGING_ENABLED by default
Quoted 1 line
- Should the naming of the debug defines be made more consistent ?
Yes
Quoted 12 lines
When enabling these debug defines by hand:
xen-all.c
#defineDEBUG_XEN
xen-mapcache.c
#defineMAPCACHE_DEBUG
hw/xen-host-pci-device.c
#defineXEN_HOST_PCI_DEVICE_DEBUG
Quoted 8 lines
hw/xen_platform.c
#defineDEBUG_PLATFORM
hw/xen_pt.h
#defineXEN_PT_LOGGING_ENABLED
#defineXEN_PT_DEBUG_PCI_CONFIG_ACCESSI get a lot of compile errors related to wrong types in the debug printf's.
That's really bad. I would like upstream QEMU to have the same level of logging as qemu-xen-traditional by default. And they should compile.
Quoted 28 lines
Another thing that occurred to me was that the file naming doesn't seem to be overly consistent:
xen-all.cxen-mapcache.cxen-mapcache.hxen-stub.cxen_apic.chw/xen_backend.chw/xen_backend.hhw/xen_blkif.hhw/xen_common.hhw/xen_console.chw/xen_devconfig.chw/xen_disk.chw/xen_domainbuild.chw/xen_domainbuild.hhw/xenfb.chw/xen.hhw/xen-host-pci-device.chw/xen-host-pci-device.hhw/xen_machine_pv.chw/xen_nic.chw/xen_platform.chw/xen_pt.chw/xen_pt_config_init.chw/xen_pt.hhw/xen_pt_msi.c
Quoted 3 lines
Would it be worthwhile to make it:
- consistent all underscore or all minus ?
- allwaysxen_(or xen- depending on the above) ?
Yes, definitely.
Given that the development window for QEMU 1.4 has just opened might even be the right time to make these changes.
Are you volunteering? :)
Quoted 94 lines · you
Quoted 17 lines · Sander Eikelenboom
Hi All,
Yesterday I have tried building and using upstream qemu and seabios. Config.mk:
QEMU_UPSTREAM_URL?=git://git.qemu.org/qemu.gitQEMU_UPSTREAM_REVISION?= master
SEABIOS_UPSTREAM_URL?=git://git.qemu.org/seabios.gitSEABIOS_UPSTREAM_TAG?= masterAnd i'm happy to say that it works quite ok, even with (secondary pci) pci-passthrough ( using an ATI gfx adapter and windows7 as guest os) :-).
But it seems to have an issue with a USB controller which is trying to use msi-X interrupts, which makes xl dmesg report:
(XEN) [2012-12-06 16:07:24] vmsi.c:108:d32767 Unsupported delivery mode 3
and when "pci_msitranslate=0" is set the error still occurs, only this time the correct domain number is reported, instead of the 32767.Quoted 5 lines
However, when trying to debug, i noticed although making a debug build (make debug=y && make debug=y install), qemu-dm-<guestname>.log stays almost empty. It seems all the defines related to debugging are not set.
- Would it be appropriated to enable them all when making a debug build ?
- Would it be wise to also have some more verbose logging when not running a debug build ?Yes and yes
Quoted 1 line
- And if yes, what would be the nicest way to set the defines ?
My guess is that it would be enough to turn on
XEN_PT_LOGGING_ENABLEDby defaultQuoted 1 line
- Should the naming of the debug defines be made more consistent ?
Yes
Quoted 12 lines
When enabling these debug defines by hand:
xen-all.c
#defineDEBUG_XEN
xen-mapcache.c
#defineMAPCACHE_DEBUG
hw/xen-host-pci-device.c
#defineXEN_HOST_PCI_DEVICE_DEBUGQuoted 8 lines
hw/xen_platform.c
#defineDEBUG_PLATFORM
hw/xen_pt.h
#defineXEN_PT_LOGGING_ENABLED
#defineXEN_PT_DEBUG_PCI_CONFIG_ACCESSI get a lot of compile errors related to wrong types in the debug printf's.
That's really bad. I would like upstream QEMU to have the same level of logging as qemu-xen-traditional by default. And they should compile.
Quoted 28 lines
Another thing that occurred to me was that the file naming doesn't seem to be overly consistent:
xen-all.cxen-mapcache.cxen-mapcache.hxen-stub.cxen_apic.chw/xen_backend.chw/xen_backend.hhw/xen_blkif.hhw/xen_common.hhw/xen_console.chw/xen_devconfig.chw/xen_disk.chw/xen_domainbuild.chw/xen_domainbuild.hhw/xenfb.chw/xen.hhw/xen-host-pci-device.chw/xen-host-pci-device.hhw/xen_machine_pv.chw/xen_nic.chw/xen_platform.chw/xen_pt.chw/xen_pt_config_init.chw/xen_pt.hhw/xen_pt_msi.cQuoted 3 lines
Would it be worthwhile to make it:
- consistent all underscore or all minus ?
- allwaysxen_(or xen- depending on the above) ?
Quoted 5 lines
Yes, definitely.
Given that the development window for QEMU 1.4 has just opened might even be the right time to make these changes.Are you volunteering? :)
Erhmm yes i think i should be able to accomplish this :-) And yes i did notice the 1.3 release :-)
Patches would be directly against the qemu-upstream git-tree, first round to xen-devel and when acked send to qemu-list ?
For the filerenaming, the rest of the qemu sources seems to be mixed, but i think it would be more neat for the xen part to stick to one of the two .. but which one would be prefered ?
1. all underscores
2. all minus
--
Sander
Quoted 100 lines · Sander Eikelenboom
Quoted 97 lines · you
Quoted 17 lines · Sander Eikelenboom
Hi All,
Yesterday I have tried building and using upstream qemu and seabios. Config.mk:
QEMU_UPSTREAM_URL?=git://git.qemu.org/qemu.gitQEMU_UPSTREAM_REVISION?= master
SEABIOS_UPSTREAM_URL?=git://git.qemu.org/seabios.gitSEABIOS_UPSTREAM_TAG?= masterAnd i'm happy to say that it works quite ok, even with (secondary pci) pci-passthrough ( using an ATI gfx adapter and windows7 as guest os) :-).
But it seems to have an issue with a USB controller which is trying to use msi-X interrupts, which makes xl dmesg report:
(XEN) [2012-12-06 16:07:24] vmsi.c:108:d32767 Unsupported delivery mode 3
and when "pci_msitranslate=0" is set the error still occurs, only this time the correct domain number is reported, instead of the 32767.Quoted 5 lines
However, when trying to debug, i noticed although making a debug build (make debug=y && make debug=y install), qemu-dm-<guestname>.log stays almost empty. It seems all the defines related to debugging are not set.
- Would it be appropriated to enable them all when making a debug build ?
- Would it be wise to also have some more verbose logging when not running a debug build ?Yes and yes
Quoted 1 line
- And if yes, what would be the nicest way to set the defines ?
My guess is that it would be enough to turn on
XEN_PT_LOGGING_ENABLEDby defaultQuoted 1 line
- Should the naming of the debug defines be made more consistent ?
Yes
Quoted 12 lines
When enabling these debug defines by hand:
xen-all.c
#defineDEBUG_XEN
xen-mapcache.c
#defineMAPCACHE_DEBUG
hw/xen-host-pci-device.c
#defineXEN_HOST_PCI_DEVICE_DEBUGQuoted 8 lines
hw/xen_platform.c
#defineDEBUG_PLATFORM
hw/xen_pt.h
#defineXEN_PT_LOGGING_ENABLED
#defineXEN_PT_DEBUG_PCI_CONFIG_ACCESSI get a lot of compile errors related to wrong types in the debug printf's.
That's really bad. I would like upstream QEMU to have the same level of logging as qemu-xen-traditional by default. And they should compile.
Quoted 28 lines
Another thing that occurred to me was that the file naming doesn't seem to be overly consistent:
xen-all.cxen-mapcache.cxen-mapcache.hxen-stub.cxen_apic.chw/xen_backend.chw/xen_backend.hhw/xen_blkif.hhw/xen_common.hhw/xen_console.chw/xen_devconfig.chw/xen_disk.chw/xen_domainbuild.chw/xen_domainbuild.hhw/xenfb.chw/xen.hhw/xen-host-pci-device.chw/xen-host-pci-device.hhw/xen_machine_pv.chw/xen_nic.chw/xen_platform.chw/xen_pt.chw/xen_pt_config_init.chw/xen_pt.hhw/xen_pt_msi.cQuoted 3 lines
Would it be worthwhile to make it:
- consistent all underscore or all minus ?
- allwaysxen_(or xen- depending on the above) ?Yes, definitely.
Given that the development window for QEMU 1.4 has just opened might even be the right time to make these changes.
Quoted 6 lines
Quoted 1 line
Are you volunteering? :)
Erhmm yes i think i should be able to accomplish this :-) And yes i did notice the 1.3 release :-)
Patches would be directly against the qemu-upstream git-tree, first round to xen-devel and when acked send to qemu-list ?
It is best to CC qemu-devel from the start, they are used to high levels of traffic anyway ;)
Quoted 3 lines
For the filerenaming, the rest of the qemu sources seems to be mixed, but i think it would be more neat for the xen part to stick to one of the two .. but which one would be prefered ?
1. all underscores
2. all minus
I would go for 1.
However I would keep the renaming patch separate from the others, because it could start a flame war between underscores supporters and minuses supporters :)
The other changes (better default debug levels, working debugs, debug functions naming) should all be non-controversial.
Quoted 103 lines · you
Quoted 102 lines · Sander Eikelenboom
Quoted 99 lines · you
Quoted 17 lines · Sander Eikelenboom
Hi All,
Yesterday I have tried building and using upstream qemu and seabios. Config.mk:
QEMU_UPSTREAM_URL?=git://git.qemu.org/qemu.gitQEMU_UPSTREAM_REVISION?= master
SEABIOS_UPSTREAM_URL?=git://git.qemu.org/seabios.gitSEABIOS_UPSTREAM_TAG?= masterAnd i'm happy to say that it works quite ok, even with (secondary pci) pci-passthrough ( using an ATI gfx adapter and windows7 as guest os) :-).
But it seems to have an issue with a USB controller which is trying to use msi-X interrupts, which makes xl dmesg report:
(XEN) [2012-12-06 16:07:24] vmsi.c:108:d32767 Unsupported delivery mode 3
and when "pci_msitranslate=0" is set the error still occurs, only this time the correct domain number is reported, instead of the 32767.Quoted 5 lines
However, when trying to debug, i noticed although making a debug build (make debug=y && make debug=y install), qemu-dm-<guestname>.log stays almost empty. It seems all the defines related to debugging are not set.
- Would it be appropriated to enable them all when making a debug build ?
- Would it be wise to also have some more verbose logging when not running a debug build ?Yes and yes
Quoted 1 line
- And if yes, what would be the nicest way to set the defines ?
My guess is that it would be enough to turn on
XEN_PT_LOGGING_ENABLEDby defaultQuoted 1 line
- Should the naming of the debug defines be made more consistent ?
Yes
Quoted 12 lines
When enabling these debug defines by hand:
xen-all.c
#defineDEBUG_XEN
xen-mapcache.c
#defineMAPCACHE_DEBUG
hw/xen-host-pci-device.c
#defineXEN_HOST_PCI_DEVICE_DEBUGQuoted 8 lines
hw/xen_platform.c
#defineDEBUG_PLATFORM
hw/xen_pt.h
#defineXEN_PT_LOGGING_ENABLED
#defineXEN_PT_DEBUG_PCI_CONFIG_ACCESSI get a lot of compile errors related to wrong types in the debug printf's.
That's really bad. I would like upstream QEMU to have the same level of logging as qemu-xen-traditional by default. And they should compile.
Quoted 28 lines
Another thing that occurred to me was that the file naming doesn't seem to be overly consistent:
xen-all.cxen-mapcache.cxen-mapcache.hxen-stub.cxen_apic.chw/xen_backend.chw/xen_backend.hhw/xen_blkif.hhw/xen_common.hhw/xen_console.chw/xen_devconfig.chw/xen_disk.chw/xen_domainbuild.chw/xen_domainbuild.hhw/xenfb.chw/xen.hhw/xen-host-pci-device.chw/xen-host-pci-device.hhw/xen_machine_pv.chw/xen_nic.chw/xen_platform.chw/xen_pt.chw/xen_pt_config_init.chw/xen_pt.hhw/xen_pt_msi.cQuoted 3 lines
Would it be worthwhile to make it:
- consistent all underscore or all minus ?
- allwaysxen_(or xen- depending on the above) ?Yes, definitely.
Given that the development window for QEMU 1.4 has just opened might even be the right time to make these changes.Are you volunteering? :)
Quoted 7 lines
Quoted 4 lines
Erhmm yes i think i should be able to accomplish this :-) And yes i did notice the 1.3 release :-)
Patches would be directly against the qemu-upstream git-tree, first round to xen-devel and when acked send to qemu-list ?
It is best to CC qemu-devel from the start, they are used to high levels of traffic anyway ;)
Ok
Quoted 8 lines
Quoted 3 lines
For the filerenaming, the rest of the qemu sources seems to be mixed, but i think it would be more neat for the xen part to stick to one of the two .. but which one would be prefered ?
1. all underscores
2. all minusI would go for 1.
However I would keep the renaming patch separate from the others, because it could start a flame war between underscores supporters and minuses supporters :)
Ok i thought about that :-)
Quoted 2 lines
The other changes (better default debug levels, working debugs, debug functions naming) should all be non-controversial.
Ok will send those first