Re: [Qemu-devel] [PATCH 15/22] usb: Add packet combining functions

2012-10-24 Thread Gerd Hoffmann
On 10/24/12 18:14, Hans de Goede wrote: > +/* > + * Process / cancel combined packets, called from > + * usb_ep_combine_input_packets() / usb_combined_packet_cancel(). > + * Only called for devices which call these functions themselves. > + */ > +int (*handle_combined_data)(

[Qemu-devel] [Bug 1071149] [NEW] target-mips: special3 instruction dinsm translation error

2012-10-24 Thread Nikita Kanunnikov
Public bug reported: Function decode_opc() in translate.c calls function gen_bitops(), which has such prototype: /* special3 bitfield operations */ static void gen_bitops (DisasContext *ctx, uint32_t opc, int rt, int rs, int lsb, int msb) The code for DINSM instruction is

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-24 Thread Evgeny Voevodin
Here are the results of tests before and after this patch series was applied: * EEMBC CoreMark (before -> after) - Guest: Exynos4210 ARMv7, Linux (Custom buildroot image) - Host: Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz, 4GB RAM, Linux - Results: 1148.105626 -> 1161.440186 (+1.16%) * nbench

Re: [Qemu-devel] [PATCH 1/3] nbd: Only try to send flush/discard commands if connected to the NBD server

2012-10-24 Thread Kevin Wolf
Am 24.10.2012 16:32, schrieb Jamie Lokier: > Kevin Wolf wrote: >> Am 24.10.2012 14:16, schrieb Nicholas Thomas: >>> On Tue, 2012-10-23 at 16:02 +0100, Jamie Lokier wrote: Since the I/O _order_ before, and sometimes after, flush, is important for data integrity, this needs to be maintained

Re: [Qemu-devel] nvram and boot order

2012-10-24 Thread David Gibson
On Fri, Oct 19, 2012 at 10:40:45AM +0200, Alexander Graf wrote: > > > On 19.10.2012, at 10:24, David Gibson wrote: > > > On Thu, Oct 18, 2012 at 08:32:54AM +0200, Alexander Graf wrote: > >> > >> > >> On 18.10.2012, at 03:18, Benjamin Herrenschmidt > >> wrote: > >> > >>> On Thu, 2012-10-18

[Qemu-devel] [PATCH v11] kvm: notify host when the guest is panicked

2012-10-24 Thread Hu Tao
We can know the guest is panicked when the guest runs on xen. But we do not have such feature on kvm. Another purpose of this feature is: management app(for example: libvirt) can do auto dump when the guest is panicked. If management app does not do auto dump, the guest's user can do dump by hand

[Qemu-devel] [PATCH v11 6/6] allower the user to disable pv event support

2012-10-24 Thread Hu Tao
From: Wen Congyang Signed-off-by: Wen Congyang --- hw/pc_piix.c|6 +- qemu-config.c |4 qemu-options.hx |3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fb67dc1..864d356 100644 --- a/hw/pc_piix.c +++ b/hw/pc_pii

[Qemu-devel] [PATCH v11 4/6] add a new qevent: QEVENT_GUEST_PANICKED

2012-10-24 Thread Hu Tao
This event will be emited when the guest is panicked. Signed-off-by: Wen Congyang --- monitor.c |1 + monitor.h |1 + 2 files changed, 2 insertions(+) diff --git a/monitor.c b/monitor.c index d17ae2d..d2e4bbf 100644 --- a/monitor.c +++ b/monitor.c @@ -457,6 +457,7 @@ static const char *

[Qemu-devel] [PATCH v11 5/6] introduce a new qom device to deal with panicked event

2012-10-24 Thread Hu Tao
If the target is x86/x86_64, the guest's kernel will write 0x01 to the port KVM_PV_EVENT_PORT when it is panciked. This patch introduces a new qom device kvm_pv_ioport to listen this I/O port, and deal with panicked event according to panicked_action's value. The possible actions are: 1. emit QEVEN

[Qemu-devel] [PATCH v11 3/6] add a new runstate: RUN_STATE_GUEST_PANICKED

2012-10-24 Thread Hu Tao
From: Wen Congyang The guest will be in this state when it is panicked. Signed-off-by: Wen Congyang --- qapi-schema.json |6 +- qmp.c|3 ++- vl.c |7 ++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.j

[Qemu-devel] [PATCH v11 1/6] start vm after reseting it

2012-10-24 Thread Hu Tao
From: Wen Congyang The guest should run after reseting it, but it does not run if its old state is RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED. We don't set runstate to RUN_STATE_PAUSED when reseting the guest, so the runstate will be changed from RUN_STATE_INTERNAL_ERROR or RUN_STATE_PAUSED to

[Qemu-devel] [PATCH v11 2/6] update kernel headers

2012-10-24 Thread Hu Tao
update kernel headers to add pv event macros. Signed-off-by: Wen Congyang Signed-off-by: Hu Tao --- linux-headers/asm-x86/kvm_para.h |1 + linux-headers/linux/kvm_para.h |6 ++ 2 files changed, 7 insertions(+) diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-24 Thread Evgeny Voevodin
On 10/25/2012 07:17 AM, 陳韋任 (Wei-Ren Chen) wrote: On Thu, Oct 25, 2012 at 07:06:37AM +0400, Evgeny Voevodin wrote: Any other comments on the patches? I didn't get the consensus. Do we need a pointer to tcg context? As I said before, I didn't notice any slow-down with it. On 10/23/2012 10:21 AM,

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-24 Thread Wei-Ren Chen
On Thu, Oct 25, 2012 at 07:06:37AM +0400, Evgeny Voevodin wrote: > Any other comments on the patches? > I didn't get the consensus. Do we need a pointer to tcg context? > As I said before, I didn't notice any slow-down with it. > > On 10/23/2012 10:21 AM, Evgeny Voevodin wrote: > > This set of pat

Re: [Qemu-devel] [PATCH v2 0/7] TCG global variables clean-up

2012-10-24 Thread Evgeny Voevodin
Any other comments on the patches? I didn't get the consensus. Do we need a pointer to tcg context? As I said before, I didn't notice any slow-down with it. On 10/23/2012 10:21 AM, Evgeny Voevodin wrote: This set of patches moves global variables to tcg_ctx: gen_opc_ptr gen_opparam_ptr gen_opc_b

Re: [Qemu-devel] [PATCH] stream: fix ratelimit_set_speed

2012-10-24 Thread Eric Blake
On 10/24/2012 04:10 AM, Dietmar Maurer wrote: > The formula to compute slice_quota was wrong. > > Signed-off-by: Dietmar Maurer > --- > include/qemu/ratelimit.h |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) Reviewed-by: Eric Blake However, it might also be nice to point to the

Re: [Qemu-devel] raltelimit bug

2012-10-24 Thread Eric Blake
On 10/24/2012 02:56 AM, Dietmar Maurer wrote: > The code to compute slice_quota seems buggy. The following fixes the issue: > > --- new.orig/include/qemu/ratelimit.h 2012-10-22 07:06:31.0 +0200 Missing a Signed-off-By, so it cannot be taken as-is. See http://wiki.qemu.org/Contribute/Su

[Qemu-devel] raltelimit bug

2012-10-24 Thread Dietmar Maurer
The code to compute slice_quota seems buggy. The following fixes the issue: --- new.orig/include/qemu/ratelimit.h 2012-10-22 07:06:31.0 +0200 +++ new/include/qemu/ratelimit.h2012-10-22 07:06:49.0 +0200 @@ -42,7 +42,7 @@ uint64_t sli

[Qemu-devel] [PATCH] stream: fix ratelimit_set_speed

2012-10-24 Thread Dietmar Maurer
The formula to compute slice_quota was wrong. Signed-off-by: Dietmar Maurer --- include/qemu/ratelimit.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/qemu/ratelimit.h b/include/qemu/ratelimit.h index c6ac281..d1610f1 100644 --- a/include/qemu/ratelimit.h +++

[Qemu-devel] [QEMU PATCH 3/3] target-i386: kvm_cpu_fill_host: use GET_SUPPORTED_CPUID

2012-10-24 Thread Eduardo Habkost
Change the kvm_cpu_fill_host() function to use kvm_arch_get_supported_cpuid() instead of running the CPUID instruction directly, when checking for supported CPUID features. This should solve two problems at the same time: * "-cpu host" was not enabling features that don't need support on the

[Qemu-devel] [QEMU PATCH 2/3] target-i386: cpu: make -cpu host/check/enforce code KVM-specific

2012-10-24 Thread Eduardo Habkost
Rationale: * "-cpu host" is available only when using KVM * The current implementation of -cpu check/enforce (check_features_against_host()) makes sense only when using KVM. So this makes the functions check_features_against_host() and cpu_x86_fill_host() KVM-specific, document them as such,

[Qemu-devel] [QEMU PATCH 1/3] target-i385: make cpu_x86_fill_host() void

2012-10-24 Thread Eduardo Habkost
The return value of that function is always 0, and is always ignored. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 38fca92..42171c9 100644 --- a/target-i386/cpu.c +++ b/targ

[Qemu-devel] [QEMU PATCH 0/3] Fix -cpu host and enforce/check to use GET_SUPPORTED_CPUID

2012-10-24 Thread Eduardo Habkost
This depends on a previous series I have submitted: Subject: [QEMU PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes Message-Id: <1349383747-19383-1-git-send-email-ehabk...@redhat.com> http://article.gmane.org/gmane.comp.emulators.kvm.devel/99375 Eduardo Habkost (3): target-i385

Re: [Qemu-devel] [PATCHv2 3/4] Support for "double whitelist" filters

2012-10-24 Thread Eduardo Otubo
On Tue, Oct 23, 2012 at 11:10:58AM -0400, Corey Bryant wrote: > > > On 10/23/2012 01:55 AM, Eduardo Otubo wrote: > >This patch includes a second whitelist right before the main loop. It's > >a smaller and more restricted whitelist, excluding execve() among many > >others. > > > >v2: * ctx changed

Re: [Qemu-devel] [PATCH v3 01/26] blockdev: Introduce a default machine blockdev interface field, QEMUMachine->mach_if

2012-10-24 Thread Jason Baron
On Wed, Oct 24, 2012 at 03:12:36PM +0200, Markus Armbruster wrote: > Jason Baron writes: > > > From: Jason Baron > > > > The current QEMUMachine definition has a 'use_scsi' field to indicate if a > > machine type should use scsi by default. However, Q35 wants to use ahci by > > default. Thus, in

Re: [Qemu-devel] [PATCH v3 02/26] blockdev: Introduce IF_AHCI

2012-10-24 Thread Jason Baron
On Wed, Oct 24, 2012 at 05:50:25PM +0200, Markus Armbruster wrote: > Jason Baron writes: > > > On Mon, Oct 22, 2012 at 01:40:21PM +0200, Kevin Wolf wrote: > >> >> From: Jason Baron > >> >> > >> >> Introduce IF_AHCI so that q35 can differentiate between ide and ahci > >> >> disks. > >> >> This a

[Qemu-devel] Subject: [PATCH 00/27] Fix APIC-ID-based CPU topology, take 3

2012-10-24 Thread Eduardo Habkost
Overview of patches: * 1-3 are just header dependency/conflict cleanups * 4 is the APIC ID initialization patch sent earlier by Igor * 5-6 change the KVM code to use the APIC ID as vcpu_id, on i386 * 7-21 refactor the PC initialization code to allow a compatibility argument to be easily set

[Qemu-devel] [PATCH 02/27] cpus.h: include qemu-stdio.h

2012-10-24 Thread Eduardo Habkost
Needed for the definition of fprint_function. This is not necessary right now, but it will be necessary if code that doesn't include cpu-common.h includes cpus.h. Signed-off-by: Eduardo Habkost --- cpus.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpus.h b/cpus.h index 81bd817..b7c37

Re: [Qemu-devel] [PATCH 00/32] Header file renaming and cleanup

2012-10-24 Thread Andreas Färber
Am 24.10.2012 14:58, schrieb Paolo Bonzini: > .gitignore |1 + > Makefile | 49 +-- > Makefile.dis | 20 - > Makefile.objs | 39 +--

[Qemu-devel] [PATCH 06/27] target-i386: kvm: set vcpu_id to APIC ID instead of CPU index

2012-10-24 Thread Eduardo Habkost
The CPU ID in KVM is supposed to be the APIC ID, so change the KVM_CREATE_VCPU call to match it. The current behavior didn't break anything yet because today the APIC ID is assumed to be == the CPU index, but this won't be true in the future. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2:

[Qemu-devel] [PATCH 16/27] pc: pass PCInitArgs struct to pc_bios_init()

2012-10-24 Thread Eduardo Habkost
The argument will be used later, when enabling compatibility mode for the APIC ID generation code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index c38d8b2..0e01003 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -57

[Qemu-devel] [PATCH 12/22] usb: Move clearing of queue on halt to the core

2012-10-24 Thread Hans de Goede
hcds which queue up more then one packet at once (uhci, ehci and xhci), must clear the queue after an error which has caused the queue to halt. Currently this is handled as a special case inside the hcd code, this patch instead adds an USB_RET_REMOVE_FROM_QUEUE packet result code, teaches the 3 hc

[Qemu-devel] [PATCH 08/27] pc: pc_init1(): remove MemoryRegion arguments

2012-10-24 Thread Eduardo Habkost
All calls to pc_init1() pass the same expressions as arguments, so move the expressions inside pc_init1(). Signed-off-by: Eduardo Habkost --- hw/pc_piix.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 3c4ce8f..5093ce5 10

[Qemu-devel] [PATCH 08/17] uhci: Add uhci_read_td() helper function

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 7589a5b..6d2db7f 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -693,6 +693,15 @@ static USBDevice

[Qemu-devel] [PATCH 03/17] uhci: cleanup: Add an unlink call to uhci_async_cancel()

2012-10-24 Thread Hans de Goede
All callers of uhci_async_cancel() call uhci_async_unlink() first, so lets move the unlink call to uhci_async_cancel() Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 129792b..82

[Qemu-devel] [PATCH 11/27] pc: add PC_DEFAULT_CPU_MODEL #define

2012-10-24 Thread Eduardo Habkost
Make the pc_cpus_init() code more clear, by removing an #ifdef from the middle of the code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 408823b..67fdbe2 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -

[Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3

2012-10-24 Thread Eduardo Habkost
This: - Renames the init function for pc-1.2 and lower to pc_init_pci_v1_2; - Creates a pc_init_pci_v1_3 function for pc-1.3. Right now both functions have exactly the same code, but the following patch will change pc_init_v1_2 to set compatibility PCInitArgs fields. Signed-off-by: Eduardo Habk

[Qemu-devel] [PATCH 06/17] uhci: Move emptying of the queue's asyncs' queue to uhci_queue_free

2012-10-24 Thread Hans de Goede
Cleanup: all callers of uhci_queue_free first unconditionally cancel all remaining asyncs in the queue, so lets move this to uhci_queue_free(). Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/hw/usb/h

[Qemu-devel] [PATCH 02/17] uhci: No need to handle async completion of isoc packets

2012-10-24 Thread Hans de Goede
No devices ever return async for isoc endpoints and the core already enforces this. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 29 +++-- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 4a1ea6b..129792b 1

Re: [Qemu-devel] [PATCH V19 5/7] Add a TPM Passthrough backend driver implementation

2012-10-24 Thread Stefan Berger
On 09/27/2012 10:28 AM, Corey Bryant wrote: On 06/04/2012 03:37 PM, Stefan Berger wrote: + +/* borrowed from qemu-char.c */ +static int tpm_passthrough_unix_write(int fd, const uint8_t *buf, uint32_t len) +{ +return send_all(fd, buf, len); +} + +static int tpm_passthrough_unix_read(int f

Re: [Qemu-devel] [PATCH V19 7/7] Add fd parameter for TPM passthrough driver

2012-10-24 Thread Stefan Berger
On 10/03/2012 02:46 PM, Corey Bryant wrote: On 06/04/2012 03:37 PM, Stefan Berger wrote: @@ -201,6 +201,10 @@ static TPMInfo *qmp_query_tpm_inst(TPMBackend *drv) res->path = g_strdup(drv->path); res->has_path = true; } +if (drv->tpm_fd != NULL && *drv->tpm_fd >= 0

Re: [Qemu-devel] [PATCH V19 1/7] Support for TPM command line options

2012-10-24 Thread Stefan Berger
On 09/27/2012 10:12 AM, Corey Bryant wrote: On 06/04/2012 03:37 PM, Stefan Berger wrote: + +#ifdef CONFIG_TPM + +static const TPMDriverOps *bes[] = { I think bes[] would be more descriptive if it were named be_drivers[] or be_ops[]? Renamed to be_drivers. +if (!QLIST_EMPTY(&tpm_ba

[Qemu-devel] [PATCH 25/27] target-i386: topology & APIC ID utility functions

2012-10-24 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Cc: Blue Swirl Changes v1 -> v2: - Support 32-bit APIC IDs (in case x2APIC is going to be used) - Coding style changes - Use TARGET_I386_TOPOLOGY_H instead of __QEMU_X86_TOPOLOGY_H__ - Rename topo_make_apic_id() to topo_apicid_for_cpu() - Rename __make_api

[Qemu-devel] [PATCH 20/27] target-i386: do not call x86_cpu_realize() on cpu_x86_init()

2012-10-24 Thread Eduardo Habkost
The PC code will need to run additional steps when initializing the CPU object, before x86_cpu_realize(). So, make cpu_x86_init() not call x86_cpu_realize(), and add two x86_cpu_realize() calls: - One on cpu_init(), that is called only by *-user - One on pc_cpu_init(), that will include the more a

[Qemu-devel] [PATCH 14/27] pc: use FWCfgState* instead of void* for fw_cfg data

2012-10-24 Thread Eduardo Habkost
I don't know why the code uses void* if the FWCfgState typedef is declared at the same header where fw_cfg_init() and other fw_cfg_*() functions are declared. This changes the code to use FWCfgState* instead of void* in the PC initialization code. Signed-off-by: Eduardo Habkost --- hw/pc.c | 8

[Qemu-devel] [PATCH 03/27] hw/apic.c: rename bit functions to not conflict with bitops.h

2012-10-24 Thread Eduardo Habkost
Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Coding style change: break too-long line --- hw/apic.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 49f0015..1772f2c 100644 --- a/hw/apic.c +++ b/hw/api

[Qemu-devel] [PATCH 17/22] usb-redir: Add support for 32 bits bulk packet length

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- configure | 2 +- hw/usb/redirect.c | 7 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 248b871..036c38a 100755 --- a/configure +++ b/configure @@ -2768,7 +2768,7 @@ fi # check for usbredirparser for u

Re: [Qemu-devel] [PATCH V19 2/7] Add TPM (frontend) hardware interface (TPM TIS) to Qemu

2012-10-24 Thread Stefan Berger
On 09/27/2012 10:22 AM, Corey Bryant wrote: On 06/04/2012 03:37 PM, Stefan Berger wrote: + +/* whether the STS interrupt is supported */ +/*#define RAISE_STS_IRQ */ Why is this commented out? Will activate it. +if ((tis->loc[locty].inte & TPM_TIS_INT_ENABLED) && +(tis->loc[lo

[Qemu-devel] [PATCH 04/17] uhci: Don't retry on error

2012-10-24 Thread Hans de Goede
Since we are either dealing with emulated devices, where retrying is not going to help, or with redirected devices where the host OS will have already retried, don't bother retrying on failed transfers. Also move some common/indentical code out of all the error cases into the generic error path.

[Qemu-devel] [PATCH 22/27] pc: set CPU APIC ID explicitly

2012-10-24 Thread Eduardo Habkost
The PC code takes care of CPU topology, and CPU topology affect the CPU APIC ID. So the PC CPU initialization code needs to set the APIC ID explicitly. By now, keep the existing behavior but create a apic_id_for_cpu() function that will be changed later to implement appropriate topology-dependent

[Qemu-devel] [PATCH 05/22] ehci: Improve latency of interrupt delivery and async schedule scanning

2012-10-24 Thread Hans de Goede
While doing various performance tests of reading from USB mass storage devices I noticed the following:: 1) When an async handled packet completes, we don't immediately report an interrupt to the guest, instead we wait for the frame-timer to run and report it from there 2) If 1) has been fixe

[Qemu-devel] [PATCH 11/17] uhci: Immediately free queues on device disconnect

2012-10-24 Thread Hans de Goede
There is no need to just cancel any in-flight packets, and then wait for validate-end to clean things up, we can simply clean things up immediately on device removal. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --gi

[Qemu-devel] [PATCH 24/27] tests: support target-specific unit tests

2012-10-24 Thread Eduardo Habkost
To make unit tests that depend on target-specific files, use check-unit--y and test-obj--y. Signed-off-by: Eduardo Habkost --- tests/Makefile | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 26a67ce..ce4f6f2 100644 --- a/

[Qemu-devel] [PATCH 04/27] target-i386: initialize APIC at CPU level

2012-10-24 Thread Eduardo Habkost
From: Igor Mammedov (L)APIC is a part of cpu [1] so move APIC initialization inside of x86_cpu object. Since cpu_model and override flags currently specify whether APIC should be created or not, APIC creation&initialization is moved into x86_cpu_apic_init() which is called from x86_cpu_realize().

[Qemu-devel] [PATCH 09/27] pc: pc_init1(): get QEMUMachineInitArgs argument

2012-10-24 Thread Eduardo Habkost
Instead of passing each QEMUMachineInitArgs field individually, just pass the whole QEMUMachineInitArgs object to pc_init1(). Signed-off-by: Eduardo Habkost --- hw/pc_piix.c | 47 --- 1 file changed, 12 insertions(+), 35 deletions(-) diff --git a/hw/p

[Qemu-devel] [PATCH 13/27] pc: pass PCInitArgs struct to pc_memory_init()

2012-10-24 Thread Eduardo Habkost
Instead of having a large list of arguments, just pass the PCInitArgs struct to pc_memory_init(). This is being done mainly to facilitate the addition of an argument to be used by bochs_bios_init() (enabling compatibility mode for APIC ID generation). Signed-off-by: Eduardo Habkost --- hw/pc.c

[Qemu-devel] [PATCH 17/27] xen_machine_pv: use cpu_init() instead of cpu_x86_init()

2012-10-24 Thread Eduardo Habkost
cpu_init() will be kept as the simple-to-use init+realize function that some code uses (e.g., *-user, and now xen_machine_pv too). This will make cpu_x86_init() be used directly only by the more specialized PC code, that will need to do additional initialization steps between the CPU object creati

[Qemu-devel] [PATCH 19/27] cpu_x86_init: check for x86_cpu_realize() errors

2012-10-24 Thread Eduardo Habkost
If x86_cpu_realize() set any errors, print an error message and return NULL. Signed-off-by: Eduardo Habkost --- target-i386/helper.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/target-i386/helper.c b/target-i386/helper.c index c5d42c5..1e5f61f 100644 --- a/target-i

[Qemu-devel] uhci: Cleanups, fixes and improvements

2012-10-24 Thread Hans de Goede
Here is a patchset with assorted uhci cleanups / fixes / improvments, please add these to your tree for Anthony. Regards, Hans

[Qemu-devel] [PATCH 01/22] uhci: Properly unmap packets on cancel / invalid pid

2012-10-24 Thread Hans de Goede
Packets with an invalid pid, or which were cancelled have usb_packet_map() called on them on init, but not usb_packet_unmap() before being freed. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index c

[Qemu-devel] [PATCH 05/17] uhci: Drop unnecessary forward declaration of some static functions

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index eecd291..7dfedef 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -693,9 +693,6 @@ static USBDevice *uhci_find_device(UHCIState *s, uint8_t

Re: [Qemu-devel] [PATCH 26/27] pc: create separate init function for pc-1.3

2012-10-24 Thread Michael S. Tsirkin
On Wed, Oct 24, 2012 at 03:50:00PM -0200, Eduardo Habkost wrote: > This: > - Renames the init function for pc-1.2 and lower to pc_init_pci_v1_2; > - Creates a pc_init_pci_v1_3 function for pc-1.3. > > Right now both functions have exactly the same code, but the following patch > will change pc_i

[Qemu-devel] [PATCH 10/27] pc: create PCInitArgs struct

2012-10-24 Thread Eduardo Habkost
Instead of changing pc_init1() arguments every time some additional machine-type-specific behavior has to be introduced, create a struct that will carry all the information needed by the PC initialization functions. Signed-off-by: Eduardo Habkost --- hw/pc.h | 8 hw/pc_piix.c | 41

[Qemu-devel] [PATCH 07/27] pc: pc_init1(): always use rom_memory on pc_memory_init() call

2012-10-24 Thread Eduardo Habkost
When pci_enabled is false, rom_memory is already pointing to system_memory, so there's no need to check pci_enabled again when calling pc_memory_init(). Signed-off-by: Eduardo Habkost --- hw/pc_piix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c

[Qemu-devel] [PATCH 18/27] pc: isolate the code that create CPUs

2012-10-24 Thread Eduardo Habkost
The code will get more complex, so put it outside the for loop, into a separate function. Signed-off-by: Eduardo Habkost --- hw/pc.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 0e01003..85eab04 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -8

[Qemu-devel] [PATCH 15/27] pc: rename bochs_bios_init() to pc_bios_init()

2012-10-24 Thread Eduardo Habkost
This code is not specific to the Bochs BIOS, so rename it. Signed-off-by: Eduardo Habkost --- hw/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 4e971c8..c38d8b2 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -570,7 +570,7 @@ int e820_add_entry(uint64_

Re: [Qemu-devel] [PATCH 00/15] QEMU KVM_GET_SUPPORTED_CPUID cleanups and fixes

2012-10-24 Thread Eduardo Habkost
Has anybody looked at this series? Avi, Marcelo? On Thu, Oct 04, 2012 at 05:48:52PM -0300, Eduardo Habkost wrote: > Most of this series are just cleanups that will help when making -cpu > check/enforce work properly, with some fixes. > > In addition to code movements, the main changes are: > -

[Qemu-devel] [PATCH 27/27] pc: generate APIC IDs according to CPU topology

2012-10-24 Thread Eduardo Habkost
This keeps compatibility on machine-types pc-1.2 and older, and prints a warning in case the requested configuration won't get the correct topology. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Move code to cpu.c - keep using cpu_index on *-user - Use SMP.contiguous_apic_ids global p

[Qemu-devel] [PATCH 21/27] fw_cfg: remove FW_CFG_MAX_CPUS from fw_cfg_init()

2012-10-24 Thread Eduardo Habkost
PC will not use max_cpus for that field, so move it outside the common code so it can use a different value on PC. Signed-off-by: Eduardo Habkost --- hw/fw_cfg.c | 1 - hw/pc.c | 2 +- hw/ppc_newworld.c | 1 + hw/ppc_oldworld.c | 1 + hw/sun4m.c| 3 +++ hw/sun4u.c

[Qemu-devel] [PATCH 12/27] pc: add PCInitArgs parameter to pc_cpus_init()

2012-10-24 Thread Eduardo Habkost
This will make the code simpler when the CPU initialization code start using additional initialization parameters. Signed-off-by: Eduardo Habkost --- hw/pc.c | 8 hw/pc.h | 2 +- hw/pc_piix.c | 3 +-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hw/pc.c b/hw/

[Qemu-devel] [PATCH 23/27] pc: set fw_cfg data based on APIC ID calculation

2012-10-24 Thread Eduardo Habkost
This changes FW_CFG_MAX_CPUS and FW_CFG_NUMA to use apic_id_for_cpu(), so the NUMA table can be based on the APIC IDs, instead of CPU index (SeaBIOS knows nothing about CPU indexes, just APIC IDs). Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: - Get PC object as argument - Add more detai

[Qemu-devel] [PATCH 01/27] move I/O-related definitions from qemu-common.h to a new header (qemu-stdio.h)

2012-10-24 Thread Eduardo Habkost
This will help reduce the qemu-common.h dependency hell. Signed-off-by: Eduardo Habkost -- Changes v1 -> v2: - move qemu_open() & qemu_close() to qemu-stdio.h, too --- qemu-common.h | 59 ++ qemu-stdio.h | 76 +

[Qemu-devel] [PATCH 05/27] kvm: create kvm_arch_vcpu_id() function

2012-10-24 Thread Eduardo Habkost
This will allow each architecture to define how the VCPU ID is set on the KVM_CREATE_VCPU ioctl call. Signed-off-by: Eduardo Habkost --- kvm-all.c | 2 +- kvm.h | 3 +++ target-i386/kvm.c | 5 + target-ppc/kvm.c | 5 + target-s390x/kvm.c | 5 + 5 files change

[Qemu-devel] [PATCH 16/22] combined-packet: Add a workaround for Linux usbfs + live migration

2012-10-24 Thread Hans de Goede
Older versions (anything but the latest) of Linux usbfs + libusb(x), will submit larger (bulk) transfers split into multiple 16k submissions, which means that rather then all tds getting linked into the queue in one atomic operarion they get linked in a bunch at a time, which could cause problems i

[Qemu-devel] [PATCH 07/22] ehci: Detect going in circles when filling the queue

2012-10-24 Thread Hans de Goede
For ctrl endpoints Windows (atleast Win7) creates circular td lists, so far these were not a problem because we would stop filling the queue if altnext was set. Since further patches in this patchset remove the altnext check this does become a problem and we need detection for going in circles. Si

[Qemu-devel] [PATCH 10/17] uhci: Store ep in UHCIQueue

2012-10-24 Thread Hans de Goede
This avoids the need to repeatedly lookup the device, and ep. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index 2bbc6fb..8214a21 100644 --- a/hw/usb/h

[Qemu-devel] [PATCH 22/22] usb-redir: Allow redirecting super speed devices to high speed controllers

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index d2859b7..2c5377c 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1097,7 +1097,7 @@ static int usbr

[Qemu-devel] [PATCH 08/22] ehci: Retry to fill the queue while waiting for td completion

2012-10-24 Thread Hans de Goede
If the guest is using multiple transfers to try and keep the usb bus busy / used at maximum efficiency, currently we would see / do the following: 1) submit transfer 1 to the device 2) submit transfer 2 to the device 3) report transfer 1 completion to guest 4) report transfer 2 completion to guest

Re: [Qemu-devel] [PATCH 4/4] Warning messages on net devices hotplug

2012-10-24 Thread Corey Bryant
On 10/24/2012 11:45 AM, Paolo Bonzini wrote: Il 24/10/2012 17:39, Corey Bryant ha scritto: On 10/24/2012 11:21 AM, Paolo Bonzini wrote: Il 24/10/2012 16:18, Corey Bryant ha scritto: On 10/18/2012 11:15 AM, Paolo Bonzini wrote: Il 17/10/2012 15:15, Eduardo Otubo ha scritto: With the inc

[Qemu-devel] [PATCH 18/22] usb-redir: Add support for input pipelining

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 67 ++- 1 file changed, 57 insertions(+), 10 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index a24ff63..a6f9555 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -

[Qemu-devel] [PATCH 12/17] uhci: Verify queue has not been changed by guest

2012-10-24 Thread Hans de Goede
According to the spec a guest can unlink a qh, and then as soon as frindex has changed by 1 since the unlink, assume it is idle and re-use it. However for various reasons, we cannot simply consider a qh as unlinked if we've not seen it for 1 frame. This means that it is possible for a guest to re-u

Re: [Qemu-devel] [PATCH] configure: avoid compiler warning in pipe2 detection

2012-10-24 Thread Andreas Färber
Am 24.10.2012 18:48, schrieb Peter Maydell: > Ping! Just ran into this bug today and noticed this > patch never got applied. > Patch still applies OK, patchwork url is: > http://patchwork.ozlabs.org/patch/178920/ ...and since it was noticed while packaging v1.2, it should go into stable as well (c

Re: [Qemu-devel] [RFC PATCH v3 05/19] Implement dimm device abstraction

2012-10-24 Thread Vasilis Liaskovitis
Hi, On Wed, Oct 24, 2012 at 12:15:17PM +0200, Stefan Hajnoczi wrote: > On Wed, Oct 24, 2012 at 10:06 AM, liu ping fan wrote: > > On Tue, Oct 23, 2012 at 8:25 PM, Stefan Hajnoczi wrote: > >> On Fri, Sep 21, 2012 at 01:17:21PM +0200, Vasilis Liaskovitis wrote: > >>> +static void dimm_populate(Dimm

[Qemu-devel] [PATCH 06/22] ehci: Speed up the timer of raising int from the async schedule

2012-10-24 Thread Hans de Goede
Often the guest will queue up new packets in response to a packet, in the async schedule with its IOC flag set, completing. By speeding up the frame-timer, we notice these new packets earlier. This increases the speed (MB/s) of a Linux guest reading from a USB mass storage device by a factor of 1.1

Re: [Qemu-devel] [PATCH v3 25/26] q35: fill in usb pci slots with -usb

2012-10-24 Thread Paolo Bonzini
Il 19/10/2012 22:43, Jason Baron ha scritto: > From: Jason Baron > > This fills out the usb slots on q35, when -usb is passed. > We now have (lspci output): > > 00:1d.0 USB Controller: Intel Corporation 82801I (ICH9 Family) USB UHCI > Controller #1 (rev 03) > 00:1d.1 USB Controller: Intel Corpo

[Qemu-devel] [PATCH 10/22] usb: Rename __usb_packet_complete to usb_packet_complete_one

2012-10-24 Thread Hans de Goede
And make it available for use outside of core.c Signed-off-by: Hans de Goede --- hw/usb.h | 1 + hw/usb/core.c | 8 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/usb.h b/hw/usb.h index 48c8926..01dd423 100644 --- a/hw/usb.h +++ b/hw/usb.h @@ -370,6 +370,7 @@ USB

[Qemu-devel] [PATCH 15/17] uhci: Always mark a queue valid when we encounter it

2012-10-24 Thread Hans de Goede
Before this patch we would not mark a queue valid when its head was a non-active td. This causes us to misbehave in the following scenario: 1) queue with multiple input transfers queued 2) We hit some latency issue, causing qemu to get behind processing frames 3) When qemu gets to run again, it no

[Qemu-devel] usb: input-pipelining + speedups v3

2012-10-24 Thread Hans de Goede
This is the final version of the input pipelining patchset, please add these patches to your tree for Anthony. Changes since the v2 rfc: - Move the settnig of the int_req flag for xhci, as you requested - Add "ehci: Retry to fill the queue while waiting for td completion" patch - Lots of tests run

[Qemu-devel] [PATCH 16/17] uhci: Retry to fill the queue while waiting for td completion

2012-10-24 Thread Hans de Goede
If the guest is using multiple transfers to try and keep the usb bus busy / used at maximum efficiency, currently we would see / do the following: 1) submit transfer 1 to the device 2) submit transfer 2 to the device 3) report transfer 1 completion to guest 4) report transfer 2 completion to guest

[Qemu-devel] [PATCH 17/17] uhci: Use only one queue for ctrl endpoints

2012-10-24 Thread Hans de Goede
ctrl endpoints use different pids for different phases of a control transfer, this patch makes us use only one queue for a ctrl ep, rather then 3. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/hw/usb/hcd-uhci.c b/h

Re: [Qemu-devel] [PATCH] configure: avoid compiler warning in pipe2 detection

2012-10-24 Thread Peter Maydell
Ping! Just ran into this bug today and noticed this patch never got applied. Patch still applies OK, patchwork url is: http://patchwork.ozlabs.org/patch/178920/ thanks -- PMM On 20 August 2012 19:45, Bruce Rogers wrote: > When building qemu-kvm for openSUSE:Factory, I am getting a > warning in t

[Qemu-devel] [PATCH 21/22] usb-redir: Allow to attach USB 2.0 devices to 1.1 host controller

2012-10-24 Thread Hans de Goede
From: Jan Kiszka This follows the logic of host-linux: If a 2.0 device has no ISO endpoint and no interrupt endpoint with a packet size > 64, we can attach it also to an 1.1 host controller. In case the redir server does not report endpoint sizes, play safe and remove the 1.1 compatibility as wel

[Qemu-devel] [PATCH 20/22] usb-redir: Use reject rather the disconnect on bad ep info

2012-10-24 Thread Hans de Goede
So that the client gets a notification about us disconnecting the device. Signed-off-by: Hans de Goede --- hw/usb/redirect.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index fe4eeea..b1fc7ef 100644 --- a/hw/usb/redirect.c +++ b/

[Qemu-devel] [PATCH 04/22] ehci: Set int flag on a short input packet

2012-10-24 Thread Hans de Goede
According to 4.15.1.2 an interrupt must be raised when a short packet is received. If we don't do this it may take a significant time for the guest to notice a short trasnfer has completed, since only the last td will have its IOC flag set, and a short transfer may complete in an earlier packet. S

Re: [Qemu-devel] [PATCH] target-i386: cpu: recover items 28-31 of ext2_feature_name

2012-10-24 Thread Don Slutz
On 10/24/12 10:10, Eduardo Habkost wrote: I removed a line by mistake on commit 3b671a40cab2404bc63e57db8cd3afa4ec70bfab, containing the flags lm/i64, 3dnow, and 3dnowext. This patch restores the removed line. Reported-by: Don Slutz Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 1 +

[Qemu-devel] [PATCH 14/17] uhci: When the guest marks a pending td non-active, cancel the queue

2012-10-24 Thread Hans de Goede
Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/usb/hcd-uhci.c b/hw/usb/hcd-uhci.c index c4f2f98..592ad8d 100644 --- a/hw/usb/hcd-uhci.c +++ b/hw/usb/hcd-uhci.c @@ -821,6 +821,10 @@ static int uhci_handle_td(UHCIState *s, UHCIQueue *q,

[Qemu-devel] [PATCH 13/17] uhci: Detect guest td re-use

2012-10-24 Thread Hans de Goede
A td can be reused by the guest in a different queue, before we notice the original queue has been unlinked. So search for tds by addr only, detect guest td reuse, and cancel the original queue, this is necessary to keep our packet ids unique. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c |

[Qemu-devel] [PATCH 07/17] uhci: Rename UHCIAsync->td to UHCIAsync->td_addr

2012-10-24 Thread Hans de Goede
We use the name td both to refer to a UHCI_TD read from guest memory as well as to refer to the guest address where a td is stored, switch over to always use td_addr in the second case for consistency. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 44 +-

[Qemu-devel] [PATCH 09/17] uhci: Make uhci_fill_queue() actually operate on an UHCIQueue

2012-10-24 Thread Hans de Goede
And move its calling point to handle_td, this removes the ep_ret ugliness, and prepates the way for further cleanups in the follow-up patches in this patch-set. Signed-off-by: Hans de Goede --- hw/usb/hcd-uhci.c | 31 --- 1 file changed, 16 insertions(+), 15 deletions

[Qemu-devel] [PATCH 01/17] usb: Enforce iso endpoints never returing USB_RET_ASYNC

2012-10-24 Thread Hans de Goede
ehci was already testing for this, and we depend in various places on no devices doing this, so lets move the check for this to the usb core. Signed-off-by: Hans de Goede --- hw/usb/core.c | 1 + hw/usb/hcd-ehci.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/cor

  1   2   3   >