Re: [Qemu-devel] Trouble with pc_system_firmware_init()

2012-08-16 Thread Jordan Justen
On Thu, Aug 16, 2012 at 4:16 AM, Markus Armbruster wrote: > I noticed a few things I'd like to discuss. > > 0. pc_fw_add_pflash_drv() lacks error checking, patch coming. > > 1. Watch this: > > $ qemu-system-x86_64 -nodefaults -S -vnc :0 -bios /dev/null > Bad ram offset 800 > Aborte

Re: [Qemu-devel] [PATCH 1/2] pc_sysfw: Check for qemu_find_file() failure

2012-08-16 Thread Jordan Justen
Reviewed-by: Jordan Justen On Thu, Aug 16, 2012 at 4:41 AM, Markus Armbruster wrote: > pc_fw_add_pflash_drv() ignores qemu_find_file() failure, and happily > creates a drive without a medium. > > When pc_system_flash_init() asks for its size, bdrv_getlength() fails > with -E

Re: [Qemu-devel] [PATCH v9 3/3] pc: Support system flash memory with pflash

2012-01-28 Thread Jordan Justen
On Mon, Jan 9, 2012 at 01:28, Kevin Wolf wrote: > Am 19.12.2011 23:19, schrieb Anthony Liguori: >> On 12/19/2011 03:25 PM, Jordan Justen wrote: >>> On Mon, Dec 19, 2011 at 11:41, Anthony Liguori  wrote: >>>> On 12/15/2011 02:51 PM, Jordan Justen wrote: >>

Re: [Qemu-devel] [RFC] Writeable files in fw_cfg

2013-01-27 Thread Jordan Justen
On Sun, Jan 27, 2013 at 8:38 AM, David Woodhouse wrote: > On Sun, 2013-01-27 at 16:02 +, Blue Swirl wrote: >> On Sun, Jan 27, 2013 at 3:50 PM, David Woodhouse wrote: >> > On Sun, 2013-01-27 at 15:14 +, Blue Swirl wrote: >> >> It looks like this duplicates rom_add_file() and fw_cfg_add_fil

Re: [Qemu-devel] [RFC] Writeable files in fw_cfg

2013-01-28 Thread Jordan Justen
On Mon, Jan 28, 2013 at 8:10 AM, Anthony Liguori wrote: > David Woodhouse writes: > >> On Sun, 2013-01-27 at 18:53 -0600, Anthony Liguori wrote: >>> Are you just trying to persist a single blob of a fixed maximum size? >> >> That would suffice. >> >>> Why not just have a second flash device then?

Re: [Qemu-devel] EDKII OVMF+QEMU Query- What is the Max supported Buffer size for file IO.

2013-02-04 Thread Jordan Justen
On Mon, Feb 4, 2013 at 8:22 AM, baban devkate wrote: > When Working with OVMF+QEMU, What is the Max supported Buffer size (in Block > I/O Protocol)? I don't think there should be a set limit, although the VM RAM size is obviously 1 limit. :) -Jordan

Re: [Qemu-devel] [Qemu-ppc] Qemu boot device precedence over nvram boot-device setting

2012-09-27 Thread Jordan Justen
On Thu, Sep 27, 2012 at 2:51 AM, Gleb Natapov wrote: > The problem is that it works reasonably well with legacy BIOS > since it is enough to specify device to boot from, but with EFI (OF is > the same I guess) it is not enough to point to a device to boot from, > but you also need to specify a fil

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Jordan Justen
On Fri, Aug 30, 2013 at 5:42 AM, Paolo Bonzini wrote: > Il 30/08/2013 14:10, Gleb Natapov ha scritto: >> On Fri, Aug 30, 2013 at 01:58:59PM +0200, Paolo Bonzini wrote: >>> Il 30/08/2013 11:37, Laszlo Ersek ha scritto: Disclaimer: I don't know what I'm talking about. >>> >>> No problem. :) >>>

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Jordan Justen
On Fri, Aug 30, 2013 at 4:58 AM, Paolo Bonzini wrote: > However, if you guys can figure out a patch for > UefiCpuPkg/ResetVector/Vtf0/Ia32/Flat32ToFlat64.asm so that it builds > the page tables in RAM (and removing the page table Python code), that > would also work. That path is not quite how it

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-30 Thread Jordan Justen
On Fri, Aug 30, 2013 at 11:44 AM, Paolo Bonzini wrote: > Il 30/08/2013 19:39, Jordan Justen ha scritto: >>> However, if you guys can figure out a patch for >>> > UefiCpuPkg/ResetVector/Vtf0/Ia32/Flat32ToFlat64.asm so that it builds >>> > the page tables in RAM

Re: [Qemu-devel] [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-31 Thread Jordan Justen
On Thu, Aug 29, 2013 at 8:28 PM, Gary Ching-Pang Lin wrote: > On Fri, Aug 30, 2013 at 02:04:40AM +1000, Bruce Rogers wrote: >> I tried this out, and I get the black screen as well when ept=n, but it boots >> successfully to the efi shell when ept=y. >> >> Gary, what does 'cat /sys/module/kvm_intel

Re: [Qemu-devel] [PATCH 2/2] vmstate, memory: decouple vmstate from memory API

2012-01-07 Thread Jordan Justen
On Tue, Dec 20, 2011 at 06:05, Avi Kivity wrote: > +void qemu_ram_set_idstr(ram_addr_t addr, const char *name, DeviceState *dev) >  { >     RAMBlock *new_block, *block; > > -    size = TARGET_PAGE_ALIGN(size); > -    new_block = g_malloc0(sizeof(*new_block)); > +    new_block = NULL; > +    QLIST_

[Qemu-devel] [PATCH v10 0/8] PC system flash support

2012-01-08 Thread Jordan Justen
onal comments v2: * Convert debug printf to DPRINTF Jordan Justen (8): blockdev: allow read-only pflash devices pflash_cfi01/02: support read-only pflash devices vl: make find_default_machine externally visible hw/pc: move rom init to pc_sysfw.c hw/pc_sysfw: Support system flash memor

[Qemu-devel] [PATCH v10 1/8] blockdev: allow read-only pflash devices

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- blockdev.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index c832782..2d1b8f7 100644 --- a/blockdev.c +++ b/blockdev.c @@ -557,7 +557,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi

[Qemu-devel] [PATCH v10 2/8] pflash_cfi01/02: support read-only pflash devices

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pflash_cfi01.c | 44 +++- hw/pflash_cfi02.c | 83 2 files changed, 75 insertions(+), 52 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index ee0c3ba..b03f623

[Qemu-devel] [PATCH v10 5/8] hw/pc_sysfw: Support system flash memory with pflash

2012-01-08 Thread Jordan Justen
drive. Signed-off-by: Jordan Justen --- default-configs/i386-softmmu.mak |1 + default-configs/x86_64-softmmu.mak |1 + hw/pc.c|2 +- hw/pc.h|3 +- hw/pc_sysfw.c | 172

[Qemu-devel] [PATCH v10 3/8] vl: make find_default_machine externally visible

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/boards.h |1 + vl.c|2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/boards.h b/hw/boards.h index 716fd7b..45a31a1 100644 --- a/hw/boards.h +++ b/hw/boards.h @@ -33,6 +33,7 @@ typedef struct QEMUMachine { } QEMUMachine

[Qemu-devel] [PATCH v10 7/8] hw/pc_piix: add pc-1.1

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pc_piix.c | 11 +-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 00f525e..aea95e4 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -314,8 +314,8 @@ static void pc_xen_hvm_init(ram_addr_t ram_size

[Qemu-devel] [PATCH v10 4/8] hw/pc: move rom init to pc_sysfw.c

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- Makefile.target |1 + hw/pc.c | 56 +++-- hw/pc.h |3 ++ hw/pc_sysfw.c | 92 +++ 4 files changed, 101 insertions(+), 51 deletions(-) create mode 100644

[Qemu-devel] [PATCH v10 6/8] hw/pc_piix: remove is_default for pc-0.15

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pc_piix.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index b70431f..00f525e 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -328,7 +328,6 @@ static QEMUMachine pc_machine_v0_15 = { .desc

[Qemu-devel] [PATCH v10 8/8] pc: enable system flash for pc-1.1

2012-01-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pc.c |5 +++-- hw/pc.h |3 ++- hw/pc_piix.c | 33 + 3 files changed, 30 insertions(+), 11 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 7a7af90..4af9974 100644 --- a/hw/pc.c +++ b/hw/pc.c @@ -967,7

Re: [Qemu-devel] [PATCH v10 0/8] PC system flash support

2012-01-08 Thread Jordan Justen
This currently depends on Avi's patch to avoid an assert during boot. * Fix vmstate_register_ram() for rom/device regions -Jordan On Sun, Jan 8, 2012 at 11:51, Jordan Justen wrote: > Enable flash emulation in a PC system using pflash_cfi01. > > v10: > * Rebase to HEAD > * &q

Re: [Qemu-devel] [PATCH v10 7/8] hw/pc_piix: add pc-1.1

2012-01-08 Thread Jordan Justen
On Sun, Jan 8, 2012 at 16:12, Alexander Graf wrote: > > On 08.01.2012, at 20:51, Jordan Justen wrote: > >> Signed-off-by: Jordan Justen >> --- >> hw/pc_piix.c |   11 +-- >> 1 files changed, 9 insertions(+), 2 deletions(-) >> >> diff --git a

Re: [Qemu-devel] [PATCH v11 0/9] PC system flash support

2012-03-14 Thread Jordan Justen
On Tue, Mar 13, 2012 at 05:34, Paolo Bonzini wrote: > Il 22/02/2012 08:18, Jordan Justen ha scritto: >> Enable flash emulation in a PC system using pflash_cfi01. > > Jordan, can you document this on the wiki > (http://wiki.qemu.org/ChangeLog/1.1#x86)? I found > http://w

Re: [Qemu-devel] [PATCH v3] hw/pc: Support system flash memory with -pflash parameter

2011-06-03 Thread Jordan Justen
o wrote: >> On Thu, Mar 31, 2011 at 11:25:26AM -0700, Jordan Justen wrote: >> > If -pflash is specified and -bios is specified then pflash will >> > be mapped just below the system rom using hw/pflash_cfi01.c. >> > >> > If -pflash is specified on the comma

[Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-07-25 Thread Jordan Justen
Read-only mode is indicated by bdrv_is_read_only When read-only mode is enabled, no changes will be made to the flash image in memory, and no bdrv_write calls will be made. Signed-off-by: Jordan Justen Cc: Jan Kiszka Cc: Aurelien Jarno Cc: Anthony Liguori --- blockdev.c|3 +- hw

[Qemu-devel] [PATCH 2/2] pc: Support system flash memory with pflash

2011-07-25 Thread Jordan Justen
If a pflash image is found, then it is used for the system firmware image. If a pflash image is not initially found, then a read-only pflash device is created using the -bios filename. Signed-off-by: Jordan Justen Cc: Anthony Liguori Cc: Aurelien Jarno --- Makefile.target

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-07-27 Thread Jordan Justen
On Wed, Jul 27, 2011 at 02:30, Jan Kiszka wrote: > On 2011-07-25 23:34, Jordan Justen wrote: >> Read-only mode is indicated by bdrv_is_read_only >> >> When read-only mode is enabled, no changes will be made >> to the flash image in memory, and no bdrv_write calls will b

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-07-28 Thread Jordan Justen
On Thu, Jul 28, 2011 at 11:26, Jan Kiszka wrote: > On 2011-07-27 17:38, Jordan Justen wrote: >> On Wed, Jul 27, 2011 at 02:30, Jan Kiszka wrote: >>> On 2011-07-25 23:34, Jordan Justen wrote: >>>> Read-only mode is indicated by bdrv_is_read_only >>>&g

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-08-11 Thread Jordan Justen
On Thu, Jul 28, 2011 at 14:05, Jordan Justen wrote: > On Thu, Jul 28, 2011 at 11:26, Jan Kiszka wrote: >> On 2011-07-27 17:38, Jordan Justen wrote: >>> On Wed, Jul 27, 2011 at 02:30, Jan Kiszka wrote: >>>> On 2011-07-25 23:34, Jordan Justen wrote: >&g

Re: [Qemu-devel] [PATCH 1/2] pflash: Support read-only mode

2011-08-15 Thread Jordan Justen
On Mon, Aug 15, 2011 at 16:45, Jan Kiszka wrote: > On 2011-08-11 10:57, Jordan Justen wrote: >> On Thu, Jul 28, 2011 at 14:05, Jordan Justen wrote: >>> On Thu, Jul 28, 2011 at 11:26, Jan Kiszka wrote: >>>> On 2011-07-27 17:38, Jordan Justen wrote: >>>>&

Re: [Qemu-devel] [PATCH v9 3/3] pc: Support system flash memory with pflash

2012-02-19 Thread Jordan Justen
On Mon, Jan 9, 2012 at 01:28, Kevin Wolf wrote: > Am 19.12.2011 23:19, schrieb Anthony Liguori: >> On 12/19/2011 03:25 PM, Jordan Justen wrote: >>> On Mon, Dec 19, 2011 at 11:41, Anthony Liguori  wrote: >>>> On 12/15/2011 02:51 PM, Jordan Justen wrote: >>>&g

[Qemu-devel] [PATCH v11 7/9] hw/pc_piix: remove is_default for pc-0.15

2012-02-21 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pc_piix.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 17f8d5d..2fc4211 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -385,7 +385,6 @@ static QEMUMachine pc_machine_v0_15 = { .desc

[Qemu-devel] [PATCH v11 1/9] blockdev: allow read-only pflash devices

2012-02-21 Thread Jordan Justen
Signed-off-by: Jordan Justen --- blockdev.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7a6613a..2c132a3 100644 --- a/blockdev.c +++ b/blockdev.c @@ -595,7 +595,8 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi

[Qemu-devel] [PATCH v11 3/9] vl: make find_default_machine externally visible

2012-02-21 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/boards.h |1 + vl.c|2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/boards.h b/hw/boards.h index f6d3784..667177d 100644 --- a/hw/boards.h +++ b/hw/boards.h @@ -32,6 +32,7 @@ typedef struct QEMUMachine { } QEMUMachine

[Qemu-devel] [PATCH v11 9/9] pc_piix/pc_sysfw: enable flash by default

2012-02-21 Thread Jordan Justen
-1.1. Signed-off-by: Jordan Justen --- hw/pc_piix.c | 49 + hw/pc_sysfw.c |2 +- 2 files changed, 50 insertions(+), 1 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index fcf0153..fe7a729 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[Qemu-devel] [PATCH v11 8/9] hw/pc_piix: add pc-1.1

2012-02-22 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pc_piix.c | 12 ++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 2fc4211..fcf0153 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -371,8 +371,8 @@ static void pc_xen_hvm_init(ram_addr_t ram_size

[Qemu-devel] [PATCH v11 6/9] hw/pc_sysfw: support system flash memory with pflash

2012-02-22 Thread Jordan Justen
. If flash is enabled and a pflash image is not initially found, then a read-only pflash device is created using the -bios filename. KVM cannot execute from a pflash region currently. Therefore, when KVM is enabled, the old rom based initialization method is used. Signed-off-by: Jordan Justen

[Qemu-devel] [PATCH v11 4/9] hw/pc: move rom init to pc_sysfw.c

2012-02-22 Thread Jordan Justen
Signed-off-by: Jordan Justen --- Makefile.target |1 + hw/pc.c | 56 +++-- hw/pc.h |3 ++ hw/pc_sysfw.c | 92 +++ 4 files changed, 101 insertions(+), 51 deletions(-) create mode 100644

[Qemu-devel] [PATCH v11 2/9] pflash_cfi01/02: support read-only pflash devices

2012-02-22 Thread Jordan Justen
Signed-off-by: Jordan Justen --- hw/pflash_cfi01.c | 44 +++- hw/pflash_cfi02.c | 83 2 files changed, 75 insertions(+), 52 deletions(-) diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index ee0c3ba..b03f623

[Qemu-devel] [PATCH v11 5/9] hw/pc_sysfw: enable pc-sysfw as a qdev

2012-02-22 Thread Jordan Justen
Setup a pc-sysfw device type. It contains a single property of 'rom_only' which is defaulted to enabled. Signed-off-by: Jordan Justen --- hw/pc_sysfw.c | 37 + 1 files changed, 37 insertions(+), 0 deletions(-) diff --git a/hw/pc_sysfw.c b/hw/

[Qemu-devel] [PATCH v11 0/9] PC system flash support

2012-02-22 Thread Jordan Justen
in status register when a write to erase is attempted in read-only mode. * Add system firmware to qemu roms v5: * Enable pflash read-only mode * Enable -drive with if=pflash to define system firmware image v4: * Rebase v3: * Fix code style issues * Add additional comments v2: * Convert debug pr

[Qemu-devel] KVM/QEMU: Support executing from flash device

2012-03-03 Thread Jordan Justen
On Tue, Oct 25, 2011 at 00:47, Avi Kivity wrote: > The core issue that kvm (the kernel part) supports two styles of memory: > read/write RAM, and read/write MMIO.  ROM wants writes to be ignored, > and rom/device wants reads serviced from memory and writes serviced by > userspace (as MMIO). > > It

Re: [Qemu-devel] KVM/QEMU: Support executing from flash device

2012-03-04 Thread Jordan Justen
On Sun, Mar 4, 2012 at 02:46, Avi Kivity wrote: > On 03/04/2012 12:38 PM, Gleb Natapov wrote: >> On Sun, Mar 04, 2012 at 12:36:20PM +0200, Avi Kivity wrote: >> > On 03/04/2012 10:12 AM, Gleb Natapov wrote: >> > > On Sat, Mar 03, 2012 at 10:56:02PM -0800, Jordan Just

Re: [Qemu-devel] PC BIOS Flash emulation

2012-03-07 Thread Jordan Justen
On Wed, Mar 7, 2012 at 08:51, Dmitry Zamaruev wrote: > On Wed, Mar 7, 2012 at 6:32 PM, Avi Kivity wrote: >> On 03/07/2012 03:59 PM, Dmitry Zamaruev wrote: >>> I'm trying to emulate BIOS Flash chip (something Intel FWH compatible) >>> on PC target (i386-softmmu) and to verify possibility of such >

[Qemu-devel] [PATCH v4] hw/pc: Support system flash memory with -pflash parameter

2011-07-08 Thread Jordan Justen
just below 4GB in place of the normal rom image. Signed-off-by: Jordan Justen Reviewed-by: Aurelien Jarno --- default-configs/i386-softmmu.mak |1 + default-configs/x86_64-softmmu.mak |1 + hw/pc.c| 161 +++- 3 files ch

Re: [Qemu-devel] [PATCH v4] hw/pc: Support system flash memory with -pflash parameter

2011-07-15 Thread Jordan Justen
Hi all, Are there any concerns with this patch? I haven't heard much feedback, except: * Jes Sorensen - March 28 - code style * Aurelien Jarno - April 18 - Reviewed-by Thanks, -Jordan On Fri, Jul 8, 2011 at 12:37, Jordan Justen wrote: > If -pflash is specified and -bios is specif

Re: [Qemu-devel] [PATCH v4] hw/pc: Support system flash memory with -pflash parameter

2011-07-23 Thread Jordan Justen
On Sat, Jul 23, 2011 at 08:51, Anthony Liguori wrote: > On 07/08/2011 02:37 PM, Jordan Justen wrote: >> >> If -pflash is specified and -bios is specified then pflash will >> be mapped just below the system rom using hw/pflash_cfi01.c. >> >> If -pflash is specifi

Re: [Qemu-devel] [PATCH v4] hw/pc: Support system flash memory with -pflash parameter

2011-07-23 Thread Jordan Justen
On Sat, Jul 23, 2011 at 14:25, Anthony Liguori wrote: > On 07/23/2011 03:19 PM, Jordan Justen wrote: >> >> On Sat, Jul 23, 2011 at 08:51, Anthony Liguori >>  wrote: >>> >>> On 07/08/2011 02:37 PM, Jordan Justen wrote: >>>> >>>>

Re: [Qemu-devel] [PATCH v4] hw/pc: Support system flash memory with -pflash parameter

2011-07-23 Thread Jordan Justen
On Sat, Jul 23, 2011 at 15:26, Anthony Liguori wrote: > On 07/23/2011 05:06 PM, Jordan Justen wrote: >> >> On Sat, Jul 23, 2011 at 14:25, Anthony Liguori >>  wrote: >>> >>> On 07/23/2011 03:19 PM, Jordan Justen wrote: >>>> >>>

Re: [Qemu-devel] [PATCH 3/4] loader: Add rom_add_file_buf for adding roms from a buffer

2011-10-18 Thread Jordan Justen
On Tue, Oct 18, 2011 at 11:05, Blue Swirl wrote: > On Mon, Oct 17, 2011 at 7:16 PM, Jordan Justen > wrote: >> rom_add_file_buf is similar to rom_add_file, except the rom's >> contents are provided in a buffer. >> >> rom_add_file is modified to call rom_add_

Re: [Qemu-devel] [PATCH 3/4] loader: Add rom_add_file_buf for adding roms from a buffer

2011-10-24 Thread Jordan Justen
On Sun, Oct 23, 2011 at 04:27, Blue Swirl wrote: > On Tue, Oct 18, 2011 at 21:17, Jordan Justen wrote: >> On Tue, Oct 18, 2011 at 11:05, Blue Swirl wrote: >>> On Mon, Oct 17, 2011 at 7:16 PM, Jordan Justen >>> wrote: >>>> rom_add_file_buf is si

[Qemu-devel] Executing from a rom device - Re: [PATCH 2/4] pc: Support system flash memory with pflash

2011-10-24 Thread Jordan Justen
m on the kernel side? Or, the qemu side? Perhaps just within the pflash_cfi01 device? Would implementing it require the flash based execution to be very slow under kvm? Thanks for your time, -Jordan On Mon, Oct 17, 2011 at 12:27, Jordan Justen wrote: > On Mon, Oct 17, 2011 at 12:16, Jorda

Re: [Qemu-devel] Executing from a rom device - Re: [PATCH 2/4] pc: Support system flash memory with pflash

2011-10-25 Thread Jordan Justen
the qemu kvm path to enable this support. (I will also attempt to implement the kvm kernel+qemu pieces of this.) Thanks, -Jordan On Tue, Oct 25, 2011 at 00:47, Avi Kivity wrote: > On 10/25/2011 01:00 AM, Jordan Justen wrote: >> Avi, >> >> Alex pointed out that my patch

[Qemu-devel] [PATCH v7 0/2] PC system flash support

2011-11-02 Thread Jordan Justen
additional comments v2: * Convert debug printf to DPRINTF Jordan Justen (2): pflash: Support read-only mode pc: Support system flash memory with pflash Makefile.target|1 + blockdev.c |3 +- default-configs/i386-softmmu.mak |1 + default

[Qemu-devel] [PATCH v7 1/2] pflash: Support read-only mode

2011-11-02 Thread Jordan Justen
pflash_cfi02 (AMD), if the flash is in read-only mode then the pflash will silently ignore all write/erase commands. Signed-off-by: Jordan Justen --- blockdev.c|3 +- hw/pflash_cfi01.c | 44 +++- hw/pflash_cfi02.c | 83

[Qemu-devel] [PATCH v7 2/2] pc: Support system flash memory with pflash

2011-11-02 Thread Jordan Justen
region is created and filled with the contents of the pflash drive. Signed-off-by: Jordan Justen Cc: Anthony Liguori --- Makefile.target|1 + default-configs/i386-softmmu.mak |1 + default-configs/x86_64-softmmu.mak |1 + hw/boards.h|1

Re: [Qemu-devel] [PATCH v7 0/2] PC system flash support

2011-11-05 Thread Jordan Justen
Cc: qemu-devel On Fri, Nov 4, 2011 at 22:37, Zhi Yong Wu wrote: > On Sat, Nov 5, 2011 at 12:11 AM, Jordan Justen wrote: >> On Fri, Nov 4, 2011 at 04:34, Zhi Yong Wu wrote: >>> BTW: what is the relationship between -bios and -pflash? >> >> Previously the QEMU/KVM P

Re: [Qemu-devel] [Bug 885213] Re: Latest GIT version fails to compile on Linux cris-softmmu/pci-stub.c

2011-11-05 Thread Jordan Justen
On Fri, Nov 4, 2011 at 10:22, Stefan Weil <885...@bugs.launchpad.net> wrote: > Did you try compilation in a tree with old generated files from previous > compilations? If there are several qmp-commands.h in subdirectories, > you have such old files. There must be only one qmp-commands.h > in the bu

Re: [Qemu-devel] [PATCH v7 2/2] pc: Support system flash memory with pflash

2011-11-07 Thread Jordan Justen
On Wed, Nov 2, 2011 at 21:19, Jordan Justen wrote: > If a pflash image is found, then it is used for the system > firmware image. > > If a pflash image is not initially found, then a read-only > pflash device is created using the -bios filename. > > KVM cannot execute

[Qemu-devel] [PATCH 0/6] KVM flash memory support

2013-04-28 Thread Jordan Justen
git://github.com/jljusten/qemu.git kvm-flash-v1 Utilize KVM_CAP_READONLY_MEM to support PC system flash emulation with KVM. Jordan Justen (6): kvm: add kvm_readonly_mem_enabled kvm: support using KVM_MEM_READONLY flag for readonly regions kvm: workaround a possible KVM bug when using

[Qemu-devel] [PATCH 1/6] kvm: add kvm_readonly_mem_enabled

2013-04-28 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 75bd7d9..c83f51c 100644 --- a/include/sysemu/kvm.h +++ b

[Qemu-devel] [PATCH 3/6] kvm: workaround a possible KVM bug when using KVM_MEM_READONLY

2013-04-28 Thread Jordan Justen
On a Linux 3.8.0 based kernel, I occasionally saw a situation where the memory region would continue to trap on memory read even though KVM_MEM_READONLY was set. I found that if I set the slot to a size of 0, and before setting the slot, it would then behave as expected. Signed-off-by: Jordan

[Qemu-devel] [PATCH 4/6] pflash_cfi01: memory region should be set to enable readonly mode

2013-04-28 Thread Jordan Justen
mory region.) Signed-off-by: Jordan Justen --- hw/block/pflash_cfi01.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3ff20e0..b65225e 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -596,6 +596,8 @@ static

[Qemu-devel] [PATCH 5/6] pc_sysfw: allow flash memory to be used with KVM

2013-04-28 Thread Jordan Justen
This requires the KVM READONLY memory capability. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c index aad8614..e88d67e 100644 --- a/hw/block/pc_sysfw.c +++ b/hw/block/pc_sysfw.c @@ -237,6

[Qemu-devel] [PATCH 2/6] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-04-28 Thread Jordan Justen
kvm.) Signed-off-by: Jordan Justen Cc: Xiao Guangrong --- kvm-all.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index f634c41..95e6bf2 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -266,9 +266,14 @@ err: * dirty pages

[Qemu-devel] [PATCH 6/6] pc_sysfw: change rom_only default to 0

2013-04-28 Thread Jordan Justen
Now KVM can support a flash memory. This feature depends on KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/pc_sysfw.c b/hw/block/pc_sysfw.c index

Re: [Qemu-devel] [PATCH 6/6] pc_sysfw: change rom_only default to 0

2013-04-29 Thread Jordan Justen
On Mon, Apr 29, 2013 at 1:20 AM, Paolo Bonzini wrote: > Il 28/04/2013 10:32, Jordan Justen ha scritto: >> Now KVM can support a flash memory. This feature depends on >> KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. > > I don't think we can require such a ne

Re: [Qemu-devel] [PATCH 3/6] kvm: workaround a possible KVM bug when using KVM_MEM_READONLY

2013-04-29 Thread Jordan Justen
On Mon, Apr 29, 2013 at 3:29 AM, Jan Kiszka wrote: > On 2013-04-28 10:32, Jordan Justen wrote: >> On a Linux 3.8.0 based kernel, I occasionally saw a situation >> where the memory region would continue to trap on memory >> read even though KVM_MEM_READONLY was set. > >

Re: [Qemu-devel] [PATCH 6/6] pc_sysfw: change rom_only default to 0

2013-04-29 Thread Jordan Justen
On Mon, Apr 29, 2013 at 2:10 PM, Paolo Bonzini wrote: > Il 29/04/2013 20:23, Jordan Justen ha scritto: >> On Mon, Apr 29, 2013 at 1:20 AM, Paolo Bonzini wrote: >>> Il 28/04/2013 10:32, Jordan Justen ha scritto: >>>> Now KVM can support a flash m

[Qemu-devel] [PATCH v2 1/6] kvm: add kvm_readonly_mem_enabled

2013-05-01 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 75bd7d9..c83f51c 100644 --- a/include/sysemu/kvm.h +++ b

[Qemu-devel] [PATCH v2 0/6] KVM flash memory support

2013-05-01 Thread Jordan Justen
git://github.com/jljusten/qemu.git kvm-flash-v2 Utilize KVM_CAP_READONLY_MEM to support PC system flash emulation with KVM. v2: * Remove rom_only from PC_COMPAT_1_4 * Only enable flash when a pflash drive is created. Jordan Justen (6): kvm: add kvm_readonly_mem_enabled kvm: support using

[Qemu-devel] [PATCH v2 4/6] pflash_cfi01: memory region should be set to enable readonly mode

2013-05-01 Thread Jordan Justen
mory region.) Signed-off-by: Jordan Justen --- hw/block/pflash_cfi01.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3ff20e0..b65225e 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -596,6 +596,8 @@ static

[Qemu-devel] [PATCH v2 6/6] pc_sysfw: change rom_only default to 0

2013-05-01 Thread Jordan Justen
Now KVM can support a flash memory. This feature depends on KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. Flash memory will only be enabled if a pflash device is created. (For example, by using the -pflash command line parameter.) Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c

[Qemu-devel] [PATCH v2 2/6] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-01 Thread Jordan Justen
kvm.) Signed-off-by: Jordan Justen Cc: Xiao Guangrong --- kvm-all.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index f634c41..95e6bf2 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -266,9 +266,14 @@ err: * dirty pages

[Qemu-devel] [PATCH v2 3/6] kvm: workaround a possible KVM bug when using KVM_MEM_READONLY

2013-05-01 Thread Jordan Justen
On a Linux 3.8.0 based kernel, I occasionally saw a situation where the memory region would continue to trap on memory read even though KVM_MEM_READONLY was set. I found that if I set the slot to a size of 0, and before setting the slot, it would then behave as expected. Signed-off-by: Jordan

[Qemu-devel] [PATCH v2 5/6] pc_sysfw: allow flash (-pflash) memory to be used with KVM

2013-05-01 Thread Jordan Justen
abort if a flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c | 50 +++--- 1 file

[Qemu-devel] [PATCH v3 0/5] KVM flash memory support

2013-05-06 Thread Jordan Justen
ONLY memory support. v2: * Remove rom_only from PC_COMPAT_1_4 * Only enable flash when a pflash drive is created. Jordan Justen (5): kvm: add kvm_readonly_mem_enabled kvm: support using KVM_MEM_READONLY flag for readonly regions pflash_cfi01: memory region should be set to enable reado

[Qemu-devel] [PATCH v3 2/5] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-06 Thread Jordan Justen
kvm.) Signed-off-by: Jordan Justen Reviewed-by: Xiao Guangrong --- kvm-all.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 1686adc..fffd2f4 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -201,12 +201,18

[Qemu-devel] [PATCH v3 1/5] kvm: add kvm_readonly_mem_enabled

2013-05-06 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 9735c1d..13c4b2e 100644 --- a/include/sysemu/kvm.h +++ b

[Qemu-devel] [PATCH v3 3/5] pflash_cfi01: memory region should be set to enable readonly mode

2013-05-06 Thread Jordan Justen
mory region.) Signed-off-by: Jordan Justen --- hw/block/pflash_cfi01.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3ff20e0..b65225e 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -596,6 +596,8 @@ static

[Qemu-devel] [PATCH v3 5/5] pc_sysfw: change rom_only default to 0

2013-05-06 Thread Jordan Justen
Now KVM can support a flash memory. This feature depends on KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. Flash memory will only be enabled if a pflash device is created. (For example, by using the -pflash command line parameter.) Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c

[Qemu-devel] [PATCH v3 4/5] pc_sysfw: allow flash (-pflash) memory to be used with KVM

2013-05-06 Thread Jordan Justen
abort if a flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c | 50 +++--- 1 file

Re: [Qemu-devel] Last Call for 1.5 before Hard Freeze

2013-05-06 Thread Jordan Justen
On Mon, May 6, 2013 at 7:42 AM, Anthony Liguori wrote: > I believe I have processed all of the outstanding pull requests and > patches tagged for 1.5. If there are any other patches or pull requests > you would like to be considered, please respond to this note with a > pointer to the patch or ma

Re: [Qemu-devel] Last Call for 1.5 before Hard Freeze

2013-05-06 Thread Jordan Justen
On Mon, May 6, 2013 at 1:41 PM, Paolo Bonzini wrote: > Il 06/05/2013 22:31, Anthony Liguori ha scritto: >> Jordan Justen writes: >> >>> On Mon, May 6, 2013 at 7:42 AM, Anthony Liguori wrote: >>>> I believe I have processed all of the outstanding pull requ

Re: [Qemu-devel] Last Call for 1.5 before Hard Freeze

2013-05-06 Thread Jordan Justen
On Mon, May 6, 2013 at 1:31 PM, Anthony Liguori wrote: > Jordan Justen writes: > >> On Mon, May 6, 2013 at 7:42 AM, Anthony Liguori wrote: >>> I believe I have processed all of the outstanding pull requests and >>> patches tagged for 1.5. If there are any other pa

[Qemu-devel] [PATCH v4 2/6] kvm: add kvm_readonly_mem_enabled

2013-05-07 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 9735c1d..13c4b2e 100644 --- a/include/sysemu/kvm.h +++ b

[Qemu-devel] [PATCH v4 5/6] pc_sysfw: allow flash (-pflash) memory to be used with KVM

2013-05-07 Thread Jordan Justen
abort if a flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c | 50 +++--- 1 file

[Qemu-devel] [PATCH v4 6/6] pc_sysfw: change rom_only default to 0

2013-05-07 Thread Jordan Justen
Now KVM can support a flash memory. This feature depends on KVM_CAP_READONLY_MEM, which was introduced in Linux 3.7. Flash memory will only be enabled if a pflash device is created. (For example, by using the -pflash command line parameter.) Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c

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

2013-05-07 Thread Jordan Justen
, this change avoids marking the BIOS as readonly for isapc. This change also will allow KVM to start supporting ROM mode via KVM_CAP_READONLY_MEM. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c | 14 ++ hw/i386/pc_piix.c |5 + 2 files changed, 15 insertions(+), 4

[Qemu-devel] [PATCH v4 0/6] KVM flash memory support

2013-05-07 Thread Jordan Justen
om PC_COMPAT_1_4 * Only enable flash when a pflash drive is created. Jordan Justen (6): isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS) kvm: add kvm_readonly_mem_enabled kvm: support using KVM_MEM_READONLY flag for readonly regions pflash_cfi01: memory region should be set

[Qemu-devel] [PATCH v4 3/6] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-07 Thread Jordan Justen
kvm.) Signed-off-by: Jordan Justen Reviewed-by: Xiao Guangrong --- kvm-all.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index 1686adc..fffd2f4 100644 --- a/kvm-all.c +++ b/kvm-all.c @@ -201,12 +201,18

[Qemu-devel] [PATCH v4 4/6] pflash_cfi01: memory region should be set to enable readonly mode

2013-05-07 Thread Jordan Justen
mory region.) Signed-off-by: Jordan Justen --- hw/block/pflash_cfi01.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 3ff20e0..b65225e 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -596,6 +596,8 @@ static

Re: [Qemu-devel] [PATCH v2] gtk: Fix accelerator filtering

2013-05-07 Thread Jordan Justen
On Sun, Mar 24, 2013 at 11:06 AM, Jan Kiszka wrote: > On 2013-02-25 16:44, Jan Kiszka wrote: >> On 2013-02-25 16:39, Anthony Liguori wrote: >>> Jan Kiszka writes: >>> This is in fact very simply: When the input in grabbed, everything should be exclusively passed to the guest - except it

Re: [Qemu-devel] [PATCH v4 0/6] KVM flash memory support

2013-05-07 Thread Jordan Justen
On Tue, May 7, 2013 at 1:28 PM, Paolo Bonzini wrote: > Il 07/05/2013 19:15, Jordan Justen ha scritto: >> git://github.com/jljusten/qemu.git kvm-flash-v4 >> >> Utilize KVM_CAP_READONLY_MEM to support PC system flash emulation >> with KVM. >> >> v4: >>

Re: [Qemu-devel] [PATCH v4 3/6] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-07 Thread Jordan Justen
On Tue, May 7, 2013 at 1:35 PM, Paolo Bonzini wrote: > Il 07/05/2013 19:15, Jordan Justen ha scritto: >> A slot that uses KVM_MEM_READONLY can be read from and code >> can execute from the region, but writes will trap. >> >> For regions that are readonly and also not

Re: [Qemu-devel] [PATCH v4 3/6] kvm: support using KVM_MEM_READONLY flag for readonly regions

2013-05-07 Thread Jordan Justen
On Tue, May 7, 2013 at 3:25 PM, Paolo Bonzini wrote: > Il 08/05/2013 00:01, Jordan Justen ha scritto: >> On Tue, May 7, 2013 at 1:35 PM, Paolo Bonzini wrote: >>> Il 07/05/2013 19:15, Jordan Justen ha scritto: >>>> A slot that uses KVM_MEM_READONLY can be read from

[Qemu-devel] [PATCH v5 0/5] KVM flash memory support

2013-05-08 Thread Jordan Justen
tch 2 & 3 based on Xiao's feedback that what I was calling a 'workaround' in patch 3 was actually what is required by the KVM READONLY memory support. v2: * Remove rom_only from PC_COMPAT_1_4 * Only enable flash when a pflash drive is created. Jordan Justen (5): isap

[Qemu-devel] [PATCH v5 4/5] pc_sysfw: allow flash (-pflash) memory to be used with KVM

2013-05-08 Thread Jordan Justen
flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen --- hw/block/pc_sysfw.c | 50 +++--- 1 file changed, 31

[Qemu-devel] [PATCH v5 2/5] kvm: add kvm_readonly_mem_enabled

2013-05-08 Thread Jordan Justen
Signed-off-by: Jordan Justen --- include/sysemu/kvm.h | 10 ++ kvm-all.c|6 ++ kvm-stub.c |1 + 3 files changed, 17 insertions(+) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index 9735c1d..13c4b2e 100644 --- a/include/sysemu/kvm.h +++ b

  1   2   3   >