Re: [Qemu-devel] Dynamic Binary Instrumentation

2012-09-20 Thread Wei-Ren Chen
Hi Liuis, On Tue, Sep 04, 2012 at 10:08:09PM +0200, Lluís Vilanova wrote: > Hi there, > > Given that right now I don't have enough time to write the paper that should > accompany this work, I've decided to open it up so that whoever is interested > can have access to it. > > You can get some ins

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-20 Thread Gerd Hoffmann
On 09/20/12 17:33, Stefano Stabellini wrote: > On Thu, 20 Sep 2012, Stefano Stabellini wrote: >> On Thu, 20 Sep 2012, Gerd Hoffmann wrote: >>> Hi, >>> > In any graphics mode relevant today vga emulation will use > qemu_create_displaysurface_from(). Whenever a DisplayAllocator is > pr

[Qemu-devel] RFC: target-ppc savevm fixup, cleanup and conversion to VMState

2012-09-20 Thread David Gibson
Hi Alex, Juan, I know Juan has an outstanding patch that converts target-ppc to use the new VMStateDescription approach for savevm at http://lists.gnu.org/archive/html/qemu-devel/2012-05/msg00532.html Before I noticed that patch was out there, I had done my own conversion (patch below) using a d

[Qemu-devel] [PATCH 4/4] pseries: Remove unnecessary locking from PAPR hash table hcalls

2012-09-20 Thread David Gibson
In the paravirtualized environment provided by PAPR, there is a standard locking scheme so that hypercalls updating the hash page table from different guest threads don't corrupt the haah table state. We implement this HVLOCK bit in out page table hypercalls. However, it is not necessary in our c

Re: [Qemu-devel] [PATCH v7 5/5] block: Support GlusterFS as a QEMU block backend.

2012-09-20 Thread Bharata B Rao
On Thu, Sep 20, 2012 at 05:08:56PM +0200, Paolo Bonzini wrote: > > Just shooting around a possibility: why reinvent the wheel poorly if we > can use a full-blown URI parsing library? The libxml2 one is very good > and easy to use. > > It is also pretty much self-contained and has hardly seen a c

[Qemu-devel] [0/4] pseries patches for comment

2012-09-20 Thread David Gibson
Alex, If you think these patches are ready, I'll certain be happy to see them applied. However, I suspect you (and/or others) will have comments on how they're implemented, particularly 2-4. If so, I hope to get those as soon as convenient so I can revise as necessary well before the next releas

[Qemu-devel] [PATCH 3/4] target-ppc: Extend FPU state for newer POWER CPUs

2012-09-20 Thread David Gibson
This patch adds some extra FPU state to CPUPPCState. Specifically, fpscr is extended to 64 bits, since some recent CPUs now have more status bits than fit inside 64 bits, and we add the 32 VSR registers present on CPUs with VSX (these extend the standard FP regs, which together with the Altivec/VM

[Qemu-devel] [PATCH 2/4] target-ppc: Remove unused power_mode field from cpu state

2012-09-20 Thread David Gibson
CPUPPCState includes a variable 'power_mode' which is used nowhere. This patch removes it. This includes saving a dummy zero in its place during vmsave, to avoid breaking the save format. Signed-off-by: David Gibson --- target-ppc/cpu.h |1 - target-ppc/machine.c |4 ++-- 2 files c

[Qemu-devel] [PATCH 1/4] pseries: Set hash table size based on RAM size

2012-09-20 Thread David Gibson
Currently the pseries machine code always attempts to set the size of the guests's hash page table to 16MB. However, because of the way the POWER MMU works, a suitable hash page table size should really depend on memory size. 16MB will be excessive for guests with <1GB and RAM, and may not be eno

[Qemu-devel] RFC: NVRAM for pseries machine

2012-09-20 Thread David Gibson
Below is a patch which implements the (PAPR mandated) NVRAM for the pseries machine. It raises a couple of generic questions. First, this adds a new "nvram" machine option which is used to give a block device id to back the NVRAM so it is persistent. Since some sort of NVRAM is quite common, it

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/2] pseries: Synchronize qemu and KVM state on hypercalls

2012-09-20 Thread David Gibson
On Thu, Sep 20, 2012 at 02:44:26PM +0200, Alexander Graf wrote: > > On 20.09.2012, at 13:53, David Gibson wrote: > > > On Thu, Sep 20, 2012 at 09:38:58AM +0200, Alexander Graf wrote: > >> > >> On 20.09.2012, at 09:08, David Gibson wrote: > >> > >>> Currently the KVM exit path for PAPR hypercall

[Qemu-devel] [PATCH 1/2] tcg/README: document tcg_gen_goto_tb restrictions

2012-09-20 Thread Max Filippov
See http://lists.nongnu.org/archive/html/qemu-devel/2012-09/msg03196.html for the whole story. Signed-off-by: Max Filippov --- tcg/README |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tcg/README b/tcg/README index cfdfd96..86b43f1 100644 --- a/tcg/README +++ b/tcg/RE

[Qemu-devel] [PATCH 2/2] tcg: add TB sanity checking

2012-09-20 Thread Max Filippov
Do a sanity checking pass on the intermediate code. Check that goto_tb indices are either 0 or 1 and used at most once per TB. Signed-off-by: Max Filippov --- tcg/tcg.c | 69 + 1 files changed, 69 insertions(+), 0 deletions(-) diff -

[Qemu-devel] [PATCH 0/2] Add TCG sanity checks (goto_tb related)

2012-09-20 Thread Max Filippov
Does this look sane or should it better be merged with e.g. tcg_dump_ops? Max Filippov (2): tcg/README: document tcg_gen_goto_tb restrictions tcg: add TB sanity checking tcg/README |3 +- tcg/tcg.c | 69 2 files changed, 71

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-20 Thread Shawn Starr
On Thursday, September 20, 2012 07:29:08 PM Shawn Starr wrote: > On Thursday, September 20, 2012 05:37:44 PM Hans de Goede wrote: > > Hi, > > > > On 09/19/2012 06:42 PM, Shawn Starr wrote: > > > Hello QMU folks, > > > > > > The latest EHCI patches and or USB redirection ones have caused a > > > r

Re: [Qemu-devel] [PATCH 1/2] target-xtensa: fix extui shift amount

2012-09-20 Thread Richard Henderson
On 09/20/2012 03:59 PM, Max Filippov wrote: > +if (shiftimm) { > +tcg_gen_shri_i32(tmp, cpu_R[RRR_T], shiftimm); > +} else { > +tcg_gen_mov_i32(tmp, cpu_R[RRR_T]); > +} tcg_gen_shri_i32 will perform this condit

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-20 Thread Shawn Starr
On Thursday, September 20, 2012 05:37:44 PM Hans de Goede wrote: > Hi, > > On 09/19/2012 06:42 PM, Shawn Starr wrote: > > Hello QMU folks, > > > > The latest EHCI patches and or USB redirection ones have caused a > > regression. Using the (legacy) qemu-kvm git master repository which does > > not

[Qemu-devel] [PATCH] blockdev: preserve readonly and snapshot states across media changes

2012-09-20 Thread Kevin Shanahan
If readonly=on is given at device creation time, the ->readonly flag needs to be set in the block driver state for this device so that readonly-ness is preserved across media changes (qmp change command). Similarly, to preserve the snapshot property requires ->open_flags to be correct. Signed-off-

Re: [Qemu-devel] [PATCH 0/2] target-xtensa: fix extui and gen_check_loop_end

2012-09-20 Thread malc
On Fri, 21 Sep 2012, Max Filippov wrote: > Max Filippov (2): > target-xtensa: fix extui shift amount > target-xtensa: don't emit extra tcg_gen_goto_tb > > target-xtensa/translate.c | 28 > 1 files changed, 24 insertions(+), 4 deletions(-) > Applied, thanks.

[Qemu-devel] [PATCH 2/2] target-xtensa: don't emit extra tcg_gen_goto_tb

2012-09-20 Thread Max Filippov
Unconditional gen_check_loop_end at the end of disas_xtensa_insn can emit tcg_gen_goto_tb with slot id already used in the TB (e.g. when TB ends at LEND with a branch). Signed-off-by: Max Filippov Cc: qemu-stable --- target-xtensa/translate.c |4 +++- 1 files changed, 3 insertions(+), 1 del

[Qemu-devel] [PATCH 1/2] target-xtensa: fix extui shift amount

2012-09-20 Thread Max Filippov
extui opcode only uses lowermost op1 bit for sa4. Reported-by: malc Signed-off-by: Max Filippov Cc: qemu-stable --- target-xtensa/translate.c | 24 +--- 1 files changed, 21 insertions(+), 3 deletions(-) diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c i

[Qemu-devel] [PATCH 0/2] target-xtensa: fix extui and gen_check_loop_end

2012-09-20 Thread Max Filippov
Max Filippov (2): target-xtensa: fix extui shift amount target-xtensa: don't emit extra tcg_gen_goto_tb target-xtensa/translate.c | 28 1 files changed, 24 insertions(+), 4 deletions(-) -- 1.7.7.6

Re: [Qemu-devel] Shifts, ppc[64], xtensa

2012-09-20 Thread malc
On Thu, 20 Sep 2012, Max Filippov wrote: > On Wed, Sep 19, 2012 at 11:53 PM, Richard Henderson wrote: > > On 09/19/2012 11:30 AM, Peter Maydell wrote: > >> ...but on the other hand that ought to work for PPC too, so > >> presumably my analysis is wrong somewhere. > > > > It isn't. It's a target-

Re: [Qemu-devel] [PATCH 1/5] tcg: Introduce movcond

2012-09-20 Thread Richard Henderson
On 09/20/2012 03:06 PM, Aurelien Jarno wrote: >> > +if (TCG_TARGET_HAS_movcond_i64) { >> > +tcg_gen_op6i_i64(INDEX_op_movcond_i64, ret, c1, c2, v1, v2, cond); >> > +return; > Minor nitpick: there is useless return here, and it's not present for > movcond_i32. > Ah, right. I s

Re: [Qemu-devel] [PATCH 1/5] tcg: Introduce movcond

2012-09-20 Thread Aurelien Jarno
On Tue, Sep 18, 2012 at 07:23:56AM -0700, Richard Henderson wrote: > Implemented with setcond if the target does not provide > the optional opcode. > > Signed-off-by: Richard Henderson > --- > tcg/README | 6 ++ > tcg/arm/tcg-target.h | 1 + > tcg/hppa/tcg-target.h | 1 + >

Re: [Qemu-devel] [PATCH 4/5] tcg: Optimize movcond for constant comparisons

2012-09-20 Thread Aurelien Jarno
On Tue, Sep 18, 2012 at 11:11:48PM +0200, Aurelien Jarno wrote: > On Tue, Sep 18, 2012 at 07:23:59AM -0700, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > > --- > > tcg/optimize.c | 29 + > > 1 file changed, 29 insertions(+) > > > > diff --git a/tcg/o

[Qemu-devel] [PATCH] New syscalls to the seccomp whitelist

2012-09-20 Thread Eduardo Otubo
Seccomp syscall whitelist updated after tests running qemu under libvirt. Reference to the bug - https://bugzilla.redhat.com/show_bug.cgi?id=855162 Regards, --- qemu-seccomp.c | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/qemu-seccomp.c b/qemu-seccomp.c

Re: [Qemu-devel] [PATCH] virtio-blk: add default serial id

2012-09-20 Thread Eric Blake
On 09/20/2012 01:17 AM, Dave Young wrote: > For virtio block device, if user does not specify the serial attribute, > There will be not serial availabe, this is not convinient for identify s/not serial availabe/no serial available/ s/convinient/convenient/ s/identify/identifying/ > the disk. > >

Re: [Qemu-devel] [PATCH] add default virtio-blk serial id

2012-09-20 Thread Dave Young
Oops, local mta use wrong from line, should use below: From: Dave Young On 09/20/2012 04:48 PM, Dave Young wrote: > For virtio block device, if user does not specify the serial attribute, > There will be not serial availabe, this is not convinient for identify > the disk. > > Doing something si

[Qemu-devel] [PATCH] virtio-blk: add default serial id

2012-09-20 Thread Dave Young
For virtio block device, if user does not specify the serial attribute, There will be not serial availabe, this is not convinient for identify the disk. Doing something similar to ide disks, add a "VD?" default serial number if user does not specify it. Signed-off-by: Dave Young --- hw/virt

[Qemu-devel] [PATCH v4 00/17] Allow changing of Hypervisor CPUIDs.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization CPUIDs. This is primarily done so that the guest will think it is running under vmware when hypervisor-vendor=vmware is specified as a property of a cpu. This depends on: http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg01400.html As far as I know it is

[Qemu-devel] [PATCH v4 13/17] target-i386: Add optional Hypervisor leaf extra.

2012-09-20 Thread Don Slutz
Signed-off-by: Don Slutz --- target-i386/cpu.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 6dafaeb..e158c54 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -807,6 +807,10 @@ typedef struct CPUX86State { uin

Re: [Qemu-devel] [PATCH 3/5] QAPI: Introduce memchar-write QMP command

2012-09-20 Thread Luiz Capitulino
On Thu, 20 Sep 2012 15:42:30 +0800 Lei Li wrote: > On 09/20/2012 02:05 AM, Luiz Capitulino wrote: > > On Wed, 12 Sep 2012 19:57:24 +0800 > > Lei Li wrote: > > > >> Signed-off-by: Lei Li > >> --- > >> hmp-commands.hx | 23 ++ > >> hmp.c| 19 +++ > >

[Qemu-devel] [PATCH v4 02/17] target-i386: Add missing kvm bits.

2012-09-20 Thread Don Slutz
Fix duplicate name (kvmclock => kvm_clock2) also. Signed-off-by: Don Slutz --- target-i386/cpu.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 0313cf5..5f9866a 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c

[Qemu-devel] [PATCH v4 01/17] target-i386: Allow tsc-frequency to be larger then 2.147G

2012-09-20 Thread Don Slutz
The check using INT_MAX (2147483647) is wrong in this case. Signed-off-by: Fred Oliveira Signed-off-by: Don Slutz --- target-i386/cpu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index af50a8f..0313cf5 100644 --- a/target-i386

[Qemu-devel] [PATCH 2/3] monitor: add Error * argument to monitor_get_fd

2012-09-20 Thread Luiz Capitulino
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- dump.c | 3 +-- migration-fd.c | 2 +- monitor.c | 15 +-- monitor.h | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/dump.c b/dump.c index 2bf8d8d..1a3c

[Qemu-devel] [PATCH v4 12/19] block: qcow2 image file reopen

2012-09-20 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qcow2 format. There is currently nothing that needs to be done by the qcow2 driver in reopen. Signed-off-by: Jeff Cody --- block/qcow2.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 8f

[Qemu-devel] [PATCH v4 09/17] target-i386: Add cpu object access routines for Hypervisor vendor.

2012-09-20 Thread Don Slutz
These are modeled after x86_cpuid_set_vendor and x86_cpuid_get_vendor. Since kvm's vendor is shorter, the test for correct size is removed and zero padding is added. Set Microsoft's Vendor now that we can. Value defined in: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v

Re: [Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-20 Thread Eric Blake
On 09/20/2012 12:18 PM, Luiz Capitulino wrote: > Before the qapi conversion, the sendkey command could be used to > send key codes in hex directly to the guest. This doesn't work > with the current implemention, as it will only send to the guest > QKeyCode values. That's a regression. > > This com

[Qemu-devel] [PATCH v4 15/17] target-i386: Add setting of Hypervisor leaf extra for known vmare4.

2012-09-20 Thread Don Slutz
This was taken from: http://article.gmane.org/gmane.comp.emulators.kvm.devel/22643 Signed-off-by: Don Slutz --- target-i386/cpu.c | 32 1 files changed, 32 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 7e9c43b..459469

[Qemu-devel] [PATCH v4 10/17] target-i386: Use Hypervisor vendor in -machine pc, accel=kvm.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization vendor. This change is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel change starts with: http://fixunix.com/kernel/538707-use-cpuid-communicate-hypervisor.html Al

[Qemu-devel] [PATCH v4 05/17] target-i386: Add x86_set_hyperv.

2012-09-20 Thread Don Slutz
This is used to set the cpu object's hypervisor level to the default for Microsoft's Hypervisor. HYPERV_CPUID_MIN (0x4005) is defined in a linux header file. CPUID_HV_LEVEL_HYPERV (0x4005) is used instead. Signed-off-by: Don Slutz --- target-i386/cpu.c | 10 ++ target-i386/cp

[Qemu-devel] lp bug #1052857: qemu-user compiled static for ppc fails

2012-09-20 Thread Erik de Castro Lopo
HI all, I reported this bug ion launchpad, but it never seemed to show up here on the list: https://bugs.launchpad.net/qemu/+bug/1052857 Anyone have any clues on what's going on here? Erik -- -- Erik de Castro Lopo http://

[Qemu-devel] [PATCH v4 11/17] target-i386: Use Hypervisor vendor in -machine pc, accel=tcg.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization vendor. This change is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel change starts with: http://fixunix.com/kernel/538707-use-cpuid-communicate-hypervisor.html Al

[Qemu-devel] [PATCH 3/3] qapi: convert add_client

2012-09-20 Thread Luiz Capitulino
Also fixes a few issues while there: 1. The fd returned by monitor_get_fd() leaks in most error conditions 2. monitor_get_fd() return value is not checked. Best case we get an error that is not correctly reported, worse case one of the functions using the fd (with value of -1) will explo

[Qemu-devel] [PATCH 1/3] pci-assign: use monitor_handle_fd_param

2012-09-20 Thread Luiz Capitulino
From: Paolo Bonzini There is no need to open-code the choice between a file descriptor number or a named one. Just use monitor_handle_fd_param, which also takes care of printing the error message. Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino --- hw/kvm/pci-assign.c | 12 +++---

[Qemu-devel] [PATCH v2 0/3]: qapi: convert add_client

2012-09-20 Thread Luiz Capitulino
The first two patches work on adding an Error * argument to monitor_get_fd(). The second patch is the actual conversion of add_client. v2 o add Error * argument to monitor_get_fd() o fix schema doc mistakes dump.c | 3 +-- hw/kvm/pci-assign.c | 12 +++- migration-fd.c

[Qemu-devel] [PATCH v4 05/19] block: move open flag parsing in raw block drivers to helper functions

2012-09-20 Thread Jeff Cody
Code motion, to move parsing of open flags into a helper function. Signed-off-by: Jeff Cody --- block/raw-posix.c | 38 -- block/raw-win32.c | 43 +++ 2 files changed, 47 insertions(+), 34 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH v4 07/17] target-i386: Use Hypervisor level in -machine pc, accel=tcg.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization level. This change is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel change starts with: http://fixunix.com/kernel/538707-use-cpuid-communicate-hypervisor.html Als

[Qemu-devel] [PATCH v4 13/19] block: qcow image file reopen

2012-09-20 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qcow format. There is currently nothing that needs to be done by the qcow driver in reopen. Signed-off-by: Jeff Cody --- block/qcow.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/qcow.c b/block/qcow.c index 7b5ab87

[Qemu-devel] [PATCH v4 14/17] target-i386: Add cpu object access routines for Hypervisor leaf extra.

2012-09-20 Thread Don Slutz
Signed-off-by: Don Slutz --- target-i386/cpu.c | 66 + 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 904b08f..7e9c43b 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1273

[Qemu-devel] [PATCH v4 17/17] target-i386: Use Hypervisor leaf extra in -machine pc, accel=tcg.

2012-09-20 Thread Don Slutz
Signed-off-by: Don Slutz --- target-i386/cpu.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 4594693..72a8442 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -1991,6 +1991,17 @@ void cpu_x86_cpuid(CPUX86St

[Qemu-devel] [PATCH v4 08/17] target-i386: Add Hypervisor vendor.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization vendor. This is EBX, ECX, EDX data for 0x4000. QEMU knows this is KVM_CPUID_SIGNATURE (0x4000). This is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel chang

[Qemu-devel] [PATCH v4 04/17] target-i386: Add cpu object access routines for Hypervisor level.

2012-09-20 Thread Don Slutz
These are modeled after x86_cpuid_get_xlevel and x86_cpuid_set_xlevel. Signed-off-by: Don Slutz --- target-i386/cpu.c | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 5f9866a..0e4a18d 100644 --- a/tar

[Qemu-devel] [PATCH v4 12/17] target-i386: Add some known names to Hypervisor vendor.

2012-09-20 Thread Don Slutz
Signed-off-by: Don Slutz --- target-i386/cpu.c | 44 +++- target-i386/cpu.h | 14 ++ 2 files changed, 57 insertions(+), 1 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 5cf7146..904b08f 100644 --- a/target-i386/cpu.c

[Qemu-devel] [PATCH v4 06/17] target-i386: Use Hypervisor level in -machine pc, accel=kvm.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization level. This change is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware/ff542428%28v=vs.85%29.aspx Linux kernel change starts with: http://fixunix.com/kernel/538707-use-cpuid-communicate-hypervisor.html Als

[Qemu-devel] [PATCH v4 03/17] target-i386: Add Hypervisor level.

2012-09-20 Thread Don Slutz
Also known as Paravirtualization level or maximim cpuid function present in this leaf. This is just the EAX value for 0x4000. QEMU knows this is KVM_CPUID_SIGNATURE (0x4000). This is based on: Microsoft Hypervisor CPUID Leaves: http://msdn.microsoft.com/en-us/library/windows/hardware

[Qemu-devel] [PATCH v4 16/17] target-i386: Use Hypervisor leaf extra in -machine pc, accel=kvm.

2012-09-20 Thread Don Slutz
Signed-off-by: Don Slutz --- target-i386/kvm.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index dde9214..bd7753f 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -457,6 +457,25 @@ int kvm_arch_init_vcp

[Qemu-devel] [PATCH v4 19/19] block: remove keep_read_only flag from BlockDriverState struct

2012-09-20 Thread Jeff Cody
The keep_read_only flag is no longer used, in favor of the bdrv flag BDRV_O_ALLOW_RDWR. Signed-off-by: Jeff Cody --- block.c | 2 -- block_int.h | 1 - 2 files changed, 3 deletions(-) diff --git a/block.c b/block.c index 84544d2..751ebdc 100644 --- a/block.c +++ b/block.c @@ -812,8 +812,6 @

[Qemu-devel] [PATCH v4 06/19] block: do not parse BDRV_O_CACHE_WB in block drivers

2012-09-20 Thread Jeff Cody
Block drivers should ignore BDRV_O_CACHE_WB in .bdrv_open flags, and in the bs->open_flags. This patch removes the code, leaving the behaviour behind as if BDRV_O_CACHE_WB was set. Signed-off-by: Jeff Cody --- block/iscsi.c | 4 block/raw-posix.c | 3 --- block/raw-win32.c | 3 ---

[Qemu-devel] [PATCH v4 14/19] block: vmdk image file reopen

2012-09-20 Thread Jeff Cody
This patch supports reopen for VMDK image files. VMDK extents are added to the existing reopen queue, so that the transactional model of reopen is maintained with multiple image files. Signed-off-by: Jeff Cody --- block/vmdk.c | 35 +++ 1 file changed, 35 inserti

[Qemu-devel] [PATCH v4 09/19] block: raw-posix image file reopen

2012-09-20 Thread Jeff Cody
This is derived from the Supriya Kannery's reopen patches. This contains the raw-posix driver changes for the bdrv_reopen_* functions. All changes are staged into a temporary scratch buffer during the prepare() stage, and copied over to the live structure during commit(). Upon abort(), all chang

[Qemu-devel] [PATCH v2 1/1] target-i386: Fix default Hypervisor level for hypervisor-vendor=kvm.

2012-09-20 Thread Don Slutz
>From http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html EAX should be KVM_CPUID_FEATURES (0x4001) not 0. Added hypervisor-vendor=kvm0 to get the older CPUID result. kvm1 selects the newer one. Signed-off-by: Don Slutz --- target-i386/cpu.c | 17 + 1 files c

[Qemu-devel] [PATCH v2 0/1] target-i386: Fix default Hypervisor level for kvm

2012-09-20 Thread Don Slutz
Looking at http://lkml.indiana.edu/hypermail/linux/kernel/1205.0/00100.html The new value for EAX is 0x4001. This depends on http://lists.gnu.org/archive/html/qemu-devel/2012-09/msg02497.html As far as I known it is #5. It depends on (1), (2), (3) and (4). Based on cpu-queue[1] branch. (Fr

[Qemu-devel] [PATCH v4 00/19] block: bdrv_reopen() patches

2012-09-20 Thread Jeff Cody
These patches are based off Supriya Kannery's original bdrv_reopen() patches as part of the hostcache series. This provides support for safe reopen of a single image, or transactional reopening of multiple images atomically. These changes are all reflected in my github repo: git://github.com

[Qemu-devel] [PATCH v4 07/19] block: use BDRV_O_NOCACHE instead of s->aligned_buf in raw-posix.c

2012-09-20 Thread Jeff Cody
Rather than check for a non-NULL aligned_buf to determine if raw_aio_submit needs to check for alignment, check for the presence of BDRV_O_NOCACHE in the bs->open_flags. Signed-off-by: Jeff Cody --- block/raw-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/raw-p

[Qemu-devel] [PATCH v4 11/19] block: qed image file reopen

2012-09-20 Thread Jeff Cody
These are the stubs for the file reopen drivers for the qed format. There is currently nothing that needs to be done by the qed driver in reopen. Signed-off-by: Jeff Cody --- block/qed.c | 9 + 1 file changed, 9 insertions(+) diff --git a/block/qed.c b/block/qed.c index 21cb239..6c182c

[Qemu-devel] [PATCH v4 16/19] block: vdi image file reopen

2012-09-20 Thread Jeff Cody
There is currently nothing that needs to be done for VDI reopen. Signed-off-by: Jeff Cody --- block/vdi.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/vdi.c b/block/vdi.c index 550cf58..f35b12e 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -454,6 +454,12 @@ static int vdi_ope

[Qemu-devel] [PATCH v4 15/19] block: raw-win32 driver reopen support

2012-09-20 Thread Jeff Cody
This is the support for reopen, for win32. Note that there is a key difference in the win32 reopen, namely that it is not guaranteed safe like all the other drivers. Attempts are made to reopen the file, or open the file in a new handle prior to closing the old handle. However, this is not alway

[Qemu-devel] [PATCH v4 10/19] block: raw image file reopen

2012-09-20 Thread Jeff Cody
These are the stubs for the file reopen drivers for the raw format. There is currently nothing that needs to be done by the raw driver in reopen. Signed-off-by: Jeff Cody --- block/raw.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/block/raw.c b/block/raw.c index ff34ea4..253

[Qemu-devel] [PATCH v4 08/19] block: purge s->aligned_buf and s->aligned_buf_size from raw-posix.c

2012-09-20 Thread Jeff Cody
The aligned_buf pointer and aligned_buf size are no longer used in raw_posix.c, so remove all references to them. Signed-off-by: Jeff Cody --- block/raw-posix.c | 21 + 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 1

[Qemu-devel] [PATCH v4 18/19] block: convert bdrv_commit() to use bdrv_reopen()

2012-09-20 Thread Jeff Cody
Currently, bdrv_commit() reopens images r/w itself, via risky _delete() and _open() calls. Use the new safe method for drive reopen. Signed-off-by: Jeff Cody --- block.c | 48 +--- 1 file changed, 5 insertions(+), 43 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH v4 01/19] block: correctly set the keep_read_only flag

2012-09-20 Thread Jeff Cody
I believe the bs->keep_read_only flag is supposed to reflect the initial open state of the device. If the device is initially opened R/O, then commit operations, or reopen operations changing to R/W, are prohibited. Currently, the keep_read_only flag is only accurate for the active layer, and its

[Qemu-devel] [PATCH] net/socket: Fix compiler warning (regression for MinGW)

2012-09-20 Thread Stefan Weil
Add a type cast which was removed by commit 213fd5087e2e4e2da10ad266df0ba950cf7618bf again. Without it, MinGW compilers complain: net/socket.c:136: warning: pointer targets in passing argument 2 of ‘sendto’ differ in signedness /usr/lib/gcc/amd64-mingw32msvc/4.4.4/../../../../amd64-mingw32msvc/i

[Qemu-devel] [PATCH v4 03/19] block: Framework for reopening files safely

2012-09-20 Thread Jeff Cody
This is based on Supriya Kannery's bdrv_reopen() patch series. This provides a transactional method to reopen multiple images files safely. Image files are queue for reopen via bdrv_reopen_queue(), and the reopen occurs when bdrv_reopen_multiple() is called. Changes are staged in bdrv_reopen_pre

[Qemu-devel] [PATCH v4 17/19] block: vpc image file reopen

2012-09-20 Thread Jeff Cody
There is currently nothing that needs to be done for VPC image file reopen. Signed-off-by: Jeff Cody --- block/vpc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/block/vpc.c b/block/vpc.c index c0b82c4..b6bf52f 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -265,6 +265,12 @@ static

[Qemu-devel] [PATCH v4 04/19] block: move aio initialization into a helper function

2012-09-20 Thread Jeff Cody
Move AIO initialization for raw-posix block driver into a helper function. In addition to just code motion, the aio_ctx pointer is checked for NULL, prior to calling laio_init(), to make sure laio_init() is only run once. Signed-off-by: Jeff Cody --- block/raw-posix.c | 53 +

[Qemu-devel] [PATCH v4 02/19] block: make bdrv_set_enable_write_cache() modify open_flags

2012-09-20 Thread Jeff Cody
bdrv_set_enable_write_cache() sets the bs->enable_write_cache flag, but without the flag recorded in bs->open_flags, then next time a reopen() is performed the enable_write_cache setting may be inadvertently lost. This will set the flag in open_flags, so it is preserved across reopens. Signed-off

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-20 Thread Shawn Starr
On Thursday, September 20, 2012 05:37:44 PM Hans de Goede wrote: > Hi, > > Thanks for reporting this. This is caused by a recent change to > fix a memory leak inside the ehci codes interrupt ep handling, together > with: > > // TODO Windows does not seem to ever set the MULT field > > The a

Re: [Qemu-devel] [PATCH 6/6] mm: compaction: Restart compaction from near where it left off

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: This is almost entirely based on Rik's previous patches and discussions with him about how this might be implemented. Order > 0 compaction stops when enough free pages of the correct page order have been coalesced. When doing subsequent higher order all

Re: [Qemu-devel] [PATCH 5/6] mm: compaction: Cache if a pageblock was scanned and no pages were isolated

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: When compaction was implemented it was known that scanning could potentially be excessive. The ideal was that a counter be maintained for each pageblock but maintaining this information would incur a severe penalty due to a shared writable cache line. It

Re: [Qemu-devel] [PATCH 4/6] Revert "mm: have order > 0 compaction start off where it left"

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: This reverts commit 7db8889a (mm: have order > 0 compaction start off where it left) and commit de74f1cc (mm: have order > 0 compaction start near a pageblock with free pages). These patches were a good idea and tests confirmed that they massively reduced

Re: [Qemu-devel] [PATCH 3/6] mm: compaction: Acquire the zone->lock as late as possible

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: Compactions free scanner acquires the zone->lock when checking for PageBuddy pages and isolating them. It does this even if there are no PageBuddy pages in the range. This patch defers acquiring the zone lock for as long as possible. In the event there a

Re: [Qemu-devel] [PATCH 2/6] mm: compaction: Acquire the zone->lru_lock as late as possible

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: Compactions migrate scanner acquires the zone->lru_lock when scanning a range of pages looking for LRU pages to acquire. It does this even if there are no LRU pages in the range. If multiple processes are compacting then this can cause severe locking cont

Re: [Qemu-devel] [PATCH 1/6] mm: compaction: Abort compaction loop if lock is contended or run too long

2012-09-20 Thread Rik van Riel
On 09/20/2012 10:04 AM, Mel Gorman wrote: From: Shaohua Li Changelog since V2 o Fix BUG_ON triggered due to pages left on cc.migratepages o Make compact_zone_order() require non-NULL arg `contended' Changelog since V1 o only abort the compaction if lock is contended or run too long o Rearrange

[Qemu-devel] [PATCH 3/3] input: index_from_key(): drop unused code

2012-09-20 Thread Luiz Capitulino
The hex key conversion is unused since last commit. Signed-off-by: Luiz Capitulino --- input.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/input.c b/input.c index 187a131..da3ed27 100644 --- a/input.c +++ b/input.c @@ -186,8 +186,7 @@ static const int key_d

[Qemu-devel] [PATCH 1/3] input: qmp_send_key(): simplify

2012-09-20 Thread Luiz Capitulino
The current code duplicates the QKeyCodeList keys in order to store the key values for release_keys() late run. This is a bit complicated though, as we have to care about correct ordering and then release_keys() will have to index key_defs[] over again. Switch to an array of integers, which is dyn

[Qemu-devel] [PATCH 2/3] qmp: qmp_send_key(): accept key codes in hex

2012-09-20 Thread Luiz Capitulino
Before the qapi conversion, the sendkey command could be used to send key codes in hex directly to the guest. This doesn't work with the current implemention, as it will only send to the guest QKeyCode values. That's a regression. This commit fixes the problem by adding hex value support down the

[Qemu-devel] [PATCH 0/3]: qmp: send-key: accept key codes in hex

2012-09-20 Thread Luiz Capitulino
This actually fixes a regression introduced by the qapi conversion, please refer to patch 2/3 for details. It's also important to note that this series changes the QMP interface for the send-key command, but this shouldn't be a problem as we're still in development phase. hmp.c| 43 +

[Qemu-devel] assert and crash on hot-unplug

2012-09-20 Thread Serge E. Hallyn
Hi, a regression test of CVE-2011-1751 (fixed by 505597e4476a6bc219d0ec1362b760d71cb4fdca) found that when writing 2 to 0xae08, qemu-system-i386 crashes with ERROR:qom/object.c:386:object_finalize: assertion failed: (obj->ref == 0) A simple way to reproduce this (in qemu 1.1 or 1.2) is: serge@u

Re: [Qemu-devel] [PATCH] sparc-dis: Remove redundant NULL check

2012-09-20 Thread Stefan Weil
Am 05.09.2012 19:45, schrieb Stefan Weil: Am 05.09.2012 19:15, schrieb Stefan Weil: AFAIK, binutils moved to GPL 3. Therefore I don't expect that QEMU will update to upstream in the next years. We'll have to maintain the code which we have. Try "git log *-dis.c" or "gitk *-dis.c": there are a

Re: [Qemu-devel] [PATCH] pflash_cfi01: Fix warning caused by unreachable code

2012-09-20 Thread Stefan Weil
Am 01.09.2012 13:00, schrieb Stefan Weil: Report from smatch: hw/pflash_cfi01.c:431 pflash_write(180) info: ignoring unreachable code. Instead of removing the return statement after the switch statement, the patch replaces the return statements in the switch statement by break statements. Other

Re: [Qemu-devel] [PATCH] qemu-sockets: Fix potential memory leak

2012-09-20 Thread Stefan Weil
Am 01.09.2012 09:40, schrieb Stefan Weil: The old code leaks variable 'peer'. Signed-off-by: Stefan Weil --- qemu-sockets.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Report from smatch: qemu-sockets.c:404 inet_dgram_opts(101) warn: variable dereferenced before check 'peer' (s

[Qemu-devel] qemu.git/qemu-kvm.git bugs during migrate + reboot

2012-09-20 Thread Lucas Meneghel Rodrigues
Hi guys, We're seeing the following problem during upstream testing: qemu: VQ 0 size 0x80 Guest index 0x2d6 inconsistent with Host index 0x18: delta 0x2be qemu: warning: error while loading state for instance 0x0 of device ':00:04.0/virtio-blk' load of migration failed This

Re: [Qemu-devel] [PATCH v3 05/17] target-i386: Add x86_set_hyperv.

2012-09-20 Thread Eduardo Habkost
On Wed, Sep 19, 2012 at 05:26:01PM -0400, Don Slutz wrote: > On 09/19/12 15:32, Eduardo Habkost wrote: > >On Mon, Sep 17, 2012 at 10:00:55AM -0400, Don Slutz wrote: > >>This is used to set the cpu object's hypervisor level to the default for > >>Microsoft's Hypervisor. > >> > >>Signed-off-by: Don

[Qemu-devel] [PATCH] ehci: Fix interrupt packet MULT handling

2012-09-20 Thread Hans de Goede
There are several issues with our handling of the MULT epcap field of interrupt qhs, which this patch fixes. 1) When we don't execute a transaction because of the transaction counter being 0, p->async stays EHCI_ASYNC_NONE, and the next time we process the same qtd we hit an assert in ehci_state_f

Re: [Qemu-devel] EHCI USB regression in 1.2.0 - ehci_state_fetchqtd() asserting

2012-09-20 Thread Hans de Goede
Hi, On 09/19/2012 06:42 PM, Shawn Starr wrote: Hello QMU folks, The latest EHCI patches and or USB redirection ones have caused a regression. Using the (legacy) qemu-kvm git master repository which does not have these patches (not sure which patch is causing assert specifically yet). Using a

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-20 Thread Stefano Stabellini
On Thu, 20 Sep 2012, Stefano Stabellini wrote: > On Thu, 20 Sep 2012, Gerd Hoffmann wrote: > > Hi, > > > > >> In any graphics mode relevant today vga emulation will use > > >> qemu_create_displaysurface_from(). Whenever a DisplayAllocator is > > >> present or not doesn't make any difference the

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-20 Thread Stefano Stabellini
On Thu, 20 Sep 2012, Gerd Hoffmann wrote: > Hi, > > >> In any graphics mode relevant today vga emulation will use > >> qemu_create_displaysurface_from(). Whenever a DisplayAllocator is > >> present or not doesn't make any difference then. > > > > Unfortunately if my memory doesn't fail me, Win

Re: [Qemu-devel] [PATCH 7/9] fbdev: move to pixman

2012-09-20 Thread Gerd Hoffmann
Hi, >> In any graphics mode relevant today vga emulation will use >> qemu_create_displaysurface_from(). Whenever a DisplayAllocator is >> present or not doesn't make any difference then. > > Unfortunately if my memory doesn't fail me, Windows uses 24 bpp. > So actually the DisplayAllocator int

  1   2   3   >