[Qemu-devel] [PATCH 4/7] qga: create state directory on win32

2013-05-30 Thread Michael Roth
From: Laszlo Ersek On Win32 the local state directory is application specific and users might expect qemu-ga to create it automatically. Signed-off-by: Laszlo Ersek Signed-off-by: Michael Roth --- qga/main.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/qga/main.c b/qg

[Qemu-devel] [PATCH 2/7] qga: determine default state dir and pidfile dynamically

2013-05-30 Thread Michael Roth
From: Laszlo Ersek No effective change on POSIX, but on Win32 the defaults come from the environment / session. Since commit 39097daf ("qemu-ga: use key-value store to avoid recycling fd handles after restart") we've relied on the state directory for the fd handles' key-value store. Even though

[Qemu-devel] [PATCH 1/7] osdep: add qemu_get_local_state_pathname()

2013-05-30 Thread Michael Roth
From: Laszlo Ersek This function returns ${prefix}/var/RELATIVE_PATHNAME on POSIX-y systems, and /RELATIVE_PATHNAME on Win32. http://msdn.microsoft.com/en-us/library/bb762494.aspx [...] This folder is used for application data that is not user specific. For example, an application can store

[Qemu-devel] [PATCH 3/7] configure: don't save any fixed local_statedir for win32

2013-05-30 Thread Michael Roth
From: Laszlo Ersek ... because now we can get the dynamic value with qemu_get_local_state_pathname(). The only user of the fixed value was the guest agent, which we've moved to qemu_get_local_state_pathname() in the previous patch. Signed-off-by: Laszlo Ersek Signed-off-by: Michael Roth ---

[Qemu-devel] [PATCH 6/7] qga: save state directory in ga_install_service()

2013-05-30 Thread Michael Roth
From: Laszlo Ersek If the user selects a non-default state directory at service installation time, we should remember it in the registered service. Signed-off-by: Laszlo Ersek Signed-off-by: Michael Roth --- qga/main.c | 11 ++- qga/service-win32.c |6 +- qga/servic

[Qemu-devel] [PULL 0/7] qemu-ga: local state directory fixes for win32

2013-05-30 Thread Michael Roth
The following changes since commit 87d23f78aa79b72da022afda358bbc8a8509ca70: virtio-pci: drop unused wmb macro (2013-05-29 08:16:21 -0500) are available in the git repository at: git://github.com/mdroth/qemu.git qga-pull-2013-05-30 for you to fetch changes up to f2e3978b5a72870b061d29948075

[Qemu-devel] [PATCH 5/7] qga: remove undefined behavior in ga_install_service()

2013-05-30 Thread Michael Roth
From: Laszlo Ersek We shouldn't snprintf() from a buffer to the same buffer. Signed-off-by: Laszlo Ersek Signed-off-by: Michael Roth --- qga/service-win32.c | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/qga/service-win32.c b/qga/service-win32.c ind

[Qemu-devel] [PATCH 7/7] Makefile: create ".../var/run" when installing the POSIX guest agent

2013-05-30 Thread Michael Roth
From: Laszlo Ersek Otherwise the default local state directory of POSIX qga won't exist after installation with a non-standard ${prefix} or DESTDIR. For now qga is the only user of ".../var" (= $qemu_localstatedir) too, so don't create that directory either unless we're installing the agent. Si

Re: [Qemu-devel] [PATCH] qemu-char: don't issue CHR_EVENT_OPEN in a BH

2013-05-30 Thread mdroth
On Thu, May 30, 2013 at 11:55:56AM -0500, Anthony Liguori wrote: > Michael Roth writes: > > > When CHR_EVENT_OPEN was initially added, it was CHR_EVENT_RESET, and > > it was issued as a bottom-half: > > > > 86e94dea5b740dad65446c857f6959eae43e0ba6 > > > > AFAICT the only reason this was ever done

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2013-05-30 Thread Tobin Davis
*** This bug is a duplicate of bug 1033727 *** https://bugs.launchpad.net/bugs/1033727 ** This bug has been marked a duplicate of bug 1033727 USB passthrough doesn't work anymore with qemu-kvm 1.1.1 -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [PATCH 5/5] memory: able to pin guest node memory to host node manually

2013-05-30 Thread Eduardo Habkost
On Thu, May 30, 2013 at 05:57:21PM +0800, Wanlong Gao wrote: > > Use mbind to pin guest numa node memory to host nodes manually. > > > > If we are not able to pin memory to host node, we may meet the > > cross node memory access performance regression. > > > > With this patch, we can add manual p

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 19:56, Luiz Capitulino ha scritto: > On Thu, 30 May 2013 10:32:36 -0700 > Jordan Justen wrote: > >> On Thu, May 30, 2013 at 10:03 AM, Luiz Capitulino >> wrote: >>> On Thu, 30 May 2013 09:50:10 -0700 >>> Jordan Justen wrote: On Thu, May 30, 2013 at 9:08 AM, Luiz Capitulino >

Re: [Qemu-devel] [PATCH 6/9] vhost-scsi: new device supporting the tcm_vhost Linux kernel module

2013-05-30 Thread Badari Pulavarty
On 05/29/2013 10:36 PM, Nicholas A. Bellinger wrote: On Wed, 2013-05-29 at 21:29 -0700, Nicholas A. Bellinger wrote: On Thu, 2013-05-30 at 06:17 +0800, Asias He wrote: On Wed, May 29, 2013 at 08:10:44AM -0700, Badari Pulavarty wrote: On 05/29/2013 02:05 AM, Wenchao Xia wrote: 于 2013-5-28 17:0

Re: [Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend

2013-05-30 Thread Frederic Konrad
Hi, On 30/05/2013 16:47, Cole Robinson wrote: 'default_backend' isn't always set, but 'rng' is, so use that. $ ./x86_64-softmmu/qemu-system-x86_64 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0 Segmentation fault (core dumped) Regressed with virtio refactoring

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Luiz Capitulino
On Thu, 30 May 2013 10:32:36 -0700 Jordan Justen wrote: > On Thu, May 30, 2013 at 10:03 AM, Luiz Capitulino > wrote: > > On Thu, 30 May 2013 09:50:10 -0700 > > Jordan Justen wrote: > >> On Thu, May 30, 2013 at 9:08 AM, Luiz Capitulino > >> wrote: > >> > On Thu, 30 May 2013 18:03:04 +0200 > >>

[Qemu-devel] [PATCH 3/4] tcg-ppc: Don't implement rem

2013-05-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c | 14 -- tcg/ppc/tcg-target.h | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index 29ca934..453ab6b 100644 --- a/tcg/ppc/tcg-target.c +++ b/tcg/ppc/tcg-target

[Qemu-devel] [PATCH 4/4] tcg-ppc64: Don't implement rem

2013-05-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 26 -- tcg/ppc64/tcg-target.h | 4 ++-- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index 0fcf2b5..ea5f150 100644 --- a/tcg/ppc64/tcg-target.c

[Qemu-devel] [PATCH 2/4] tcg-arm: Don't implement rem

2013-05-30 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 14 -- tcg/arm/tcg-target.h | 3 +-- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/tcg/arm/tcg-target.c b/tcg/arm/tcg-target.c index 3d43412..2fecc4d 100644 --- a/tcg/arm/tcg-target.c +++ b/tcg/arm/tcg-targe

[Qemu-devel] [PATCH 1/4] tcg: Split rem requirement from div requirement

2013-05-30 Thread Richard Henderson
There are several hosts with only a "div" insn. Remainder is computed manually from the quotient and inputs. We can do this generically. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h | 2 ++ tcg/hppa/tcg-target.h | 1 + tcg/ia64/tcg-target.h | 2 ++ tcg/mips/tcg-target.h |

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 09:57:10AM -0700, Jordan Justen wrote: > On Thu, May 30, 2013 at 9:41 AM, Laszlo Ersek wrote: > > On 05/30/13 18:20, Jordan Justen wrote: > >> I think ACPI table generation lives in firmware on real products, > >> because on real products the firmware is the point that best

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 09:20:42AM -0700, Jordan Justen wrote: > On Thu, May 30, 2013 at 5:19 AM, David Woodhouse wrote: > > On Thu, 2013-05-30 at 13:13 +0200, Laszlo Ersek wrote: > >> Where is CorebootPkg available from? > > > > https://github.com/pgeorgi/edk2/tree/coreboot-pkg > > Is the licens

Re: [Qemu-devel] [PATCH v2 4/5] pc: add 1.6 compat type

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 05:55:35PM +0200, Andreas Färber wrote: > Am 30.05.2013 13:07, schrieb Michael S. Tsirkin: > > Identical to 1.5 ATM, but changes will accumulate. > > > > Signed-off-by: Michael S. Tsirkin > > You did notice that Eduardo had a similar patch yesterday or so? > Yours does no

Re: [Qemu-devel] [PATCH v2 5/5] pc: pci-info add compat support

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 06:32:19PM +0200, Laszlo Ersek wrote: > On 05/30/13 13:07, Michael S. Tsirkin wrote: > > > /* PC hardware initialisation */ > > static void pc_init1(MemoryRegion *system_memory, > > @@ -122,6 +122,7 @@ static void pc_init1(MemoryRegion *system_memory, > > } > > > >

Re: [Qemu-devel] [PATCH 1/2] dec.c - move to pci-bridge

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 05:27:46PM +0200, Andreas Färber wrote: > Am 30.05.2013 11:30, schrieb Michael S. Tsirkin: > > Looks like dec.c is in pci-host by mistake. > > Moving it over to pci-bridge. > > > > Cc: Andreas Färber > > Signed-off-by: Michael S. Tsirkin > > --- > > hw/pci-bridge/Makefil

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 05:05:51PM +0200, Laszlo Ersek wrote: > On 05/30/13 15:27, Michael S. Tsirkin wrote: > > Use the type-safe FWCfgState structure instead > > of the unsafe void *. > > > > Signed-off-by: Michael S. Tsirkin > > --- > > hw/misc/pvpanic.c | 2 +- > > 1 file changed, 1 insertio

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Laszlo Ersek
On 05/30/13 18:57, Jordan Justen wrote: > On Thu, May 30, 2013 at 9:41 AM, Laszlo Ersek wrote: >> On 05/30/13 18:20, Jordan Justen wrote: >>> I think ACPI table generation lives in firmware on real products, >>> because on real products the firmware is the point that best >>> understands the actua

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Jordan Justen
On Thu, May 30, 2013 at 10:03 AM, Luiz Capitulino wrote: > On Thu, 30 May 2013 09:50:10 -0700 > Jordan Justen wrote: >> On Thu, May 30, 2013 at 9:08 AM, Luiz Capitulino >> wrote: >> > On Thu, 30 May 2013 18:03:04 +0200 >> > Paolo Bonzini wrote: >> > >> >> Il 30/05/2013 17:46, Luiz Capitulino h

Re: [Qemu-devel] [PATCH] ARM: Fix disable interrupt for M profile

2013-05-30 Thread Peter Maydell
On 30 May 2013 17:22, Fabien Chouteau wrote: > I'm not sure this was expected or not, but it looks like the "||" should > be a "&&". Otherwise it's not possible to disable interrupt. > > Signed-off-by: Fabien Chouteau We've had people trying to fiddle with this bit of code before. I'd like to se

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Luiz Capitulino
On Thu, 30 May 2013 09:50:10 -0700 Jordan Justen wrote: > On Thu, May 30, 2013 at 9:08 AM, Luiz Capitulino > wrote: > > On Thu, 30 May 2013 18:03:04 +0200 > > Paolo Bonzini wrote: > > > >> Il 30/05/2013 17:46, Luiz Capitulino ha scritto: > >> > The culprit is commit: > >> > > >> > commit 235e8

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Jordan Justen
On Thu, May 30, 2013 at 9:41 AM, Laszlo Ersek wrote: > On 05/30/13 18:20, Jordan Justen wrote: >> I think ACPI table generation lives in firmware on real products, >> because on real products the firmware is the point that best >> understands the actual hardware layout for the machine. In qemu, I

Re: [Qemu-devel] [PATCH] qemu-char: don't issue CHR_EVENT_OPEN in a BH

2013-05-30 Thread Anthony Liguori
Michael Roth writes: > When CHR_EVENT_OPEN was initially added, it was CHR_EVENT_RESET, and > it was issued as a bottom-half: > > 86e94dea5b740dad65446c857f6959eae43e0ba6 > > AFAICT the only reason this was ever done in a BH was because it was > initially used to to issue a CHR_EVENT_RESET when w

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Jordan Justen
On Thu, May 30, 2013 at 9:08 AM, Luiz Capitulino wrote: > On Thu, 30 May 2013 18:03:04 +0200 > Paolo Bonzini wrote: > >> Il 30/05/2013 17:46, Luiz Capitulino ha scritto: >> > The culprit is commit: >> > >> > commit 235e8982ad393e5611cb892df54881c872eea9e1 >> > Author: Jordan Justen >> > Date:

Re: [Qemu-devel] [PATCH v2 2/2] ps2: preserve repeat state on migration

2013-05-30 Thread Anthony Liguori
Amos Kong writes: > Use a subsection to migrate repeat state (repate period and first > delay). > > Signed-off-by: Amos Kong Ah, You should fold this into 1/2. Otherwise you break migration during bisecting. Regards, Anthony Liguori > --- > hw/input/ps2.c | 22 ++ > 1

Re: [Qemu-devel] [PATCH v2 1/2] ps2: add support of auto-repeat

2013-05-30 Thread Anthony Liguori
Amos Kong writes: > Guest driver sets repeat rate and delay time by KBD_CMD_SET_RATE, > but ps2 backend doesn't process it and no auto-repeat implementation. > This patch adds support of auto-repeat feature. The repeated events > from host are ignored and re-implements ps2's auto-repeat. > > Gues

Re: [Qemu-devel] [PATCH 1/2] xen: remove xen_vcpu_init

2013-05-30 Thread Andreas Färber
Am 27.05.2013 20:17, schrieb Stefano Stabellini: > No need for xen_vcpu_init anymore: > > - the RTC emulator doesn't have any periodic timers continuously running > even in absence of guest interactions anymore; > > - qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't > need to

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Laszlo Ersek
On 05/30/13 18:20, Jordan Justen wrote: > I think ACPI table generation lives in firmware on real products, > because on real products the firmware is the point that best > understands the actual hardware layout for the machine. In qemu, I > would say that qemu best knows the hardware layout, give

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Luiz Capitulino
On Thu, 30 May 2013 18:03:04 +0200 Paolo Bonzini wrote: > Il 30/05/2013 17:46, Luiz Capitulino ha scritto: > > The culprit is commit: > > > > commit 235e8982ad393e5611cb892df54881c872eea9e1 > > Author: Jordan Justen > > Date: Wed May 29 01:27:26 2013 -0700 > > > > kvm: support using KVM_

Re: [Qemu-devel] [PATCH v2 5/5] pc: pci-info add compat support

2013-05-30 Thread Laszlo Ersek
On 05/30/13 13:07, Michael S. Tsirkin wrote: > /* PC hardware initialisation */ > static void pc_init1(MemoryRegion *system_memory, > @@ -122,6 +122,7 @@ static void pc_init1(MemoryRegion *system_memory, > } > > guest_info = pc_guest_info_init(below_4g_mem_size, above_4g_mem_size); >

[Qemu-devel] [PATCH] ARM: Fix disable interrupt for M profile

2013-05-30 Thread Fabien Chouteau
I'm not sure this was expected or not, but it looks like the "||" should be a "&&". Otherwise it's not possible to disable interrupt. Signed-off-by: Fabien Chouteau --- cpu-exec.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu-exec.c b/cpu-exec.c index 31c089d..07

Re: [Qemu-devel] [SeaBIOS] KVM call agenda for 2013-05-28

2013-05-30 Thread Jordan Justen
On Thu, May 30, 2013 at 5:19 AM, David Woodhouse wrote: > On Thu, 2013-05-30 at 13:13 +0200, Laszlo Ersek wrote: >> Where is CorebootPkg available from? > > https://github.com/pgeorgi/edk2/tree/coreboot-pkg Is the license on this actually BSD as the License.txt indicates? Is this planned to be u

Re: [Qemu-devel] [PATCH qom-cpu 0/3] Conroe/Penryn/Nehalem CPUID family/level fixes

2013-05-30 Thread Andreas Färber
Am 28.05.2013 11:31, schrieb Igor Mammedov: > On Mon, 27 May 2013 17:23:52 -0300 > Eduardo Habkost wrote: > >> This series changes the CPUID family and level fields of the Conroe, Penryn, >> and >> Nehalem CPU models. >> >> Testing: those model/level values have been in use on Red Hat >> Enterpr

Re: [Qemu-devel] [PATCH 2/3] fw_cfg: add API to find FW cfg object

2013-05-30 Thread Laszlo Ersek
On 05/30/13 15:28, Michael S. Tsirkin wrote: > diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c > index 1483f27..910e44f 100644 > --- a/hw/misc/pvpanic.c > +++ b/hw/misc/pvpanic.c > @@ -96,7 +96,7 @@ static int pvpanic_isa_initfn(ISADevice *dev) > isa_register_ioport(dev, &s->io, s->ioport)

[Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Luiz Capitulino
The culprit is commit: commit 235e8982ad393e5611cb892df54881c872eea9e1 Author: Jordan Justen Date: Wed May 29 01:27:26 2013 -0700 kvm: support using KVM_MEM_READONLY flag for regions I'm running 3.9.2-200.fc18, btw. And, error checking is missing on the first call to kvm_vm_ioctl().

Re: [Qemu-devel] [PATCH 0/3] fw_cfg: misc fixes

2013-05-30 Thread Laszlo Ersek
On 05/30/13 15:27, Michael S. Tsirkin wrote: > Here are some misc fixes to the fw cfg object > handling. > I've queued them on my pci branch temporarily > as it's useful to cleanup some pci things. > I'm using this with Laszlo's cleanup patch > that got rid of void * in pc.c too - > that's queued t

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Laszlo Ersek
On 05/30/13 17:05, Laszlo Ersek wrote: > On 05/30/13 15:27, Michael S. Tsirkin wrote: >> Use the type-safe FWCfgState structure instead >> of the unsafe void *. >> >> Signed-off-by: Michael S. Tsirkin >> --- >> hw/misc/pvpanic.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff

Re: [Qemu-devel] [PATCH v2 4/5] pc: add 1.6 compat type

2013-05-30 Thread Andreas Färber
Am 30.05.2013 13:07, schrieb Michael S. Tsirkin: > Identical to 1.5 ATM, but changes will accumulate. > > Signed-off-by: Michael S. Tsirkin You did notice that Eduardo had a similar patch yesterday or so? Yours does not handle q35 by comparison. > --- > hw/i386/pc_piix.c | 13 - >

Re: [Qemu-devel] [PATCH] target-ppc kvm: missing kvm_arch_init_irq_routing

2013-05-30 Thread Scott Wood
On 05/30/2013 04:25:33 AM, Alexey Kardashevskiy wrote: This adds an empty stub to make the compiler happy. Signed-off-by: Alexey Kardashevskiy --- target-ppc/kvm.c |4 1 file changed, 4 insertions(+) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 3ab2946..2bbc3b8 100644 --- a

Re: [Qemu-devel] [BUG]: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 17:46, Luiz Capitulino ha scritto: > The culprit is commit: > > commit 235e8982ad393e5611cb892df54881c872eea9e1 > Author: Jordan Justen > Date: Wed May 29 01:27:26 2013 -0700 > > kvm: support using KVM_MEM_READONLY flag for regions > > I'm running 3.9.2-200.fc18, btw. And, e

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 18:03, Laszlo Ersek ha scritto: > On 05/30/13 17:05, Laszlo Ersek wrote: >> On 05/30/13 15:27, Michael S. Tsirkin wrote: >>> Use the type-safe FWCfgState structure instead >>> of the unsafe void *. >>> >>> Signed-off-by: Michael S. Tsirkin >>> --- >>> hw/misc/pvpanic.c | 2 +- >>> 1

Re: [Qemu-devel] [PATCH v2 0/2] block: fix spurious DEVICE_TRAY_MOVED events on shutdown

2013-05-30 Thread Luiz Capitulino
On Wed, 29 May 2013 18:18:17 +0200 Pavel Hrdina wrote: > This fixes a regression introduced by commit 9ca111544. > > The first commit is done by Luiz and I've just use it as it is. > > The second commit moves the bdrv_dev_change_media_cb() into eject_device(), > called by QMP and HMP eject comm

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Laszlo Ersek
On 05/30/13 17:41, Paolo Bonzini wrote: > Il 30/05/2013 17:05, Laszlo Ersek ha scritto: >> But, again object_resolve_path() returns pointer-to-Object. I'm checking >> "struct Object" in "include/qom/object.h", and it suggests that derived >> structs should embed Object as first member. However FWCf

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 17:05, Laszlo Ersek ha scritto: > But, again object_resolve_path() returns pointer-to-Object. I'm checking > "struct Object" in "include/qom/object.h", and it suggests that derived > structs should embed Object as first member. However FWCfgState is *not* > such a derived member. What

Re: [Qemu-devel] [PATCH 2/2] firmware_abi: move to include/hw/nvram/

2013-05-30 Thread Andreas Färber
Am 30.05.2013 11:30, schrieb Michael S. Tsirkin: > firmware_abi.h with structs for OpenBIOS landed in hw/sparc/ by mistake > - move it to hw/nvram/ alongside fw_cfg.h. In addition to sparc it's > included from ppc mac_nvram.c and will need to include it from prep.c in > the future. > > Cc: Andrea

Re: [Qemu-devel] [PATCH 1/2] dec.c - move to pci-bridge

2013-05-30 Thread Andreas Färber
Am 30.05.2013 11:30, schrieb Michael S. Tsirkin: > Looks like dec.c is in pci-host by mistake. > Moving it over to pci-bridge. > > Cc: Andreas Färber > Signed-off-by: Michael S. Tsirkin > --- > hw/pci-bridge/Makefile.objs | 2 + > hw/pci-bridge/dec.c | 156 > +

Re: [Qemu-devel] [PATCH] target-i386: pc: fix crash when attempting hotplug CPU with negative ID

2013-05-30 Thread Andreas Färber
Am 30.05.2013 17:09, schrieb Igor Mammedov: > QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause > QEMU SIGSEGV at: > piix4_cpu_hotplug_req () > ... > g->sts[cpu_id / 8] |= (1 << (cpu_id % 8)); > ... > > Since for PC in current implementation id should be in ra

[Qemu-devel] [PATCH qom-cpu v3 2/9] target-i386: Fix mask of pte index in memory mapping

2013-05-30 Thread Andreas Färber
From: Qiao Nuohan Function walk_pte() needs pte index to calculate virtual address. However, pte index of PAE paging or IA-32e paging is 9 bit, so the mask should be 0x1ff. Signed-off-by: Qiao Nuohan Reviewed-by: Jesse Larrew Signed-off-by: Andreas Färber --- target-i386/arch_memory_mapping.

[Qemu-devel] [PATCH] target-i386: pc: fix crash when attempting hotplug CPU with negative ID

2013-05-30 Thread Igor Mammedov
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': -1 }}" may cause QEMU SIGSEGV at: piix4_cpu_hotplug_req () ... g->sts[cpu_id / 8] |= (1 << (cpu_id % 8)); ... Since for PC in current implementation id should be in range [0...maxcpus) and maxcpus already checked, add check for

[Qemu-devel] [PATCH qom-cpu v3 8/9] dump: Unconditionally compile

2013-05-30 Thread Andreas Färber
qmp_dump_guest_memory() calls dump_init() and returns an Error when cpu_get_dump_info() returns an error, as done by the stub. So there is no need to have a stub for qmp_dump_guest_memory(). Enable the documentation of the always-present dump-guest-memory command. That way we can drop CONFIG_HAVE

[Qemu-devel] [PATCH qom-cpu v3 9/9] memory_mapping: Change qemu_get_guest_memory_mapping() semantics

2013-05-30 Thread Andreas Färber
Previously it would search for the first CPU with paging enabled and retrieve memory mappings from this and any following CPUs or return an error if that fails. Instead walk all CPUs and if paging is enabled retrieve the memory mappings. Fail only if retrieving memory mappings on a CPU with paging

[Qemu-devel] [PATCH qom-cpu v3 3/9] target-i386: walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Andreas Färber
From: Luiz Capitulino The code used to walk IA-32e page-tables, and possibly PAE page-tables, uses the bit mask ~0xfff to get the next PML4E/PDPTE/PDE/PTE address. However, as we use a uint64_t to store the resulting address, that mask gets expanded to 0xf000 which not only ends up s

[Qemu-devel] [PATCH qom-cpu v3 5/9] memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h

2013-05-30 Thread Andreas Färber
This will avoid issues with hwaddr and ram_addr_t when including sysemu/memory_mapping.h for CONFIG_USER_ONLY. Signed-off-by: Andreas Färber --- include/qemu/typedefs.h | 2 ++ include/sysemu/memory_mapping.h | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/inclu

[Qemu-devel] [PATCH qom-cpu v3 4/9] cpu: Turn cpu_paging_enabled() into a CPUState hook

2013-05-30 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/qom/cpu.h | 10 ++ include/sysemu/memory_mapping.h | 1 - memory_mapping-stub.c | 6 -- memory_mapping.c | 2 +- qom/cpu.c | 13 + target-i386/arch_memory_ma

[Qemu-devel] [PATCH qom-cpu v3 7/9] memory_mapping: Drop qemu_get_memory_mapping() stub

2013-05-30 Thread Andreas Färber
dump.c:dump_init() never checked for the return code anyway. If paging is not enabled, it will fall back to an identity map. If paging is enabled and getting memory mapping list is not implemented, qemu_get_guest_memory_mapping() will return an error. Since the targets not implementing memory mapp

[Qemu-devel] [PATCH qom-cpu v3 0/9] dump: Build cleanups redone

2013-05-30 Thread Andreas Färber
Hello, This series is an alternative to patches previously queued or posted, based on virgin master. As requested by Paolo, this replaces Kate's previous memory_mapping split and my follow-ups and instead goes directly for moving things to CPUState. All knowledge about dump / memory mapping are

[Qemu-devel] [PATCH qom-cpu v3 6/9] cpu: Turn cpu_get_memory_mapping() into a CPUState hook

2013-05-30 Thread Andreas Färber
Signed-off-by: Andreas Färber --- include/qom/cpu.h | 11 +++ include/sysemu/memory_mapping.h | 2 -- memory_mapping-stub.c | 6 -- memory_mapping.c | 2 +- qom/cpu.c | 14 ++ target-i386/arch_memory

[Qemu-devel] [PATCH qom-cpu v3 1/9] dump: Move stubs into libqemustub.a

2013-05-30 Thread Andreas Färber
This allows us to drop CONFIG_NO_CORE_DUMP with its indirect dependency on CONFIG_HAVE_CORE_DUMP. Acked-by: Paolo Bonzini Signed-off-by: Andreas Färber --- Makefile.target | 2 -- stubs/Makefile.objs | 1 + dump-stub.c => stubs/dump.c | 0 3 files changed, 1 insertion(+), 2

Re: [Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Laszlo Ersek
On 05/30/13 15:27, Michael S. Tsirkin wrote: > Use the type-safe FWCfgState structure instead > of the unsafe void *. > > Signed-off-by: Michael S. Tsirkin > --- > hw/misc/pvpanic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c >

[Qemu-devel] [PATCH 1/3] vhost-scsi: fix k->set_guest_notifiers() NULL dereference

2013-05-30 Thread Stefan Hajnoczi
Coverity picked up a copy-paste bug. In vhost_scsi_start() we check for !k->set_guest_notifiers and error out. The check probably got copied but instead of erroring we actually use the function pointer! Cc: Nicholas Bellinger Cc: Asias He Cc: qemu-sta...@nongnu.org Signed-off-by: Stefan Hajnoc

Re: [Qemu-devel] updated: kvm networking todo wiki

2013-05-30 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Thu, May 30, 2013 at 08:40:47AM -0500, Anthony Liguori wrote: >> Stefan Hajnoczi writes: >> >> > On Thu, May 30, 2013 at 7:23 AM, Rusty Russell >> > wrote: >> >> Anthony Liguori writes: >> >>> Rusty Russell writes: >> On Fri, May 24, 2013 at 08:47:58AM

[Qemu-devel] [PATCH] virtio-rng: Fix crash with non-default backend

2013-05-30 Thread Cole Robinson
'default_backend' isn't always set, but 'rng' is, so use that. $ ./x86_64-softmmu/qemu-system-x86_64 -object rng-random,id=rng0,filename=/dev/random -device virtio-rng-pci,rng=rng0 Segmentation fault (core dumped) Regressed with virtio refactoring in 59ccd20a9ac719cff82180429458728f03ec612f CC:

Re: [Qemu-devel] broken incoming migration

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 16:38, Peter Lieven ha scritto: >> > You could also scan the page for nonzero values before writing it. > i had this in mind, but then choosed the other approach turned out to be > a bad idea. > > alexey: i will prepare a patch later today, could you then please verify it > fix

Re: [Qemu-devel] broken incoming migration

2013-05-30 Thread Peter Lieven
Am 30.05.2013 um 15:41 schrieb "Paolo Bonzini" : > Il 30/05/2013 11:08, Peter Lieven ha scritto: >> Am 30.05.2013 10:18, schrieb Alexey Kardashevskiy: >>> On 05/30/2013 05:49 PM, Paolo Bonzini wrote: Il 30/05/2013 09:44, Alexey Kardashevskiy ha scritto: > Hi! > > I found the m

[Qemu-devel] [PATCH 3/3] savevm: avoid leaking popen(3) file pointer

2013-05-30 Thread Stefan Hajnoczi
I'm not sure why we check the mode only after invoking popen(3) but we need to close the file pointer. Spotted by Coverity. Cc: Juan Quintela Cc: qemu-sta...@nongnu.org Signed-off-by: Stefan Hajnoczi --- savevm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/savevm.c b/savevm.c index 31d

Re: [Qemu-devel] [PATCH] xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)

2013-05-30 Thread Stefano Stabellini
On Thu, 30 May 2013, Andreas Färber wrote: > Am 30.05.2013 15:20, schrieb Stefano Stabellini: > > We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END, > > that is 0xf000. > > Start the PCI hole at 0xe000 instead, that is the same value used by > > pc_init1 and qemu-xen-tr

Re: [Qemu-devel] [PATCH] walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Luiz Capitulino
On Thu, 30 May 2013 16:22:32 +0200 Andreas Färber wrote: > Am 30.05.2013 16:14, schrieb Luiz Capitulino: > > On Thu, 30 May 2013 16:10:28 +0200 > > Andreas Färber wrote: > > > >> Am 30.05.2013 15:16, schrieb Luiz Capitulino: > >>> On Thu, 30 May 2013 15:16:18 +0200 > >>> Laszlo Ersek wrote: >

Re: [Qemu-devel] [PATCH] walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Andreas Färber
Am 28.05.2013 20:19, schrieb Luiz Capitulino: > The code used to walk IA-32e page-tables, and possibly PAE page-tables, > uses the bit mask ~0xfff to get the next PML4E/PDPTE/PDE/PTE address. > > However, as we use a uint64_t to store the resulting address, that mask > gets expanded to 0xf

Re: [Qemu-devel] [PATCH 3/3] savevm: avoid leaking popen(3) file pointer

2013-05-30 Thread Eric Blake
On 05/30/2013 08:14 AM, Stefan Hajnoczi wrote: > I'm not sure why we check the mode only after invoking popen(3) but we > need to close the file pointer. > > Spotted by Coverity. > > Cc: Juan Quintela > Cc: qemu-sta...@nongnu.org > Signed-off-by: Stefan Hajnoczi > --- > savevm.c | 1 + > 1 fil

Re: [Qemu-devel] [PATCH] walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Andreas Färber
Am 30.05.2013 16:14, schrieb Luiz Capitulino: > On Thu, 30 May 2013 16:10:28 +0200 > Andreas Färber wrote: > >> Am 30.05.2013 15:16, schrieb Luiz Capitulino: >>> On Thu, 30 May 2013 15:16:18 +0200 >>> Laszlo Ersek wrote: >>> On 05/30/13 14:59, Luiz Capitulino wrote: > On Tue, 28 May 201

Re: [Qemu-devel] [Xen-devel] [PATCH] xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)

2013-05-30 Thread Pasi Kärkkäinen
On Thu, May 30, 2013 at 02:20:46PM +0100, Stefano Stabellini wrote: > We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END, > that is 0xf000. > Start the PCI hole at 0xe000 instead, that is the same value used by > pc_init1 and qemu-xen-traditional. > > This fixes a bug w

[Qemu-devel] [PATCH 2/3] ivshmem: add missing error exit(2)

2013-05-30 Thread Stefan Hajnoczi
If the user fails to specify 'chardev' or 'shm' then we cannot continue. Exit right away so that we don't invoke shm_open(3) with a NULL pointer. It would be nice to replace exit(1) with error returns in the PCI device .init() function, but leave that for another patch since exit(1) is currently u

Re: [Qemu-devel] [PATCH RFC 0/7] pass cpu online/offline event bewteen QEMU and linux kernel by ACPI Embedded Controller

2013-05-30 Thread Igor Mammedov
On Wed, 29 May 2013 09:47:35 +0800 liguang wrote: > patch 1 adds ACPI Embedded Controller (EC), > refer-to: > ACPI SPEC v5 chapter 12 > "ACPI Embedded Controller Interface Specification" > > EC is a standard ACPI device, it plays flexible roles, > especially be event carrier, it can pass events

[Qemu-devel] [PATCH 0/3] vhost-scsi, ivshmem, savevm fixes for Coverity issues

2013-05-30 Thread Stefan Hajnoczi
The following fixes address NULL pointer dereferences and resource leaks spotted by Coverity. Stefan Hajnoczi (3): vhost-scsi: fix k->set_guest_notifiers() NULL dereference ivshmem: add missing error exit(2) savevm: avoid leaking popen(3) file pointer hw/misc/ivshmem.c| 1 + hw/scsi/vh

Re: [Qemu-devel] [PATCH] walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Luiz Capitulino
On Thu, 30 May 2013 16:10:28 +0200 Andreas Färber wrote: > Am 30.05.2013 15:16, schrieb Luiz Capitulino: > > On Thu, 30 May 2013 15:16:18 +0200 > > Laszlo Ersek wrote: > > > >> On 05/30/13 14:59, Luiz Capitulino wrote: > >>> On Tue, 28 May 2013 14:19:22 -0400 > >>> Luiz Capitulino wrote: > >>>

Re: [Qemu-devel] [PATCH] xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)

2013-05-30 Thread Andreas Färber
Am 30.05.2013 15:20, schrieb Stefano Stabellini: > We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END, > that is 0xf000. > Start the PCI hole at 0xe000 instead, that is the same value used by > pc_init1 and qemu-xen-traditional. > > This fixes a bug with device assignme

Re: [Qemu-devel] [PATCH] walk_pml4e(): fix abort on bad PML4E/PDPTE/PDE/PTE addresses

2013-05-30 Thread Andreas Färber
Am 30.05.2013 15:16, schrieb Luiz Capitulino: > On Thu, 30 May 2013 15:16:18 +0200 > Laszlo Ersek wrote: > >> On 05/30/13 14:59, Luiz Capitulino wrote: >>> On Tue, 28 May 2013 14:19:22 -0400 >>> Luiz Capitulino wrote: >>> The code used to walk IA-32e page-tables, and possibly PAE page-table

Re: [Qemu-devel] broken incoming migration

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 15:38, Alexey Kardashevskiy ha scritto: >>> does this problem only occur on pseries emulation? >> >> Probably not. On a PC, it would occur if you had 4K of zeros in the >> source BIOS but not in the destination BIOS. When you reboot, the BIOS >> image is wrong. >> >>> not sending ze

Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 09:50:35PM +0800, Amos Kong wrote: > On Tue, May 28, 2013 at 08:25:56AM -0400, Luiz Capitulino wrote: > > On Tue, 28 May 2013 06:43:04 +0800 > > Amos Kong wrote: > > CC: netdev, vlad > > Currently we create & open macvtap device by libvirt(management), > and pass the fd t

Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event

2013-05-30 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 08:25:56AM -0400, Luiz Capitulino wrote: > On Tue, 28 May 2013 06:43:04 +0800 > Amos Kong wrote: > > > On Mon, May 27, 2013 at 09:24:28AM -0400, Luiz Capitulino wrote: > > > On Mon, 27 May 2013 09:10:11 -0400 > > > Luiz Capitulino wrote: > > > > > > > > We use the QMP ev

Re: [Qemu-devel] [PATCH v2 1/2] net: introduce MAC_TABLE_CHANGED event

2013-05-30 Thread Amos Kong
On Tue, May 28, 2013 at 08:25:56AM -0400, Luiz Capitulino wrote: > On Tue, 28 May 2013 06:43:04 +0800 > Amos Kong wrote: CC: netdev, vlad Currently we create & open macvtap device by libvirt(management), and pass the fd to qemu process. And macvtap works in promiscuous mode, we want to sync the

Re: [Qemu-devel] updated: kvm networking todo wiki

2013-05-30 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 08:40:47AM -0500, Anthony Liguori wrote: > Stefan Hajnoczi writes: > > > On Thu, May 30, 2013 at 7:23 AM, Rusty Russell > > wrote: > >> Anthony Liguori writes: > >>> Rusty Russell writes: > On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: > > F

Re: [Qemu-devel] updated: kvm networking todo wiki

2013-05-30 Thread Anthony Liguori
Stefan Hajnoczi writes: > On Thu, May 30, 2013 at 7:23 AM, Rusty Russell wrote: >> Anthony Liguori writes: >>> Rusty Russell writes: On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: > FWIW, I think what's more interesting is using vhost-net as a networking > backen

Re: [Qemu-devel] updated: kvm networking todo wiki

2013-05-30 Thread Anthony Liguori
Rusty Russell writes: > Anthony Liguori writes: >> Rusty Russell writes: >>> On Fri, May 24, 2013 at 08:47:58AM -0500, Anthony Liguori wrote: FWIW, I think what's more interesting is using vhost-net as a networking backend with virtio-net in QEMU being what's guest facing.

Re: [Qemu-devel] broken incoming migration

2013-05-30 Thread Alexey Kardashevskiy
On 05/30/2013 11:00 PM, Paolo Bonzini wrote: > Il 30/05/2013 11:08, Peter Lieven ha scritto: >> Am 30.05.2013 10:18, schrieb Alexey Kardashevskiy: >>> On 05/30/2013 05:49 PM, Paolo Bonzini wrote: Il 30/05/2013 09:44, Alexey Kardashevskiy ha scritto: > Hi! > > I found the migration

Re: [Qemu-devel] [PATCH v2] linux-user: improve target_to_host_sock_type conversion

2013-05-30 Thread Petar Jovanovic
Thanks. Petar From: Riku Voipio [riku.voi...@linaro.org] Sent: Thursday, May 30, 2013 3:28 PM To: Petar Jovanovic Cc: qemu-devel@nongnu.org; Aurelien Jarno; Petar Jovanovic; blauwir...@gmail.com; r...@twiddle.net; Alexander Graf; Andreas Färber Subject: Re

[Qemu-devel] [PATCH] xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)

2013-05-30 Thread Stefano Stabellini
We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END, that is 0xf000. Start the PCI hole at 0xe000 instead, that is the same value used by pc_init1 and qemu-xen-traditional. This fixes a bug with device assignment of graphic cards with large amount of video memory (http:/

Re: [Qemu-devel] [PATCH v2] linux-user: improve target_to_host_sock_type conversion

2013-05-30 Thread Riku Voipio
Hi, On 27 May 2013 13:49, Petar Jovanovic wrote: > Can anyone take a look at this and commit it if there are no other change > requests? I thought Aurelian had an issue with this patch, but it seems you explained your position well. I'll get this included in my next pull. Riku > _

[Qemu-devel] [PATCH 3/3] fw_cfg: fw_cfg is a singleton

2013-05-30 Thread Michael S. Tsirkin
Make sure we only have a single instance ever: because if it isn't we can't find it so it's useless anyway. Signed-off-by: Michael S. Tsirkin --- hw/nvram/fw_cfg.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cfg.c index df3f089..3c25

[Qemu-devel] [PATCH 2/3] fw_cfg: add API to find FW cfg object

2013-05-30 Thread Michael S. Tsirkin
Remove some code duplication by adding a function to look up the fw cfg file. This way, we don't need to duplicate same strings everywhere. Use by both fw cfg and pvpanic device. Signed-off-by: Michael S. Tsirkin --- hw/misc/pvpanic.c | 2 +- hw/nvram/fw_cfg.c | 15 -

[Qemu-devel] [PATCH 1/3] pvpanic: use FWCfgState explicitly

2013-05-30 Thread Michael S. Tsirkin
Use the type-safe FWCfgState structure instead of the unsafe void *. Signed-off-by: Michael S. Tsirkin --- hw/misc/pvpanic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/pvpanic.c b/hw/misc/pvpanic.c index 31e1b1d..1483f27 100644 --- a/hw/misc/pvpanic.c +++ b/hw/mi

[Qemu-devel] [PATCH 0/3] fw_cfg: misc fixes

2013-05-30 Thread Michael S. Tsirkin
Here are some misc fixes to the fw cfg object handling. I've queued them on my pci branch temporarily as it's useful to cleanup some pci things. I'm using this with Laszlo's cleanup patch that got rid of void * in pc.c too - that's queued there as well. Please review and comment. Michael S. Tsirk

<    1   2   3   >