[Qemu-devel] Re: [PATCH v4 02/15] pci: introduce helper functions to clear/set bits in configuration space

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:43PM +0900, Isaku Yamahata wrote: > This patch introduces helper functions to clear/set bits in configuration > space. pci_{clear_set, clear, set}_bit_{byte, word, long, quad}(). > They will be used later. > > Signed-off-by: Isaku Yamahata I am not very happy with t

[Qemu-devel] Re: [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:46PM +0900, Isaku Yamahata wrote: > lower 4bits of base/limit register is RO, and > should not be modified on reset. > > Signed-off-by: Isaku Yamahata > --- > hw/pci_bridge.c | 15 +-- > 1 files changed, 9 insertions(+), 6 deletions(-) > > diff --git

[Qemu-devel] Re: [PATCH v4 00/15] pcie port switch emulators

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:41PM +0900, Isaku Yamahata wrote: > > Here is v4 of the pcie patch series. > - PCIDevice::written > The abuse of PCIDevice::config to record a written bit of non-modifiable > registers is confusing and bad style. So I introduced PCIDevice::written. > - FLR stuff >

[Qemu-devel] [Tracing][RFC v3 PATCH 2/2] Add documentation for QMP commands: query-trace & query-trace-events.

2010-10-17 Thread Prerna Saxena
[PATCH 2/2] Add documentation for QMP commands: query-trace & query-trace-events. Signed-off-by: Prerna Saxena --- qmp-commands.hx | 71 +++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/qmp-commands.hx b/qmp-commands.hx in

[Qemu-devel] [Tracing][RFC v3 PATCH 1/2] Introduce QMP interfaces : query-trace & query-trace-events

2010-10-17 Thread Prerna Saxena
[PATCH 1/2] Introduce QMP interfaces : query-trace & query-trace-events. Signed-off-by: Prerna Saxena --- monitor.c | 40 +++--- simpletrace.c | 58 + simpletrace.h |4 +++ 3 files changed, 98 ins

Re: [Qemu-devel] Snapshots ide0-hd0 issue

2010-10-17 Thread Stefan Hajnoczi
On Mon, Oct 18, 2010 at 12:37 AM, Ubuntu Explorer wrote: > I am trying to implement snapshot saving and loading from command line using > qemu. I am using both the drive and disk options as follows. > \ > --disk \ > ...other options \ > -drive file=, > index=0,media=disk,snapshot=on,if=ide,type=

[Qemu-devel] Re: [PATCH v4 01/15] pci: make pci_del_capability() update for w1cmask

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:42PM +0900, Isaku Yamahata wrote: > When deleting pci capability, w1cmask should be 0 > to make those registers writablein addition to wmask. > > Signed-off-by: Isaku Yamahata Applied (typo in commit message fixed). > --- > hw/pci.c |1 + > 1 files changed, 1

[Qemu-devel] [Tracing][RFC v3 PATCH 0/2] QMP Query interfaces for tracing

2010-10-17 Thread Prerna Saxena
This patch set introduces two QMP interfaces for tracing : * query-trace: to list current contents of trace-buffer * query-trace-events : to list all available trace-events with their state. Changelog : --- Changes v2 -> v3 : - Change declarations of st_print_trace_to_qlist() and

[Qemu-devel] Re: [PATCH v4 09/15] pcie/aer: helper functions for pcie aer capability

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:50PM +0900, Isaku Yamahata wrote: > This patch implements helper functions for pcie aer capability > which will be used later. > > Signed-off-by: Isaku Yamahata > --- > Changes v3 -> v4: > - various naming fixes. > - use pci bit operation helper function > - eliminat

[Qemu-devel] Re: [PATCH v4 02/15] pci: introduce helper functions to clear/set bits in configuration space

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:43PM +0900, Isaku Yamahata wrote: > This patch introduces helper functions to clear/set bits in configuration > space. pci_{clear_set, clear, set}_bit_{byte, word, long, quad}(). > They will be used later. > > Signed-off-by: Isaku Yamahata I don't think we want clea

[Qemu-devel] Re: [PATCH v4 08/15] pcie: helper functions for pcie capability and extended capability

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:49PM +0900, Isaku Yamahata wrote: > This patch implements helper functions for pci express capability > and pci express extended capability allocation. > NOTE: presence detection depends on pci_qdev_init() change. > > Signed-off-by: Isaku Yamahata OK, this is gettin

[Qemu-devel] Re: [PATCH v4 04/15] pci: record which is written into pci configuration space

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:45PM +0900, Isaku Yamahata wrote: > record which is written into pci configuration space. > introduce helper function to zero PCIDevice::written. > They will be used later. > > Signed-off-by: Isaku Yamahata This really exposes an internal variable. I really dislike

[Qemu-devel] Re: [PATCH v4 12/15] x3130: pcie upstream port

2010-10-17 Thread Michael S. Tsirkin
On Mon, Oct 18, 2010 at 12:17:53PM +0900, Isaku Yamahata wrote: > +static void xio3130_upstream_flr(PCIDevice *d) > +{ > +/* TODO: not enabled until qdev reset clean up > + waiting for Anthony's qdev cealn up */ typo > +#if 0 > +/* So far, sticky bit registers or register which must

[Qemu-devel] Changelog of qemu-0.13.0.tar.gz ?

2010-10-17 Thread Sergei Steshenko
Hello, though there is already http://download.savannah.gnu.org/releases/qemu/qemu-0.13.0.tar.gz available, I don't see its changelog on http://wiki.qemu.org/Index.html . Is it expected to be this way ? Thanks, Sergei.

[Qemu-devel] [PATCH v4 04/15] pci: record which is written into pci configuration space

2010-10-17 Thread Isaku Yamahata
record which is written into pci configuration space. introduce helper function to zero PCIDevice::written. They will be used later. Signed-off-by: Isaku Yamahata --- hw/pci.c | 10 ++ hw/pci.h |5 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/

[Qemu-devel] [PATCH v4 07/15] pcie: add pcie constants to pcie_regs.h

2010-10-17 Thread Isaku Yamahata
add pcie constants to pcie_regs.h. Those constants should go to Linux pci_regs.h and then the file should go away eventually. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - removed copyright notice as requested. Changes v2 -> v3: - moved out pcie constants from pcie.c to pcie_regs.h. - re

[Qemu-devel] [PATCH v4 05/15] pci/bridge: fix pci_bridge_reset()

2010-10-17 Thread Isaku Yamahata
lower 4bits of base/limit register is RO, and should not be modified on reset. Signed-off-by: Isaku Yamahata --- hw/pci_bridge.c | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/hw/pci_bridge.c b/hw/pci_bridge.c index 638e3b3..7229610 100644 --- a/hw/pci_bri

[Qemu-devel] [PATCH v4 06/15] msi: implements msi

2010-10-17 Thread Isaku Yamahata
implements msi related functions. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - use pci_set_bit_xxx helper function. - make nr_vectors, vector unsigned int. - introduce PCI_MSI_VECTORS_MAX. - fix undefined bit operations. - eliminate msi_set_pending(). Changes v2 -> v3: - improved comme

[Qemu-devel] [PATCH v4 09/15] pcie/aer: helper functions for pcie aer capability

2010-10-17 Thread Isaku Yamahata
This patch implements helper functions for pcie aer capability which will be used later. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - various naming fixes. - use pci bit operation helper function - eliminate errmsg function pointer - replace pci_shift_xxx() with PCIDevice::written - unco

[Qemu-devel] [PATCH v4 03/15] pci: use pci_clear_bit_word() in pci_device_reset()

2010-10-17 Thread Isaku Yamahata
use pci_clear_bit_word() in pci_device_reset() where appropriate. Signed-off-by: Isaku Yamahata --- hw/pci.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index e3462a9..5954476 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -137,9 +137,8 @@ static voi

[Qemu-devel] [PATCH v4 15/15] pcie/aer: glue aer error injection into qemu monitor

2010-10-17 Thread Isaku Yamahata
introduce pcie_aer_inject_error command. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - s/PCIE_AER/PCIEAER/g for structure names. - compilation adjustment. Changes v2 -> v3: - compilation adjustment. --- hw/pcie_aer.c | 84 +++ qemu

[Qemu-devel] [PATCH v4 11/15] ioh3420: pcie root port in X58 ioh

2010-10-17 Thread Isaku Yamahata
Implements pcie root port switch in intel X58 ioh whose device id is 0x3420. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - rename pcie_root -> ioh3420 - compilation adjustment. Changes v2 -> v3: - compilation adjustment. --- Makefile.objs |1 + hw/ioh3420.c | 228 +

[Qemu-devel] [PATCH v4 02/15] pci: introduce helper functions to clear/set bits in configuration space

2010-10-17 Thread Isaku Yamahata
This patch introduces helper functions to clear/set bits in configuration space. pci_{clear_set, clear, set}_bit_{byte, word, long, quad}(). They will be used later. Signed-off-by: Isaku Yamahata --- hw/pci.h | 72 ++ 1 files changed,

[Qemu-devel] [PATCH v4 08/15] pcie: helper functions for pcie capability and extended capability

2010-10-17 Thread Isaku Yamahata
This patch implements helper functions for pci express capability and pci express extended capability allocation. NOTE: presence detection depends on pci_qdev_init() change. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - various clean up - dropped pcie_notify(), pcie_del_capability() - use

[Qemu-devel] [PATCH v4 14/15] pcie/hotplug: introduce pushing attention button command

2010-10-17 Thread Isaku Yamahata
glue pcie_push_attention_button command. Signed-off-by: Isaku Yamahata --- hw/pcie_port.c | 82 +++ qemu-monitor.hx | 14 + sysemu.h|4 +++ 3 files changed, 100 insertions(+), 0 deletions(-) diff --git a/hw/pcie_port.c

[Qemu-devel] [PATCH v4 13/15] x3130: pcie downstream port

2010-10-17 Thread Isaku Yamahata
Implement TI x3130 pcie downstream port switch. Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - rename: pcie_downstream -> x3130_downstream - compilation adjustment. Changes v2 -> v3: - compilation adjustment. --- Makefile.objs |2 +- hw/xio3130_downstream.c | 207 +

[Qemu-devel] [PATCH v4 12/15] x3130: pcie upstream port

2010-10-17 Thread Isaku Yamahata
Implement TI x3130 pcie upstream port switch. Signed-off-by: Isaku Yamahata --- Chnages v3 -> v4: - rename pcie_upstream -> x3130_upstream. - compilation adjustment. Changes v2 -> v3: - compilation adjustment. --- Makefile.objs |2 +- hw/xio3130_upstream.c | 188 +++

[Qemu-devel] [PATCH v4 01/15] pci: make pci_del_capability() update for w1cmask

2010-10-17 Thread Isaku Yamahata
When deleting pci capability, w1cmask should be 0 to make those registers writablein addition to wmask. Signed-off-by: Isaku Yamahata --- hw/pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index abddc6d..e3462a9 100644 --- a/hw/pci.c +++ b/hw/pc

[Qemu-devel] [PATCH v4 10/15] pcie port: define struct PCIEPort/PCIESlot and helper functions

2010-10-17 Thread Isaku Yamahata
define struct PCIEPort which represents common part of pci express port.(root, upstream and downstream.) add a helper function for pcie port which can be used commonly by root/upstream/downstream port. define struct PCIESlot which represents common part of pcie slot.(root and downstream.) and helpe

[Qemu-devel] [PATCH v4 00/15] pcie port switch emulators

2010-10-17 Thread Isaku Yamahata
Here is v4 of the pcie patch series. - PCIDevice::written The abuse of PCIDevice::config to record a written bit of non-modifiable registers is confusing and bad style. So I introduced PCIDevice::written. - FLR stuff I didn't addresse FLR function pointer issue. Anyway in order to make FLR

[Qemu-devel] [Bug 662461] [NEW] -name error message should have trailing newline

2010-10-17 Thread John Morrissey
Public bug reported: Trivial, but it was triggering the OCD. diff --git a/vl.c b/vl.c index df414ef..9c76a55 100644 --- a/vl.c +++ b/vl.c @@ -2524,7 +2524,7 @@ int main(int argc, char **argv, char **envp) if (p != NULL) { *p++ = 0;

[Qemu-devel] Snapshots ide0-hd0 issue

2010-10-17 Thread Ubuntu Explorer
Hi, I am trying to implement snapshot saving and loading from command line using qemu. I am using both the drive and disk options as follows. \ --disk \ ...other options \ -drive file=, index=0,media=disk,snapshot=on,if=ide,type=drive,cache=writethrough I am not running latest version of qemu,

[Qemu-devel] [Bug 586175] Re: Windows XP/2003 doesn't boot

2010-10-17 Thread tekditt
In qemu-kvm-0.12.5-r1 Windows XP/2003 is booting fine on IDE, but it hangs directly after the first reboot of the Windows setup if you try to install it on a viostor drive. Windows Vista and higher never had any problems in any version of qemu-kvm with any drive (IDE and viostor)... I'm using the

[Qemu-devel] Re: [PATCH] migration: don't segfault on invalid input

2010-10-17 Thread Michael S. Tsirkin
On Sun, Oct 17, 2010 at 03:01:45PM -0600, Alex Williamson wrote: > On Sun, 2010-10-17 at 20:43 +0200, Michael S. Tsirkin wrote: > > host_from_stream_offset returns NULL on error, > > return error instead of trying to use that address, > > to avoid segfault on invalid stream. > > > > Signed-off-by:

[Qemu-devel] Re: [PATCH] migration: don't segfault on invalid input

2010-10-17 Thread Alex Williamson
On Sun, 2010-10-17 at 20:43 +0200, Michael S. Tsirkin wrote: > host_from_stream_offset returns NULL on error, > return error instead of trying to use that address, > to avoid segfault on invalid stream. > > Signed-off-by: Michael S. Tsirkin > --- > arch_init.c |5 + > 1 files changed, 5

[Qemu-devel] [PATCH] virtio: sanity-check available index

2010-10-17 Thread Michael S. Tsirkin
Checking available index upon load instead of only when vm is running makes is easier to debug failures. Signed-off-by: Michael S. Tsirkin --- hw/virtio.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index c8a0fc6..a2a657e 100644 -

[Qemu-devel] [PATCH] migration: don't segfault on invalid input

2010-10-17 Thread Michael S. Tsirkin
host_from_stream_offset returns NULL on error, return error instead of trying to use that address, to avoid segfault on invalid stream. Signed-off-by: Michael S. Tsirkin --- arch_init.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch_init.c b/arch_init.c index e

Re: [Qemu-devel] [PATCH V5 09/14] xen: Introduce the Xen mapcache

2010-10-17 Thread Blue Swirl
On Mon, Oct 11, 2010 at 4:07 PM, wrote: > From: Anthony PERARD > > The mapcache maps chucks of guest memory on demand, unmaps them when > they are not needed anymore. > > Each call to qemu_get_ram_ptr makes a call to qemu_map_cache with the > lock option, so mapcache will not unmap these ram_ptr

[Qemu-devel] [PATCH] qemu-timer: move commonly used timer code to qemu-timer-common

2010-10-17 Thread Blue Swirl
Move timer init functions to a new file, qemu-timer-common.c. Make other critical timer functions inlined to preserve performance in qemu-timer.c, also move muldiv64() (used by the inline functions) to qemu-timer.h. Adjust block/raw-posix.c and simpletrace.c to use get_clock() directly. Remove a s

[Qemu-devel] [PATCH 1/2] usb-ccid: add CCID bus

2010-10-17 Thread Alon Levy
A CCID device is a smart card reader. It is a USB device, defined at [1]. This patch introduces the usb-ccid device that is a ccid bus. Next patches will introduce two card types to use it, a passthru card and an emulated card. [1] http://www.usb.org/developers/devclass_docs/DWG_Smart-Card_CCID_R

[Qemu-devel] [PATCH 2/2] ccid: add passthru card device

2010-10-17 Thread Alon Levy
For the client side utility vscclient, see libcac_card: libcac_card http://cgit.freedesktop.org/~alon/cac_card (temporary home) written by Robert Relyea Signed-off-by: Alon Levy --- Makefile.objs |2 +- hw/ccid-card-passthru.c | 284 ++

[Qemu-devel] [PATCH 0/2] usb-ccid (v3)

2010-10-17 Thread Alon Levy
This patchset adds two new devices, usb-ccid and ccid-card-passthru, providing a CCID implementation as a bus and a simple passthru protocol implementing card requiring a client. Next patches will add a fully emulated card that can be used standalone to use a local (host side) card reader, and

[Qemu-devel] [PATCH] alsa: fix 100% CPU load when idle w/ dmix

2010-10-17 Thread Jindřich Makovička
Hi, when using dmix as an ALSA output, the output cannot be polled and ALSA (snd_pcm_poll_descriptors) returns the event mask set to POLLIN instead. As this event mask is passed to the main loop, the select() in main_loop_wait() never waits, because the output file descriptor is never read. So, qe

[Qemu-devel] [PATCH 1/2] Use defines instead of numbers for pci hotplug sts bit

2010-10-17 Thread Gleb Natapov
Signed-off-by: Gleb Natapov --- hw/acpi_piix4.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index c8733e5..bec42b4 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -38,6 +38,8 @@ #define PCI_BASE 0xae00 #define PCI_EJ_BAS

[Qemu-devel] [PATCH 2/2] Fix pci hotplug to generate level triggered interrupt.

2010-10-17 Thread Gleb Natapov
SCI is level triggered. pci hotplug should behave appropriately. Signed-off-by: Gleb Natapov --- hw/acpi_piix4.c | 28 +--- 1 files changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index bec42b4..f74f34c 100644 --- a/hw/acpi_pii

[Qemu-devel] Re: [patch 0/8] port qemu-kvm's MCE support (v3 resend)

2010-10-17 Thread Avi Kivity
On 10/11/2010 08:31 PM, Marcelo Tosatti wrote: Port qemu-kvm's KVM MCE (Machine Check Exception) handling to qemu. It allows qemu to propagate MCEs to the guest. v2: - rename do_qemu_ram_addr_from_host. - fix kvm_on_sigbus/kvm_on_sigbus_vcpu naming. - fix bank register restoration (Dean Nelson)

Re: [Qemu-devel] [PATCH 1/3] Introduce threadlets

2010-10-17 Thread Avi Kivity
On 10/14/2010 11:32 PM, Venkateswararao Jujjuri (JV) wrote: > > Blocking is somewhat against the spirit of the thing, no? While I agree that > the current cancel API is hard to use correctly, blocking defeats the purpose of > the API. > Are you proposing to add additional state in the retur

[Qemu-devel] [PATCH] trace: improve info trace output

2010-10-17 Thread Blue Swirl
Use PRI*64 to print full 64 bit data even on ILP32 hosts. Print also sixth tracepoint parameter. Cc: Stefan Hajnoczi Signed-off-by: Blue Swirl --- simpletrace.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/simpletrace.c b/simpletrace.c index deb1e07..b488d51 10

[Qemu-devel] [PATCH] apic: convert debug printf statements to tracepoints

2010-10-17 Thread Blue Swirl
Replace debug printf statements with tracepoints. Cc: Stefan Hajnoczi Signed-off-by: Blue Swirl --- However, when I tried to use coalescing_apic.bin (triggers coalescing events, see [1]), simpletrace.py chokes: ./qemu -bios ./ -monitor stdio coalescing_apic.bin -trace file=foo QEMU 0.13.50 moni