Re: [Qemu-devel] [RFC] New Migration Protocol using Visitor Interface

2011-10-04 Thread Stefan Berger
On 10/03/2011 09:43 AM, Anthony Liguori wrote: On 10/03/2011 08:24 AM, Michael S. Tsirkin wrote: On Mon, Oct 03, 2011 at 07:51:00AM -0500, Anthony Liguori wrote: Here are some suggestions: - Let's make the protocol be BER directly. As a first step, use a single octet string for the whole

Re: [Qemu-devel] [PATCH 2/2] hda: do not mix output and input stream states, RHBZ #740493

2011-10-04 Thread Marc-André Lureau
Hi On Tue, Oct 4, 2011 at 7:21 PM, Juan Quintela wrote: > "Marc-André Lureau" wrote: >> Windows 7 may use the same stream number for input and output. >> Current code will confuse streams. >> >> NB: I wonder if this patch breaks migration code because of >> this change: >> -        VMSTATE_BOOL_

Re: [Qemu-devel] [PATCH 21/23] migration: Don't use callback on file defining it

2011-10-04 Thread Juan Quintela
Anthony Liguori wrote: > On 09/23/2011 07:57 AM, Juan Quintela wrote: >> Signed-off-by: Juan Quintela > > I don't think this is better. It just eliminates the possibility of > having useful trace points in get_error. It's use is not consistent at all (same places use get_error() and the others t

[Qemu-devel] Qemu/KVM guest boots 2x slower with vhost_net

2011-10-04 Thread Reeted
Hello all, for people in qemu-devel list, you might want to have a look at the previous thread about this topic, at http://www.spinics.net/lists/kvm/msg61537.html but I will try to recap here. I found that virtual machines in my host booted 2x slower (on average it's 2x slower, but probably so

Re: [Qemu-devel] [PATCH 1/1] kvm: support TSC deadline MSR

2011-10-04 Thread Marcelo Tosatti
On Tue, Oct 04, 2011 at 07:53:42PM +0200, Avi Kivity wrote: > On 10/03/2011 10:55 PM, Marcelo Tosatti wrote: > >From: "Liu, Jinsong" > > > >KVM add emulation of lapic tsc deadline timer for guest. > >This patch is co-operation work at qemu side. > > > >-#define CPU_SAVE_VERSION 12 > >+#define CPU_S

Re: [Qemu-devel] [PATCH 05/11] migration: add error handling to migrate_fd_put_notify().

2011-10-04 Thread Juan Quintela
(Adding new Yoshiaki email address) Paolo Bonzini wrote: > On 09/23/2011 02:50 PM, Juan Quintela wrote: >> From: Yoshiaki Tamura >> >> Although migrate_fd_put_buffer() sets MIG_STATE_ERROR if it failed, >> since migrate_fd_put_notify() isn't checking error of underlying >> QEMUFile, those resour

[Qemu-devel] [Bug 546458] Re: kernel NULL pointer in -virtual (-server) kernel

2011-10-04 Thread Serge Hallyn
Per comment #7, marking this invalid for qemu-kvm. ** Changed in: qemu-kvm (Ubuntu) Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/546458 Title: kernel NULL poin

[Qemu-devel] [Bug 241119] Re: usb_add of a Creative ZEN unrecognized in guest

2011-10-04 Thread Serge Hallyn
Hi, is this still an issue under natty or oneiric? ** Changed in: qemu-kvm (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/241119 Title: usb_add of a

[Qemu-devel] [PATCH 8/5] Add fd parameter for TPM passthrough driver

2011-10-04 Thread Stefan Berger
Enable the passing of a file descriptor via fd=<..> to access the host's TPM device using the TPM passthrough driver. Signed-off-by: Stefan Berger --- hw/tpm_passthrough.c | 74 +-- qemu-config.c|5 +++ 2 files changed, 53 inserti

[Qemu-devel] [PATCH 6/5] Introduce --enable-tpm-passthrough configure option

2011-10-04 Thread Stefan Berger
Introduce --enable-tpm-passthrough configure option. Signed-off-by: Stefan Berger --- configure | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) Index: qemu-git.pt/configure === --- qemu-git.pt.orig/config

[Qemu-devel] [PATCH 7/5] Move parsing of filedescriptor into common function

2011-10-04 Thread Stefan Berger
Move the parsing of a filedescriptor into a common function qemu_parse_fd(). Have the code in net.c call this function. Signed-off-by: Stefan Berger --- cutils.c | 12 net.c |7 +-- qemu-common.h |1 + 3 files changed, 14 insertions(+), 6 deletions(-) I

Re: [Qemu-devel] Guest freezes "Refined TSC clocksource calibration ..."

2011-10-04 Thread Mulyadi Santosa
Hi Onkar :) On Tue, Oct 4, 2011 at 18:02, Onkar N Mahajan wrote: > On 10/02/2011 12:54 PM, Mulyadi Santosa wrote: >> >> Hi. :) >> > Hey Mulyadi , you seem to be where I go (or may be other way round) :-) ; > How > r u buddy ?? Yeah, it's like we always at the same boat :) But it's great, isn

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Avi Kivity
On 10/04/2011 08:35 PM, Juan Quintela wrote: Avi Kivity wrote: > On 10/04/2011 04:38 PM, Juan Quintela wrote: >> Hi >> >> This series move the subsections detection code form: >> - Look that it starts form 5 >> To: >> - Look that it starts form 5 (SUBSECTION) >> - Look at the length >> -

Re: [Qemu-devel] [PATCH RFC V1 01/11] Introduce HostPCIDevice to access a pci device on the host.

2011-10-04 Thread Stefano Stabellini
On Tue, 4 Oct 2011, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > --- > hw/host-pci-device.c | 192 > ++ > hw/host-pci-device.h | 36 + > 2 files changed, 228 insertions(+), 0 deletions(-) > create mode 100644 hw/host-pci-devi

Re: [Qemu-devel] [PATCH 04/11] migration: return real error code

2011-10-04 Thread Juan Quintela
Anthony Liguori wrote: > On 09/23/2011 07:50 AM, Juan Quintela wrote: >> make functions propaget errno, instead of just using -EIO. >> >> Signed-off-by: Juan Quintela > > qemu_file_has_error() implies a boolean response. Wouldn't > qemu_file_get_error() make more sense if you're going to rely on

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Juan Quintela
Avi Kivity wrote: > On 10/04/2011 04:38 PM, Juan Quintela wrote: >> Hi >> >> This series move the subsections detection code form: >> - Look that it starts form 5 >> To: >> - Look that it starts form 5 (SUBSECTION) >> - Look at the length >> - Look that length is bigger than section name >> - Look

Re: [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Christian Borntraeger
> Hrm. Are you sure that this doesn't break anything? The rest looks good. Works on my kvm box. Unfortunately the non-kvm mode doesnt work (with and without the patch) so I cant test that one. Christian

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Avi Kivity
On 10/04/2011 08:22 PM, Anthony Liguori wrote: The original intent with subsections was to register them as a new vmstate section, with just a name relationship. Can we rename .subsections to .old_and_semi_broken_subsections, and introduce a new .subsections field that works properly in all c

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Avi Kivity
On 10/04/2011 08:19 PM, Stefano Stabellini wrote: On Tue, 4 Oct 2011, Avi Kivity wrote: > On 10/04/2011 05:01 PM, Anthony Liguori wrote: > >> We also have pci passthrough in qemu-kvm (I think based on the same > >> Neocleus > >> code). Rather than having two pci assignment implementations,

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Anthony Liguori
On 10/04/2011 01:20 PM, Avi Kivity wrote: On 10/04/2011 04:38 PM, Juan Quintela wrote: Hi This series move the subsections detection code form: - Look that it starts form 5 To: - Look that it starts form 5 (SUBSECTION) - Look at the length - Look that length is bigger than section name - Look a

Re: [Qemu-devel] [PATCH RFC V1 01/11] Introduce HostPCIDevice to access a pci device on the host.

2011-10-04 Thread Jan Kiszka
This wasn't run through checkpatch.pl, I bet. On 2011-10-04 16:51, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > --- > hw/host-pci-device.c | 192 > ++ > hw/host-pci-device.h | 36 + > 2 files changed, 228 insertions(+), 0 del

Re: [Qemu-devel] [PATCH RFC V1 02/11] qemu-timer: Introduce qemu_run_one_timer

2011-10-04 Thread Anthony Liguori
On 10/04/2011 12:27 PM, Jan Kiszka wrote: On 2011-10-04 16:51, Anthony PERARD wrote: Used by the Xen PCI Passthrough code to run the timer about the power state transition. Signed-off-by: Anthony PERARD --- qemu-timer.c | 15 +++ qemu-timer.h |3 +++ 2 files changed, 18 in

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Avi Kivity
On 10/04/2011 04:38 PM, Juan Quintela wrote: Hi This series move the subsections detection code form: - Look that it starts form 5 To: - Look that it starts form 5 (SUBSECTION) - Look at the length - Look that length is bigger than section name - Look at the idstr and see that it starts with the

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Stefano Stabellini
On Tue, 4 Oct 2011, Avi Kivity wrote: > On 10/04/2011 05:01 PM, Anthony Liguori wrote: > >> We also have pci passthrough in qemu-kvm (I think based on the same > >> Neocleus > >> code). Rather than having two pci assignment implementations, I think > >> we should > >> have just one, with the diff

Re: [Qemu-devel] [PATCH 04/11] migration: return real error code

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:50 AM, Juan Quintela wrote: make functions propaget errno, instead of just using -EIO. Signed-off-by: Juan Quintela qemu_file_has_error() implies a boolean response. Wouldn't qemu_file_get_error() make more sense if you're going to rely on the return value? Regards, Antho

Re: [Qemu-devel] [PATCH 1/1] kvm: support TSC deadline MSR

2011-10-04 Thread Avi Kivity
On 10/03/2011 10:55 PM, Marcelo Tosatti wrote: From: "Liu, Jinsong" KVM add emulation of lapic tsc deadline timer for guest. This patch is co-operation work at qemu side. -#define CPU_SAVE_VERSION 12 +#define CPU_SAVE_VERSION 13 Unfortunate. Can't we use subsections? -- error compiling co

Re: [Qemu-devel] [PATCH RFC V1 02/11] qemu-timer: Introduce qemu_run_one_timer

2011-10-04 Thread Stefano Stabellini
On Tue, 4 Oct 2011, Jan Kiszka wrote: > On 2011-10-04 16:51, Anthony PERARD wrote: > > Used by the Xen PCI Passthrough code to run the timer about the power > > state transition. > > > > Signed-off-by: Anthony PERARD > > --- > > qemu-timer.c | 15 +++ > > qemu-timer.h |3 +++ >

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Avi Kivity
On 10/04/2011 07:24 PM, Jan Kiszka wrote: >> >> Given that, when in conflict, we rather model after AMD than Intel for >> TCG, I would hesitate to expose this by default. Or are there >> precedences already? > > Practically all MSRs. i486 doesn't have any, IIRC, for example. Pre-Pentiums do

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Jan Kiszka
On 2011-10-04 19:01, Avi Kivity wrote: > On 10/04/2011 06:33 PM, Alex Williamson wrote: >> I thought we were potentially looking at vfio as a convergence point. >> I'm still a bit off from having a vfio re-write ready to submit, but is >> this still a possibility? Thanks, >> > > vfio leaves out u

Re: [Qemu-devel] [PATCH RFC V1 02/11] qemu-timer: Introduce qemu_run_one_timer

2011-10-04 Thread Jan Kiszka
On 2011-10-04 16:51, Anthony PERARD wrote: > Used by the Xen PCI Passthrough code to run the timer about the power > state transition. > > Signed-off-by: Anthony PERARD > --- > qemu-timer.c | 15 +++ > qemu-timer.h |3 +++ > 2 files changed, 18 insertions(+), 0 deletions(-) >

Re: [Qemu-devel] [PATCH] Make cpu_single_env thread local (Linux only for now)

2011-10-04 Thread Jan Kiszka
On 2011-10-04 17:10, Lluís Vilanova wrote: > Jan Kiszka writes: > >> On 2011-10-03 18:33, Dr. David Alan Gilbert wrote: >>> Make cpu_single_env thread local (Linux only for now) >>> * Fixes some user space threading issues (esp those triggered >>> by bug 823902) >>> >>> Against rev d11cf8cc..., te

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Jan Kiszka
On 2011-10-04 19:21, Avi Kivity wrote: > On 10/04/2011 07:14 PM, Jan Kiszka wrote: >> > >> >> > + >> >> > +static const VMStateDescription vmstate_msr_ia32_misc_enable = { >> >> > +.name = "cpu/msr_ia32_misc_enable", >> >> > +.version_id = 1, >> >> > +.minimum_version_id

Re: [Qemu-devel] [PATCH 2/2] hda: do not mix output and input stream states, RHBZ #740493

2011-10-04 Thread Juan Quintela
"Marc-André Lureau" wrote: > Windows 7 may use the same stream number for input and output. > Current code will confuse streams. > > NB: I wonder if this patch breaks migration code because of > this change: > -VMSTATE_BOOL_ARRAY(running, HDAAudioState, 16), > +VMSTATE_BOOL_ARRAY(r

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Jan Kiszka
On 2011-10-04 17:01, Anthony Liguori wrote: > On 10/04/2011 09:58 AM, Avi Kivity wrote: >> On 10/04/2011 04:51 PM, Anthony PERARD wrote: >>> Hi all, >>> >>> This patch series introduce the PCI passthrough for Xen. >>> >>> First, we have HostPCIDevice that help to access one PCI device of >>> the ho

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Avi Kivity
On 10/04/2011 07:14 PM, Jan Kiszka wrote: > >> > + >> > +static const VMStateDescription vmstate_msr_ia32_misc_enable = { >> > +.name = "cpu/msr_ia32_misc_enable", >> > +.version_id = 1, >> > +.minimum_version_id = 1, >> > +.minimum_version_id_old = 1, >> > +

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Jan Kiszka
On 2011-10-04 19:08, Avi Kivity wrote: > On 10/04/2011 06:05 PM, Jan Kiszka wrote: >> On 2011-10-04 16:26, Avi Kivity wrote: >> > It's needed for its default value - bit 0 specifies that "rep movs" is >> > good enough for memcpy, and Linux may use a slower memcpu if it is >> not set, >> > depend

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Avi Kivity
On 10/04/2011 06:05 PM, Jan Kiszka wrote: On 2011-10-04 16:26, Avi Kivity wrote: > It's needed for its default value - bit 0 specifies that "rep movs" is > good enough for memcpy, and Linux may use a slower memcpu if it is not set, > depending on cpu family/model. > > Signed-off-by: Avi Kivit

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Avi Kivity
On 10/04/2011 05:01 PM, Anthony Liguori wrote: We also have pci passthrough in qemu-kvm (I think based on the same Neocleus code). Rather than having two pci assignment implementations, I think we should have just one, with the differences (programming the hypervisor) abstracted at that level.

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Avi Kivity
On 10/04/2011 06:33 PM, Alex Williamson wrote: I thought we were potentially looking at vfio as a convergence point. I'm still a bit off from having a vfio re-write ready to submit, but is this still a possibility? Thanks, vfio leaves out users of current and past kernels; relying on it would

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Stefano Stabellini
On Tue, 4 Oct 2011, Alex Williamson wrote: > On Tue, 2011-10-04 at 16:05 +0100, Stefano Stabellini wrote: > > On Tue, 4 Oct 2011, Anthony Liguori wrote: > > > On 10/04/2011 09:58 AM, Avi Kivity wrote: > > > > On 10/04/2011 04:51 PM, Anthony PERARD wrote: > > > >> Hi all, > > > >> > > > >> This patc

Re: [Qemu-devel] [PATCH 2/2] LAPIC: make lapic support cpu hotplug

2011-10-04 Thread Jan Kiszka
On 2011-10-04 13:13, pingf...@linux.vnet.com wrote: > From: Liu Ping Fan > > Separate apic from qbus to icc bus which supports hotplug feature. Modeling the ICC bus looks like a step in the right direction. The IOAPIC could be attached to it as well to get rid of "ioapics[MAX_IOAPICS]". > And m

Re: [Qemu-devel] build errors on s390 tcg

2011-10-04 Thread Stefan Weil
Am 04.10.2011 14:44, schrieb Peter Maydell: On 4 October 2011 13:23, Alexander Graf wrote: The problem is that tcg.c defines the functions with int arguments for TCG register indexes, while s390/tcg-target.c takes TCGReg parameters. I'm not sure which way is better, but using TCGReg feels mor

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Alex Williamson
On Tue, 2011-10-04 at 16:05 +0100, Stefano Stabellini wrote: > On Tue, 4 Oct 2011, Anthony Liguori wrote: > > On 10/04/2011 09:58 AM, Avi Kivity wrote: > > > On 10/04/2011 04:51 PM, Anthony PERARD wrote: > > >> Hi all, > > >> > > >> This patch series introduce the PCI passthrough for Xen. > > >> >

[Qemu-devel] [PATCH 2/2] hda: do not mix output and input stream states, RHBZ #740493

2011-10-04 Thread Marc-André Lureau
Windows 7 may use the same stream number for input and output. Current code will confuse streams. NB: I wonder if this patch breaks migration code because of this change: -VMSTATE_BOOL_ARRAY(running, HDAAudioState, 16), +VMSTATE_BOOL_ARRAY(running, HDAAudioState, 2 * 16), --- hw/h

[Qemu-devel] [PATCH 1/2] hda: do not mix output and input streams, RHBZ #740493

2011-10-04 Thread Marc-André Lureau
Windows 7 may use the same stream number for input and output. That will result in lot of garbage on playback. The hardcoded value of 4 needs to be in sync with GCAP streams description and IN/OUT registers. --- hw/intel-hda.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) di

[Qemu-devel] [PATCH 0/2] HDA fixes for Windows 7

2011-10-04 Thread Marc-André Lureau
Hi, There are two related bugs in stream state and xfer handling due to the conflict of stream number (on Windows 7, input stream and output stream both use the full range of 1..15 values. on Linux, the handling is different and it works fine because there is no clash) The patches handle stream n

Re: [Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Jan Kiszka
On 2011-10-04 16:26, Avi Kivity wrote: > It's needed for its default value - bit 0 specifies that "rep movs" is > good enough for memcpy, and Linux may use a slower memcpu if it is not set, > depending on cpu family/model. > > Signed-off-by: Avi Kivity > --- > target-i386/cpu.h |5

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] tcg/ppc*: Move cache initialization to ppc specific code

2011-10-04 Thread Scott Wood
On 10/04/2011 12:55 AM, Stefan Weil wrote: > Am 03.10.2011 23:40, schrieb Scott Wood: >> The interface isn't powerpc-specific. It just happens to be the only >> arch so far that qemu supports that needs the implementation to do >> something (or possibly just the only one where that need has been >>

Re: [Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Alexander Graf
On 10/04/2011 05:20 PM, Christian Borntraeger wrote: On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track the overall number of running CPUs to call the shutdown sequence accordingly. This patch implements the counting and shutdow

[Qemu-devel] [PATCH 3/4] savevm: improve subsections detection on load

2011-10-04 Thread Juan Quintela
We add qemu_peek_buffer, that is identical to qemu_get_buffer, just that it don't update f->buf_index. We add a paramenter to qemu_peek_byte() to be able to peek more than one byte. Once this is done, to see if we have a subsection we look: - 1st byte is QEMU_VM_SUBSECTION - 2nd byte is a length,

[Qemu-devel] [PATCH RFC V1 03/11] pci_ids: Add INTEL_82599_VF id.

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci_ids.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_ids.h b/hw/pci_ids.h index 83f3893..2ea5ec2 100644 --- a/hw/pci_ids.h +++ b/hw/pci_ids.h @@ -117,6 +117,7 @@ #define PCI_DEVICE_ID_INTEL_82801I_UHCI6 0x2939 #define PCI

Re: [Qemu-devel] [PATCH] ppc64: Fix linker script

2011-10-04 Thread Richard Henderson
On 10/04/2011 08:14 AM, Andreas Färber wrote: > Since commit 8733f609 (Fix linker scripts) linking on Linux/ppc64 fails: It occurs to me to wonder if we ought to simply auto-detect the presence of the -Ttext-segment ADDR option. If that's present, don't override the linker script and all the chan

[Qemu-devel] [PATCH RFC V1 07/11] host-pci-device: Add host_pci_find_ext_cap_offset

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/host-pci-device.c | 31 +++ hw/host-pci-device.h |2 ++ 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/hw/host-pci-device.c b/hw/host-pci-device.c index b3f2899..2a889d5 100644 --- a/hw/host-pci-device.c +++ b

[Qemu-devel] [PATCH RFC V1 05/11] pci_regs: Add PCI_EXP_TYPE_PCIE_BRIDGE

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/pci_regs.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/pci_regs.h b/hw/pci_regs.h index dad7d9a..091a749 100644 --- a/hw/pci_regs.h +++ b/hw/pci_regs.h @@ -391,6 +391,7 @@ #define PCI_EXP_TYPE_UPSTREAM 0x5 /* Upstream Port

[Qemu-devel] [PATCHv3] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Christian Borntraeger
On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track the overall number of running CPUs to call the shutdown sequence accordingly. This patch implements the counting and shutdown handling for the kvm path in qemu. Lets also wrap ch

[Qemu-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Anthony PERARD
Hi all, This patch series introduce the PCI passthrough for Xen. First, we have HostPCIDevice that help to access one PCI device of the host. Then, there are several additions in the QEMU code. One is qemu_run_one_timer to run a specific timer. It is used by PCI passthrough to run a timer about

[Qemu-devel] [PATCH RFC V1 04/11] pci_regs: Fix value of PCI_EXP_TYPE_RC_EC.

2011-10-04 Thread Anthony PERARD
Value check in PCI Express Base Specification rev 1.1 Signed-off-by: Anthony PERARD --- hw/pci_regs.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/pci_regs.h b/hw/pci_regs.h index e884096..dad7d9a 100644 --- a/hw/pci_regs.h +++ b/hw/pci_regs.h @@ -392,7 +392,7 @@

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc64: Fix linker script

2011-10-04 Thread Alexander Graf
On 10/04/2011 05:14 PM, Andreas Färber wrote: Since commit 8733f609 (Fix linker scripts) linking on Linux/ppc64 fails: LINK ppc64-linux-user/qemu-ppc64 /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../powerpc64-suse-linux/bin/ld:/home/afaerber/qemu/ppc64.ld:84: syntax error collect2: ld

[Qemu-devel] [PATCH] ppc64: Fix linker script

2011-10-04 Thread Andreas Färber
Since commit 8733f609 (Fix linker scripts) linking on Linux/ppc64 fails: LINK ppc64-linux-user/qemu-ppc64 /usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../powerpc64-suse-linux/bin/ld:/home/afaerber/qemu/ppc64.ld:84: syntax error collect2: ld gab 1 als Ende-Status zurück make[1]: *** [qemu-p

Re: [Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Paolo Bonzini
On 10/04/2011 04:38 PM, Juan Quintela wrote: Hi This series move the subsections detection code form: - Look that it starts form 5 To: - Look that it starts form 5 (SUBSECTION) - Look at the length - Look that length is bigger than section name - Look at the idstr and see that it starts with the

Re: [Qemu-devel] [PATCH] Make cpu_single_env thread local (Linux only for now)

2011-10-04 Thread Lluís Vilanova
Jan Kiszka writes: > On 2011-10-03 18:33, Dr. David Alan Gilbert wrote: >> Make cpu_single_env thread local (Linux only for now) >> * Fixes some user space threading issues (esp those triggered >> by bug 823902) >> >> Against rev d11cf8cc..., tested on ARM user mode, and ARM Vexpress >> system mo

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Stefano Stabellini
On Tue, 4 Oct 2011, Anthony Liguori wrote: > On 10/04/2011 09:58 AM, Avi Kivity wrote: > > On 10/04/2011 04:51 PM, Anthony PERARD wrote: > >> Hi all, > >> > >> This patch series introduce the PCI passthrough for Xen. > >> > >> First, we have HostPCIDevice that help to access one PCI device of the

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Anthony Liguori
On 10/04/2011 09:58 AM, Avi Kivity wrote: On 10/04/2011 04:51 PM, Anthony PERARD wrote: Hi all, This patch series introduce the PCI passthrough for Xen. First, we have HostPCIDevice that help to access one PCI device of the host. Then, there are several additions in the QEMU code. One is qemu

Re: [Qemu-devel] [Xen-devel] [PATCH RFC V1 00/11] Xen PCI Passthrough

2011-10-04 Thread Avi Kivity
On 10/04/2011 04:51 PM, Anthony PERARD wrote: Hi all, This patch series introduce the PCI passthrough for Xen. First, we have HostPCIDevice that help to access one PCI device of the host. Then, there are several additions in the QEMU code. One is qemu_run_one_timer to run a specific timer. It

Re: [Qemu-devel] [PATCH 05/23] migration: Refactor MigrationState creation

2011-10-04 Thread Anthony Liguori
On 10/04/2011 09:44 AM, Juan Quintela wrote: Anthony Liguori wrote: On 09/23/2011 07:56 AM, Juan Quintela wrote: Signed-off-by: Juan Quintela I think this would fit better if it were migrate_new() or migrate_open(). It definitely should be in the form noun_verb and not noun_verb_noun(). R

[Qemu-devel] [PATCH RFC V1 06/11] pci.c: Add pci_check_bar_overlap

2011-10-04 Thread Anthony PERARD
This function help Xen PCI Passthrough device to check for overlap. Signed-off-by: Anthony PERARD --- hw/pci.c | 46 ++ hw/pci.h |3 +++ 2 files changed, 49 insertions(+), 0 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index af74003..56e94d1 10

[Qemu-devel] [PATCH RFC V1 08/11] Introduce Xen PCI Passthrough, qdevice (1/3)

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/xen_pci_passthrough.c | 763 ++ hw/xen_pci_passthrough.h | 335 + hw/xen_pci_passthrough_helpers.c | 46 +++ 3 files changed, 1144 insertions(+), 0 deletions(-) create mode 100644 hw/xen_

[Qemu-devel] [PATCH RFC V1 10/11] Introduce Xen PCI Passthrough, MSI (3/3)

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/xen_pci_passthrough_msi.c | 674 ++ 1 files changed, 674 insertions(+), 0 deletions(-) create mode 100644 hw/xen_pci_passthrough_msi.c diff --git a/hw/xen_pci_passthrough_msi.c b/hw/xen_pci_passthrough_msi.c new file

[Qemu-devel] [PATCH RFC V1 11/11] config/make: Introduce --enable-xen-pci-passthrough, built it.

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- Makefile.target |7 +++ configure | 21 + 2 files changed, 28 insertions(+), 0 deletions(-) diff --git a/Makefile.target b/Makefile.target index f708453..b5fbc18 100644 --- a/Makefile.target +++ b/Makefile.target @@ -208,6 +20

[Qemu-devel] [PATCH RFC V1 01/11] Introduce HostPCIDevice to access a pci device on the host.

2011-10-04 Thread Anthony PERARD
Signed-off-by: Anthony PERARD --- hw/host-pci-device.c | 192 ++ hw/host-pci-device.h | 36 + 2 files changed, 228 insertions(+), 0 deletions(-) create mode 100644 hw/host-pci-device.c create mode 100644 hw/host-pci-device.h diff --git

[Qemu-devel] [PATCH RFC V1 02/11] qemu-timer: Introduce qemu_run_one_timer

2011-10-04 Thread Anthony PERARD
Used by the Xen PCI Passthrough code to run the timer about the power state transition. Signed-off-by: Anthony PERARD --- qemu-timer.c | 15 +++ qemu-timer.h |3 +++ 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 46dd483..15e65

Re: [Qemu-devel] [PATCH 17/23] migration: make sure we always have a migration state

2011-10-04 Thread Juan Quintela
Anthony Liguori wrote: > On 09/23/2011 07:57 AM, Juan Quintela wrote: >> This cleans up a lot the code as we don't have to check anymore if >> the variable is NULL or not. >> >> We don't make it static, because when we integrate fault tolerance, we >> can have several migrations at once. >> >> Sig

Re: [Qemu-devel] [PATCH 15/23] migration: use global variable directly

2011-10-04 Thread Juan Quintela
Anthony Liguori wrote: > How about we compromise and add a: > > MigrationState *migrate_get_current(void); I can agree with this one. > I'm strongly opposed to propagating direct usage of a global. If it's > at least a function call, that's a bit nicer. What I am against is with trying to "hi

Re: [Qemu-devel] [PATCH 05/23] migration: Refactor MigrationState creation

2011-10-04 Thread Juan Quintela
Anthony Liguori wrote: > On 09/23/2011 07:56 AM, Juan Quintela wrote: >> Signed-off-by: Juan Quintela > > > I think this would fit better if it were migrate_new() or migrate_open(). > > It definitely should be in the form noun_verb and not noun_verb_noun(). > > Regards, You are the native speaker

[Qemu-devel] [PATCH 0/4] migration: Improve subsections detection

2011-10-04 Thread Juan Quintela
Hi This series move the subsections detection code form: - Look that it starts form 5 To: - Look that it starts form 5 (SUBSECTION) - Look at the length - Look that length is bigger than section name - Look at the idstr and see that it starts with the subsection name. Please review. Later, Juan.

[Qemu-devel] [PATCH 4/4] Revert "savevm: fix corruption in vmstate_subsection_load()."

2011-10-04 Thread Juan Quintela
This reverts commit eb60260de0b050a5e8ab725e84d377d0b44c43ae. Conflicts: savevm.c We changed qemu_peek_byte() prototype, just fixed the rejects. Signed-off-by: Juan Quintela --- savevm.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/savevm.c b/savev

[Qemu-devel] [PATCH 2/4] savevm: some coding style cleanups

2011-10-04 Thread Juan Quintela
This patch will make moving code on next patches and having checkpatch happy easier. Signed-off-by: Juan Quintela --- savevm.c | 21 ++--- 1 files changed, 14 insertions(+), 7 deletions(-) diff --git a/savevm.c b/savevm.c index 31131df..5fee4e2 100644 --- a/savevm.c +++ b/save

[Qemu-devel] [PATCH 1/4] savevm: teach qemu_fill_buffer to do partial refills

2011-10-04 Thread Juan Quintela
We will need on next patch to be able to lookahead on next patch Signed-off-by: Juan Quintela --- savevm.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/savevm.c b/savevm.c index 46f2447..31131df 100644 --- a/savevm.c +++ b/savevm.c @@ -455,6 +455,7 @@ vo

Re: [Qemu-devel] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Alexander Graf
On 10/04/2011 03:47 PM, Christian Borntraeger wrote: Something like the following? s390: Fix cpu shutdown for KVM On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track this number to call the shutdown sequence accordingly. This p

Re: [Qemu-devel] [PATCH v3 00/23] Refactor and cleanup migration code

2011-10-04 Thread Anthony Liguori
I peeled off the first 4 patches to apply. Once I finish testing I'll push them. Most of the rest of the series looks good. I really don't like making MigrationState nullable with MIG_STATE_NONE. I don't think it makes sense with multiple MigrationStates. The direct use of globals is not

Re: [Qemu-devel] [PATCH 23/23] migration: make migration-{tcp, unix} consistent

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: Files are almost identical in functionality, just remove the differences that make no sense. Signed-off-by: Juan Quintela Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- migration-tcp.c | 15 ++- migration-unix.c |

Re: [Qemu-devel] [PATCH 22/23] migration: propagate error correctly

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: unix and tcp outgoing migration have error values, but didn't returned it. Make them return the error. Notice that EINPROGRESS& EWOULDBLOCK are not considered errors as callwill be retry later. Signed-off-by: Juan Quintela Reviewed-by: Anthony Li

Re: [Qemu-devel] [PATCH 21/23] migration: Don't use callback on file defining it

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: Signed-off-by: Juan Quintela I don't think this is better. It just eliminates the possibility of having useful trace points in get_error. Regards, Anthony Liguori --- migration-tcp.c |4 ++-- migration-unix.c |6 +++--- 2 files ch

Re: [Qemu-devel] [PATCH 19/23] migration: Export a function that tells if the migration has finished correctly

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: This will allows us to hide the status values. Signed-off-by: Juan Quintela --- migration.c |4 ++-- migration.h |2 +- ui/spice-core.c |4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/migration.c b/migr

Re: [Qemu-devel] [PATCH] runstate: do not discard runstate changes when paused

2011-10-04 Thread Luiz Capitulino
On Tue, 04 Oct 2011 16:09:03 +0200 Paolo Bonzini wrote: > On 10/04/2011 03:49 PM, Luiz Capitulino wrote: > > There's a semantic change which I'm not completely sure it won't generate > > unexpected side-effects: today vm_stop() will only carry any action if the > > machine is running, otherwise i

Re: [Qemu-devel] [PATCH 18/23] migration: Use bandwidth_limit directly

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: Now that current_migration always exist, there is no reason for max_throotle variable. Signed-off-by: Juan Quintela If we can have multiple MigrationStates, this doesn't really make sense. Regards, Anthony Liguori --- migration.c | 19 ++

Re: [Qemu-devel] [PATCH 17/23] migration: make sure we always have a migration state

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: This cleans up a lot the code as we don't have to check anymore if the variable is NULL or not. We don't make it static, because when we integrate fault tolerance, we can have several migrations at once. Signed-off-by: Juan Quintela --- migration.c

Re: [Qemu-devel] [PATCH 15/23] migration: use global variable directly

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: We are setting a pointer to a local variable in the previous line, just use the global variable directly. We remove the ->file test because it is already done inside qemu_file_set_rate_limit() function. Signed-off-by: Juan Quintela --- migration.c

[Qemu-devel] [PATCH] i386: wire up MSR_IA32_MISC_ENABLE

2011-10-04 Thread Avi Kivity
It's needed for its default value - bit 0 specifies that "rep movs" is good enough for memcpy, and Linux may use a slower memcpu if it is not set, depending on cpu family/model. Signed-off-by: Avi Kivity --- target-i386/cpu.h |5 + target-i386/helper.c|1 + target-i386/kvm.

Re: [Qemu-devel] [PATCH 14/23] migration: Move exported functions to the end of the file

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:57 AM, Juan Quintela wrote: This means we can remove the two forward declarations. Signed-off-by: Juan Quintela Reviewed-by: Anthony Liguori Regards, Anthony Liguori --- migration.c | 188 -- 1 files changed, 91

Re: [Qemu-devel] [PATCH 05/23] migration: Refactor MigrationState creation

2011-10-04 Thread Anthony Liguori
On 09/23/2011 07:56 AM, Juan Quintela wrote: Signed-off-by: Juan Quintela --- migration-exec.c | 16 +--- migration-fd.c | 16 +--- migration-tcp.c | 15 +-- migration-unix.c | 15 +-- migration.c | 29 +++

Re: [Qemu-devel] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Christian Borntraeger
On 04/10/11 15:56, Peter Maydell wrote: > On 4 October 2011 14:47, Christian Borntraeger wrote: >> + * We can only deliver interrupts to (interrupt) enabled CPUs. >> + * We dont call kvm_s390_add_running_cpu here, since CPUs in enabled >> wait >> + * will wait inside the kernel (no ex

Re: [Qemu-devel] [PATCH] runstate: do not discard runstate changes when paused

2011-10-04 Thread Paolo Bonzini
On 10/04/2011 03:49 PM, Luiz Capitulino wrote: There's a semantic change which I'm not completely sure it won't generate unexpected side-effects: today vm_stop() will only carry any action if the machine is running, otherwise it's no-op. This patch changes that. More or less, yes. I tried to l

Re: [Qemu-devel] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Peter Maydell
On 4 October 2011 14:47, Christian Borntraeger wrote: > +     * We can only deliver interrupts to (interrupt) enabled CPUs. > +     * We dont call kvm_s390_add_running_cpu here, since CPUs in enabled wait > +     * will wait inside the kernel (no exit). Therefore, the targeted > +     * CPUs was n

Re: [Qemu-devel] [PATCH 0/1] Make the help info more friendly in monitor

2011-10-04 Thread Luiz Capitulino
On Wed, 28 Sep 2011 10:16:19 +0100 Stefan Hajnoczi wrote: > On Wed, Sep 28, 2011 at 10:00 AM, Wayne Xia > wrote: > > During my test, I found it inconvenient when I type "help" or "help info", > > because the information was shown without orderliness. This patch would just > > show the help info

Re: [Qemu-devel] [PATCH] runstate: do not discard runstate changes when paused

2011-10-04 Thread Luiz Capitulino
On Tue, 4 Oct 2011 14:04:45 +0200 Paolo Bonzini wrote: > Trying to migrate a paused machine fails. The reason is that > the RSTATE_PRE_MIGRATE is reached with vm_stop, and this > transition is eaten when the vm is already paused. This patch > fixes the problem by always going through runstate_

Re: [Qemu-devel] s390: Fix cpu shutdown for KVM

2011-10-04 Thread Christian Borntraeger
Something like the following? s390: Fix cpu shutdown for KVM On s390 a shutdown is the state of all CPUs being either stopped or disabled (for interrupts) waiting. We have to track this number to call the shutdown sequence accordingly. This patch implements the counting and shutdown handling for

Re: [Qemu-devel] KVM call agenda for October 4th

2011-10-04 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please send in any agenda items you are interested in covering. As there is no agenda, this week call gets cancelled. Happy hacking, Juan.

[Qemu-devel] [PATCH v2] runstate: add more valid transitions

2011-10-04 Thread Paolo Bonzini
This patch adds more valid transitions to the table, and avoids that the VM remains stuck in RSTATE_SAVEVM state when savevm is done on a paused virtual machine. Signed-off-by: Paolo Bonzini --- savevm.c |9 +++-- vl.c |5 + 2 files changed, 12 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH] runstate: add more valid transitions

2011-10-04 Thread Paolo Bonzini
This patch adds more valid transitions to the table, and avoids that the VM remains stuck in RSTATE_SAVEVM state when savevm is done on a paused virtual machine. Signed-off-by: Paolo Bonzini --- savevm.c | 11 --- vl.c |5 + 2 files changed, 13 insertions(+), 3 deletions(-)

  1   2   >