Re: [Qemu-devel] [PATCH v6 0/7] RTC: New logic to emulate RTC

2012-05-17 Thread Paolo Bonzini
Il 18/05/2012 01:59, Zhang, Yang Z ha scritto: > Thanks for reviewing it! It's ok for me. > Will you pay effort to put it into 1.2? I will greatly appreciate it if you > can do it.:) Yes, I can do that. Paolo

Re: [Qemu-devel] [PATCH 13/13] iommu: Add a memory barrier to DMA RW function

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 02:24, Benjamin Herrenschmidt ha scritto: >> > Also, should I make the barrier conditional to kvm_enabled() ? IE. It's >> > pointless in full emulation and might actually be a performance hit on >> > something already quite slow... > Finally ... something like smp_mb() in qemu will tu

[Qemu-devel] Sparc-softmmu -- Debugging Results and Suggestions Request

2012-05-17 Thread Paul Wilhelm
Sirs, I've been trying to debug a problem with Solaris 8 running on sparc-softmmu. The syslog daemon in very unreliable (about 7 of 8 starts of the syslog daemon end in a daemon hang - the daemon can be "killed" and restarted manually). *Background:* I looked at the syslogd.c code on the Oracle w

[Qemu-devel] Cursor hidden with emulated touchscreen

2012-05-17 Thread James Hogan
Hi, Since updating to QEMU v1.0 I've had a problem with automatic mouse grab. Whenever I move the mouse over the QEMU window it seems to make the mouse cursor invisible, but the input device being emulated is a touchscreen providing absolute coordinates so the software in the emulator doesn't prov

Re: [Qemu-devel] [RFC PATCH] qemu pci: pci_add_capability enhancement to prevent damaging config space

2012-05-17 Thread Alexey Kardashevskiy
Alexander, Is that any better? :) @@ -1779,11 +1779,29 @@ static void pci_del_option_rom(PCIDevice *pdev) * in pci config space */ int pci_add_capability(PCIDevice *pdev, uint8_t cap_id, uint8_t offset, uint8_t size) { -uint8_t *config; +uint8_t *config, exist

Re: [Qemu-devel] [PATCH 03/15] Openrisc: add instructions translation

2012-05-17 Thread 陳韋任
> >> + ? 坟witch (op0) { > >> + ? ?case 0x10: ? ?/*lf.add.d*/ > >> + ? ? ? 猂OG_DIS("lf.add.d r%d, r%d, r%d\n", rd, ra, rb); > >> + ? ? ? 慯cg_gen_add_i64(cpu_R[rd], cpu_R[ra], cpu_R[rb]); > > > > Through this function you generate integer operations on the > > registers, although ISA > > suggests tha

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-17 Thread 陳韋任
> > This is a mix of two ways of doing the same thing. You should only use > > VMState for new code. > > > > did you mean I should not use QEMUFile? I guess what Andreas means is there are two ways to do cpu_save/cpu_load, the one you wrote is the old style. For the brand new target, you should

Re: [Qemu-devel] [PATCH] kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNC

2012-05-17 Thread Marcelo Tosatti
On Wed, May 16, 2012 at 02:31:37PM +0300, Avi Kivity wrote: > Signed-off-by: Avi Kivity > --- > scripts/kvm/vmxcap | 13 + > 1 file changed, 13 insertions(+) Applied to uq/master, thanks.

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-17 Thread 陳韋任
> > Pleave avoid unnecessary uppercase spelling: OpenRISCCPUClass? That > > distinguishes it from the all-uppercase cast macros. > > > > Or OpenriscCPUClass as you spell it elsewhere? > > > > I used OPENRISCCPU in the code, if it is not good, I can change it > into OpenriscCPU. I think OpenRISC

Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions

2012-05-17 Thread David Gibson
On Thu, May 17, 2012 at 05:09:22PM -0500, Anthony Liguori wrote: > On 05/16/2012 09:44 PM, Benjamin Herrenschmidt wrote: > >On Wed, 2012-05-16 at 21:28 -0500, Anthony Liguori wrote: > > > >>>@@ -2794,6 +2795,9 @@ void *qemu_get_ram_ptr(ram_addr_t addr) > >>> { > >>> RAMBlock *block; > >>> >

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-17 Thread Jia Liu
Hi Andreas, Thanks for your comment. On Thu, May 17, 2012 at 10:14 PM, Andreas Färber wrote: > Am 17.05.2012 10:35, schrieb Jia Liu: >> add the openrisc target stub and basic implementation. >> >> Signed-off-by: Jia Liu >> --- >> diff --git a/target-openrisc/cpu-qom.h b/target-openrisc/cpu-qom.

Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions

2012-05-17 Thread Benjamin Herrenschmidt
On Thu, 2012-05-17 at 17:09 -0500, Anthony Liguori wrote: > ld/st should not ever be used by device emulation because they use a concept > of > "target endianness" that doesn't exist for devices. Hrm, there's a bit of both, some of them even have explicit endianness arguments and some of them a

Re: [Qemu-devel] [PATCH 03/15] Openrisc: add instructions translation

2012-05-17 Thread Jia Liu
Hi Max Thanks for comments. On Thu, May 17, 2012 at 8:11 PM, Max Filippov wrote: > Hi. > > I've got a couple of questions/suggestions regarding the code. > > On Thu, May 17, 2012 at 12:35 PM, Jia Liu wrote: >> add the openrisc instructions translation. >> >> Signed-off-by: Jia Liu > > [...] >

[Qemu-devel] [PATCH] s390x: fix s390 virtio aliases

2012-05-17 Thread Alexander Graf
Some of the virtio devices have the same frontend name, but actually implement different devices behind the scenes through aliases. The indicator which device type to use is the architecture. On s390, we want s390 virtio devices. On everything else, we want PCI devices. Reflect this in the alias

Re: [Qemu-devel] [PATCH] Fix legacy device aliases for s390

2012-05-17 Thread Anthony Liguori
On 05/17/2012 05:57 PM, Alexander Graf wrote: On 03.05.2012, at 15:34, Alexander Graf wrote: On 03.05.2012, at 14:32, Anthony Liguori wrote: On 05/03/2012 04:07 AM, Alexander Graf wrote: On 03.05.2012, at 11:05, Paolo Bonzini wrote: The usual old fix was to not even compile them in. W

Re: [Qemu-devel] [PATCH] Fix size checking in load_image_targphys to accept max_size > INT_MAX

2012-05-17 Thread Anthony Liguori
On 05/17/2012 07:18 PM, Alexander Graf wrote: On 16.05.2012, at 12:29, Christian Borntraeger wrote: On 03/05/12 16:33, Peter Maydell wrote: On 3 May 2012 15:27, Christian Borntraeger wrote: commit 17df768c1e4580f03301d18ea938d3557d441911 load_image_targphys() should enforce the max size

Re: [Qemu-devel] [PATCH] Fix size checking in load_image_targphys to accept max_size > INT_MAX

2012-05-17 Thread Alexander Graf
On 16.05.2012, at 12:29, Christian Borntraeger wrote: > On 03/05/12 16:33, Peter Maydell wrote: >> On 3 May 2012 15:27, Christian Borntraeger wrote: >>> commit 17df768c1e4580f03301d18ea938d3557d441911 >>> load_image_targphys() should enforce the max size >>> >>> caused some problems with exter

Re: [Qemu-devel] [PATCH v6 0/7] RTC: New logic to emulate RTC

2012-05-17 Thread Zhang, Yang Z
> -Original Message- > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Cc: 'qemu-devel@nongnu.org'; 'aligu...@us.ibm.com' > Subject: Re: [PATCH v6 0/7] RTC: New logic to emulate RTC > > Il 17/05/2012 04:28, Zhang, Yang Z ha scritto: > > Changes in v6: >

Re: [Qemu-devel] [PATCH] Fix legacy device aliases for s390

2012-05-17 Thread Alexander Graf
On 03.05.2012, at 15:34, Alexander Graf wrote: > > On 03.05.2012, at 14:32, Anthony Liguori wrote: > >> On 05/03/2012 04:07 AM, Alexander Graf wrote: >>> >>> On 03.05.2012, at 11:05, Paolo Bonzini wrote: >>> >> The usual old fix was to not even compile them in. Why are they in >

[Qemu-devel] [PATCH] rbd: hook up cache options

2012-05-17 Thread Josh Durgin
Writeback caching was added in Ceph 0.46, and writethrough will be in 0.47. These are controlled by general config options, so there's no need to check for librbd version. Signed-off-by: Josh Durgin --- block/rbd.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) di

Re: [Qemu-devel] [RFC/PATCH] Add a memory barrier to guest memory access functions

2012-05-17 Thread Anthony Liguori
On 05/16/2012 09:44 PM, Benjamin Herrenschmidt wrote: On Wed, 2012-05-16 at 21:28 -0500, Anthony Liguori wrote: @@ -2794,6 +2795,9 @@ void *qemu_get_ram_ptr(ram_addr_t addr) { RAMBlock *block; +/* We ensure ordering for all DMA transactions */ +dma_mb(); + I get being conse

Re: [Qemu-devel] [PATCH] Add event notification for guest balloon changes

2012-05-17 Thread Anthony Liguori
On 05/17/2012 07:56 AM, Luiz Capitulino wrote: On Thu, 17 May 2012 08:49:44 +0100 "Daniel P. Berrange" wrote: On Wed, May 16, 2012 at 01:58:34PM -0500, Anthony Liguori wrote: On 05/16/2012 01:42 PM, Luiz Capitulino wrote: On Wed, 16 May 2012 11:10:47 +0100 "Daniel P. Berrange" wrote: Fro

Re: [Qemu-devel] Add support for new image type

2012-05-17 Thread Kai Meyer
On 05/17/2012 01:43 PM, Paolo Bonzini wrote: Il 17/05/2012 19:53, Kai Meyer ha scritto: Morally it's wrong, but a copyright holder cannot stop you on moral grounds. Legally, you should consult a lawyer. What you say is morally wrong here is a bit ambiguous to me. Do you mean using modified ver

Re: [Qemu-devel] Add support for new image type

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 19:53, Kai Meyer ha scritto: >> Morally it's wrong, but a copyright holder cannot stop you on >> moral grounds. Legally, you should consult a lawyer. > What you say is morally wrong here is a bit ambiguous to me. Do you > mean using modified versions of qemu internally at StorageCraf

Re: [Qemu-devel] Memory Tracking API

2012-05-17 Thread Richard W.M. Jones
On Thu, May 17, 2012 at 11:36:24PM +0530, Jaspal wrote: > Hi , > > Is it possible to keep a count of reads / writes taking place in a > vm using qemu ( using kvm as hypervisor ) ? Is there a api ( or any > patch ) for it ? Memory reads and writes is surely going to generate a huge amount of outpu

[Qemu-devel] Memory Tracking API

2012-05-17 Thread Jaspal
Hi , Is it possible to keep a count of reads / writes taking place in a vm using qemu ( using kvm as hypervisor ) ? Is there a api ( or any patch ) for it ? Thanks , Jaspal

Re: [Qemu-devel] Add support for new image type

2012-05-17 Thread Kai Meyer
On 05/17/2012 03:41 AM, Paolo Bonzini wrote: Il 17/05/2012 11:10, Artyom Tarasenko ha scritto: To help me better understand, what would be the terminology used for the explanation between what I would call "source code" licensing, and "project" licensing? Also, where in the code (or rather what

[Qemu-devel] [Bug 498035] Re: qemu hangs on shutdown or reboot (XP guest)

2012-05-17 Thread Brian W. Neu
"Forgive me, El Guapo. I know that I, Jefe, do not have your superior intellect and education. But could it be that once again, you are angry at something else, and are looking to take it out on me?" Eh, Tokarev, calm down. So I misplaced a period and a zero. So I haven't been compiling my own b

Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Thu, May 17, 2012 at 10:56:36AM -0600, Eric Blake wrote: > On 05/17/2012 10:26 AM, Eduardo Habkost wrote: > > > The problem is that this makes the resulting CPU feature flags > > unpredictable and dependent on the host CPU and kernel version. This > > breaks live-migration badly if migrating fr

Re: [Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eric Blake
On 05/17/2012 10:26 AM, Eduardo Habkost wrote: > The problem is that this makes the resulting CPU feature flags > unpredictable and dependent on the host CPU and kernel version. This > breaks live-migration badly if migrating from a host CPU that supports > some features on that CPUID leaf (runnin

[Qemu-devel] [PULL 1.1] Xen fixes for 1.1-rc3

2012-05-17 Thread Stefano Stabellini
Hi Anthony, please pull: git://xenbits.xen.org/people/sstabellini/qemu-dm.git for_1.1_rc3 Anthony PERARD (1): xen: Fix PV-on-HVM Jan Beulich (1): xen_disk: properly update stats in ioreq_release() John V. Baboval (1): Call xc_domain_shutdown with the reboot flag when the gue

Re: [Qemu-devel] [PULL 1.1] Xen fixes for 1.1

2012-05-17 Thread Stefano Stabellini
On Tue, 15 May 2012, Stefano Stabellini wrote: > Hi Anthony, > please pull: > > git://xenbits.xen.org/people/sstabellini/qemu-dm.git for_1.1 > > > it contains 3 fixes to xen_disk and 2 patches to disable rtc_clock, > the PIT and PCSPK on Xen: > > > Jan Beulich (1): > xen_disk: properly u

[Qemu-devel] [QEMU 1.1 PATCH v2] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
Changes v1 -> v2: - Use kvm_arch_get_supported_cpuid() instead of host_cpuid() on cpu_x86_fill_host(). We should use GET_SUPPORTED_CPUID for all bits on "-cpu host" eventually, but I am not changing all the other CPUID leaves because we may not be able to test such an intrusive change

Re: [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Eric Blake
On 05/17/2012 09:34 AM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > This produces a qcow2 file which is the difference between > two disk images. ie, if: > > base.img - is a disk image (in any format) > modified.img - is base.img, copied and modified > > then: > > qem

[Qemu-devel] qxl performance problems and spice issues

2012-05-17 Thread heliman
Hello, I am testing Xen 4.2 (unstable) with Qemu 1.1rc2 and spice. I have severe video performance problems on Windows 7 guest and X fails to run on Debian wheezy and Ubuntu Precise guest. The problem may be related to Xen and I'm asking there too, but I want to make sure my invocation is correct

[Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
From: "Richard W.M. Jones" This produces a qcow2 file which is the difference between two disk images. ie, if: base.img - is a disk image (in any format) modified.img - is base.img, copied and modified then: qemu-img diff -b base.img modified.img diff.qcow2 creates 'diff.qcow2' whi

Re: [Qemu-devel] [PATCH v2] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
On Thu, May 17, 2012 at 09:15:08AM -0600, Eric Blake wrote: > On 05/17/2012 08:57 AM, Richard W.M. Jones wrote: > > +DEF("diff", img_diff, > > +"diff [-F backing_fmt] -b backing_file [-f fmt] [-O output_fmt] [-o > > options] filename output_filename") > > +STEXI > > +@item diff [-F @var{backin

Re: [Qemu-devel] [PATCH 04/13] pci: New pci_dma_quirk()

2012-05-17 Thread Alex Williamson
On Thu, 2012-05-17 at 15:19 +0800, Anonymous wrote: > Alex, > > On Sat, May 12, 2012 at 6:55 AM, Alex Williamson > wrote: > > Integrating IOMMU groups more closely into the driver core allows > > us to more easily work around DMA quirks. The Ricoh multifunction > > controller is a favorite examp

Re: [Qemu-devel] [PATCH v6 0/7] RTC: New logic to emulate RTC

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 04:28, Zhang, Yang Z ha scritto: > Changes in v6: > Rebase to latest QEMU > Fix a bug that fail to pass tests/rtc-test: > In previous version, it uses host time as the base point to calculate > guest RTC. It works when guest uses host based clock. But for vm and rt based > clo

[Qemu-devel] [PATCH 16/16] qapi: convert netdev_del

2012-05-17 Thread Luiz Capitulino
Signed-off-by: Anthony Liguori Signed-off-by: Luiz Capitulino --- hmp-commands.hx |3 +-- hmp.c|9 + hmp.h|1 + net.c| 11 +-- net.h|1 - qapi-schema.json | 14 ++ qmp-commands.hx |5 + 7 fi

[Qemu-devel] [PATCH 10/16] qerror: introduce QERR_INVALID_OPTION_GROUP

2012-05-17 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+) diff --git a/qerror.c b/qerror.c index 5092fe7..92c4eff 100644 --- a/qerror.c +++ b/qerror.c @@ -156,6 +156,10 @@ static const QErrorStringTable qerror_table[] = { .desc =

Re: [Qemu-devel] [PATCH v2] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Eric Blake
On 05/17/2012 08:57 AM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > This produces a qcow2 file which is the difference between > two disk images. ie, if: > > base.img - is a disk image (in any format) > modified.img - is base.img, copied and modified > > then: > > qem

[Qemu-devel] [PATCH 07/16] qemu-option: opt_set(): use error_set()

2012-05-17 Thread Luiz Capitulino
The functions qemu_opt_set() and opts_do_parse() both call opt_set(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 31 --- 1 file changed, 2

[Qemu-devel] [PATCH 14/16] net: net_client_init(): use error_set()

2012-05-17 Thread Luiz Capitulino
Callers are changed to use qerror_report_err() to keep their QError semantics. Signed-off-by: Luiz Capitulino --- hw/pci-hotplug.c |8 ++-- hw/usb/dev-network.c |7 +-- net.c| 53 +++--- net.h|2

[Qemu-devel] [PATCH 13/16] net: purge the monitor object from all init functions

2012-05-17 Thread Luiz Capitulino
The only backend that really uses it is the socket one, which calls monitor_get_fd(). But it can use 'cur_mon' instead. Signed-off-by: Luiz Capitulino --- hw/pci-hotplug.c |2 +- hw/usb/dev-network.c |2 +- net.c| 18 +++--- net.h|2 +

[Qemu-devel] [PATCH 08/16] qemu-option: introduce qemu_opt_set_err()

2012-05-17 Thread Luiz Capitulino
This is like qemu_opt_set(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_opt_set(). Signed-off-by: Luiz Capitulino --- qemu-option.c |6 ++ qemu-option.h |2 ++ 2 files changed, 8 insertions(+) diff --git a/qemu-o

Re: [Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
On Thu, May 17, 2012 at 07:57:31AM -0600, Eric Blake wrote: [...] I just posted a v2 patch which fixes everything you mentioned except the case of resizing the disk, which I need to think about a bit more. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones vi

[Qemu-devel] [PATCH 04/16] qemu-option: parse_option_size(): use error_set()

2012-05-17 Thread Luiz Capitulino
Signed-off-by: Luiz Capitulino --- qemu-option.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index a8b50af..61354af 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -203,7 +203,8 @@ static void parse_option_number(cons

[Qemu-devel] [PATCH 09/16] qemu-option: qemu_opts_from_qdict(): use error_set()

2012-05-17 Thread Luiz Capitulino
do_device_add() and do_netdev_add() call qerror_report_err() to maintain their QError semantics. Signed-off-by: Luiz Capitulino --- hw/qdev-monitor.c |7 +-- net.c |5 - qemu-option.c | 31 --- qemu-option.h |3 ++- 4 files ch

[Qemu-devel] [PATCH v2] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
From: "Richard W.M. Jones" This produces a qcow2 file which is the difference between two disk images. ie, if: base.img - is a disk image (in any format) modified.img - is base.img, copied and modified then: qemu-img diff -b base.img modified.img diff.qcow2 creates 'diff.qcow2' whi

[Qemu-devel] [RFC][PATCH v2 10/11] msix: Add msix_nr_vectors_allocated

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Analogously to msi_nr_vectors_allocated, add a service for MSI-X. Will be used by the virtio-pci layer. Signed-off-by: Jan Kiszka --- hw/msix.c |5 + hw/msix.h |2 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 1622e16

[Qemu-devel] [PATCH 11/16] qemu-config: find_list(): use error_set()

2012-05-17 Thread Luiz Capitulino
Note that qemu_find_opts() and qemu_config_parse() need to call error_report() to maintain their semantics on error. Signed-off-by: Luiz Capitulino --- qemu-config.c | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/qemu-config.c b/qemu-confi

[Qemu-devel] [PATCH 05/16] qemu-option: qemu_opt_parse(): use error_set()

2012-05-17 Thread Luiz Capitulino
The functions opt_set() and qemu_opts_validate() both call qemu_opt_parse(), but their callers expect QError semantics. Thus, both functions call qerro_report_err() to keep the expected semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 36 +--- 1 fil

[Qemu-devel] [RFC][PATCH v2 06/11] kvm: Publicize kvm_irqchip_release_virq

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka This allows to drop routes created by kvm_irqchip_add_irq/msi_route again. Signed-off-by: Jan Kiszka --- kvm-all.c |2 +- kvm-stub.c |4 kvm.h |1 + 3 files changed, 6 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 7f906ca..ca6ce

[Qemu-devel] [RFC][PATCH v2 04/11] kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka We will add kvm_irqchip_add_msi_route, so let's make the difference clearer. Signed-off-by: Jan Kiszka --- hw/pc_piix.c |8 kvm-all.c|2 +- kvm.h|2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c i

[Qemu-devel] [PATCH 12/16] qemu-config: introduce qemu_find_opts_err()

2012-05-17 Thread Luiz Capitulino
This is like qemu_find_opts(), except that it takes an Error argument. This new function allows for a incremental conversion of code using qemu_find_opts(). Signed-off-by: Luiz Capitulino --- qemu-config.c |5 + qemu-config.h |3 +++ 2 files changed, 8 insertions(+) diff --git a/qe

[Qemu-devel] [RFC][PATCH v2 03/11] msix: Introduce vector notifiers

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Vector notifiers shall be triggered by the MSI/MSI-X core whenever a relevant configuration change is programmed by the guest. In case of MSI-X, changes are reported when the effective mask (global && per-vector) alters its state. On unmask, the current vector configuration is in

[Qemu-devel] [PATCH 03/16] qemu-option: parse_option_bool(): use error_set()

2012-05-17 Thread Luiz Capitulino
Note that set_option_parameter() callers still expect automatic error reporting with QError, so set_option_parameter() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletio

[Qemu-devel] [PATCH 15/16] qapi: convert netdev_add

2012-05-17 Thread Luiz Capitulino
This is not a full QAPI conversion, but an intermediate step. In essence, do_netdev_add() is split into three functions: 1. netdev_add(): performs the actual work. This function is fully converted to Error (thus, it's "qapi-friendly") 2. qmp_netdev_add(): the QMP front-end for netdev_add()

[Qemu-devel] [PATCH 06/16] qemu-option: qemu_opts_validate(): use error_set()

2012-05-17 Thread Luiz Capitulino
net_client_init() propagates the error up by calling qerror_report_err(), because its users expect QError semantics. Signed-off-by: Luiz Capitulino --- net.c |6 +- qemu-option.c | 13 + qemu-option.h |2 +- 3 files changed, 11 insertions(+), 10 deletions(-) di

[Qemu-devel] [PATCH 01/16] qemu-option: qemu_opts_create(): use error_set()

2012-05-17 Thread Luiz Capitulino
This commit converts qemu_opts_create() from qerror_report() to error_set(). Currently, most calls to qemu_opts_create() can't fail, so most callers don't need any changes. The two cases where code checks for qemu_opts_create() erros are: 1. Initialization code in vl.c. All of them print their

[Qemu-devel] [PATCH 02/16] qemu-option: parse_option_number(): use error_set()

2012-05-17 Thread Luiz Capitulino
Note that qemu_opt_parse() callers still expect automatic error reporting with QError, so qemu_opts_parse() calls qerror_report_err() to keep the same semantics. Signed-off-by: Luiz Capitulino --- qemu-option.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH qmp-next v4 00/16]: qapi: convert netdev_add & netdev_del

2012-05-17 Thread Luiz Capitulino
v4 - Fix vde build [Laszlo] - Rebase on top of qmp-next (which contains latest master) [Me] blockdev.c |2 +- hmp-commands.hx |6 +- hmp.c| 30 + hmp.h|2 + hw/pci-hotplug.c |8 ++- hw/qdev-monitor.c|7 +- hw/us

[Qemu-devel] [RFC][PATCH v2 07/11] kvm: Make kvm_irqchip_commit_routes an internal service

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Automatically commit route changes after kvm_add_routing_entry and kvm_irqchip_release_virq. There is no performance relevant use case for which collecting multiple route changes is beneficial. This makes kvm_irqchip_commit_routes an internal service which assert()s that the corr

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Andreas Färber
Am 17.05.2012 11:23, schrieb Alex Barcelo: > Running it in a i386 machine works and gives an output of "0x0d\n0x20". > Running it in a qemu-i386 segfaults. Because the self-modifying code > raises a SIGSEGV in the qemu (I understand that it is the method used by > qemu to handle self-modifying code

[Qemu-devel] [RFC][PATCH v2 00/11] uq/master: irqfd-based interrupt injection for virtio/vhost

2012-05-17 Thread Jan Kiszka
[ changes in v2: rebase over uq/master ] This series is another major milestone of merging qemu-kvm into upstream. It implements the required interfaces and logic to directly inject MSI-X interrupts generated by the vhost-net kernel module into the KVM in-kernel irqchip. This involves - establish

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Andreas Färber
Am 17.05.2012 15:42, schrieb Peter Maydell: > On 17 May 2012 14:33, Andreas Färber wrote: >> Am 17.05.2012 11:23, schrieb Alex Barcelo: >>> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >>> Running it in a qemu-i386 segfaults. Because the self-modifying code >>> raises a

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-17 Thread Eric Blake
On 05/17/2012 07:42 AM, Stefan Hajnoczi wrote: >>> >>> The -open-hook-fd approach allows QEMU to support file descriptor passing >>> without changing -drive. It also supports snapshot_blkdev and other >>> commands >> By the way, How will it support them? > > The problem with snapshot_blkdev is

Re: [Qemu-devel] [PATCH 01/15] Openrisc: add target stub

2012-05-17 Thread Andreas Färber
Am 17.05.2012 10:35, schrieb Jia Liu: > add the openrisc target stub and basic implementation. > > Signed-off-by: Jia Liu > --- > diff --git a/target-openrisc/cpu-qom.h b/target-openrisc/cpu-qom.h > new file mode 100644 > index 000..8c936df > --- /dev/null > +++ b/target-openrisc/cpu-qom.h F

[Qemu-devel] [RFC][PATCH v2 05/11] kvm: Introduce kvm_irqchip_add_msi_route

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Add a service that establishes a static route from a virtual IRQ line to an MSI message. Will be used for IRQFD and device assignment. As we will use this service outside of CONFIG_KVM protected code, stub it properly. Signed-off-by: Jan Kiszka --- kvm-all.c | 31 ++

[Qemu-devel] [RFC][PATCH v2 08/11] kvm: Introduce kvm_irqchip_add/remove_irqfd

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Add services to associate an eventfd file descriptor as input with an IRQ line as output. Such a line can be an input pin of an in-kernel irqchip or a virtual line returned by kvm_irqchip_add_route. Signed-off-by: Jan Kiszka --- kvm-all.c | 30 ++

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-17 Thread Zhi Yong Wu
On Thu, May 17, 2012 at 9:42 PM, Stefan Hajnoczi wrote: > On Fri, May 04, 2012 at 11:28:47AM +0800, Zhi Yong Wu wrote: >> On Tue, May 1, 2012 at 11:31 PM, Stefan Hajnoczi >> wrote: >> > Libvirt can take advantage of SELinux to restrict the QEMU process and >> > prevent >> > it from opening files

Re: [Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
On Thu, May 17, 2012 at 02:52:56PM +0100, Peter Maydell wrote: > On 17 May 2012 14:44, Richard W.M. Jones wrote: > > From: "Richard W.M. Jones" > > > > This produces a qcow2 file which is the different between > > two disk images.  ie, if: > > > >  original.img - is a disk image (in any format) >

Re: [Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Eric Blake
On 05/17/2012 07:52 AM, Peter Maydell wrote: > On 17 May 2012 14:44, Richard W.M. Jones wrote: >> From: "Richard W.M. Jones" >> >> This produces a qcow2 file which is the different between >> two disk images. ie, if: >> >> original.img - is a disk image (in any format) >> modified.img - is a m

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-17 Thread Zhi Yong Wu
On Thu, May 17, 2012 at 9:42 PM, Stefan Hajnoczi wrote: > On Fri, May 04, 2012 at 11:28:47AM +0800, Zhi Yong Wu wrote: >> On Tue, May 1, 2012 at 11:31 PM, Stefan Hajnoczi >> wrote: >> > Libvirt can take advantage of SELinux to restrict the QEMU process and >> > prevent >> > it from opening files

Re: [Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Eric Blake
On 05/17/2012 07:44 AM, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > This produces a qcow2 file which is the different between > two disk images. ie, if: > > original.img - is a disk image (in any format) > modified.img - is a modified version of original.img > > then: > >

Re: [Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Peter Maydell
On 17 May 2012 14:44, Richard W.M. Jones wrote: > From: "Richard W.M. Jones" > > This produces a qcow2 file which is the different between > two disk images.  ie, if: > >  original.img - is a disk image (in any format) >  modified.img - is a modified version of original.img > > then: > >  qemu-im

[Qemu-devel] [RFC][PATCH v2 11/11] virtio/vhost: Add support for KVM in-kernel MSI injection

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Make use of the new vector notifier to track changes of the MSI-X configuration of virtio PCI devices. On enabling events, we establish the required virtual IRQ to MSI-X message route and link the signaling eventfd file descriptor to this vIRQ line. That way, vhost-generated inte

Re: [Qemu-devel] [PATCH] Add event notification for guest balloon changes

2012-05-17 Thread Luiz Capitulino
On Thu, 17 May 2012 08:49:44 +0100 "Daniel P. Berrange" wrote: > On Wed, May 16, 2012 at 01:58:34PM -0500, Anthony Liguori wrote: > > On 05/16/2012 01:42 PM, Luiz Capitulino wrote: > > >On Wed, 16 May 2012 11:10:47 +0100 > > >"Daniel P. Berrange" wrote: > > > > > >>From: "Daniel P. Berrange" > >

[Qemu-devel] [PATCH] qemu-img: Implement 'diff' operation.

2012-05-17 Thread Richard W.M. Jones
From: "Richard W.M. Jones" This produces a qcow2 file which is the different between two disk images. ie, if: original.img - is a disk image (in any format) modified.img - is a modified version of original.img then: qemu-img diff -b original.img modified.img diff.qcow2 creates 'diff.qc

Re: [Qemu-devel] [libvirt] [RFC 0/5] block: File descriptor passing using -open-hook-fd

2012-05-17 Thread Stefan Hajnoczi
On Fri, May 04, 2012 at 11:28:47AM +0800, Zhi Yong Wu wrote: > On Tue, May 1, 2012 at 11:31 PM, Stefan Hajnoczi > wrote: > > Libvirt can take advantage of SELinux to restrict the QEMU process and > > prevent > > it from opening files that it should not have access to.  This improves > > security

Re: [Qemu-devel] Signal management in qemu-user

2012-05-17 Thread Peter Maydell
On 17 May 2012 14:33, Andreas Färber wrote: > Am 17.05.2012 11:23, schrieb Alex Barcelo: >> Running it in a i386 machine works and gives an output of "0x0d\n0x20". >> Running it in a qemu-i386 segfaults. Because the self-modifying code >> raises a SIGSEGV in the qemu (I understand that it is the m

[Qemu-devel] [RFC][PATCH v2 09/11] kvm: Enable use of kvm_irqchip_in_kernel in hwlib code

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka Provide a dummy kvm_kernel_irqchip so that kvm_irqchip_in_kernel can be used by code that is not under CONFIG_KVM protection. Signed-off-by: Jan Kiszka --- kvm-stub.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kvm-stub.c b/kvm-stub.c index b4cf03f

[Qemu-devel] [RFC][PATCH v2 01/11] msix: Factor out msix_get_message

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka This helper will also be used by the upcoming config notifier. Signed-off-by: Jan Kiszka --- hw/msix.c | 19 +-- 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/hw/msix.c b/hw/msix.c index 3835eaa..3197465 100644 --- a/hw/msix.c +++ b/hw/msix.

[Qemu-devel] [RFC][PATCH v2 02/11] msix: Invoke msix_handle_mask_update on msix_mask_all

2012-05-17 Thread Jan Kiszka
From: Jan Kiszka In preparation of firing vector notifiers on mask changes, call msix_handle_mask_update also from msix_mask_all. So far, this will have no real effect. Signed-off-by: Jan Kiszka --- hw/msix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/msix.c

Re: [Qemu-devel] [QEMU] net: adapt dump to support the new syntax

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 12:05, Zhi Yong Wu ha scritto: > On Thu, May 17, 2012 at 5:51 PM, Paolo Bonzini wrote: >>> This case has existed in current upstream code, not only vlan-hub >>> code. Currently can_send function has been called by backend send >>> function before deliver/deliver_iov, If we put can_se

Re: [Qemu-devel] [QEMU 1.1 PATCH] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Wed, May 16, 2012 at 05:58:05PM -0300, Eduardo Habkost wrote: [...] > @@ -521,6 +523,13 @@ static int cpu_x86_fill_host(x86_def_t *x86_cpu_def) > x86_cpu_def->ext_features = ecx; > x86_cpu_def->features = edx; > > +if (x86_cpu_def->level >= 7) { > +host_cpuid(0x7, 0, &eax

Re: [Qemu-devel] [PATCH v10 8/9] Add set_cachesize command

2012-05-17 Thread Orit Wasserman
On 05/17/2012 12:46 PM, Avi Kivity wrote: > On 05/16/2012 08:58 PM, Eric Blake wrote: >> On 05/16/2012 11:04 AM, Orit Wasserman wrote: >> > +- "value": cache size in bytes (json-int) Would it be any easier to take 'order' (log2 of the size) instead of the actual cache size? That

Re: [Qemu-devel] [QEMU 1.1 PATCH] Expose CPUID leaf 7 only for -cpu host

2012-05-17 Thread Eduardo Habkost
On Wed, May 16, 2012 at 09:32:44PM -0500, Anthony Liguori wrote: > On 05/16/2012 03:58 PM, Eduardo Habkost wrote: > >Description of the bug: > > > >Since QEMU 0.15, the CPUID information on CPUID[EAX=7,ECX=0] is being > >returned unfiltered to the guest, directly from the GET_SUPPORTED_CPUID > >ret

Re: [Qemu-devel] [PATCH 03/15] Openrisc: add instructions translation

2012-05-17 Thread Max Filippov
Hi. I've got a couple of questions/suggestions regarding the code. On Thu, May 17, 2012 at 12:35 PM, Jia Liu wrote: > add the openrisc instructions translation. > > Signed-off-by: Jia Liu [...] > +    case 0x0009: > +        switch (op1) { > +        case 0x03:   /*l.div*/ > +            LOG_

Re: [Qemu-devel] Add support for new image type

2012-05-17 Thread Artyom Tarasenko
On Thu, May 17, 2012 at 11:41 AM, Paolo Bonzini wrote: > To help me better understand, what would >>> be the terminology used for the explanation between what I would call >>> "source code" licensing, and "project" licensing? Also, where in the code >>> (or rather what file) can I see this distinc

Re: [Qemu-devel] [PATCH 1.1 V2] xen: Fix PV-on-HVM

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 12:35, Stefano Stabellini ha scritto: > On Wed, 16 May 2012, Anthony PERARD wrote: >> In the context of PV-on-HVM under Xen, the emulated nics are supposed to be >> unplug before the guest drivers are initialized, when the guest write to a >> specific IO port. >> >> Without this patch

Re: [Qemu-devel] [PATCH v6 2/7] RTC: Update the RTC clock only when reading it

2012-05-17 Thread Paolo Bonzini
Note: I haven't tested this series yet. Thanks for finding the problem! Il 17/05/2012 04:28, Zhang, Yang Z ha scritto: > Use offset instead of timer to calculate guest rtc. Guest rtc is calculated > by (base_rtc + guest_time_now - guest_time_last_update_rtc + offset). > Base_rtc means the rtc va

Re: [Qemu-devel] [PATCH 1.1 V2] xen: Fix PV-on-HVM

2012-05-17 Thread Stefano Stabellini
On Wed, 16 May 2012, Anthony PERARD wrote: > In the context of PV-on-HVM under Xen, the emulated nics are supposed to be > unplug before the guest drivers are initialized, when the guest write to a > specific IO port. > > Without this patch, the guest end up with two nics with the same MAC, the >

Re: [Qemu-devel] [PATCH v6 4/7] RTC: Add divider reset support

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 04:28, Zhang, Yang Z ha scritto: > > +static int32_t divider_reset; This must be a variable inside RTCState. The remark about inlining rtc_set_offset applies here as well. Paolo > +static inline bool rtc_running(RTCState *s) > +{ > +return (!(s->cmos_data[RTC_REG_B] & REG_B_S

Re: [Qemu-devel] [QEMU] net: adapt dump to support the new syntax

2012-05-17 Thread Zhi Yong Wu
On Thu, May 17, 2012 at 5:51 PM, Paolo Bonzini wrote: > Il 17/05/2012 07:59, Zhi Yong Wu ha scritto: >>> > However, then I noticed that qemu_can_send_packet is not called very much, >>> > and I do not understand why qemu_net_queue_send and >>> > qemu_net_queue_send_iov >>> > do not call qemu_can_

Re: [Qemu-devel] [PATCH 2/2] Get system state configuration from QEMU and patcth DSDT with it.

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 02:24, Kevin O'Connor ha scritto: >> > Can we build an SSDT that includes the contents of fw_cfg (e.g. >> > FW_CFG_SIGNATURE at offset 0, FW_CFG_UUID at offset 4, FW_CFG_NOGRAPHIC >> > at offset 16... the entry <-> offset mapping and the defaults would be >> > part of SeaBIOS), and th

[Qemu-devel] [PATCH 2/2] [kvm/vhost-net]: make vhost net own NUMA attribute

2012-05-17 Thread Liu Ping Fan
From: Liu Ping Fan Make vhost net support to spread on host node according the command. And consider the whole vhost_net componsed of lots of logic net units. for each node, there is a unit, which includes a vhost_worker thread, rx/tx vhost_virtqueue. Signed-off-by: Liu Ping Fan --- drivers/vh

Re: [Qemu-devel] [QEMU] net: adapt dump to support the new syntax

2012-05-17 Thread Paolo Bonzini
Il 17/05/2012 07:59, Zhi Yong Wu ha scritto: >> > However, then I noticed that qemu_can_send_packet is not called very much, >> > and I do not understand why qemu_net_queue_send and qemu_net_queue_send_iov >> > do not call qemu_can_send_packet before calling deliver/deliver_iov. > This case has exi

Re: [Qemu-devel] [PATCH v10 8/9] Add set_cachesize command

2012-05-17 Thread Avi Kivity
On 05/16/2012 08:58 PM, Eric Blake wrote: > On 05/16/2012 11:04 AM, Orit Wasserman wrote: > > >>> +- "value": cache size in bytes (json-int) > >> > >> Would it be any easier to take 'order' (log2 of the size) instead of the > >> actual cache size? That is, instead of calling "value":1048576, I wou

  1   2   >