Re: [Qemu-devel] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-30 Thread Stefan Priebe - Profihost AG
Am 31.05.2013 00:51, schrieb Amos Kong: > On Thu, May 30, 2013 at 10:30:21PM +0200, Stefan Priebe wrote: >> Am 30.05.2013 15:13, schrieb Amos Kong: >>> On Thu, May 30, 2013 at 02:09:25PM +0200, Stefan Priebe - Profihost AG >>> wrote: Am 29.05.2013 09:56, schrieb Amos Kong: > Recent virtio

Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-05-30 Thread Alexey Kardashevskiy
On 05/31/2013 07:16 AM, Paolo Bonzini wrote: > So far, the size of all regions passed to listeners could fit in 64 bits, > because artificial regions (containers and aliases) are eliminated by > the memory core, leaving only device regions which have reasonable sizes > > An IOMMU however cannot be

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

2013-05-30 Thread Xiao Guangrong
On 05/31/2013 12:50 AM, 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 235e8982ad393e5611cb892df548

Re: [Qemu-devel] [PATCH 7/8] pseries: savevm support for PAPR virtual SCSI

2013-05-30 Thread Alexey Kardashevskiy
On 05/27/2013 05:03 PM, Paolo Bonzini wrote: > Il 27/05/2013 08:48, Alexey Kardashevskiy ha scritto: This is only true when the rerror and werror options have the values "ignore" or "report". See virtio-scsi for an example of how to save the requests using the save_request and

Re: [Qemu-devel] [PATCH 0/7] target-arm: cpregs list for migration, kvm reset

2013-05-30 Thread Christoffer Dall
On Fri, May 17, 2013 at 02:23:50PM +0100, Peter Maydell wrote: > This patch series overhauls how we handle ARM coprocessor registers, > so that we use a consistent approach for migration, reset and > QEMU<->KVM synchronisation, driven by the kernel's list of supported > registers. > > The basic pr

Re: [Qemu-devel] [PATCH 4/7] target-arm: Convert TCG to using (index, value) list for cp migration

2013-05-30 Thread Christoffer Dall
On Fri, May 17, 2013 at 02:23:54PM +0100, Peter Maydell wrote: > Convert the TCG ARM target to using an (index,value) list for migrating > coprocessors. The primary benefit of the (index,value) list is for > passing state between KVM and QEMU, but it works for TCG-to-TCG > migration as well and is

Re: [Qemu-devel] [PATCH 3/7] target-arm: mark up cpregs for no-migrate or raw access

2013-05-30 Thread Christoffer Dall
On Thu, May 30, 2013 at 11:27:01PM +0100, Peter Maydell wrote: > On 30 May 2013 23:13, Christoffer Dall wrote: > > What happens with registers which don't have the raw_write function set > > (even though the write function imposes some access checks or has side > > effects) and also is not marked

Re: [Qemu-devel] [PATCH 3/7] target-arm: mark up cpregs for no-migrate or raw access

2013-05-30 Thread Christoffer Dall
On Fri, May 17, 2013 at 02:23:53PM +0100, Peter Maydell wrote: > Mark up coprocessor register definitions to add raw access > functions or mark the register as non-migratable where necessary. > > Signed-off-by: Peter Maydell > --- > target-arm/helper.c | 94 > +

Re: [Qemu-devel] [PATCH v2 2/5] pci: store PCI hole ranges in guestinfo structure

2013-05-30 Thread Gerd Hoffmann
Hi, > I see. I'll figure out the details and add a comment to this end. > > But that's for the 32 bit window - I don't see it playing > with mtrrs for the 64 bit ranges. > So I'm guessing alignment isn't needed there, right? mtrr's are a 32bit thing anyway IIRC. I still would place the 64bit

Re: [Qemu-devel] [RFC PATCH v3 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems

2013-05-30 Thread Tomoki Sekiyama
Jeff Cody wrote: > On Tue, May 21, 2013 at 11:33:57AM -0400, Tomoki Sekiyama wrote: >> +HRESULT hr = WaitForAsync(pAsyncSnapshot); >> +if (hr == VSS_E_OBJECT_NOT_FOUND) { > > When I tried compiling, I received a warning that this is a signed / > unsigned comparison. I think, from the VSS_

[Qemu-devel] [PATCH] [ARM] Fix rfe instruction

2013-05-30 Thread Peter Chubb
The rfe instruction has been broken since patch 5a839c0d54fac9db0516904db873a4fe01f50f4b because of a typo. Signed-off-by: Peter Chubb diff --git a/target-arm/translate.c b/target-arm/translate.c index e5a2e4c..29e8f27 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -6798,7

Re: [Qemu-devel] [PATCH v7 1/4] isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)

2013-05-30 Thread Jordan Justen
On Thu, May 30, 2013 at 7:06 PM, Kevin O'Connor wrote: > On Wed, May 29, 2013 at 01:27:24AM -0700, Jordan Justen wrote: >> The isapc machine with seabios currently requires the BIOS region >> to be read/write memory rather than read-only memory. >> >> KVM currently cannot support the BIOS as a ROM

Re: [Qemu-devel] Why some test suite in kvm-unit-tests designed for 64bit only?

2013-05-30 Thread Jan Kiszka
On 2013-05-30 19:58, 李春奇 wrote: > Hi there, > I'm now reading codes of kvm-unit-tests and I found that some of the > test cases for x86 is only designed for x86_64 (including access.flat, > apic.flat, emulator.flat, idt_test.flat and so on). I wonder why these > cases are not designed for i386? Or

Re: [Qemu-devel] [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h

2013-05-30 Thread David Gibson
On Fri, May 31, 2013 at 11:48:47AM +1000, Peter Crosthwaite wrote: > Hi David, > > On Wed, May 29, 2013 at 7:31 PM, David Gibson > wrote: > > On Wed, May 29, 2013 at 10:14:19AM +0100, Peter Maydell wrote: > >> On 29 May 2013 09:18, David Gibson wrote: > >> > On Mon, May 27, 2013 at 02:20:57PM +1

Re: [Qemu-devel] [PATCH v2 2/5] pci: store PCI hole ranges in guestinfo structure

2013-05-30 Thread Hu Tao
On Thu, May 30, 2013 at 02:07:19PM +0300, Michael S. Tsirkin wrote: > Will be used to pass hole ranges to guests. > > Signed-off-by: Michael S. Tsirkin > --- > hw/i386/pc.c | 39 ++- > hw/i386/pc_piix.c | 14 +- > hw/i386/pc_q3

[Qemu-devel] [SeaBIOS] What's the impact of enlarging IDE_TIMEOUT ?

2013-05-30 Thread Gonglei (Arei)
Hi, IDE_TIMEOUT is defined 32s. But we encountered its timeout in some cases, and then loading disk failed in VM. In order to reduce the probability of timeout, we want to enlarge the IDE_TIMEOUT, such as 120s. We verified this modification worked for us. But we are wondering if this m

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

2013-05-30 Thread Amos Kong
On Fri, May 31, 2013 at 08:35:28AM +0800, Amos Kong wrote: > On Thu, May 30, 2013 at 04:54:41PM +0300, Michael S. Tsirkin 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: > > > > > > > On Mon, May 27, 2013

Re: [Qemu-devel] [PATCH v2 1/5] range: add Range structure

2013-05-30 Thread Hu Tao
On Thu, May 30, 2013 at 02:07:16PM +0300, Michael S. Tsirkin wrote: > Sometimes we need to pass ranges around, add a > handy structure for this purpose. > > Note: memory.c defines its own concept of AddrRange structure for > working with 128 addresses. It's necessary there for doing range math. >

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

2013-05-30 Thread Kevin O'Connor
On Tue, May 28, 2013 at 07:53:09PM -0400, Kevin O'Connor wrote: > There were discussions on potentially introducing a middle component > to generate the tables. Coreboot was raised as a possibility, and > David thought it would be okay to use coreboot for both OVMF and > SeaBIOS. The possibility

Re: [Qemu-devel] [PATCH 3/2] vfio: Provide module option to disable vfio_iommu_type1 hugepage support

2013-05-30 Thread Chegu Vinod
On 5/28/2013 9:27 AM, Alex Williamson wrote: Add a module option to vfio_iommu_type1 to disable IOMMU hugepage support. This causes iommu_map to only be called with single page mappings, disabling the IOMMU driver's ability to use hugepages. This option can be enabled by loading vfio_iommu_type1

Re: [Qemu-devel] [PATCH V15 3/6] Create four QemuOptsList related functions

2013-05-30 Thread Dongxu Wang
On 2013/5/31 5:43, Eric Blake wrote: On 05/30/2013 03:55 AM, Dongxu Wang wrote: From: Dong Xu Wang This patch will create 4 functions, count_opts_list, qemu_opts_append, s/will create/creates/ - commit messages make the most sense when written in present tense qemu_opts_free and qemu_opts_

Re: [Qemu-devel] [PATCH V15 1/6] add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print

2013-05-30 Thread Dongxu Wang
On 2013/5/31 5:22, Eric Blake wrote: On 05/30/2013 03:55 AM, Dongxu Wang wrote: From: Dong Xu Wang qemu_opts_print has no user now, so can re-write the function safely. qemu_opts_print will be used while using "qemu-img create", it will produce the same output as previous code. The behavior

Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-30 Thread Tomoki Sekiyama
Hi Baiqing, > Provider.dll is built with --cross-prefix=i686-w64-mingw32-, does it support > 64-bit system? No. The DLL is dynamic-linked to the VSS system component, so it must be built for the same architecture (32-bit (i686) or 64-bit (x86_64)) as the operating system you run. Thanks, Tomok

Re: [Qemu-devel] [RFC] Check backing_file chain's loop

2013-05-30 Thread Dongxu Wang
On 2013/5/30 20:48, Stefan Hajnoczi wrote: hain 1.qcow2' don't crash. qemu-img info --backing-chain detects cycles and returns an error, see the hash table in collect_image_info_list(). We should protect bdrv_open() too. Okay, will send a patch. Stefan

Re: [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze

2013-05-30 Thread Tomoki Sekiyama
>On Tue, May 28, 2013 at 05:01:25PM -0400, Jeff Cody wrote: >> On Thu, May 23, 2013 at 06:36:35PM +, Tomoki Sekiyama wrote: >> > On 5/23/13 8:22 , "Stefan Hajnoczi" wrote: >> > >On Tue, May 21, 2013 at 11:33:52AM -0400, Tomoki Sekiyama wrote: >> > >> +# rules to build qga-provider.tlb >> > >>

Re: [Qemu-devel] [PATCH v7 1/4] isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)

2013-05-30 Thread Kevin O'Connor
On Wed, May 29, 2013 at 01:27:24AM -0700, Jordan Justen wrote: > The isapc machine with seabios currently requires the BIOS region > to be read/write memory rather than read-only memory. > > KVM currently cannot support the BIOS as a ROM region, but qemu > in non-KVM mode can. Based on this, isapc

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

2013-05-30 Thread Hu Tao
On Thu, May 30, 2013 at 04:27:56PM +0300, 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

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

2013-05-30 Thread Hu Tao
On Thu, May 30, 2013 at 04:28:01PM +0300, Michael S. Tsirkin wrote: > 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 > --

Re: [Qemu-devel] [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h

2013-05-30 Thread Peter Crosthwaite
Hi David, On Wed, May 29, 2013 at 7:31 PM, David Gibson wrote: > On Wed, May 29, 2013 at 10:14:19AM +0100, Peter Maydell wrote: >> On 29 May 2013 09:18, David Gibson wrote: >> > On Mon, May 27, 2013 at 02:20:57PM +1000, peter.crosthwa...@xilinx.com >> > wrote: >> >> From: Peter Crosthwaite >>

Re: [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS

2013-05-30 Thread Libaiqing
Hi, When installing the guest-agent on windows2008R2, an error occurs. Executing command "qemu-ga.exe -s install", the app popups a dialog box with the message: "CoCreateInstance(VSSCoordinator)failed.(Error:80010154)" the commandline output is"Failed to pCatalog->InstallComponent.(

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 li guang
在 2013-05-30四的 16:14 +0200,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 flex

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

2013-05-30 Thread Amos Kong
On Thu, May 30, 2013 at 04:54:41PM +0300, Michael S. Tsirkin 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: > > > > > On Mon, May 27, 2013 at 09:24:28AM -0400, Luiz Capitulino wrote: > > > > On Mon, 27 May 2013

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 2:23 PM, Paolo Bonzini wrote: > Il 30/05/2013 22:32, Luiz Capitulino ha scritto: >> On Thu, 30 May 2013 20:05:29 +0200 >> Paolo Bonzini wrote: >> >>> Il 30/05/2013 19:56, Luiz Capitulino ha scritto: On Thu, 30 May 2013 10:32:36 -0700 Jordan Justen wrote: >>

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

2013-05-30 Thread Alexey Kardashevskiy
On 05/31/2013 01:58 AM, Scott Wood wrote: > 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-

Re: [Qemu-devel] [PATCH v5 08/11] blockdev: allow BdrvActionOps->commit() to be NULL

2013-05-30 Thread Eric Blake
On 05/30/2013 06:34 AM, Stefan Hajnoczi wrote: > Some QMP 'transaction' types don't need to do anything on .commit(). > Make .commit() optional just like .abort(). > > The "drive-backup" action will take advantage of this, it only needs to > cancel the block job on .abort(). Other block job actio

Re: [Qemu-devel] [PATCH v5 07/11] blockdev: rename BlkTransactionStates to singular

2013-05-30 Thread Eric Blake
On 05/30/2013 06:34 AM, Stefan Hajnoczi wrote: > The QMP 'transaction' command keeps a list of in-flight transactions. > The transaction state structure is called BlkTransactionStates even > though it only deals with a single transaction. The only plural thing > is the linked list of transaction s

Re: [Qemu-devel] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-30 Thread Amos Kong
On Thu, May 30, 2013 at 10:30:21PM +0200, Stefan Priebe wrote: > Am 30.05.2013 15:13, schrieb Amos Kong: > >On Thu, May 30, 2013 at 02:09:25PM +0200, Stefan Priebe - Profihost AG wrote: > >>Am 29.05.2013 09:56, schrieb Amos Kong: > >>>Recent virtio refactoring in QEMU made virtio-bus become the par

Re: [Qemu-devel] [PATCH v5 02/11] block: add bdrv_add_before_write_notifier()

2013-05-30 Thread Eric Blake
On 05/30/2013 06:34 AM, Stefan Hajnoczi wrote: > The bdrv_add_before_write_notifier() function installs a callback that > is invoked before a write request is processed. This will be used to > implement copy-on-write point-in-time snapshots where we need to copy > out old data before overwriting i

Re: [Qemu-devel] [PATCH 3/7] target-arm: mark up cpregs for no-migrate or raw access

2013-05-30 Thread Peter Maydell
On 30 May 2013 23:38, Christoffer Dall wrote: > On Thu, May 30, 2013 at 11:27:01PM +0100, Peter Maydell wrote: >> On 30 May 2013 23:13, Christoffer Dall wrote: >> > CONTEXTIDR seems to be such an example. ? >> >> In this specific case I decided it was safe to let the non-raw >> write function do

Re: [Qemu-devel] [PATCH v5 01/11] notify: add NotiferWithReturn so notifier list can abort

2013-05-30 Thread Eric Blake
On 05/30/2013 06:34 AM, Stefan Hajnoczi wrote: > notifier_list_notify() has no return value. This is fine when we just > want to invoke side-effects. > > Sometimes it's useful for notifiers to produce a return value. This > allows notifiers to "veto" an operation and will be used by the block >

Re: [Qemu-devel] [PATCH 3/7] target-arm: mark up cpregs for no-migrate or raw access

2013-05-30 Thread Peter Maydell
On 30 May 2013 23:13, Christoffer Dall wrote: > What happens with registers which don't have the raw_write function set > (even though the write function imposes some access checks or has side > effects) and also is not marked as ARM_CP_NO_MIGRATE, In the general case what happens is that we prob

[Qemu-devel] [PATCH 09/21] exec: reorganize mem_add to match Int128 version

2013-05-30 Thread Paolo Bonzini
When adding support for 2^64-byte sections, we will have to change the structure of mem_add to avoid failures in int128_get64. Reorganize the code now before introducing Int128. Signed-off-by: Paolo Bonzini --- exec.c | 39 --- 1 file changed, 16 insertions(+)

[Qemu-devel] [PATCH 13/21] vfio: abort if an emulated iommu is used

2013-05-30 Thread Paolo Bonzini
From: Avi Kivity vfio doesn't support guest iommus yet, indicate it to the user by gently depositing a core on their disk. Reviewed-by: Peter Maydell Signed-off-by: Avi Kivity Signed-off-by: Paolo Bonzini --- hw/misc/vfio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/misc/vfio.c

[Qemu-devel] [PATCH 03/22] cputlb: simplify tlb_set_page

2013-05-30 Thread Paolo Bonzini
The same "if" condition is repeated twice. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- cputlb.c | 13 + 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cputlb.c b/cputlb.c index aba7e44..b56bc01 100644 --- a/cputlb.c +++ b/cputlb.c @@ -262,17 +26

[Qemu-devel] [PATCH 21/21] memory: give name to every AddressSpace

2013-05-30 Thread Paolo Bonzini
From: Alexey Kardashevskiy The "info mtree" command in QEMU console prints only "memory" and "I/O" address spaces while there are actually a lot more other AddressSpace structs created by PCI and VIO devices. Those devices do not normally have names and therefore not present in "info mtree" outpu

[Qemu-devel] [PATCH 05/22] exec: do not use error_mem_read

2013-05-30 Thread Paolo Bonzini
We will soon reach this case when doing (unaligned) accesses that span partly past the end of memory. We do not want to crash in that case. unassigned_mem_ops and rom_mem_ops are now the same. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 16 ++-- 1 fi

Re: [Qemu-devel] [PATCH V15 3/6] Create four QemuOptsList related functions

2013-05-30 Thread Eric Blake
On 05/30/2013 03:55 AM, Dongxu Wang wrote: > From: Dong Xu Wang > > This patch will create 4 functions, count_opts_list, qemu_opts_append, s/will create/creates/ - commit messages make the most sense when written in present tense > qemu_opts_free and qemu_opts_print_help, they will be used in f

[Qemu-devel] [PATCH 04/21] exec: Resolve subpages in one step except for IOTLB fills

2013-05-30 Thread Paolo Bonzini
From: Jan Kiszka Except for the case of setting the IOTLB entry in TCG mode, we can avoid the subpage dispatching handlers and do the resolution directly on address_space_lookup_region. An IOTLB entry describes a full page, not only the region that the first access to a sub-divided page may retur

Re: [Qemu-devel] [PATCH V15 2/6] avoid duplication of default value in QemuOpts

2013-05-30 Thread Eric Blake
On 05/30/2013 03:55 AM, Dongxu Wang wrote: > From: Dong Xu Wang > > This patch will move the default value entirely to QemuOptDesc. > > When getting the value of an option that hasn't been set, and > QemuOptDesc has a default value, return that. Else, behave as > before. > > Example: qemu_opt_

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

2013-05-30 Thread Paolo Bonzini
Il 30/05/2013 22:32, Luiz Capitulino ha scritto: > On Thu, 30 May 2013 20:05:29 +0200 > Paolo Bonzini wrote: > >> 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 wrot

Re: [Qemu-devel] [PATCH V15 1/6] add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print

2013-05-30 Thread Eric Blake
On 05/30/2013 03:55 AM, Dongxu Wang wrote: > From: Dong Xu Wang > > qemu_opts_print has no user now, so can re-write the function safely. > > qemu_opts_print will be used while using "qemu-img create", it will > produce the same output as previous code. > > The behavior of this function has cha

[Qemu-devel] [PATCH 02/22] exec: drop useless #if

2013-05-30 Thread Paolo Bonzini
This code is only compiled for softmmu targets. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index b720be5..7728ea3 100644 --- a/exec.c +++ b/exec.c @@ -1430,10 +1430,8 @@ static

[Qemu-devel] [PATCH 17/21] dma: eliminate old-style IOMMU support

2013-05-30 Thread Paolo Bonzini
The translate function in the DMAContext is now always NULL. Remove every reference to it. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- dma-helpers.c| 178 +++ exec.c | 3 +- hw/pci/pci.c | 3 +- hw

[Qemu-devel] [PATCH 18/21] pci: use memory core for iommu support

2013-05-30 Thread Paolo Bonzini
From: Avi Kivity Use the new iommu support in the memory core for iommu support. The only user, spapr, is also converted, but it still provides a DMAContext interface until the non-PCI bits switch to AddressSpace. Reviewed-by: Michael S. Tsirkin Signed-off-by: Avi Kivity [ Do not calls memory

[Qemu-devel] [PATCH 20/21] dma: eliminate DMAContext

2013-05-30 Thread Paolo Bonzini
The DMAContext is a simple pointer to an AddressSpace that is now always already available. Make everyone hold the address space directly, and clean up the DMA API to use the AddressSpace directly. Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- dma-helpers.c | 24

[Qemu-devel] [PATCH 16/21] spapr: use memory core for iommu support

2013-05-30 Thread Paolo Bonzini
Now we can stop using a "translating" DMAContext, but we do not yet modify the sPAPRTCETable users to get an AddressSpace; they keep using the table via a DMAContext. Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_iommu.c | 48 +++-

[Qemu-devel] [PATCH 11/21] memory: iommu support

2013-05-30 Thread Paolo Bonzini
From: Avi Kivity Add a new memory region type that translates addresses it is given, then forwards them to a target address space. This is similar to an alias, except that the mapping is more flexible than a linear translation and trucation, and also less efficient since the translation happens

[Qemu-devel] [PATCH 14/21] spapr: convert TCE API to use an opaque type

2013-05-30 Thread Paolo Bonzini
The TCE table is currently returned as a DMAContext, and non-type-safe APIs are called later passing back the DMAContext. Since we want to move away from DMAContext, use an opaque type instead, and add an accessor to retrieve the DMAContext from it. Acked-by: David Gibson Signed-off-by: Paolo Bo

[Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer

2013-05-30 Thread Paolo Bonzini
So far, the size of all regions passed to listeners could fit in 64 bits, because artificial regions (containers and aliases) are eliminated by the memory core, leaving only device regions which have reasonable sizes An IOMMU however cannot be eliminated by the memory core, and may have an artific

[Qemu-devel] [PATCH 19/21] spapr_vio: take care of creating our own AddressSpace/DMAContext

2013-05-30 Thread Paolo Bonzini
Fetch the root region from the sPAPRTCETable, and use it to build an AddressSpace and DMAContext. Now, everywhere we have a DMAContext we also have access to the corresponding AddressSpace (either because we create it just before the DMAContext, or because dma_context_memory's AddressSpace is triv

[Qemu-devel] [PATCH 15/21] spapr: make IOMMU translation go through IOMMUTLBEntry

2013-05-30 Thread Paolo Bonzini
The next step is to introduce the translation code that will be used for IOMMU MemoryRegions, but still do the actual translation in a DMAContext. Acked-by: David Gibson Signed-off-by: Paolo Bonzini --- hw/ppc/spapr_iommu.c | 60 ++-- 1 file chang

[Qemu-devel] [PATCH 07/21] Revert "memory: limit sections in the radix tree to the actual address space size"

2013-05-30 Thread Paolo Bonzini
This reverts commit 86a8623692b1b559a419a92eb8b6897c221bca74. Signed-off-by: Paolo Bonzini --- exec.c| 13 + include/exec/memory.h | 3 --- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 2a81b6e..e3a08d6 100644 --- a/exec.c +++ b

[Qemu-devel] [PATCH 08/21] Revert "s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62"

2013-05-30 Thread Paolo Bonzini
This reverts commit 311f83ca08c011b048c063c2fd3038a8957970bc. The next patches will implement full support for 2^64-byte regions. Signed-off-by: Paolo Bonzini --- target-s390x/cpu.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/target-s390x/cpu.h b/target-s390x/cpu.h i

[Qemu-devel] [PATCH 12/21] memory: Add iommu map/unmap notifiers

2013-05-30 Thread Paolo Bonzini
From: David Gibson This patch adds a NotifierList to MemoryRegions which represent IOMMUs allowing other parts of the code to register interest in mappings or unmappings from the IOMMU. All IOMMU implementations will need to call memory_region_notify_iommu() to inform those waiting on the notifi

[Qemu-devel] [PATCH 06/21] exec: return MemoryRegion from address_space_translate

2013-05-30 Thread Paolo Bonzini
Only address_space_translate_for_iotlb needs to return the section. Every caller of address_space_translate now uses only section->mr, return it directly. Signed-off-by: Paolo Bonzini --- exec.c| 150 +- include/exec/memory.h | 8

[Qemu-devel] [PATCH 03/21] exec: Allow unaligned address_space_rw

2013-05-30 Thread Paolo Bonzini
From: Jan Kiszka This will be needed for some corner cases with para-virtual I/O ports. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- exec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index bae4d30..5556169 100644 --- a/exec.c

[Qemu-devel] [PATCH 15/22] memory: add address_space_access_valid

2013-05-30 Thread Paolo Bonzini
The old-style IOMMU lets you check whether an access is valid in a given DMAContext. There is no equivalent for AddressSpace in the memory API, implement it with a lookup of the dispatch tree. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- dma-helpers.c |5 + e

[Qemu-devel] [PATCH 01/21] memory: Introduce address_space_lookup_region

2013-05-30 Thread Paolo Bonzini
From: Jan Kiszka This introduces a wrapper for phys_page_find (before we complicate address_space_translate with IOMMU translation). The function will also include subpage handling. Signed-off-by: Jan Kiszka Signed-off-by: Paolo Bonzini --- exec.c | 8 +++- 1 file changed, 7 insertions(+

[Qemu-devel] [PATCH 05/21] exec: Implement subpage_read/write via address_space_rw

2013-05-30 Thread Paolo Bonzini
From: Jan Kiszka This will allow to add support for unaligned memory regions: the subpage container region can activate unaligned support unconditionally because the read/write handler will now ensure that accesses are split as required by calling address_space_rw. We can furthermore drop the spe

[Qemu-devel] [PATCH 02/21] memory: move private types to exec.c

2013-05-30 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- exec.c | 16 include/exec/memory-internal.h | 15 --- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/exec.c b/exec.c index 2cd4eb3..bae4d30 100644 --- a/exec.c +++ b/exec.c @@ -81,6 +81,22 @@ i

[Qemu-devel] [PATCH 00/21] Memory/IOMMU patches, part 3: IOMMU implementation

2013-05-30 Thread Paolo Bonzini
This part includes Jan's subpage reorganization (needed to unify MMIO and PIO dispatch) and the implementation of IOMMU regions. Compared to previous submissions, there is full support for 64-bit-sized IOMMU regions, so I'm reverting the patches from part 1 that reduced the maximum size of section

[Qemu-devel] [PATCH 19/22] memory: correctly handle endian-swapped 64-bit accesses

2013-05-30 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 12 +--- memory.c |3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 1c4c466..453946e 100644 --- a/exec.c +++ b/exec.c @@ -2263,9 +2263,6 @@ static inline uint64_t

[Qemu-devel] [PATCH 18/22] memory: split accesses even when the old MMIO callbacks are used

2013-05-30 Thread Paolo Bonzini
This is useful for 64-bit memory accesses. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- memory.c | 63 + 1 files changed, 46 insertions(+), 17 deletions(-) diff --git a/memory.c b/memory.c index 679bd8d..ca27102 1

[Qemu-devel] [PATCH 22/22] memory: add return value to address_space_rw/read/write

2013-05-30 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c| 34 +++--- include/exec/memory.h | 12 +--- 2 files changed, 24 insertions(+), 22 deletions(-) diff --git a/exec.c b/exec.c index 520d4c4..5b8b40d 100644 --- a/exec.c

[Qemu-devel] [PATCH 17/22] memory: add big endian support to access_with_adjusted_size

2013-05-30 Thread Paolo Bonzini
This will be used to split 8-byte access down to two four-byte accesses. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- memory.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/memory.c b/memory.c index c72f56d..679bd8d 100644 --- a/memory.c +++ b/

[Qemu-devel] [PATCH 20/22] exec: just use io_mem_read/io_mem_write for 8-byte I/O accesses

2013-05-30 Thread Paolo Bonzini
The memory API is able to split it in two 4-byte accesses. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c |8 +--- include/exec/softmmu_template.h | 24 +--- 2 files changed, 2 insertions(+), 30 deletions(-) diff --

[Qemu-devel] [PATCH 21/22] memory: propagate errors on I/O dispatch

2013-05-30 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 21 - include/exec/exec-all.h |6 +++--- include/exec/softmmu_template.h |4 +++- memory.c| 35 ++- 4

[Qemu-devel] [PATCH 14/22] exec: implement .valid.accepts for subpages

2013-05-30 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index d640d07..ab4b4d2 100644 --- a/exec.c +++ b/exec.c @@ -1558,9 +1558,29 @@ static void subpage_write(void *opaqu

[Qemu-devel] [PATCH 16/22] memory: accept mismatching sizes in memory_region_access_valid

2013-05-30 Thread Paolo Bonzini
The memory API is able to use smaller/wider accesses than requested, match that in memory_region_access_valid. Of course, the accepts callback is still free to reject those accesses. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- memory.c | 29 -

[Qemu-devel] [PATCH 11/22] exec: introduce memory_access_is_direct

2013-05-30 Thread Paolo Bonzini
After the previous patches, this is a common test for all read/write functions. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 39 ++- 1 files changed, 22 insertions(+), 17 deletions(-) diff --git a/exec.c b/exec.c index f6cebd6..

[Qemu-devel] [PATCH 13/22] memory: export memory_region_access_valid to exec.c

2013-05-30 Thread Paolo Bonzini
We'll use it to implement address_space_access_valid. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- include/exec/memory-internal.h |3 +++ memory.c |8 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/exec/memory-int

[Qemu-devel] [PATCH 09/22] memory: assign MemoryRegionOps to all regions

2013-05-30 Thread Paolo Bonzini
This allows to remove the checks on section->readonly. Simply, write accesses to ROM will not be considered "direct" and will go through mr->ops without any special intervention. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- memory.c |3 ++- 1 files changed, 2 insertions(

[Qemu-devel] [PATCH 10/22] exec: expect mr->ops to be initialized for ROM

2013-05-30 Thread Paolo Bonzini
There is no need to use the special phys_section_rom section. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/exec.c b/exec.c index 03003b2..f6cebd6 100644 --- a/exec.c +++ b/exec.c @@ -2335,

[Qemu-devel] [PATCH 08/22] memory: move unassigned_mem_ops to memory.c

2013-05-30 Thread Paolo Bonzini
reservation_ops is already doing the same thing. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 12 -- include/exec/memory-internal.h |2 + memory.c | 44 --- 3 files chan

[Qemu-devel] [PATCH 06/22] memory: dispatch unassigned accesses based on .valid.accepts

2013-05-30 Thread Paolo Bonzini
This provides the basics for detecting accesses to unassigned memory as soon as they happen, and also for a simple implementation of address_space_access_valid. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 36 memory.c | 28

[Qemu-devel] [PATCH 07/22] memory: add address_space_translate

2013-05-30 Thread Paolo Bonzini
Using phys_page_find to translate an AddressSpace to a MemoryRegionSection is unwieldy. It requires to pass the page index rather than the address, and later memory_region_section_addr has to be called. Replace memory_region_section_addr with a function that does all of it: call phys_page_find, c

[Qemu-devel] [PATCH 12/22] exec: introduce memory_access_size

2013-05-30 Thread Paolo Bonzini
This will be used by address_space_access_valid too. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c | 27 +-- 1 files changed, 17 insertions(+), 10 deletions(-) diff --git a/exec.c b/exec.c index 881f6ec..d640d07 100644 --- a/exec.c +++ b/exec.

[Qemu-devel] [PATCH 01/22] exec: eliminate io_mem_ram

2013-05-30 Thread Paolo Bonzini
It is never used, the IOTLB always goes through io_mem_notdirty. In fact in softmmu_template.h, if it were, QEMU would crash just below the tests, as soon as io_mem_read/write dispatches to error_mem_read/write. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c

[Qemu-devel] [PATCH 04/22] exec: make io_mem_unassigned private

2013-05-30 Thread Paolo Bonzini
There is no reason to avoid a recompile before accessing unassigned memory. In the end it will be treated as MMIO anyway. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- exec.c |4 ++-- include/exec/cpu-common.h |1 - include/exec/softmmu_

[Qemu-devel] [PULL 00/22] Memory/IOMMU patches, part 2: unassigned access detection

2013-05-30 Thread Paolo Bonzini
Anthony, the following changes since commit 6a4e17711442849bf2cc731ccddef5a2a2d92d29: Remove Sun4c, Sun4d and a few CPUs (2013-05-26 11:37:58 +) are available in the git repository at: git://github.com/bonzini/qemu.git iommu-for-anthony This is part 2 of the memory/IOMMU patches. These

Re: [Qemu-devel] [Qemu-stable] [QEMU PATCH v3] qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path

2013-05-30 Thread Stefan Priebe
Am 30.05.2013 15:13, schrieb Amos Kong: On Thu, May 30, 2013 at 02:09:25PM +0200, Stefan Priebe - Profihost AG wrote: Am 29.05.2013 09:56, schrieb Amos Kong: Recent virtio refactoring in QEMU made virtio-bus become the parent bus of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implemen

[Qemu-devel] [Bug 1185888] [NEW] -device nec-usb-xhci (usb 3) breaks VM snapshots

2013-05-30 Thread Guido De Rosa
Public bug reported: Enabling the USB 3.0 controller apparently breaks "live" snapshotting. To reproduce: $ qemu-system-x86_64 -device nec-usb-xhci vm.qcow2 then, at the Monitor: (qemu) savevm Error -22 while writing VM (qemu) Instead, if I remove -device nec-usb-xhci from th

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 03:24:14PM -0500, Anthony Liguori wrote: > mdroth writes: > > > On Thu, May 30, 2013 at 02:35:37PM -0500, Anthony Liguori wrote: > >> mdroth writes: > >> > >> > On Thu, May 30, 2013 at 11:55:56AM -0500, Anthony Liguori wrote: > >> >> Michael Roth writes: > >> >> > >> >

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 20:05:29 +0200 Paolo Bonzini wrote: > 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 > >>> Jorda

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

2013-05-30 Thread Anthony Liguori
mdroth writes: > On Thu, May 30, 2013 at 02:35:37PM -0500, Anthony Liguori wrote: >> mdroth writes: >> >> > 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

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 02:35:37PM -0500, Anthony Liguori wrote: > mdroth writes: > > > 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-ha

Re: [Qemu-devel] [PATCH v3 4/5] xilinx_devcfg: Zynq devcfg device model

2013-05-30 Thread Anthony Liguori
Peter Crosthwaite writes: > Hi Anthony, > > On Thu, May 30, 2013 at 3:57 AM, Anthony Liguori > wrote: >> peter.crosthwa...@xilinx.com writes: >> >>> From: "Peter A. G. Crosthwaite" >>> >>> Minimal device model for devcfg module of Zynq. DMA capabilities and >>> interrupt generation supported.

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

2013-05-30 Thread Anthony Liguori
mdroth writes: > 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 onl

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

2013-05-30 Thread Wessel Dankers
*** This bug is a duplicate of bug 1033727 *** https://bugs.launchpad.net/bugs/1033727 Bug #1033727 is specifically about qemu-kvm 1.2.0 and higher, see comment #8 on that bug for example. This bug is about earlier versions, including the version in 12.04 LTS. -- You received this bug notifi

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

2013-05-30 Thread Stefan Hajnoczi
On Thu, May 30, 2013 at 4:25 PM, Eric Blake wrote: > 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 >> Sign

  1   2   3   >