[Qemu-devel] [PATCH 02/27] Allow qemu_devtree_setprop() to take arbitrary values

2011-03-22 Thread David Gibson
From: David Gibson Currently qemu_devtree_setprop() expects the new property value to be given as a uint32_t *. While property values consisting of u32s are common, in general they can have any bytestring value. Therefore, this patch alters the function to take a void * instead, allowing caller

[Qemu-devel] [PATCH 07/27] Clean up slb_lookup() function

2011-03-22 Thread David Gibson
The slb_lookup() function, used in the ppc translation path returns a number of slb entry fields in reference parameters. However, only one of the two callers of slb_lookup() actually wants this information. This patch, therefore, makes slb_lookup() return a simple pointer to the located SLB entr

[Qemu-devel] [PATCH 22/27] Implement sPAPR Virtual LAN (ibmveth)

2011-03-22 Thread David Gibson
This patch implements the PAPR specified Inter Virtual Machine Logical LAN; that is the virtual hardware used by the Linux ibmveth driver. Signed-off-by: Paul Mackerras Signed-off-by: David Gibson --- Makefile.target |2 +- hw/spapr.c | 21 ++- hw/spapr_llan.c | 521

[Qemu-devel] [PATCH 16/27] Implement hcall based RTAS for pSeries machines

2011-03-22 Thread David Gibson
On pSeries machines, operating systems can instantiate "RTAS" (Run-Time Abstraction Services), a runtime component of the firmware which implements a number of low-level, infrequently used operations. On logical partitions under a hypervisor, many of the RTAS functions require hypervisor privilege

[Qemu-devel] [PATCH 20/27] Add (virtual) interrupt to PAPR virtual tty device

2011-03-22 Thread David Gibson
Now that we have implemented the PAPR "xics" virtualized interrupt controller, we can add interrupts in PAPR VIO devices. This patch adds interrupt support to the PAPR virtual tty/console device. Signed-off-by: David Gibson --- hw/spapr.c |6 -- hw/spapr_vio.h |3 ++- hw/spapr_v

[Qemu-devel] [PATCH 13/27] Start implementing pSeries logical partition machine

2011-03-22 Thread David Gibson
This patch adds a "pseries" machine to qemu. This aims to emulate a logical partition on an IBM pSeries machine, compliant to the "PowerPC Architecture Platform Requirements" (PAPR) document. This initial version is quite limited, it implements a basic machine and PAPR hypercall emulation. So fa

[Qemu-devel] [PATCH 24/27] Implement PAPR virtual SCSI interface (ibmvscsi)

2011-03-22 Thread David Gibson
From: Ben Herrenschmidt This patch implements the infrastructure and hypercalls necessary for the PAPR specified Virtual SCSI interface. This is the normal method for providing (virtual) disks to PAPR partitions. Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- Makefile.targe

[Qemu-devel] [PATCH 19/27] Add PAPR H_VIO_SIGNAL hypercall and infrastructure for VIO interrupts

2011-03-22 Thread David Gibson
This patch adds infrastructure to support interrupts from PAPR virtual IO devices. This includes correctly advertising those interrupts in the device tree, and implementing the H_VIO_SIGNAL hypercall, used to enable and disable individual device interrupts. Signed-off-by: David Gibson --- hw/sp

[Qemu-devel] [PATCH 11/27] Support 1T segments on ppc

2011-03-22 Thread David Gibson
Traditionally, the "segments" used for the two-stage translation used on powerpc MMUs were 256MB in size. This was the only option on all hash page table based 32-bit powerpc cpus, and on the earlier 64-bit hash page table based cpus. However, newer 64-bit cpus also permit 1TB segments This patc

[Qemu-devel] [PATCH 21/27] Implement TCE translation for sPAPR VIO

2011-03-22 Thread David Gibson
This patch implements the necessary infrastructure and hypercalls for sPAPR's TCE (Translation Control Entry) IOMMU mechanism. This is necessary for all virtual IO devices which do DMA (i.e. nearly all of them). Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/spapr.c |

[Qemu-devel] [PATCH 12/27] Add POWER7 support for ppc

2011-03-22 Thread David Gibson
This adds emulation support for the recent POWER7 cpu to qemu. It's far from perfect - it's missing a number of POWER7 features so far, including any support for VSX or decimal floating point instructions. However, it's close enough to boot a kernel with the POWER7 PVR. Signed-off-by: David Gibs

[Qemu-devel] [PATCH 08/27] Parse SDR1 on mtspr instead of at translate time

2011-03-22 Thread David Gibson
On ppc machines with hash table MMUs, the special purpose register SDR1 contains both the base address of the encoded size (hashed) page tables. At present, we interpret the SDR1 value within the address translation path. But because the encodings of the size for 32-bit and 64-bit are different t

[Qemu-devel] [PATCH 23/27] Implement PAPR CRQ hypercalls

2011-03-22 Thread David Gibson
This patch implements the infrastructure and hypercalls necessary for the PAPR specified CRQ (Command Request Queue) mechanism. This general request queueing system is used by many of the PAPR virtual IO devices, including the virtual scsi adapter. Signed-off-by: Ben Herrenschmidt Signed-off-by:

[Qemu-devel] [PATCH 18/27] Implement the PAPR (pSeries) virtualized interrupt controller (xics)

2011-03-22 Thread David Gibson
PAPR defines an interrupt control architecture which is logically divided into ICS (Interrupt Control Presentation, each unit is responsible for presenting interrupts to a particular "interrupt server", i.e. CPU) and ICS (Interrupt Control Source, each unit responsible for one or more hardware inte

[Qemu-devel] [PATCH 09/27] Use "hash" more consistently in ppc mmu code

2011-03-22 Thread David Gibson
Currently, get_segment() has a variable called hash. However it doesn't (quite) get the hash value for the ppc hashed page table. Instead it gets the hash shifted - effectively the offset of the hash bucket within the hash page table. As well, as being different to the normal use of plain "hash"

[Qemu-devel] [PATCH 05/27] Implement missing parts of the logic for the POWER PURR

2011-03-22 Thread David Gibson
The PURR (Processor Utilization Resource Register) is a register found on recent POWER CPUs. The guts of implementing it at least enough to get by are already present in qemu, however some of the helper functions needed to actually wire it up are missing. This patch adds the necessary glue, so th

[Qemu-devel] [PATCH 10/27] Better factor the ppc hash translation path

2011-03-22 Thread David Gibson
Currently the path handling hash page table translation in get_segment() has a mix of common and 32 or 64 bit specific code. However the division is not done terribly well which results in a lot of messy code flipping between common and divided paths. This patch improves the organization, consoli

[Qemu-devel] [PATCH 14/27] Implement the bus structure for PAPR virtual IO

2011-03-22 Thread David Gibson
This extends the "pseries" (PAPR) machine to include a virtual IO bus supporting the PAPR defined hypercall based virtual IO mechanisms. So far only one VIO device is provided, the vty / vterm, providing a full console (polled only, for now). Signed-off-by: David Gibson --- Makefile.target |

[Qemu-devel] [PATCH 01/27] Clean up PowerPC SLB handling code

2011-03-22 Thread David Gibson
Currently the SLB information when emulating a PowerPC 970 is storeed in a structure with the unhelpfully named fields 'tmp' and 'tmp64'. While the layout in these fields does match the description of the SLB in the architecture document, it is not convenient either for looking up the SLB, or for

[Qemu-devel] [PATCH 04/27] Implement PowerPC slbmfee and slbmfev instructions

2011-03-22 Thread David Gibson
For a 64-bit PowerPC target, qemu correctly implements translation through the segment lookaside buffer. Likewise it supports the slbmte instruction which is used to load entries into the SLB. However, it does not emulate the slbmfee and slbmfev instructions which read SLB entries back into regis

[Qemu-devel] [PATCH 06/27] Correct ppc popcntb logic, implement popcntw and popcntd

2011-03-22 Thread David Gibson
From: David Gibson qemu already includes support for the popcntb instruction introduced in POWER5 (although it doesn't actually allow you to choose POWER5). However, the logic is slightly incorrect: it will generate results truncated to 32-bits when the CPU is in 32-bit mode. This is not normal

[Qemu-devel] [0/27] Implement emulation of pSeries logical partitions (v4)

2011-03-22 Thread David Gibson
This patch series adds a "pseries" machine to qemu, allowing it to emulate IBM pSeries logical partitions. More specifically it implements the interface defined by the "PowerPC Architecture Platform Requirements" document (PAPR, or sPAPR for short). Along the way we add a bunch of support for mor

[Qemu-devel] [PATCH 03/27] Add a hook to allow hypercalls to be emulated on PowerPC

2011-03-22 Thread David Gibson
PowerPC and POWER chips since the POWER4 and 970 have a special hypervisor mode, and a corresponding form of the system call instruction which traps to the hypervisor. qemu currently has stub implementations of hypervisor mode. That is, the outline is there to allow qemu to run a PowerPC hypervis

[Qemu-devel] [PATCH 10/18] Call init handler of event-tap at main() in vl.c.

2011-03-22 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index 483e2e3..6ed9b20 100644 --- a/vl.c +++ b/vl.c @@ -160,6 +160,7 @@ int main(int argc, char **argv) #include "qemu-queue.h" #include "cpus.h" #include "arch_init.h

[Qemu-devel] [PATCH 16/18] migration: introduce migrate_ft_trans_{put, get}_ready(), and modify migrate_fd_put_ready() when ft_mode is on.

2011-03-22 Thread Yoshiaki Tamura
Introduce migrate_ft_trans_put_ready() which kicks the FT transaction cycle. When ft_mode is on, migrate_fd_put_ready() would open ft_trans_file and turn on event_tap. To end or cancel FT transaction, ft_mode and event_tap is turned off. migrate_ft_trans_get_ready() is called to receive ack from

Re: [Qemu-devel] [PATCH 18/26] Implement the PAPR (pSeries) virtualized interrupt controller (xics)

2011-03-22 Thread David Gibson
On Thu, Mar 17, 2011 at 08:13:27AM -0500, Anthony Liguori wrote: > On 03/16/2011 08:34 PM, David Gibson wrote: > > > >>>+/* > >>>+ * ICP: Presentation layer > >>>+ */ > >>>+ > >>>+struct icp_server_state { > >>>+uint32_t cppr :8; > >>>+uint32_t xisr :24; > >>No real reason to use bitfields

[Qemu-devel] [PATCH 09/18] Introduce event-tap.

2011-03-22 Thread Yoshiaki Tamura
event-tap controls when to start FT transaction, and provides proxy functions to called from net/block devices. While FT transaction, it queues up net/block requests, and flush them when the transaction gets completed. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.targe

[Qemu-devel] [PATCH 14/18] block: insert event-tap to bdrv_aio_writev(), bdrv_aio_flush() and bdrv_flush().

2011-03-22 Thread Yoshiaki Tamura
event-tap function is called only when it is on, and requests were sent from device emulators. Signed-off-by: Yoshiaki Tamura Acked-by: Kevin Wolf --- block.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index c8e2f97..952543a 100644

[Qemu-devel] [PATCH 08/18] savevm: introduce util functions to control ft_trans_file from savevm layer.

2011-03-22 Thread Yoshiaki Tamura
To utilize ft_trans_file function, savevm needs interfaces to be exported. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |5 ++ savevm.c | 150 ++ 2 files changed, 155 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b/hw/hw.h ind

[Qemu-devel] [PATCH 05/18] vl.c: add deleted flag for deleting the handler.

2011-03-22 Thread Yoshiaki Tamura
Make deleting handlers robust against deletion of any elements in a handler by using a deleted flag like in file descriptors. Signed-off-by: Yoshiaki Tamura --- vl.c | 15 ++- 1 files changed, 10 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index dbb927d..483e2e3 100644

[Qemu-devel] [PATCH 13/18] net: insert event-tap to qemu_send_packet() and qemu_sendv_packet_async().

2011-03-22 Thread Yoshiaki Tamura
event-tap function is called only when it is on. Signed-off-by: Yoshiaki Tamura --- net.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index ddcca97..a541ede 100644 --- a/net.c +++ b/net.c @@ -37,6 +37,7 @@ #include "qemu_socket.h" #include "hw

[Qemu-devel] [PATCH 00/18] [PATCH 00/18] Kemari for KVM v0.2.13

2011-03-22 Thread Yoshiaki Tamura
Hi, This patch series is a revised version of Kemari for KVM, which applied comments for the previous post. The current code is based on qemu.git 4ac8e585c85079f6fd2b2b6da3cb845e3e19459c. The changes from v0.2.12 -> v0.2.13 are: - replaced qemu_get_timer() with qemu_get_timer_ns() - check check

[Qemu-devel] [PATCH 15/18] savevm: introduce qemu_savevm_trans_{begin, commit}.

2011-03-22 Thread Yoshiaki Tamura
Introduce qemu_savevm_trans_{begin,commit} to send the memory and device info together, while avoiding cancelling memory state tracking. This patch also abstracts common code between qemu_savevm_state_{begin,iterate,commit}. Signed-off-by: Yoshiaki Tamura --- savevm.c | 157

[Qemu-devel] [PATCH 01/18] Make QEMUFile buf expandable, and introduce qemu_realloc_buffer() and qemu_clear_buffer().

2011-03-22 Thread Yoshiaki Tamura
Currently buf size is fixed at 32KB. It would be useful if it could be flexible. Signed-off-by: Yoshiaki Tamura --- hw/hw.h |2 ++ savevm.c | 20 +++- 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/hw/hw.h b/hw/hw.h index 1b09039..f90ff15 100644 --- a/hw/

[Qemu-devel] [PATCH 12/18] Insert event_tap_mmio() to cpu_physical_memory_rw() in exec.c.

2011-03-22 Thread Yoshiaki Tamura
Record mmio write event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- exec.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 964ce31..be71464 100644 --- a/exec.c +++ b/exec.c @@ -33,6 +33,7 @@ #include "osdep.h" #include "kvm.h

[Qemu-devel] [PATCH 07/18] Introduce fault tolerant VM transaction QEMUFile and ft_mode.

2011-03-22 Thread Yoshiaki Tamura
This code implements VM transaction protocol. Like buffered_file, it sits between savevm and migration layer. With this architecture, VM transaction protocol is implemented mostly independent from other existing code. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- Makefile.objs

[Qemu-devel] [PATCH 02/18] Introduce read() to FdMigrationState.

2011-03-22 Thread Yoshiaki Tamura
Currently FdMigrationState doesn't support read(), and this patch introduces it to get response from the other side. Note that this won't change the existing migration protocol to be bi-directional. Signed-off-by: Yoshiaki Tamura --- migration-tcp.c | 15 +++ migration.c | 1

[Qemu-devel] [PATCH 11/18] ioport: insert event_tap_ioport() to ioport_write().

2011-03-22 Thread Yoshiaki Tamura
Record ioport event to replay it upon failover. Signed-off-by: Yoshiaki Tamura --- ioport.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ioport.c b/ioport.c index 2e971fa..f485bab 100644 --- a/ioport.c +++ b/ioport.c @@ -27,6 +27,7 @@ #include "ioport.h" #include

[Qemu-devel] [PATCH 06/18] virtio: decrement last_avail_idx with inuse before saving.

2011-03-22 Thread Yoshiaki Tamura
For regular migration inuse == 0 always as requests are flushed before save. However, event-tap log when enabled introduces an extra queue for requests which is not being flushed, thus the last inuse requests are left in the event-tap queue. Move the last_avail_idx value sent to the remote back to

[Qemu-devel] [PATCH 18/18] Introduce "kemari:" to enable FT migration mode (Kemari).

2011-03-22 Thread Yoshiaki Tamura
When "kemari:" is set in front of URI of migrate command, it will turn on ft_mode to start FT migration mode (Kemari). On the receiver side, the option looks like, -incoming kemari::: Signed-off-by: Yoshiaki Tamura Acked-by: Paolo Bonzini --- hmp-commands.hx |4 +++- migration.c | 12

[Qemu-devel] [PATCH 03/18] Introduce qemu_loadvm_state_no_header() and make qemu_loadvm_state() a wrapper.

2011-03-22 Thread Yoshiaki Tamura
Introduce qemu_loadvm_state_no_header() so that it can be called iteratively without reading the header, and qemu_loadvm_state() becomes a wrapper of it. Signed-off-by: Yoshiaki Tamura --- savevm.c | 45 +++-- 1 files changed, 27 insertions(+), 18 deleti

[Qemu-devel] [PATCH 17/18] migration-tcp: modify tcp_accept_incoming_migration() to handle ft_mode, and add a hack not to close fd when ft_mode is enabled.

2011-03-22 Thread Yoshiaki Tamura
When ft_mode is set in the header, tcp_accept_incoming_migration() sets ft_trans_incoming() as a callback, and call qemu_file_get_notify() to receive FT transaction iteratively. We also need a hack no to close fd before moving to ft_transaction mode, so that we can reuse the fd for it. vm_change_

[Qemu-devel] [PATCH 04/18] qemu-char: export socket_set_nodelay().

2011-03-22 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura --- qemu-char.c |2 +- qemu_socket.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 31c9e79..fa16d36 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2111,7 +2111,7 @@ static void tcp_chr_telnet_init(int

[Qemu-devel] [Bug 739785] Re: qemu-i386 on ARM bash: fork: Invalid argument

2011-03-22 Thread moonman
I compiled a static bash build. Now there's no weird command prompt, but I still can't execute anything because of fork. [root@Plugbox i386]# chroot . bash-44.# ls bash: fork: Invalid argument bash-44.# a bash: fork: Invalid argument bash-44.# asdf bash: fork: Invalid

[Qemu-devel] BBL execution hooking

2011-03-22 Thread felix.matenaar@rwth-aachen
Hello everyone, I started implementing BBL execution hooking. Requirements were that two callbacks (bbl_start and bbl_stop) are called when a BBL is executed. Since bbl_start is called through a gen_helper in gen_intermediate_code_internal, that is not a problem. But I saw that modifying gen_eob(

Re: [Qemu-devel] [PATCH 11/11] test-vmstate: add test case to verify we don't change VMState

2011-03-22 Thread Anthony Liguori
On 03/22/2011 07:16 PM, Anthony Liguori wrote: We've had lots of issues surrounding live migration breaking. This is because we haven't had a good way to validate that what we're migrating isn't changing underneath of us. This test works by first converting the in-tree schema to C source as a s

Re: [Qemu-devel] [PATCH 03/11] vmstate: for vmstate types that reuse the same field, make sure name is unique

2011-03-22 Thread Anthony Liguori
On 03/22/2011 07:16 PM, Anthony Liguori wrote: For a schema to work, we need to make sure that each field name is unique. We have a number of derivative types today that reuse the base name. This patch fixes this. Signed-off-by: Anthony Liguori --- hw/hw.h | 16 +--- 1 files c

[Qemu-devel] [PATCH v5 2/4] piix_pci: eliminate PIIX3State::pci_irq_levels

2011-03-22 Thread Isaku Yamahata
PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. Cc: Juan Quintela Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - use PCI_NUM_PINS instead of magic number 4 Changes v2 -> v3: - rename member s/dummy_for_save_loa

[Qemu-devel] [PATCH v5 3/4] piix_pci: optimize set irq path

2011-03-22 Thread Isaku Yamahata
optimize irq routing in piix_pic.c which has been a TODO. So far piix3 tracks each pirq level and checks whether a given pic pins is asserted by seeing if each pirq is mapped into the pic pin. This is independent on irq routing, but data path is on slow path. Given that irq routing is rarely chang

[Qemu-devel] [PATCH v5 4/4] piix_pci: load path clean up

2011-03-22 Thread Isaku Yamahata
The previous patch didn't change the behavior when load, it resulted in ugly code. This patch cleans it up. With this patch, pic irq lines are manipulated when loaded. It is expected that it won't change the behaviour because the interrupts are level: at the moment e.g. pci devices already reasser

[Qemu-devel] [PATCH v5 0/4] piix_pci: optimize irq data path

2011-03-22 Thread Isaku Yamahata
v4 has minor typo. I sent it too early. Here's fixed one. v3 -> v4 Main changes are - use pirq, pci_intx instead of irq_num in piix_pci.c - patch 4/4 cleans the code a bit 4/4 needs more extensive tests. So please feel free to pick it up now or drop it for now. patch description: This patch seri

[Qemu-devel] [PATCH v5 1/4] pci: add accessor function to get irq levels

2011-03-22 Thread Isaku Yamahata
Introduce accessor function to know INTx levels. It will be used later by q35. Although piix_pci tracks the intx line levels, it can be eliminated by this helper function. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.c |7 +++ hw/pci.h |1 + 2 files changed, 8 ins

Re: [Qemu-devel] [PATCH v2] Do not delete BlockDriverState when deleting the drive

2011-03-22 Thread Ryan Harper
* Markus Armbruster [2011-03-15 04:48]: > Sorry for the long delay, I was out of action for a week. > > Ryan Harper writes: > > > When removing a drive from the host-side via drive_del we currently have the > > following path: > > > > drive_del > > qemu_aio_flush() > > bdrv_close() > > drive_un

[Qemu-devel] [Bug 739785] Re: qemu-i386 on ARM bash: fork: Invalid argument

2011-03-22 Thread moonman
I found some more info about this, however it was on a ppc platform so I don't know if it'll be useful: http://www.powerdeveloper.org/forums/viewtopic.php?p=13709 "I've made some investigations. Seems that the problem is here: clone(18874385,0,0,0,1210087208,1074262024) = -1 errno=22 (Invalid arg

[Qemu-devel] [PATCH 11/11] test-vmstate: add test case to verify we don't change VMState

2011-03-22 Thread Anthony Liguori
We've had lots of issues surrounding live migration breaking. This is because we haven't had a good way to validate that what we're migrating isn't changing underneath of us. This test works by first converting the in-tree schema to C source as a string. This is built into the test case. The tes

[Qemu-devel] [PATCH 10/11] vl: add a new -vmstate-dump option to write a VMState JSON schema

2011-03-22 Thread Anthony Liguori
This ends up being pretty slick as we can store the JSON schema in the tree and then use a test wrapper to validate whether fields change. Current schema will come with the test wrapper. Signed-off-by: Anthony Liguori --- hw/hw.h |2 + qemu-options.hx | 10 savevm.c

[Qemu-devel] [PATCH 05/11] vga-isa: fix migration by breaking it

2011-03-22 Thread Anthony Liguori
This is pretty sad. We use the same section name for vga-isa as we do for vga-pci even though we use separate formats. This breaks the live migration protocol because we may misinterpret the vga-isa as a vga-pci device. vga-isa should use it's own wrapper just like vga-pci does. That's what we

[Qemu-devel] [PATCH 07/11] eeprom93xx: Use the new hack macro to avoid duplicate field names

2011-03-22 Thread Anthony Liguori
I don't fully understand this hack business but we need field to be unique so.. Signed-off-by: Anthony Liguori --- hw/eeprom93xx.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/eeprom93xx.c b/hw/eeprom93xx.c index cfa695d..f1d75ec 100644 --- a/hw/eeprom93xx.c +++ b

[Qemu-devel] [PATCH 08/11] fw_cfg: make sure all VMState fields are unique.

2011-03-22 Thread Anthony Liguori
Signed-off-by: Anthony Liguori --- hw/fw_cfg.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 67603a9..fd0c5ce 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -194,7 +194,7 @@ static const VMStateInfo vmstate_hack_uint32_as_uint16 = { };

[Qemu-devel] [PATCH 09/11] pckbd: make non-ISA pckbd use a unique name

2011-03-22 Thread Anthony Liguori
Another problem with non-PC versions of devices reusing the PC section name. Signed-off-by: Anthony Liguori --- hw/pckbd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pckbd.c b/hw/pckbd.c index 027f69e..7e90388 100644 --- a/hw/pckbd.c +++ b/hw/pckbd.c @@ -366,7 +

[Qemu-devel] [PATCH 01/11] Add hard build dependency on glib

2011-03-22 Thread Anthony Liguori
GLib is an extremely common library that has a portable thread implementation along with tons of other goodies. GLib and GObject have a fantastic amount of infrastructure we can leverage in QEMU including an object oriented programming infrastructure. Short term, it has a very nice thread pool im

[Qemu-devel] [PATCH 04/11] sb16: fix migration quirk

2011-03-22 Thread Anthony Liguori
We seem to migrate the same field twice. It's been this way since Fabrice committed the original file. Since semantically, we basically ignore the first value, make this an unused entry. Signed-off-by: Anthony Liguori --- hw/sb16.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCH 06/11] fdc: fix migration of non-ISA fdc devices

2011-03-22 Thread Anthony Liguori
Again, we are not using a unique name for non-ISA fdc devices and as a result, we may misinterpret an ISA fdc device as a non-ISA fdc device. In this case, both ISA fdc and non-ISA fdc are using too generic of a name. Since ISA fdc is more common, let it keep the old name. Signed-off-by: Anthony

[Qemu-devel] [PATCH 03/11] vmstate: for vmstate types that reuse the same field, make sure name is unique

2011-03-22 Thread Anthony Liguori
For a schema to work, we need to make sure that each field name is unique. We have a number of derivative types today that reuse the base name. This patch fixes this. Signed-off-by: Anthony Liguori --- hw/hw.h | 16 +--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --g

[Qemu-devel] [PATCH 00/11] Add live migration unit tests

2011-03-22 Thread Anthony Liguori
Here is a more sophisticated version of my patch from earlier today. Short summary is, this adds a 'make check-vmstate' that runs quickly, and would catch a large percentage of the live migration regressions we introduce. I hope it also shows how we can add similar things to other subsystems and

Re: [Qemu-devel] [PATCH] cocoa: do not create a spurious window for -version

2011-03-22 Thread Andreas Färber
Am 21.03.2011 um 09:30 schrieb Tristan Gingold: On Mar 19, 2011, at 2:44 PM, Andreas Färber wrote: Am 15.03.2011 um 14:18 schrieb Tristan Gingold: When invoked with -version, qemu will exit just after displaying the version, so there is no need to create a window. Also handles --XXX option

Re: [Qemu-devel] [PATCH] simpletrace: Thread-safe tracing

2011-03-22 Thread Andreas Färber
Am 28.02.2011 um 10:38 schrieb Stefan Hajnoczi: Trace events outside the global mutex cannot be used with the simple trace backend since it is not thread-safe. There is no check to prevent them being enabled so people sometimes learn this the hard way. This patch restructures the simple tra

[Qemu-devel] [PATCH v7 3/3] rtl8139: add vlan tag insertion

2011-03-22 Thread Benjamin Poirier
Add support to the emulated hardware to insert vlan tags in packets going from the guest to the network. Signed-off-by: Benjamin Poirier Cc: Igor V. Kovalenko Cc: Jason Wang Cc: Michael S. Tsirkin Cc: Blue Swirl --- hw/rtl8139.c | 75 ++--

[Qemu-devel] [PATCH v7] rtl8139: add vlan support

2011-03-22 Thread Benjamin Poirier
Hello, Here is version 7 of my patchset to add vlan support to the emulated rtl8139 nic. Changes since v6: * added check against guest requesting tagging on frames with len < 12 * simplified tag extraction in receive function. dot1q_buf arg removed from rtl8139_do_receiv

[Qemu-devel] [PATCH v7 2/3] rtl8139: add vlan tag extraction

2011-03-22 Thread Benjamin Poirier
Add support to the emulated hardware to extract vlan tags in packets going from the network to the guest. Signed-off-by: Benjamin Poirier Cc: Igor V. Kovalenko Cc: Jason Wang Cc: Michael S. Tsirkin Cc: Blue Swirl -- AFAIK, extraction is optional to get vlans working. The driver requests rx

[Qemu-devel] [PATCH v7 1/3] rtl8139: cleanup FCS calculation

2011-03-22 Thread Benjamin Poirier
clean out ifdef's around ethernet checksum calculation Signed-off-by: Benjamin Poirier Acked-by: Igor V. Kovalenko Cc: Jason Wang Cc: Michael S. Tsirkin Cc: Blue Swirl --- hw/rtl8139.c | 20 +++- 1 files changed, 3 insertions(+), 17 deletions(-) diff --git a/hw/rtl8139.c b

Re: [Qemu-devel] eepro100: feature is missing in this emulation: unknown word write

2011-03-22 Thread Stefan Weil
Am 22.03.2011 22:03, schrieb Sébastien BRICE: Le 21 mars 2011 22:48, Alex Williamson > a écrit : 2011/3/21 Sébastien BRICE mailto:s...@so-sweet.org>>: > Hi everyone > > I have been using qemu-kvm with success the last two years and its reall

[Qemu-devel] [PATCH v4 3/4] piix_pci: optimize set irq path

2011-03-22 Thread Isaku Yamahata
optimize irq routing in piix_pic.c which has been a TODO. So far piix3 tracks each pirq level and checks whether a given pic pins is asserted by seeing if each pirq is mapped into the pic pin. This is independent on irq routing, but data path is on slow path. Given that irq routing is rarely chang

[Qemu-devel] [PATCH v4 2/4] piix_pci: eliminate PIIX3State::pci_irq_levels

2011-03-22 Thread Isaku Yamahata
PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. Cc: Juan Quintela Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- Changes v3 -> v4: - use PCI_NUM_PINS instead of magic number 4 Changes v2 -> v3: - rename member s/dummy_for_save_loa

[Qemu-devel] [PATCH v4 4/4] piix_pci: load path clean up

2011-03-22 Thread Isaku Yamahata
The previous patch didn't change the behavior when load, it resulted in ugly code. This patch cleans it up. With this patch, pic irq lines are manipulated when loaded. It is expected that it won't change the behaviour because the interrupts are level: at the moment e.g. pci devices already reasser

[Qemu-devel] [PATCH v4 1/4] pci: add accessor function to get irq levels

2011-03-22 Thread Isaku Yamahata
Introduce accessor function to know INTx levels. It will be used later by q35. Although piix_pci tracks the intx line levels, it can be eliminated by this helper function. Cc: Michael S. Tsirkin Signed-off-by: Isaku Yamahata --- hw/pci.c |7 +++ hw/pci.h |1 + 2 files changed, 8 ins

[Qemu-devel] [PATCH v4 0/4] piix_pci: optimize irq data path

2011-03-22 Thread Isaku Yamahata
Okay now v4. Main changes is - use pirq, pci_intx instead of irq_num in piix_pci.c - patch 4/4 cleans the code a bit 4/4 needs more extensive tests. So please feel free to pick it up now or drop it for now. patch description: This patch series optimizes irq data path of piix_pci. So far piix3 tr

Re: [Qemu-devel] OVMF, SeaBIOS & non-CSM based legacy boot

2011-03-22 Thread Jordan Justen
2011/3/22 Gleb Natapov : > On Tue, Mar 22, 2011 at 12:28:51PM -0700, Jordan Justen wrote: >> Can this cover a full path like this? >> /pci@i0cf8/ide@1,1/drive@1/disk@0 => partition0 => /path/abc.efi >> > Open Firmware have syntax for that. > /pci@i0cf8/ide@1,1/drive@1/disk@0:0,/path/abc.efi > But

[Qemu-devel] Presito Personale assicurativo

2011-03-22 Thread Lidia
Prestiti aziendali - Finanziamenti ai privati - Agevolazioni per le aziende in crisi - Servizi innovativi Prestito con piano assicurativo ( per tutte le categorie ) E' un prestito personale per tutti coloro che desiderano ottenere un finanziamento in tempi rapidi con la presentazione di pochi d

Re: [Qemu-devel] eepro100: feature is missing in this emulation: unknown word write

2011-03-22 Thread Sébastien BRICE
Le 21 mars 2011 22:48, Alex Williamson a écrit : > 2011/3/21 Sébastien BRICE : > > Hi everyone > > > > I have been using qemu-kvm with success the last two years and its really > > amazing. > > I am new to this mailing list and i am requesting your assistance because > i > > struggle to have my v

[Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers

2011-03-22 Thread Peter Maydell
On 22 March 2011 19:53, Juan Quintela wrote: > Peter Maydell wrote: >> Migration from the old version to the new version can be supported >> if it is OK for the new fields to remain in their default state >> [XXX is this right? are they zeroed, or do they get the value >> the device's reset funct

Re: [Qemu-devel] OVMF, SeaBIOS & non-CSM based legacy boot

2011-03-22 Thread Gleb Natapov
On Tue, Mar 22, 2011 at 12:28:51PM -0700, Jordan Justen wrote: > 2011/3/22 Gleb Natapov : > > On Mon, Mar 21, 2011 at 02:23:31PM -0700, Jordan Justen wrote: > >> There is one big difference here between how VM's generally specify > >> the boot disk vs. a UEFI system.  In a UEFI system, normally the

[Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers

2011-03-22 Thread Juan Quintela
Peter Maydell wrote: > On 5 March 2011 14:59, Paolo Bonzini wrote: >> On 03/05/2011 01:34 PM, Peter Maydell wrote: sorry, I miss this email before. > > Ah. I was just following Juan's suggestion: >> - if you don't care about backward compatibility, just add +1 to all the >> version fields and y

Re: [Qemu-devel] OVMF, SeaBIOS & non-CSM based legacy boot

2011-03-22 Thread Jordan Justen
2011/3/22 Gleb Natapov : > On Mon, Mar 21, 2011 at 02:23:31PM -0700, Jordan Justen wrote: >> There is one big difference here between how VM's generally specify >> the boot disk vs. a UEFI system.  In a UEFI system, normally the boot >> path is not known during the first boot of the machine.  At so

[Qemu-devel] Re: [PATCH v2 1/2] hw/arm_sysctl.c: Add the Versatile Express system registers

2011-03-22 Thread Peter Maydell
On 5 March 2011 16:50, Peter Maydell wrote: > I've appended a draft of a suggested extra section for > docs/migration.txt so you can tell me if I've misunderstood > it all :-) Ping? In particular if somebody can fill in the [XXX] bit for me (and correct any other mistakes!) I'll submit this as a

[Qemu-devel] Re: [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-03-22 Thread Juan Quintela
Dmitry Eremin-Solenikov wrote: > +static inline void strongarm_rtc_alarm_tick(void *opaque) > +{ > +StrongARMRTCState *s = (StrongARMRTCState *) opaque; cast is not needed. Just a NOP in C. (lost of places) > +static const VMStateDescription vmstate_strongarm_rtc_regs = { > +.name = "s

[Qemu-devel] [PATCH] net: Improve the warnings for dubious command line option combinations

2011-03-22 Thread Peter Maydell
Improve the warnings we give if the user specified a combination of -net options which don't make much sense: * Fix a bug where we would only complain about the first VLAN having no NIC or no host network connection; we now diagnose this situation for all VLANs * Don't warn about anything i

[Qemu-devel] [PATCH] hw/versatilepb, realview: Fix condition for instantiation of onboard NIC

2011-03-22 Thread Peter Maydell
Correct the condition determining whether we instantiate the onboard NIC or a PCI card NIC on VersatilePB and Realview boards. This was broken in two ways: (1) if the user asked for two default NICs ("-net nic -net nic") we would crash trying to strcmp() a NULL pointer (2) if the user asked for t

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

2011-03-22 Thread Alexander Graf
On 03/22/2011 06:22 PM, Anthony PERARD wrote: On Tue, 22 Mar 2011, Alexander Graf wrote: On 03/22/2011 04:40 PM, Alexander Graf wrote: make[1]: *** [qemu-system-x86_64] Error 1 This should be the correct fix: diff --git a/Makefile.target b/Makefile.target index c0db745..91bbf39 100644 ---

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

2011-03-22 Thread Anthony PERARD
On Tue, 22 Mar 2011, Alexander Graf wrote: > On 03/22/2011 04:40 PM, Alexander Graf wrote: > > make[1]: *** [qemu-system-x86_64] Error 1 > > > This should be the correct fix: > > > diff --git a/Makefile.target b/Makefile.target > index c0db745..91bbf39 100644 > --- a/Makefile.target > +++ b/Makefi

Re: [Qemu-devel] [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-03-22 Thread Peter Maydell
On 22 March 2011 14:53, Dmitry Eremin-Solenikov wrote: > Basic implementation of DEC/Intel SA-1100/SA-1110 chips emulation. The other important point is that these cores are ARMv4, and at the moment target-arm/ kind of assumes ARMv5. I believe there have been patches proposed before to add ARMv4

[Qemu-devel] Re: [PATCH] virtio-serial: don't crash on invalid input

2011-03-22 Thread Amit Shah
On (Tue) 22 Mar 2011 [18:32:50], Michael S. Tsirkin wrote: > Fix crash on invalid input in virtio-serial. > Discovered by code review, untested. > > Signed-off-by: Michael S. Tsirkin > --- > hw/virtio-serial-bus.c |3 +++ > 1 files changed, 3 insertions(+), 0 deletions(-) > > diff --git a/h

Re: [Qemu-devel] [arm] Integrator/CP keyboard layout

2011-03-22 Thread jakub
Quoting Peter Maydell : I would tend to think that there is only one correct set of key codes that the keyboard on Integrator/CP may generate. Why do you think this? The keyboard isn't built in to the hardware, so the set of keycodes you get depends on the keyboard, not the Integrator/CP. (Conv

Re: [Qemu-devel] [PATCH v5 0/7] Introduce -display and make VNC optional

2011-03-22 Thread Anthony Liguori
On 03/16/2011 07:33 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen Hi, This is v5 version of the -display patches and the option to make VNC optional. It introduces a new -display argument to consolidate the current -sdl/-curses/-nographic/-vnc arguments. v5 fixes the commit messages a

Re: [Qemu-devel] [PATCH] qmp-commands.hx: Clean up mess of client_migrate_info

2011-03-22 Thread Anthony Liguori
On 03/09/2011 07:31 AM, jes.soren...@redhat.com wrote: From: Jes Sorensen client_migrate_info was put into qmp-commands.hx in the middle of migrate_set_speed, between the command and it's description. In addition client_migrate_info put the description before the command itself, which is the wro

[Qemu-devel] [PATCH] virtio-serial: don't crash on invalid input

2011-03-22 Thread Michael S. Tsirkin
Fix crash on invalid input in virtio-serial. Discovered by code review, untested. Signed-off-by: Michael S. Tsirkin --- hw/virtio-serial-bus.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index e0bf6c5..8807a2f 100644

[Qemu-devel] Re: [PATCH RESEND v3] fix vnc regression

2011-03-22 Thread Anthony Liguori
On 03/11/2011 03:10 AM, Wen Congyang wrote: This patch fix the following regression: 1. we should use bitmap_set() and bitmap_clear() to replace vnc_set_bits(). Signed-off-by: Wen Congyang Applied (version that used VNC_DIRTY_BITS). Thanks. Regards, Anthony Liguori --- ui/vnc.c |8 +

[Qemu-devel] Re: [PATCH v3 3/3] piix_pci: optimize set irq path

2011-03-22 Thread Michael S. Tsirkin
On Tue, Mar 22, 2011 at 11:07:03PM +0900, Isaku Yamahata wrote: > On Tue, Mar 22, 2011 at 03:40:16PM +0200, Michael S. Tsirkin wrote: > > On Tue, Mar 22, 2011 at 09:50:37AM +0900, Isaku Yamahata wrote: > > > On Mon, Mar 21, 2011 at 04:10:22PM +0200, Michael S. Tsirkin wrote: > > > > > @@ -37,8 +37,

Re: [Qemu-devel] [PATCH 1/2] Implement basic part of SA-1110/SA-1100

2011-03-22 Thread Dmitry Eremin-Solenikov
Hello, On 3/22/11, Peter Maydell wrote: > On 22 March 2011 14:53, Dmitry Eremin-Solenikov > wrote: > >> static inline int arm_feature(CPUARMState *env, int feature) >> @@ -391,6 +392,19 @@ void cpu_arm_set_cp_io(CPUARMState *env, int cpnum, >> #define ARM_CPUID_ARM946 0x41059461 >> #defi

Re: [Xen-devel] Re: [Qemu-devel] [PATCH V11 00/15] Xen device model support

2011-03-22 Thread Alexander Graf
On 03/22/2011 04:40 PM, Alexander Graf wrote: On 03/22/2011 03:47 PM, Anthony PERARD wrote: On Tue, Mar 22, 2011 at 14:23, Alexander Graf wrote: On 03/01/2011 07:35 PM, anthony.per...@citrix.com wrote: From: Anthony PERARD Hi all, Here is the few change since the V10: - Add braces for b

  1   2   >