Re: [Qemu-devel] [RFC PATCH v4 00/30] ACPI memory hotplug

2012-12-18 Thread Gerd Hoffmann
Hi, - multiple memory buses can be registered. Memory buses of the real hw/chipset or a paravirtual memory bus can be added. IIRC q35 supports memory hotplug natively (picked up in some discussion). Is that correct? What does the code emulate? It doesn't look like it emulates q35 memory

Re: [Qemu-devel] [Resend][Seabios PATCH] don't boot from un-selected devices

2012-12-18 Thread Gerd Hoffmann
On 12/19/12 08:24, Amos Kong wrote: Current seabios will try to boot from selected devices first, if they are all failed, seabios will also try to boot from un-selected devices. For example: @ qemu-kvm -boot order=n,menu=on ... Guest will boot from network first, if it's failed, guest

Re: [Qemu-devel] [PATCH v2 1/4] usb/ehci: Clean up SysBus and PCI EHCI split

2012-12-18 Thread Gerd Hoffmann
Hi, I fail to see the point. EHCIPCIState should not be needed outside of hcd-ehci-pci.c and I'd prefer to leave it there. Likewise for sysbus. It is exactly what I commented on my v1 for needing a v2 and you seemed to concur... In C, to embed a struct in another struct the compiler

[Qemu-devel] [PATCH qom-cpu 1/4] cpu: Introduce CPUListState struct

2012-12-18 Thread Andreas Färber
This generalizes {ARM,M68k,Alpha}CPUListState to avoid declaring it for each target. Signed-off-by: Andreas Färber afaer...@suse.de --- include/qemu/cpu.h | 12 target-alpha/cpu.c |9 ++--- target-arm/helper.c |9 ++--- target-m68k/helper.c |9 ++--- 4

[Qemu-devel] [PATCH RFC qom-cpu 2/4] qemu-common.h: Move fprintf_function to qemu-types.h

2012-12-18 Thread Andreas Färber
This avoids a dependency on qemu-common.h from qemu/cpu.h. Signed-off-by: Andreas Färber afaer...@suse.de --- include/qemu/cpu.h |2 +- qemu-common.h |5 - qemu-types.h |6 ++ 3 Dateien geändert, 7 Zeilen hinzugefügt(+), 6 Zeilen entfernt(-) diff --git

[Qemu-devel] [PATCH qom-cpu 0/4] CPU cleanup and PPC subclasses

2012-12-18 Thread Andreas Färber
Hello, This series starts with unifying the various structs for -cpu ? implementation. I'm guessing the second patch will be necessary for CPU-as-a-device, but it breaks the paradigm of having only typedefs in qemu-types.h. Based on that, by demand from David, here's a quick and dirty

Re: [Qemu-devel] [PATCHv2] virtio: make bindings typesafe

2012-12-18 Thread Michael S. Tsirkin
On Mon, Dec 17, 2012 at 06:42:58PM -0600, Anthony Liguori wrote: What don't you just use a static inline and then you get even more type safety and don't confuse with QOM cast macros... Regards, Anthony Liguori OK.

Re: [Qemu-devel] [PATCH 00/15] qdev: make reset semantics more clear and consistent, reset qbuses under virtio devices

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 08:27, Paolo Bonzini ha scritto: Il 17/12/2012 22:43, Michael S. Tsirkin ha scritto: On Mon, Dec 17, 2012 at 05:24:35PM +0100, Paolo Bonzini wrote: After discussion with mst on the topic of resetting virtio devices, here is a series that hopefully clarifies the semantics of bus

Re: [Qemu-devel] [PATCH] virtio: make bindings typesafe

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 01:48:44AM +0100, Andreas Färber wrote: Am 18.12.2012 01:30, schrieb Michael S. Tsirkin: On Tue, Dec 18, 2012 at 01:13:18AM +0100, Andreas Färber wrote: Am 17.12.2012 23:58, schrieb Michael S. Tsirkin: On Mon, Dec 17, 2012 at 11:08:43PM +0100, Andreas Färber wrote:

Re: [Qemu-devel] [PATCH 1/1] virtio-serial-bus: assert port is non-null in remove_port()

2012-12-18 Thread Markus Armbruster
Amit Shah amit.s...@redhat.com writes: remove_port() is called from qdev's unplug callback, and we're certain the port will be found in our list of ports. Adding an assert() documents this. This was flagged by Coverity, fix suggested by Markus. CC: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PATCH v2 3/5] s390: Add new channel I/O based virtio transport.

2012-12-18 Thread Paolo Bonzini
Il 04/09/2012 17:13, Cornelia Huck ha scritto: +VirtioCcwBus *virtio_ccw_bus_init(void) +{ +VirtioCcwBus *cbus; +BusState *bus; +DeviceState *dev; + +/* Create bridge device */ +dev = qdev_create(NULL, virtio-ccw-bridge); +qdev_init_nofail(dev); + +/* Create

Re: [Qemu-devel] [PATCH 00/15] qdev: make reset semantics more clear and consistent, reset qbuses under virtio devices

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 09:35:02AM +0100, Paolo Bonzini wrote: Il 18/12/2012 08:27, Paolo Bonzini ha scritto: Il 17/12/2012 22:43, Michael S. Tsirkin ha scritto: On Mon, Dec 17, 2012 at 05:24:35PM +0100, Paolo Bonzini wrote: After discussion with mst on the topic of resetting virtio

Re: [Qemu-devel] [BUG] qemu-1.1.2 [FIXED-BY] qcow2: Fix avail_sectors in cluster allocation code

2012-12-18 Thread Philipp Hahn
Hello Kevin, hello Michael, On Wednesday 12 December 2012 17:54:58 Kevin Wolf wrote: Am 12.12.2012 15:09, schrieb Philipp Hahn: Am Mittwoch 12 Dezember 2012 14:41:49 schrieb Kevin Wolf: As you can see in the commit message of that patch I was convinced that no bug did exist in practice and

Re: [Qemu-devel] [PATCH v2] Added uapi directory into linux-header

2012-12-18 Thread Alexander Graf
On 18.12.2012, at 03:07, Bhushan Bharat-R65777 r65...@freescale.com wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Tuesday, December 18, 2012 7:00 AM To: Bhushan Bharat-R65777 Cc: qemu-devel qemu-devel; Peter Maydell; Jan Kiszka; qemu-...@nongnu.org

Re: [Qemu-devel] [PATCH 09/26] ehci: Use uframe precision for interrupt threshold checking

2012-12-18 Thread Hans de Goede
Hi, On 12/17/2012 03:51 PM, Gerd Hoffmann wrote: On 12/17/12 15:47, Hans de Goede wrote: Hi, On 12/17/2012 03:39 PM, Gerd Hoffmann wrote: On 12/17/12 15:23, Hans de Goede wrote: Hi, On 12/17/2012 02:16 PM, Gerd Hoffmann wrote: On 12/14/12 14:35, Hans de Goede wrote: Note that a shadow

Re: [Qemu-devel] [PATCH v2] Added uapi directory into linux-header

2012-12-18 Thread Bhushan Bharat-R65777
+++ b/scripts/update-linux-headers.sh @@ -46,14 +46,26 @@ for arch in $ARCHLIST; do make -C $linux INSTALL_HDR_PATH=$tmpdir SRCARCH=$arch headers_install +if [ -e $linux/arch/$arch/include/uapi ] +! [ -e $output/linux-headers/uapi ] ; then +mkdir

[Qemu-devel] [PULL] virtio-serial: fixes, cleanups

2012-12-18 Thread Amit Shah
Hi Anthony, Please pull to get fixes and cleanups to virtio-serial code. Thanks, The following changes since commit 1c97e303d4ea80a2691334b0febe87a50660f99d: Merge remote-tracking branch 'afaerber/qom-cpu' into staging (2012-12-10 08:35:15 -0600) are available in the git repository at:

[Qemu-devel] [PATCHv3] virtio: make bindings typesafe

2012-12-18 Thread Michael S. Tsirkin
Move bindings from opaque to DeviceState. This gives us better type safety with no performance cost. Add macros to make future QOM work easier. Note: this code is not replacing QOM use with non QOM - it is replacing unsafe void * use with type-checked use. Switch of the implementation to QOM where

Re: [Qemu-devel] [PATCH 4/6] snapshot: implemention of common API to take snapshots

2012-12-18 Thread Wenchao Xia
于 2012-12-17 18:32, Dietmar Maurer 写道: For example, nexenta storage provides an API to create snapshots. We want to use that. Another example would be to use lvcreate to create lvm snapshots. I am not familar with those tools You do not know LVM? Honest speaking I use LVM tools

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Peter Maydell
On 17 December 2012 15:45, Michael S. Tsirkin m...@redhat.com wrote: Is the point to allow virtio-mmio? Why can't virtio-mmio be just another bus, like a pci bus, and another binding, like the virtio-pci binding? (a) the current code is really not very nice because it's not actually a proper

Re: [Qemu-devel] [PATCH 4/6] snapshot: implemention of common API to take snapshots

2012-12-18 Thread Dietmar Maurer
I am not familar with those tools You do not know LVM? Honest speaking I use LVM tools little. I wonder why lvcreate can't be used, for block internal snapshot I think this patch have same function as your previous patch, what is missing? Qemu does not have any information

Re: [Qemu-devel] [PATCH v2] Added uapi directory into linux-header

2012-12-18 Thread Alexander Graf
On 18.12.2012, at 11:19, Bhushan Bharat-R65777 r65...@freescale.com wrote: +++ b/scripts/update-linux-headers.sh @@ -46,14 +46,26 @@ for arch in $ARCHLIST; do make -C $linux INSTALL_HDR_PATH=$tmpdir SRCARCH=$arch headers_install +if [ -e $linux/arch/$arch/include/uapi ] +

Re: [Qemu-devel] [PATCHv2] virtio: make bindings typesafe

2012-12-18 Thread Michael S. Tsirkin
On Mon, Dec 17, 2012 at 06:42:58PM -0600, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Dec 17, 2012 at 11:59:15PM +0100, Andreas Färber wrote: Am 17.12.2012 22:40, schrieb Michael S. Tsirkin: Move bindings from opaque to DeviceState. This gives us better

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 10:33:37AM +, Peter Maydell wrote: On 17 December 2012 15:45, Michael S. Tsirkin m...@redhat.com wrote: Is the point to allow virtio-mmio? Why can't virtio-mmio be just another bus, like a pci bus, and another binding, like the virtio-pci binding? (a) the

Re: [Qemu-devel] [PATCH 09/26] ehci: Use uframe precision for interrupt threshold checking

2012-12-18 Thread Gerd Hoffmann
Hi, Can qemu not handle an mmio range where writes are trapped, but reads are not? That would force the use of the shadow variable, but should otherwise provide a nice speedup. No. vmexit is needed anyway btw, but the round-trip to qemu userspace could be short-cutted in theory. It's

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Peter Maydell
On 18 December 2012 11:01, Michael S. Tsirkin m...@redhat.com wrote: This is what I am saying: create your own bus and put your devices there. What bus? -- PMM

Re: [Qemu-devel] [PATCH 09/26] ehci: Use uframe precision for interrupt threshold checking

2012-12-18 Thread Hans de Goede
Hi, On 12/18/2012 12:03 PM, Gerd Hoffmann wrote: Hi, Can qemu not handle an mmio range where writes are trapped, but reads are not? That would force the use of the shadow variable, but should otherwise provide a nice speedup. No. vmexit is needed anyway btw, but the round-trip to qemu

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread KONRAD Frédéric
On 18/12/2012 12:01, Michael S. Tsirkin wrote: On Tue, Dec 18, 2012 at 10:33:37AM +, Peter Maydell wrote: On 17 December 2012 15:45, Michael S. Tsirkin m...@redhat.com wrote: Is the point to allow virtio-mmio? Why can't virtio-mmio be just another bus, like a pci bus, and another binding,

[Qemu-devel] [PATCH] powerpc: linux header sync script includes epapr_hcalls.h

2012-12-18 Thread Bharat Bhushan
epapr_hcalls.h is now referenced by kvm_para.h. so this is needed for QEMU to get compiled on powerpc. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com --- This patch is after all the discussion we had on patch with subject Added uapi directory in linux-header and the mentioned patch

Re: [Qemu-devel] [PATCH 00/15] qdev: make reset semantics more clear and consistent, reset qbuses under virtio devices

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 10:49, Michael S. Tsirkin ha scritto: +/* Device-specific reset through virtio config space. + * Reset virtio config and backend child devices if any. + */ +void virtio_config_reset(VirtIODevice *vdev) +{ +qdev_reset_all(vdev-binding_opaque); +} Yes, I had understood.

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 12:26, Peter Maydell ha scritto: On 18 December 2012 11:01, Michael S. Tsirkin m...@redhat.com wrote: This is what I am saying: create your own bus and put your devices there. What bus? A virtio bus like the one in these patches. But mst is suggesting to leave virtio.c aside,

Re: [Qemu-devel] [PATCH] powerpc: linux header sync script includes epapr_hcalls.h

2012-12-18 Thread Alexander Graf
On 18.12.2012, at 12:13, Bharat Bhushan wrote: epapr_hcalls.h is now referenced by kvm_para.h. so this is needed for QEMU to get compiled on powerpc. Signed-off-by: Bharat Bhushan bharat.bhus...@freescale.com Thanks, applied to ppc-next. Alex --- This patch is after all the

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Peter Maydell
On 18 December 2012 11:50, Paolo Bonzini pbonz...@redhat.com wrote: Il 18/12/2012 12:26, Peter Maydell ha scritto: On 18 December 2012 11:01, Michael S. Tsirkin m...@redhat.com wrote: This is what I am saying: create your own bus and put your devices there. What bus? A virtio bus like the

Re: [Qemu-devel] [BUG] qemu-1.1.2 [FIXED-BY] qcow2: Fix avail_sectors in cluster allocation code

2012-12-18 Thread Michael Tokarev
On 18.12.2012 13:46, Philipp Hahn wrote: I think I found your missing link: After filling in QCowL2Meta *m, that request ist queued: QLIST_INSERT_HEAD(s-cluster_allocs, m, next_in_flight); do prevent double allocating the same cluster for overlapping requests, which is checked in

Re: [Qemu-devel] [PATCH 01/10] ide: Break all non-qdevified controllers

2012-12-18 Thread Peter Maydell
On 17 December 2012 14:05, Markus Armbruster arm...@redhat.com wrote: The writing has been on the wall for a few years. ...behind a filing cabinet in a disused lavatory with a sign on the door saying beware of the leopard? We really need a better way to mark devices as obsolete, will be

[Qemu-devel] [Bug 1025244] Re: qcow2 image increasing disk size above the virtual limit

2012-12-18 Thread Andy Menzel
Any solution right now? I have a similar problem like Todor Andreev; Our daily backup of some virtual machines (qcow2) looks like that: 1. shutdown the VM 2. create a snapshot via: qemu-img snapshot -c nameofsnapshot... 3. boot the VM 4. backup the snapshot to another virtual disk via: qemu-img

[Qemu-devel] [PATCH 0/3] virtio: don't poll masked vectors with irqfd

2012-12-18 Thread Michael S. Tsirkin
At the moment when vector is masked virtio will poll it in userspace, even if it is handled by irqfd. This is done in order to update pending bits, but it's not really required until someone reads the pending bits. On the other hand this read results in extra io thread wakeups. As we only

Re: [Qemu-devel] [PATCH 0/3] virtio: don't poll masked vectors with irqfd

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 02:20:20PM +0200, Michael S. Tsirkin wrote: At the moment when vector is masked virtio will poll it in userspace, even if it is handled by irqfd. This is done in order to update pending bits, but it's not really required until someone reads the pending bits. On the

[Qemu-devel] [RFC PATCH v4 01/30] [SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros

2012-12-18 Thread Vasilis Liaskovitis
This allows to extract the beginning, end and name of a Device object. --- tools/acpi_extract.py | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 3295678..3191f53 100755 ---

[Qemu-devel] [RFC PATCH v4 06/30] qapi: make visit_type_size fallback to type_int

2012-12-18 Thread Vasilis Liaskovitis
Currently visit_type_size checks if the visitor's type_size function pointer is NULL. If not, it calls it, otherwise it calls v-type_uint64(). But neither of these pointers are ever set. Fallback to calling v-type_int() in this third (default) case. Signed-off-by: Vasilis Liaskovitis

[Qemu-devel] [RFC PATCH v4 14/30] piix_pci: Add i440fx dram controller initialization

2012-12-18 Thread Vasilis Liaskovitis
Also introduce function to adjust memory map for hotplug-able dimms. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/pc_piix.c |6 +++--- hw/piix_pci.c | 30 -- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [RFC PATCH v4 15/30] q35: Add i440fx dram controller initialization

2012-12-18 Thread Vasilis Liaskovitis
Create memory buses and introduce function to adjust memory map for hotplug-able dimms. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/pc_q35.c |1 + hw/q35.c| 27 +++ hw/q35.h|5 + 3 files changed, 33 insertions(+), 0

[Qemu-devel] [RFC PATCH v4 27/30] [SeaBIOS] Add _OST dimm method

2012-12-18 Thread Vasilis Liaskovitis
Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. --- src/acpi-dsdt-mem-hotplug.dsl | 51 - src/ssdt-mem.dsl |4 +++ 2 files changed, 54

[Qemu-devel] [RFC PATCH v4 30/30] Implement _PS3 for dimm

2012-12-18 Thread Vasilis Liaskovitis
This will allow us to update dimm state on OSPM-initiated eject operations e.g. with echo 1 /sys/bus/acpi/devices/PNP0C80\:00/eject v3-v4: Add support for ich9 --- docs/specs/acpi_hotplug.txt |7 +++ hw/acpi_ich9.c |7 +-- hw/acpi_ich9.h |1 +

[Qemu-devel] [RFC PATCH v4 07/30] Add SIZE type to qdev properties

2012-12-18 Thread Vasilis Liaskovitis
This patch adds a 'SIZE' type property to qdev. It will make dimm description more convenient by allowing sizes to be specified with K,M,G,T prefixes instead of number of bytes e.g.: -device dimm,id=mem0,size=2G,bus=membus.0 Credits go to Ian Molton for original patch. See:

Re: [Qemu-devel] [PATCH 01/10] ide: Break all non-qdevified controllers

2012-12-18 Thread Markus Armbruster
Andreas Färber afaer...@suse.de writes: Am 17.12.2012 15:43, schrieb Markus Armbruster: Alexander Graf ag...@suse.de writes: On 17.12.2012, at 15:05, Markus Armbruster wrote: They complicate IDE data structures and keep getting in the way. Also, TRIM support (commit d353fb72) is broken

[Qemu-devel] [RFC PATCH v4 17/30] [SeaBIOS] pci: Use paravirt interface for pcimem_start and pcimem64_start

2012-12-18 Thread Vasilis Liaskovitis
Initialize the 32-bit and 64-bit pci starting offsets from values passed in by the qemu paravirt interface QEMU_CFG_PCI_WINDOW. Qemu calculates the starting offsets based on initial memory and hotplug-able dimms. It's possible to avoid the new paravirt interface, and calculate pci ranges from srat

Re: [Qemu-devel] [PATCH v8 00/12] virtio: virtio-blk data plane

2012-12-18 Thread Stefan Hajnoczi
On Mon, Dec 17, 2012 at 11:05 AM, Stefan Hajnoczi stefa...@redhat.com wrote: Note: v8 is a small change, if you have reviewed v7 then the code is almost totally unchanged. This series adds the -device virtio-blk-pci,x-data-plane=on property that enables a high performance I/O codepath. A

[Qemu-devel] [RFC PATCH v4 28/30] Add _OST dimm support

2012-12-18 Thread Vasilis Liaskovitis
This allows qemu to receive notifications from the guest OS on success or failure of a memory hotplug request. The guest OS needs to implement the _OST functionality for this to work (linux-next: http://lkml.org/lkml/2012/6/25/321) This patch also updates dimm bitmap state and hot-remove pending

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 12:06:39PM +, Peter Maydell wrote: On 18 December 2012 11:50, Paolo Bonzini pbonz...@redhat.com wrote: Il 18/12/2012 12:26, Peter Maydell ha scritto: On 18 December 2012 11:01, Michael S. Tsirkin m...@redhat.com wrote: This is what I am saying: create your own

[Qemu-devel] [RFC PATCH v4 21/30] Implement dimm-info

2012-12-18 Thread Vasilis Liaskovitis
query-dimm-info and info dimm will give current state of all dimms in the system e.g. dimm0: on dimm1: off dimm2: off dimm3: on etc. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hmp-commands.hx |2 ++ hmp.c| 17 + hmp.h

[Qemu-devel] [RFC PATCH v4 29/30] [SeaBIOS] Implement _PS3 method for memory device

2012-12-18 Thread Vasilis Liaskovitis
--- src/acpi-dsdt-mem-hotplug.dsl | 15 +++ src/ssdt-mem.dsl |4 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt-mem-hotplug.dsl b/src/acpi-dsdt-mem-hotplug.dsl index a648bee..7d7c078 100644 --- a/src/acpi-dsdt-mem-hotplug.dsl +++

[Qemu-devel] [RFC PATCH v4 23/30] dimm: add hot-remove capability

2012-12-18 Thread Vasilis Liaskovitis
On a succesfull _EJ0 operation unmap the device from the guest by using the new qdev function qdev_unplug_complete, see: https://lists.gnu.org/archive/html/qemu-devel/2012-11/msg02699.html The memory of the device should be freed when the last subsystem using it unmaps it, see the following two

[Qemu-devel] [PATCH] ehci: Use uframe precision for interrupt threshold checking (v2)

2012-12-18 Thread Hans de Goede
Before this patch, the following could happen: 1) Transfer completes, raises interrupt 2) .5 ms later we check if the guest has queued up any new transfers 3) We find and execute a new transfer 4) .2 ms later the new transfer completes 5) We re-run our frame_timer to write back the completion, but

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 12:30:20PM +0100, KONRAD Frédéric wrote: On 18/12/2012 12:01, Michael S. Tsirkin wrote: On Tue, Dec 18, 2012 at 10:33:37AM +, Peter Maydell wrote: On 17 December 2012 15:45, Michael S. Tsirkin m...@redhat.com wrote: Is the point to allow virtio-mmio? Why can't

[Qemu-devel] [RFC PATCH v4 00/30] ACPI memory hotplug

2012-12-18 Thread Vasilis Liaskovitis
This is v4 of the ACPI memory hotplug functionality. Only x86_64 target is supported (both i440fx and q35). There are still several issues, but it's been a while since v3 and I wanted to get some more feedback on the current state of the patchseries. Overview: Dimm device layout is modeled with

Re: [Qemu-devel] [PATCH] block/raw-win32: Fix compiler warnings (wrong format specifiers)

2012-12-18 Thread Fabien Chouteau
On 12/17/2012 08:40 PM, Stefan Weil wrote: Commit fbcad04d6bfdff937536eb23088a01a280a1a3af added fprintf statements with wrong format specifiers. GetLastError() returns a DWORD which is unsigned long, so %lu must be used. That's right, I didn't see that. Thanks Stefan, -- Fabien

[Qemu-devel] [PATCH 3/3] virtio-pci: don't poll masked vectors

2012-12-18 Thread Michael S. Tsirkin
At the moment, when irqfd is in use but a vector is masked, qemu will poll it and handle vector masks in userspace. Since almost no one ever looks at the pending bits, it is better to defer this until pending bits are actually read. Implement this optimization using the new poll notifier.

Re: [Qemu-devel] [PATCH 01/10] ide: Break all non-qdevified controllers

2012-12-18 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 17 December 2012 14:05, Markus Armbruster arm...@redhat.com wrote: The writing has been on the wall for a few years. ...behind a filing cabinet in a disused lavatory with a sign on the door saying beware of the leopard? We really need a

[Qemu-devel] [PATCH 2/3] msix: expose access to masked/pending state

2012-12-18 Thread Michael S. Tsirkin
For use by poll handler. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci/msix.c | 6 +++--- hw/pci/msix.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index 1f31975..9df0ffb 100644 --- a/hw/pci/msix.c +++ b/hw/pci/msix.c @@

[Qemu-devel] [RFC PATCH v4 11/30] acpi_piix4 : Implement memory device hotplug registers

2012-12-18 Thread Vasilis Liaskovitis
A 32-byte register is used to present up to 256 hotplug-able memory devices to BIOS and OSPM. Hot-add and hot-remove functions trigger an ACPI hotplug event through these. Only reads are allowed from these registers. An ACPI hot-remove event but needs to wait for OSPM to eject the device. We use

[Qemu-devel] [RFC PATCH v4 02/30] [SeaBIOS] Add SSDT memory device support

2012-12-18 Thread Vasilis Liaskovitis
Define SSDT hotplug-able memory devices in _SB namespace. The dynamically generated SSDT includes per memory device hotplug methods. These methods just call methods defined in the DSDT. Also dynamically generate a MTFY method and a MEON array of the online/available memory devices. ACPI

Re: [Qemu-devel] [PATCH 00/10] Drop code for non-qdevified IDE, and clean up

2012-12-18 Thread Anthony Liguori
Markus Armbruster arm...@redhat.com writes: *** Important *** This *breaks* all non-qdevified controllers, see PATCH 01/10. Maintainers are cc'ed. If you want still more time to qdevify your controller, please speak up now, and tell us how much. The rest of the series is obvious cleanups

Re: [Qemu-devel] [PATCH V9 0/4] replace QEMUOptionParameter with QemuOpts parser

2012-12-18 Thread Stefan Hajnoczi
On Mon, Dec 17, 2012 at 02:42:25PM +0800, Dong Xu Wang wrote: Patch 1-3 are from Luiz, added Markus's comments, discussion could be found here: http://lists.nongnu.org/archive/html/qemu-devel/2012-07/msg02716.html Patch 3 was changed according Paolo's comments. Patch 4-5: because

Re: [Qemu-devel] [PATCH 26/26] usbredir: Add support for buffered bulk input

2012-12-18 Thread Gerd Hoffmann
Hi, Added patches 1-25 to the usb queue (using v2 of patch 10). hw/usb/redirect-ftdi-ids.h | 1255 ++ hw/usb/redirect-pl2303-ids.h | 150 + hw/usb/redirect-usb-ids.h| 910 ++ Where does this come from? Linux

[Qemu-devel] [RFC PATCH v4 09/30] Implement dimm device abstraction

2012-12-18 Thread Vasilis Liaskovitis
Each hotplug-able memory slot is a DimmDevice. All DimmDevices are attached to a new bus called DimmBus. This bus is introduced so that we no longer depend on hotplug-capability of main system bus (the main bus does not allow hotplugging). The DimmBus should be attached to a chipset Device (i440fx

[Qemu-devel] [RFC PATCH v4 04/30] [SeaBIOS] acpi: generate hotplug memory devices

2012-12-18 Thread Vasilis Liaskovitis
The memory device generation is guided by qemu paravirt info. Seabios first uses the info to setup SRAT entries for the hotplug-able memory slots. Afterwards, build_memssdt uses the created SRAT entries to generate appropriate memory device objects. One memory device (and corresponding SRAT entry)

Re: [Qemu-devel] [RFC V3 01/24] qcow2: Add deduplication to the qcow2 specification.

2012-12-18 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 04:57:38PM +0100, Benoît Canet wrote: Can you foresee the need to use a different hash algorithm in the future and should we add a hash_algo enum field to the dedup QCOW2 header extension? Yes I foresee the future use of faster hash function like SHA3 or Skein.

[Qemu-devel] [RFC PATCH v4 20/30] balloon: update with hotplugged memory

2012-12-18 Thread Vasilis Liaskovitis
query-balloon and info balloon should report total memory available to the guest. balloon inflate/ deflate can also use all memory available to the guest (initial + hotplugged memory) Ballon driver has been minimaly tested with the patch, please review and test. Caveat: if the guest does not

Re: [Qemu-devel] [RFC V3 00/24] QCOW2 deduplication

2012-12-18 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 05:14:28PM +0100, Benoît Canet wrote: Hi Stefan, I have a few questions 1) overlapping sequential sub-cluster writes The current code pass most of the tests and behave well with a 4KB cluster sized ext3 volume on the deduplicated image. But less than

Re: [Qemu-devel] [PATCH] e1000: Discard oversized packets based on SBP|LPE

2012-12-18 Thread Stefan Hajnoczi
On Wed, Dec 05, 2012 at 01:31:30PM -0500, Michael Contreras wrote: Discard packets longer than 16384 when !SBP to match the hardware behavior. Signed-off-by: Michael Contreras mich...@inetric.com --- hw/e1000.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) Thanks, applied

[Qemu-devel] [RFC PATCH v4 18/30] Introduce paravirt interface QEMU_CFG_PCI_WINDOW

2012-12-18 Thread Vasilis Liaskovitis
Qemu calculates the 32-bit and 64-bit PCI starting offsets based on initial memory and hotplug-able dimms. This info needs to be passed to Seabios for PCI initialization. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/fw_cfg.h |1 + hw/pc_piix.c | 10

[Qemu-devel] [RFC PATCH v4 10/30] vl: handle -device dimm

2012-12-18 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- vl.c | 51 +++ 1 files changed, 51 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index a3ab384..8406933 100644 --- a/vl.c +++ b/vl.c @@ -169,6 +169,7 @@ int

[Qemu-devel] [RFC PATCH v4 25/30] acpi_ich9: add hot-remove capability

2012-12-18 Thread Vasilis Liaskovitis
--- hw/acpi_ich9.c | 28 +++- hw/acpi_ich9.h |1 + 2 files changed, 28 insertions(+), 1 deletions(-) diff --git a/hw/acpi_ich9.c b/hw/acpi_ich9.c index abafbb5..f5dc1c9 100644 --- a/hw/acpi_ich9.c +++ b/hw/acpi_ich9.c @@ -105,12 +105,29 @@ static uint32_t

Re: [Qemu-devel] [PATCH v2] net: clean up network at qemu process termination

2012-12-18 Thread Stefan Hajnoczi
On Tue, Dec 11, 2012 at 10:20:15PM +0800, Amos Kong wrote: We don't clean up network if fails to parse -device parameters without calling net_cleanup(). I touch a problem, the tap device which is created by qemu-ifup script could not be removed by qemu-ifdown script. Some similar problems also

Re: [Qemu-devel] [PATCH 0/2] i2c: Add AT24Cxx EEPROM model

2012-12-18 Thread Stefan Hajnoczi
On Wed, Dec 12, 2012 at 10:44:10AM +0100, Jan Kiszka wrote: On 2012-11-19 15:24, Jan Kiszka wrote: See patches for details. Jan Kiszka (2): i2c: Introduce device address mask Add AT24Cxx I2C EEPROM device model hw/Makefile.objs |2 +- hw/at24.c| 363

Re: [Qemu-devel] [PATCH 01/10] ide: Break all non-qdevified controllers

2012-12-18 Thread Peter Maydell
On 18 December 2012 12:44, Markus Armbruster arm...@redhat.com wrote: Peter Maydell peter.mayd...@linaro.org writes: We really need a better way to mark devices as obsolete, will be removed/broken/etc in a future version... Yes, we do. These devices, however, are a slightly different case:

Re: [Qemu-devel] [PATCH] virtio-blk: Return UNSUPP for unknown request types

2012-12-18 Thread Stefan Hajnoczi
On Thu, Dec 13, 2012 at 09:03:43AM +0200, Alexey Zaytsev wrote: Currently, all unknown requests are treated as VIRTIO_BLK_T_IN Signed-off-by: Alexey Zaytsev alexey.zayt...@gmail.com --- Sorry, made a typo when formatting the patch, please consider this one. hw/virtio-blk.c |6 +-

[Qemu-devel] [RFC PATCH v4 03/30] [SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-12-18 Thread Vasilis Liaskovitis
Extend the DSDT to include methods for handling memory hot-add and hot-remove notifications and memory device status requests. These functions are called from the memory device SSDT methods. --- src/acpi-dsdt-mem-hotplug.dsl | 57 + src/acpi-dsdt.dsl

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Peter Maydell
On 18 December 2012 13:10, Michael S. Tsirkin m...@redhat.com wrote: And what makes virtio so special anyway? e1000 can be used without exposing users to internal buses and all kind of nastiness like this. Congratulations, you're using an architecture that has a pluggable discoverable bus

[Qemu-devel] [RFC PATCH v4 08/30] qemu-option: export parse_option_number

2012-12-18 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- qemu-option.c |2 +- qemu-option.h |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 38e0a11..88fd370 100644 --- a/qemu-option.c +++ b/qemu-option.c @@

[Qemu-devel] [PATCH 1/3] msi: add API to get notified about pending bit poll

2012-12-18 Thread Michael S. Tsirkin
Update all users. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci/msix.c | 13 - hw/pci/msix.h | 3 ++- hw/pci/pci.h| 4 hw/vfio_pci.c | 2 +- hw/virtio-pci.c | 3 ++- 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/hw/pci/msix.c

Re: [Qemu-devel] KVM call agenda for 2012-12-18

2012-12-18 Thread Anthony Liguori
Juan Quintela quint...@redhat.com writes: Hi Please send in any agenda topics that you have. I have a conflicting call today so I can't attend. Regards, Anthony Liguori Thanks, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[Qemu-devel] [RFC PATCH v4 05/30] [SeaBIOS] q35: Add memory hotplug handler

2012-12-18 Thread Vasilis Liaskovitis
--- src/q35-acpi-dsdt.dsl |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/q35-acpi-dsdt.dsl b/src/q35-acpi-dsdt.dsl index c031d83..5b28d72 100644 --- a/src/q35-acpi-dsdt.dsl +++ b/src/q35-acpi-dsdt.dsl @@ -403,7 +403,7 @@ DefinitionBlock ( } #include

[Qemu-devel] [RFC PATCH v4 19/30] Implement info memory-total and query-memory-total

2012-12-18 Thread Vasilis Liaskovitis
Returns total physical memory available to guest in bytes, including hotplugged memory. Note that the number reported here may be different from what the guest sees e.g. if the guest has not logically onlined hotplugged memory. This functionality is provided independently of a balloon device,

[Qemu-devel] [RFC PATCH v4 12/30] acpi_ich9 : Implement memory device hotplug registers

2012-12-18 Thread Vasilis Liaskovitis
This implements acpi dimm hot-add capability for q35 (ich9). The logic is the same as for the pc machine (piix4). TODO: Fix acpi irq delivery bug. Currently there is a flood of irqs when delivering an acpi interrupt (should be just one). Guest complains as follows: irq 9: nobody cared [...]

Re: [Qemu-devel] KVM call agenda for 2012-12-18

2012-12-18 Thread Juan Quintela
Juan Quintela quint...@redhat.com wrote: Hi Please send in any agenda topics that you have. As there are no topics, call is cancelled. Later, Juan.

[Qemu-devel] [RFC PATCH v4 13/30] piix_pci and pc_piix: refactor

2012-12-18 Thread Vasilis Liaskovitis
Refactor code so that chipset initialization is similar to q35. This will allow memory map initialization at chipset qdev init time for both machines, as well as more similar code structure overall. Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/pc_piix.c | 57

[Qemu-devel] [RFC PATCH v4 16/30] pc: Add dimm paravirt SRAT info

2012-12-18 Thread Vasilis Liaskovitis
The numa_fw_cfg paravirt interface is extended to include SRAT information for all hotplug-able dimms. There are 3 words for each hotplug-able memory slot, denoting start address, size and node proximity. The new info is appended after existing numa info, so that the fw_cfg layout does not break.

Re: [Qemu-devel] [PATCH v3 1/2] cutils:change strtosz_suffix_unit function

2012-12-18 Thread Stefan Hajnoczi
On Mon, Dec 17, 2012 at 09:49:22AM +0800, liguang wrote: if value to be translated is larger than INT64_MAX, this function will not be convenient for caller to be aware of it, so change a little for this. Signed-off-by: liguang lig.f...@cn.fujitsu.com --- cutils.c |6 -- 1 files

[Qemu-devel] [RFC PATCH v4 26/30] Implement qmp and hmp commands for notification lists

2012-12-18 Thread Vasilis Liaskovitis
Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. This patch implements a tail queue to store guest notifications for memory hot-add and hot-remove requests. Guest responses for memory hotplug command on a per-dimm basis can be detected with the new hmp command info

Re: [Qemu-devel] [PATCH 0/2] i2c: Add AT24Cxx EEPROM model

2012-12-18 Thread Andreas Färber
Am 12.12.2012 10:44, schrieb Jan Kiszka: On 2012-11-19 15:24, Jan Kiszka wrote: See patches for details. Jan Kiszka (2): i2c: Introduce device address mask Add AT24Cxx I2C EEPROM device model hw/Makefile.objs |2 +- hw/at24.c| 363

Re: [Qemu-devel] [PATCH 1/4] block: Add special error code for wrong format

2012-12-18 Thread Stefan Hajnoczi
On Sat, Dec 15, 2012 at 03:09:30PM +0100, Stefan Weil wrote: The block drivers normally return -errno for typical errors. There is no appropriate error code for wrong format, so use a special error code which does not conflict with system error codes. ENOTTY is used when something is of the

[Qemu-devel] [RFC PATCH v4 22/30] [SeaBIOS] acpi: add _EJ0 operation and eject port for memory devices

2012-12-18 Thread Vasilis Liaskovitis
This will allow hot-remove signalling from/to qemu and acpi-enabled guest. --- src/acpi-dsdt-mem-hotplug.dsl | 15 +++ src/ssdt-mem.dsl |3 +++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt-mem-hotplug.dsl

[Qemu-devel] [RFC PATCH v4 24/30] acpi_piix4: add hot-remove capability

2012-12-18 Thread Vasilis Liaskovitis
--- docs/specs/acpi_hotplug.txt |8 hw/acpi_piix4.c | 29 - 2 files changed, 36 insertions(+), 1 deletions(-) diff --git a/docs/specs/acpi_hotplug.txt b/docs/specs/acpi_hotplug.txt index 8391713..cf86242 100644 ---

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Paolo Bonzini
Il 18/12/2012 15:00, Peter Maydell ha scritto: On 18 December 2012 13:10, Michael S. Tsirkin m...@redhat.com wrote: And what makes virtio so special anyway? e1000 can be used without exposing users to internal buses and all kind of nastiness like this. Congratulations, you're using an

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Michael S. Tsirkin
On Tue, Dec 18, 2012 at 02:00:11PM +, Peter Maydell wrote: On 18 December 2012 13:10, Michael S. Tsirkin m...@redhat.com wrote: And what makes virtio so special anyway? e1000 can be used without exposing users to internal buses and all kind of nastiness like this. Congratulations,

Re: [Qemu-devel] [RFC PATCH v6 0/6] Virtio refactoring.

2012-12-18 Thread Peter Maydell
On 18 December 2012 14:36, Paolo Bonzini pbonz...@redhat.com wrote: Yes, that's true. And you're basically using virtio as the pluggable discoverable bus, which is actually a pretty good idea. However, what you are doing is very similar to what virtio-s390 does, and it manages to do it just

Re: [Qemu-devel] [PATCH v6 12/12] virtio-blk: add x-data-plane=on|off performance feature

2012-12-18 Thread Stefan Hajnoczi
On Sun, Dec 16, 2012 at 06:08:53PM +0200, Michael S. Tsirkin wrote: On Mon, Dec 10, 2012 at 02:09:45PM +0100, Stefan Hajnoczi wrote: @@ -33,6 +34,7 @@ typedef struct VirtIOBlock VirtIOBlkConf *blk; unsigned short sector_mask; DeviceState *qdev; +VirtIOBlockDataPlane

Re: [Qemu-devel] [PATCH v2 3/5] s390: Add new channel I/O based virtio transport.

2012-12-18 Thread Cornelia Huck
On Tue, 18 Dec 2012 09:45:27 +0100 Paolo Bonzini pbonz...@redhat.com wrote: Il 04/09/2012 17:13, Cornelia Huck ha scritto: +VirtioCcwBus *virtio_ccw_bus_init(void) +{ +VirtioCcwBus *cbus; +BusState *bus; +DeviceState *dev; + +/* Create bridge device */ +dev =

  1   2   3   >