Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-05 Thread David Gibson
On Fri, Aug 03, 2012 at 05:13:48PM +0200, Andreas Färber wrote: > Am 03.08.2012 04:31, schrieb David Gibson: > > On Thu, Aug 02, 2012 at 05:44:49PM +0200, Andreas Färber wrote: > >> Am 02.08.2012 04:10, schrieb David Gibson: [snip] > >>> -static voi

Re: [Qemu-devel] [PATCH] eventfd: making it thread safe

2012-08-06 Thread David Gibson
On Mon, Aug 06, 2012 at 05:05:57PM +0300, Avi Kivity wrote: > On 08/01/2012 07:05 AM, David Gibson wrote: > > From: Alexey Kardashevskiy > > > > QEMU uses IO handlers to run select() in the main loop. > > The handlers list is managed by qemu_set_fd_handler() helpe

[Qemu-devel] [PATCH] ppc: Fix bug in handling of PAPR hypercall exits

2012-08-06 Thread David Gibson
would re-initialize everything without completing the hypercall. This caused the kernel to get confused because it thought the guest was still in the middle of a hypercall when it has actually been reset. This patch therefore changes to ret = 0, which is both a bugfix and a small optimization.

[Qemu-devel] [PATCH] Update Linux kernel headers

2012-08-06 Thread David Gibson
C_HTAB and KVM_PPC_ALLOCATE_HTAB values. Signed-off-by: David Gibson --- linux-headers/asm-s390/kvm.h |2 +- linux-headers/asm-s390/kvm_para.h |2 +- linux-headers/asm-x86/kvm.h |1 + linux-headers/asm-x86/kvm_para.h |7 +++ linux-headers/linux/kvm.h |

[Qemu-devel] [PATCH] Allow QEMUMachine to override reset sequencing

2012-08-06 Thread David Gibson
mplementing the "firmware" and executing it. Signed-off-by: David Gibson --- hw/boards.h |3 +++ sysemu.h|1 + vl.c| 11 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/boards.h b/hw/boards.h index 59c01d0..a2e0a54 100644 --- a/hw/b

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-07 Thread David Gibson
ers on the course to adopt before applying random patches. Right > now x86 and ppc are moving into opposite directions and arm, mips, etc. > maintainers may not even be aware of ongoing changes, and there's a > pending uc32 machine that should be reviewed in this light. So.. having the CPU reset at the top of the tree definitely makes no sense - if nothing else, *which* cpu when there's more than one. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

[Qemu-devel] [PATCH 05/10] pseries: added allocator for a block of IRQs

2012-08-07 Thread David Gibson
Signed-off-by: David Gibson --- hw/spapr.c | 26 ++ hw/spapr.h |1 + 2 files changed, 27 insertions(+) diff --git a/hw/spapr.c b/hw/spapr.c index 8b4af62..2b66f54 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -104,6 +104,32 @@ int spapr_allocate_irq(int hint, enum

[Qemu-devel] [PATCH 03/10] pseries: Rework irq assignment to avoid carrying qemu_irqs around

2012-08-07 Thread David Gibson
. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr.c | 18 +++--- hw/spapr.h | 11 +-- hw/spapr_llan.c |2 +- hw/spapr_pci.c | 14 ++ hw/spapr_pci.h |8 ++-- hw/spapr_vio.c | 12 ++-- hw/spapr_vio.h

[Qemu-devel] [PATCH 09/10] pseries dma: DMA window params added to PHB and DT population changed

2012-08-07 Thread David Gibson
given to it. The original spapr_dma_dt() is renamed to spapr_tcet_dma_dt(). Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr.h |4 +++- hw/spapr_iommu.c | 58 ++ hw/spapr_pci.c | 11 +++ hw

[Qemu-devel] [PATCH 10/10] pseries: Update SLOF firmware image

2012-08-07 Thread David Gibson
This updates SLOF to handle the necessary device tree properties for MSI and MSI-X. Signed-off-by: David Gibson --- pc-bios/README |2 +- pc-bios/slof.bin | Bin 878088 -> 878640 bytes roms/SLOF|2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pc-b

[Qemu-devel] [PATCH 04/10] pseries: Separate PCI RTAS setup from common from emulation specific PCI setup

2012-08-07 Thread David Gibson
common across all host bridge types (and will call out to different places internally depending on the type). So, this patch moves the RTAS registration into its own function called direct from the machine setup code. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw

[Qemu-devel] [PATCH 06/10] pseries: Export find_phb() utility function for PCI code

2012-08-07 Thread David Gibson
exposes that host bridge lookup as a separate function, which we will need later in the MSI and VFIO code. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr_pci.c | 32 ++-- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 02/10] pseries: Remove extraneous prints

2012-08-07 Thread David Gibson
ff-by: David Gibson --- hw/spapr.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c index ab5a0c2..3a303cd 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -532,8 +532,6 @@ static void spapr_reset(void *opaque) { sPAPREnvironment *spapr = (sPAPREnviro

[Qemu-devel] [PATCH 07/10] pseries: Add trace event for PCI irqs

2012-08-07 Thread David Gibson
From: Alexey Kardashevskiy This adds a trace event in the pseries PCI specific set_irq() function to assist in debugging. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr_pci.c |1 + trace-events |3 +++ 2 files changed, 4 insertions(+) diff --git a/hw

[Qemu-devel] [0/10] pseries updates and cleanups

2012-08-07 Thread David Gibson
Hi Alex, This series contains all my outstanding pseries updates which aren't dependent on getting a generic patch upstream first. I have a number more which are actually more urgent to get into 1.2, but we need to get some word on the generic patches before I can really push those. In the meant

[Qemu-devel] [PATCH 08/10] pseries: Add PCI MSI/MSI-X support

2012-08-07 Thread David Gibson
slates MSI vector to interrupt controller (XICS) IRQ number. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- hw/spapr.c |7 +- hw/spapr_pci.c | 245 +++- hw/spapr_pci.h | 15 +++- trace-events |5 ++ 4 files

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-08 Thread David Gibson
vices are reset. At least that's the easiest way to use it, but it can also be used to take over control of the device reset order itself. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the

Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence

2012-08-08 Thread David Gibson
On Wed, Aug 08, 2012 at 05:22:11PM +0200, Andreas Färber wrote: > Am 08.08.2012 03:45, schrieb David Gibson: > > On Wed, Aug 08, 2012 at 12:32:39AM +0200, Andreas Färber wrote: > >> Am 08.08.2012 00:02, schrieb Benjamin Herrenschmidt: > >>> On Fri, 2012-08-03 at 17:

Re: [Qemu-devel] [Qemu-ppc][PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread David Gibson
jected -vga none. I fixed that in the version in my tree, but I hadn't sent that out to Alex yet. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread David Gibson
mach_opts, "usb", true); > >> +} > >> + > >> +if (usb_enabled) { > >> + pci_create_simple(QLIST_FIRST(&spapr->phbs)->host_state.bus, > >> + -1, "pci-ohci"); > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 3/3] spapr: Add support for -vga option

2012-08-14 Thread David Gibson
On Wed, Aug 15, 2012 at 01:52:55AM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 1:19 AM, Li Zhang wrote: > > On Tue, Aug 14, 2012 at 11:13 PM, Li Zhang wrote: > >> On Tue, Aug 14, 2012 at 8:13 PM, David Gibson wrote: > >>> On Tue, Aug 14, 2012 at 10:04:03PM

Re: [Qemu-devel] [Qemu-ppc] [0/10] pseries updates and cleanups

2012-08-14 Thread David Gibson
On Tue, Aug 14, 2012 at 02:56:43PM +0200, Alexander Graf wrote: > On 08/14/2012 02:34 PM, Alexander Graf wrote: > >On 08/08/2012 04:10 AM, David Gibson wrote: > >>Hi Alex, > >> > >>This series contains all my outstanding pseries updates which aren't

Re: [Qemu-devel] [Qemu-ppc] [PATCH 06/10] pseries: Export find_phb() utility function for PCI code

2012-08-14 Thread David Gibson
On Tue, Aug 14, 2012 at 01:45:53PM +0200, Alexander Graf wrote: > On 08/08/2012 04:10 AM, David Gibson wrote: > >From: Alexey Kardashevskiy > > > >The pseries PCI code makes use of an internal find_dev() function which > >locates a PCIDevice * given a (platform

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread David Gibson
On Wed, Aug 15, 2012 at 09:24:34AM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 8:09 AM, Benjamin Herrenschmidt > wrote: > > On Wed, 2012-08-15 at 09:10 +1000, David Gibson wrote: > >> > I see. I will redo this patch. Send out it later. :) > >> > Thanks f

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-14 Thread David Gibson
On Wed, Aug 15, 2012 at 10:50:04AM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 9:47 AM, David Gibson wrote: > > On Wed, Aug 15, 2012 at 09:24:34AM +0800, Li Zhang wrote: > >> On Wed, Aug 15, 2012 at 8:09 AM, Benjamin Herrenschmidt > >> wrote: > >> > O

[Qemu-devel] [PATCH 6/7] pseries: Clear TCE state when resetting PAPR VIO devices

2012-08-14 Thread David Gibson
the reset paths. Signed-off-by: David Gibson --- hw/spapr_vio.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index 7ca4452..298e239 100644 --- a/hw/spapr_vio.c +++ b/hw/spapr_vio.c @@ -324,9 +324,7 @@ static void

[Qemu-devel] [PATCH 3/7] pseries: Fix and cleanup CPU initialization and reset

2012-08-14 Thread David Gibson
#x27;ve been running. Nonetheless the start-cpu RTAS call's behaviour was not correct and could easily have been broken by guest changes. This patch also fixes it. Signed-off-by: David Gibson --- hw/spapr.c | 33 +++-- hw/spapr_rtas.c |5 + 2 files chan

[Qemu-devel] [PATCH 2/7] ppc: Make kvm_arch_put_registers() put *all* the registers

2012-08-14 Thread David Gibson
Signed-off-by: David Gibson --- target-ppc/kvm.c | 89 ++ 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index a31d278..1a7489b 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -60,6

[Qemu-devel] [PATCH 7/7] ppc/pseries: Reset VPA registration on CPU reset

2012-08-14 Thread David Gibson
. Patches coming for qemu once the kernel updates are merged. Signed-off-by: David Gibson --- target-ppc/translate_init.c |8 1 file changed, 8 insertions(+) diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c index 6fe4168..2bc4a3f 100644 --- a/target-ppc

[Qemu-devel] [PATCH 4/7] pseries: Use new method to correct reset sequence

2012-08-14 Thread David Gibson
h uses the new QEMUMachine reset method to to fix this problem, ensuring the various order dependent reset steps happen in the correct order. Signed-off-by: David Gibson --- hw/spapr.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/spapr.c b/hw/spapr.c ind

[Qemu-devel] [PATCH 1/7] Allow QEMUMachine to override reset sequencing

2012-08-14 Thread David Gibson
mplementing the "firmware" and executing it. Signed-off-by: David Gibson --- hw/boards.h |3 +++ sysemu.h|1 + vl.c| 11 ++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/hw/boards.h b/hw/boards.h index 59c01d0..a2e0a54 100644 --- a/hw/b

[Qemu-devel] [PATCH 5/7] pseries: Add support for new KVM hash table control call

2012-08-14 Thread David Gibson
size hash table to the kernel and for the kernel to be able to impose limits on the requested size. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- hw/spapr.c | 274 +- hw/spapr.h |4 +- target

[Qemu-devel] [0/7] pseries: Patches to fix system reset

2012-08-14 Thread David Gibson
Hi Alex, Here is a string of patches which fix most of the many problems with system reset on the pseriss machine. They apply on top of my other string of pseries patches which you already merged. They apply before Li Zhang's usb and vga patches, since it looks like those will go another iterati

Re: [Qemu-devel] [Qemu-ppc] [PATCH v7 1/3] Add USB option in machine options

2012-08-15 Thread David Gibson
On Wed, Aug 15, 2012 at 01:44:28PM +0800, Li Zhang wrote: > On Wed, Aug 15, 2012 at 10:57 AM, David Gibson wrote: > > On Wed, Aug 15, 2012 at 10:50:04AM +0800, Li Zhang wrote: > >> On Wed, Aug 15, 2012 at 9:47 AM, David Gibson wrote: > >> > On Wed, Aug 15, 2012

[Qemu-devel] [PATCH] pseries: Instantiate USB interface when required

2012-08-15 Thread David Gibson
when VGA is enabled. This is a stop gap measure to get usable graphics mode on pseries while waiting for Li Zhang's rework of USB options to go in after 1.2. Signed-off-by: David Gibson --- hw/spapr.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/spapr.c b/hw/spapr.c

Re: [Qemu-devel] [PATCH] device_tree: load_device_tree(): Allow NULL sizep

2012-08-15 Thread David Gibson
fdt blob? That's not rentirely true. > For example, if I pass a corrupt or malicious blob to libfdt, is there a > way to detect that or will it access memory beyond the end of the blob > as we query the device tree? So, libfdt does trust the blob size that's given in the blob header, since libfdt itself doesn't really have any other source for the blob/buffer size. If you have another source for your buffer size though, you can check that quite easily against fdt_totalsize(blob) (which returns the header value). If you can think of a helper function that would make this easier, I'd be happy to add it to libfdt. Once the header size is validated, though, libfdt *is* supposed to be safe against a corrupt or malicious blob. I can't guarantee that we don't have bugs here, but any crash on malicious data I do consider a bug and will fix once I'm aware of it. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [Qemu-devel] [Qemu-ppc] [PATCH v8 2/2] Add USB enablement on sPAPR platform.

2012-08-15 Thread David Gibson
s in spapr.c of: > > if (usb_enabled) { > instanciate ohci > if (vga enabled) { > add mouse & kbd > } > } I've just sent such a patch to Alex, so Li you can polish up your patches so they're ready for 1.3. -- David Gibson

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/7] ppc: Make kvm_arch_put_registers() put *all* the registers

2012-08-18 Thread David Gibson
On Fri, Aug 17, 2012 at 03:58:08PM +0200, Alexander Graf wrote: > On 08/15/2012 06:33 AM, David Gibson wrote: > >At least when invoked with high enough 'level' arguments, > >kvm_arch_put_registers() is supposed to copy essentially all the cpu state > >as encoded in

[Qemu-devel] [PATCH] eventfd: making it thread safe

2012-08-21 Thread David Gibson
restarted. The patch adds the qemu_notify_event() call to interrupt select() to make main_loop() restart select() with the updated IO handlers list. Signed-off-by: Alexey Kardashevskiy Reviewed-by: Paolo Bonzini Signed-off-by: David Gibson --- iohandler.c |1 + 1 file changed, 1 insertion

[Qemu-devel] [PATCH] usb: Fix host-side endian bugs in hcd-ehci

2012-08-21 Thread David Gibson
: It might look like this patch breaks support for unaligned accesses, however these already didn't work as they would be rejected by the code in memory.c before even reaching hcd-ehci.c. Cc: Gerd Hoffman Signed-off-by: David Gibson ---

[Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
, but the TB from the rewrite was still active and caused us to get an illegal instruction trap. This patch fixes the bug by duplicating the tb invalidate code from cpu_physical_memory_rw() in cpu_physical_memory_write_rom(). Signed-off-by: David Gibson --- exec.c |7 +++ 1 file changed

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: > > On 22.08.2012, at 06:59, David Gibson wrote: > > > cpu_physical_memory_write_rom(), despite the name, can also be used to > > write images into RAM - and will often be used that way if the machine > &g

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-21 Thread David Gibson
On Wed, Aug 22, 2012 at 08:02:11AM +0200, Alexander Graf wrote: > > On 22.08.2012, at 07:57, David Gibson wrote: > > > On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: > >> > >> On 22.08.2012, at 06:59, David Gibson wrote: > >> > >

Re: [Qemu-devel] [PATCH] cpu_physical_memory_write_rom() needs to do TB invalidates

2012-08-22 Thread David Gibson
On Wed, Aug 22, 2012 at 09:05:52AM +0200, Jan Kiszka wrote: > On 2012-08-22 08:47, Jan Kiszka wrote: > > On 2012-08-22 07:57, David Gibson wrote: > >> On Wed, Aug 22, 2012 at 07:55:31AM +0200, Alexander Graf wrote: > >>> > >>> O

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC: Pseries: Check for PCI boundaries

2012-01-23 Thread David Gibson
we expect > > it to. > > > > So let's introduce a small wrapper around them, making them behave the > > way we would without touching generic code. > > > > This patch is based on a patch by David Gibson which put this logic into > > the generic code. >

Re: [Qemu-devel] [RFC] Device isolation infrastructure v2

2012-01-24 Thread David Gibson
On Tue, Dec 20, 2011 at 09:30:37PM -0700, Alex Williamson wrote: > On Wed, 2011-12-21 at 14:32 +1100, David Gibson wrote: > > On Mon, Dec 19, 2011 at 04:41:56PM +0100, Joerg Roedel wrote: > > > On Mon, Dec 19, 2011 at 11:11:25AM +1100, David Gibson wrote: > > > > We

Re: [Qemu-devel] [RFC] Device isolation infrastructure v2

2012-01-30 Thread David Gibson
On Wed, Jan 25, 2012 at 04:44:53PM -0700, Alex Williamson wrote: > On Wed, 2012-01-25 at 14:13 +1100, David Gibson wrote: > > On Tue, Dec 20, 2011 at 09:30:37PM -0700, Alex Williamson wrote: > > > On Wed, 2011-12-21 at 14:32 +1100, David Gibson wrote: > > > > On M

[Qemu-devel] [PATCH 3/3] device_isolation: Support isolation on POWER p7ioc (IODA) bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p7ioc (aka IODA) PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- arch/powerpc/platforms/powernv/pci-ioda.c

[Qemu-devel] RFC: Device isolation groups

2012-01-31 Thread David Gibson
This patch series introduces a new infrastructure to the driver core for representing "device isolation groups". That is, groups of devices which can be "isolated" in such a way that the rest of the system can be protected from them, even in the presence of userspace or a guest OS directly driving

[Qemu-devel] [PATCH 2/3] device_isolation: Support isolation on POWER p5ioc2 bridges

2012-01-31 Thread David Gibson
This patch adds code to the code for the powernv platform to create and populate isolation groups on hardware using the p5ioc2 PCI host bridge used on some IBM POWER systems. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson --- arch/powerpc/platforms/powernv/pci-p5ioc2.c | 14

[Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3)

2012-01-31 Thread David Gibson
vskiy Signed-off-by: David Gibson --- drivers/base/Kconfig |3 + drivers/base/Makefile|1 + drivers/base/base.h |3 + drivers/base/core.c |6 ++ drivers/base/device_isolation.c | 184 ++

Re: [Qemu-devel] [PATCH 3/3] device_isolation: Support isolation on POWER p7ioc (IODA) bridges

2012-02-01 Thread David Gibson
On Wed, Feb 01, 2012 at 12:17:05PM -0700, Alex Williamson wrote: > On Wed, 2012-02-01 at 15:46 +1100, David Gibson wrote: > > This patch adds code to the code for the powernv platform to create > > and populate isolation groups on hardware using the p7ioc (aka IODA) PCI > >

Re: [Qemu-devel] RFC: Device isolation groups

2012-02-01 Thread David Gibson
On Wed, Feb 01, 2012 at 01:08:39PM -0700, Alex Williamson wrote: > On Wed, 2012-02-01 at 15:46 +1100, David Gibson wrote: > > This patch series introduces a new infrastructure to the driver core > > for representing "device isolation groups". That is, groups of > >

[Qemu-devel] [PATCH] pci: Factor out bounds checking on config space accesses

2012-02-07 Thread David Gibson
nfig_{read,write}_common(). No partial reads or writes are performed, instead any out-of-bounds write is simply ignored and an out-of-bounds read returns 0xff. This simplifies all the callers, and makes the overall semantics saner for edge cases. Signed-off-by: David Gibson --- hw/pci_host

[Qemu-devel] [PATCH] pseries: Don't try to munmap() a malloc()ed TCE table

2012-02-07 Thread David Gibson
the bug, and cleans up error messages relating to this path while we're at it. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- target-ppc/kvm.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index

[Qemu-devel] [PATCH] PPC64: Add support for ldbrx and stdbrx instructions

2012-02-07 Thread David Gibson
From: Thomas Huth These instructions for loading and storing byte-swapped 64-bit values have been introduced in PowerISA 2.06. Signed-off-by: Thomas Huth --- target-ppc/translate.c | 30 ++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/target-ppc

[Qemu-devel] [PATCH] Allow larger return values from get_image_size()

2012-02-07 Thread David Gibson
: David Gibson --- device_tree.c |4 ++-- hw/alpha_dp264.c |5 +++-- hw/highbank.c |2 +- hw/leon3.c |6 +++--- hw/loader.c| 12 +++- hw/loader.h|2 +- hw/mips_fulong2e.c | 12 ++-- hw/mips_malta.c| 12 ++-- hw

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC64: Add support for ldbrx and stdbrx instructions

2012-02-08 Thread David Gibson
On Wed, Feb 08, 2012 at 10:54:21AM +0400, malc wrote: > On Wed, 8 Feb 2012, David Gibson wrote: > > > From: Thomas Huth > > > > These instructions for loading and storing byte-swapped 64-bit values have > > been introduced in PowerISA 2.06. >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] PPC64: Add support for ldbrx and stdbrx instructions

2012-02-08 Thread David Gibson
On Wed, Feb 08, 2012 at 02:27:35PM +0100, Thomas Huth wrote: > Am Wed, 8 Feb 2012 21:48:40 +1100 > schrieb David Gibson : > > > On Wed, Feb 08, 2012 at 10:54:21AM +0400, malc wrote: > > > On Wed, 8 Feb 2012, David Gibson wrote: > > > > > > > From: Tho

Re: [Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3)

2012-02-08 Thread David Gibson
On Wed, Feb 08, 2012 at 04:27:48PM +0100, Joerg Roedel wrote: > On Wed, Feb 01, 2012 at 03:46:52PM +1100, David Gibson wrote: > > In order to safely drive a device with a userspace driver, or to pass > > it through to a guest system, we must first make sure that the device > >

[Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-08 Thread David Gibson
unsigned, fixing the compile. Signed-off-by: David Gibson --- kvm-all.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 0b87658..681ad15 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -78,7 +78,10 @@ struct KVMState int pit_in_kernel;

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread David Gibson
On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: > Looks like the subject would warmly welcome a "kvm:" tag. > > On 2012-02-09 05:22, David Gibson wrote: [snip] > > What about naming the problem instead: > > /* Comparison with IOCTL macros on 32-bit ho

Re: [Qemu-devel] [PATCH 1/3] Device isolation group infrastructure (v3)

2012-02-09 Thread David Gibson
uld iterate over > all devices on a bus and build up group structures based on isolation > information provided by the arch specific code. And how exactly do you suggest it provide that information. I really can't see how an iommu driver would specify its isolation constraints generally enough

[Qemu-devel] [PATCH] kvm: Comparison with ioctl number macros needs to be unsigned

2012-02-09 Thread David Gibson
unsigned, fixing the compile. Signed-off-by: David Gibson --- kvm-all.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) Updated with improved patch comment. diff --git a/kvm-all.c b/kvm-all.c index 0b87658..681ad15 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -78,7 +78,10 @@ struct KVM

[Qemu-devel] [PATCH] PPC64: Add support for ldbrx and stdbrx instructions

2012-02-09 Thread David Gibson
From: Thomas Huth These instructions for loading and storing byte-swapped 64-bit values have been introduced in PowerISA 2.06. Signed-off-by: Thomas Huth Signed-off-by: David Gibson --- target-ppc/cpu.h|4 ++- target-ppc/translate.c | 52

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread David Gibson
On Thu, Feb 09, 2012 at 11:06:57AM +0100, Jan Kiszka wrote: > On 2012-02-09 10:58, David Gibson wrote: > > On Thu, Feb 09, 2012 at 09:30:09AM +0100, Jan Kiszka wrote: > >> Looks like the subject would warmly welcome a "kvm:" tag. > >> > >> On 2

Re: [Qemu-devel] [PATCH] ioctl() numbers are unsigned (the man page lies)

2012-02-09 Thread David Gibson
n x86 and x86_64, but it occurs for a different set of ioctls (IOC_READ instead of IOC_WRITE). I guess we never did this sort of signed comparison on an IOC_WRITE ioctl number (comparing ioctl numbers for equality isn't a particularly obvious thing to do from userspace, after all). -- Dav

Re: [Qemu-devel] [PATCH 4/7] savevm: Add VMSTATE_ helpers for target_phys_addr_t

2012-10-10 Thread David Gibson
On Wed, Oct 10, 2012 at 11:17:31AM +1100, David Gibson wrote: > On Tue, Oct 09, 2012 at 05:24:29PM +0100, Peter Maydell wrote: > > On 9 October 2012 13:53, David Gibson wrote: > > > Well, the place I've used this (in patches yet to be posted) is saving > > >

[Qemu-devel] [0/8] Pending pseries patches

2012-10-11 Thread David Gibson
Hi Alex, Here's another patch of pending pseries patches. 1/8 is what I hope is finally a correct version of the patch to extend FPU state for recent CPUs. The rest is basically preliminary cleanups before adding support for in-kernel XICS emulation. The actual support for the in-kernel XICS is

[Qemu-devel] [PATCH 6/8] pseries: Return the token when we register an RTAS call

2012-10-11 Thread David Gibson
token value is. Signed-off-by: Michael Ellerman Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- hw/spapr.h |2 +- hw/spapr_rtas.c |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/spapr.h b/hw/spapr.h index 54960f3..f6864da 100644 --- a

[Qemu-devel] [PATCH 8/8] pseries: Add tracepoints to the XICS interrupt controller

2012-10-11 Thread David Gibson
This patch adds tracing / debugging calls to the XICS interrupt controller implementation used on the pseries machine. Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/xics.c| 23 --- trace-events | 13 + 2 files changed, 33 insertions

[Qemu-devel] [PATCH 2/8] pseries: Clean up inconsistent variable name in xics.c

2012-10-11 Thread David Gibson
Throughout xics.c 'nr' is used to refer to a global interrupt number, and 'server' is used to refer to an interrupt server number (i.e. CPU number). Except in icp_set_mfrr(), where 'nr' is used as a server number. Fix this confusing inconsistency. Signed-off-by

[Qemu-devel] [PATCH 7/8] pseries: Allow RTAS tokens without a qemu handler

2012-10-11 Thread David Gibson
g the device-tree Signed-off-by: Benjamin Herrenschmidt Signed-off-by: David Gibson --- hw/spapr_rtas.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c index 38c105f..72cad53 100644 --- a/hw/spapr_rtas.c +++ b/hw/spapr_rtas.c @@ -298,7 +

[Qemu-devel] [PATCH 4/8] pseries: Cleanup duplications of ics_valid_irq() code

2012-10-11 Thread David Gibson
A couple of places in xics.c open-coded the same logic as is already implemented in ics_valid_irq(). This patch fixes the code duplication. Signed-off-by: David Gibson --- hw/xics.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/xics.c b/hw/xics.c index db01fe3

[Qemu-devel] [PATCH 5/8] pseries: Move XICS initialization before cpu initialization

2012-10-11 Thread David Gibson
means the xics init code can no longer auto-detect the number of cpus ("interrupt servers" in XICS terminology) and so we must pass that in explicitly from the platform code. Signed-off-by: Michael Ellerman Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/spap

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

2012-10-11 Thread David Gibson
o not fail on the extended state, but also does not actually save it - that's a project for another patch. Signed-off-by: David Gibson --- v2: * Used target_ulong instead of uint64_t, since the extended state is used only on ppc64 targets. * Fixed the TCG mapping of fpscr to match th

[Qemu-devel] [PATCH 3/8] pseries: Use #define for XICS base irq number

2012-10-11 Thread David Gibson
e going to need to change this number soon to fit in with the in-kernel XICS implementation. This patch adds a #define for this number to avoid future breakage. Signed-off-by: Michael Ellerman Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/spapr.c |2 +- hw/xics.c

Re: [Qemu-devel] [PATCH] Add nvram to default boot device list

2012-10-11 Thread David Gibson
sed to when it contains its default value) was the right one, and this "x" in -boot is going the wrong direction. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_

Re: [Qemu-devel] [PATCH] Add nvram to default boot device list

2012-10-11 Thread David Gibson
On Fri, Oct 12, 2012 at 02:03:00AM +0200, Alexander Graf wrote: > > On 12.10.2012, at 00:59, David Gibson wrote: > > > On Thu, Oct 11, 2012 at 07:34:42AM +0530, Avik Sil wrote: > >> This patch adds nvram specified boot device into qemu default > >> boot_devices

Re: [Qemu-devel] [PATCH 4/7] savevm: Add VMSTATE_ helpers for target_phys_addr_t

2012-10-11 Thread David Gibson
On Thu, Oct 11, 2012 at 04:07:24PM +0100, Peter Maydell wrote: > On 11 October 2012 02:57, David Gibson wrote: > > Actually, turns out I had another use of these helpers. That was to > > store the real page address from the ppcmeb_tlb_t structure. That > > structure is

[Qemu-devel] [PATCH 02/15] target-pcc: Convert ppcemb_tlb_t to use fixed 64-bit RPN

2012-10-14 Thread David Gibson
it integer which we know is sufficient for all the machines which use this structure. Signed-off-by: David Gibson --- target-ppc/cpu.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index cde6da0..f30e0c7 100644 --- a/target-ppc/cpu.h +++ b/

[Qemu-devel] [PATCH 08/15] savevm: Implement VMS_DIVIDE flag

2012-10-14 Thread David Gibson
y the structures could use this construct. Signed-off-by: David Gibson --- savevm.c |8 vmstate.h | 13 + 2 files changed, 21 insertions(+) diff --git a/savevm.c b/savevm.c index 02e9da0..d830837 100644 --- a/savevm.c +++ b/savevm.c @@ -1460,6 +1460,10 @

[Qemu-devel] [PATCH 01/15] pseries: Split xics irq configuration from state information

2012-10-14 Thread David Gibson
patch, therefore, removes this flag from the per-irq state structure, instead adding a parallel array giving the lsi/msi configuration per irq. Signed-off-by: David Gibson --- hw/xics.c | 20 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/hw/xics.c b/hw

[Qemu-devel] [PATCH 15/15] pseries: savevm support for pseries machine

2012-10-14 Thread David Gibson
ption information to save and restore the (few) remaining pieces of state information needed by the pseries machine. Signed-off-by: David Gibson --- hw/spapr.c | 268 +- hw/spapr.h | 52 ++- hw/spapr_hcall.c | 41 + 3

[Qemu-devel] [PATCH 09/15] target-ppc: Convert ppc cpu savevm to VMStateDescription

2012-10-14 Thread David Gibson
e new VMStateDescription approach. Exactly what needs to be saved in what configurations has been more carefully examined, too. This introduces a new version (5) of the cpu save format. The old load function is retained to support version 4 images. Signed-off-by: David Gibson Conflicts: targe

[Qemu-devel] [PATCH 07/15] savevm: Fix bugs in the VMSTATE_VBUFFER_MULTIPLY definition

2012-10-14 Thread David Gibson
macro did not specify VMS_POINTER. This patch fixes this bug as well. Signed-off-by: David Gibson --- vmstate.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vmstate.h b/vmstate.h index 4b393a0..6bfdb6a 100644 --- a/vmstate.h +++ b/vmstate.h @@ -372,14 +372,14 @@ extern

[Qemu-devel] [PATCH 14/15] pseries: savevm support for PAPR virtual SCSI

2012-10-14 Thread David Gibson
This patch adds the necessary support for saving the state of the PAPR VIO virtual SCSI device. This turns out to be trivial, because the generiC SCSI code already quiesces the attached virtual SCSI bus. Signed-off-by: David Gibson --- hw/spapr_vscsi.c | 28 1

[Qemu-devel] [PATCH 04/15] savevm: Add VMSTATE_UINTTL_EQUAL helper

2012-10-14 Thread David Gibson
This adds an _EQUAL VMSTATE helper for target_ulongs, defined in terms of VMSTATE_UINT32_EQUAL or VMSTATE_UINT64_EQUAL as appropriate. Signed-off-by: David Gibson --- hw/hw.h |6 ++ vmstate.h |7 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/hw/hw.h b/hw

[Qemu-devel] RFC: savevm/migration support for pseries

2012-10-14 Thread David Gibson
Hi Alex, Juan, This large patch series contains the full set of patches to add working migration support for the pseries machine. This includes converting target-ppc to new-style VMStateDescription, at the same time reworking it thoroughly to correct many bugs. As far as I know, no target-ppc ma

[Qemu-devel] [PATCH 13/15] pseries: savevm support for PAPR TCE tables

2012-10-14 Thread David Gibson
This patch adds the necessary VMStateDescription information to save the state of PAPR TCE tables (that is, the PAPR specified IOMMU). Signed-off-by: David Gibson --- hw/spapr_iommu.c | 24 1 file changed, 24 insertions(+) diff --git a/hw/spapr_iommu.c b/hw

[Qemu-devel] [PATCH 10/15] pseries: savevm support for XICS interrupt controller

2012-10-14 Thread David Gibson
This patch adds the necessary VMStateDescription information to allow savevm/loadvm for the XICS interrupt controller. Signed-off-by: David Gibson --- hw/xics.c | 57 + 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH 05/15] savevm: Add VMSTATE_FLOAT64 helpers

2012-10-14 Thread David Gibson
The current savevm code includes VMSTATE helpers for a number of commonly used data types, but not for the float64 type used by the internal floating point emulation code. This patch fixes the deficiency. Signed-off-by: David Gibson --- savevm.c | 23 +++ vmstate.h

[Qemu-devel] [PATCH 06/15] savevm: Add VMSTATE_STRUCT_VARRAY_POINTER_UINT32

2012-10-14 Thread David Gibson
-off-by: David Gibson --- vmstate.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/vmstate.h b/vmstate.h index a04561e..4b393a0 100644 --- a/vmstate.h +++ b/vmstate.h @@ -322,6 +322,16 @@ extern const VMStateInfo vmstate_info_unused_buffer; .offset = vmstate_offset_pointer

[Qemu-devel] [PATCH 12/15] pseries: savevm support for PAPR VIO logical lan

2012-10-14 Thread David Gibson
This patch adds the necessary VMStateDescription information to support savevm/loadvm for the spapr_llan (PAPR logical lan) device. Signed-off-by: David Gibson --- hw/spapr_llan.c | 24 ++-- hw/spapr_vty.c | 16 2 files changed, 38 insertions(+), 2

[Qemu-devel] [PATCH 03/15] savevm: Add VMSTATE_UINT64_EQUAL helpers

2012-10-14 Thread David Gibson
patch fills that hole, adding a UINT64 version. Signed-off-by: David Gibson --- v2: Added missing braces --- savevm.c | 21 + vmstate.h |7 +++ 2 files changed, 28 insertions(+) diff --git a/savevm.c b/savevm.c index 31fd2e0..fcbc706 100644 --- a/savevm.c +++ b/sav

[Qemu-devel] [PATCH 11/15] pseries: savevm support for VIO devices

2012-10-14 Thread David Gibson
This patch adds helpers to allow PAPR VIO devices to save state common to all VIO devices during savevm. Signed-off-by: David Gibson --- hw/spapr_vio.c | 20 hw/spapr_vio.h |5 + 2 files changed, 25 insertions(+) diff --git a/hw/spapr_vio.c b/hw/spapr_vio.c index

Re: [Qemu-devel] nvram and boot order

2012-10-16 Thread David Gibson
x order else if -boot is specified: use the -boot order else: use platform specific default behaviour The last option may depend on the contents of NVRAM or other platform specific information. More importantly though, how best to achieve

Re: [Qemu-devel] nvram and boot order

2012-10-16 Thread David Gibson
est. > > If you look at my other note in this thread, one way to achieve this is > to have the boot order "owned" by QEMU with the guest making fw_cfg > calls to modify it. It would be persisted in a portion of the NVRAM > reserved for QEMU's use. That's not necessarily compatible with established guest visible platform NVRAM semantics. -- David Gibson| I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson

Re: [Qemu-devel] nvram and boot order

2012-10-17 Thread David Gibson
On Wed, Oct 17, 2012 at 01:17:28PM -0500, Anthony Liguori wrote: > David Gibson writes: > > > On Tue, Oct 16, 2012 at 02:55:21PM -0500, Anthony Liguori wrote: > >> > >> We discussed nvram and it's interaction with boot order in today's KVM >

[Qemu-devel] [PATCH 11/15] pseries: Add tracepoints to the XICS interrupt controller

2012-10-17 Thread David Gibson
This patch adds tracing / debugging calls to the XICS interrupt controller implementation used on the pseries machine. Signed-off-by: Ben Herrenschmidt Signed-off-by: David Gibson --- hw/xics.c| 23 --- trace-events | 13 + 2 files changed, 33 insertions

  1   2   3   4   5   6   7   8   9   10   >