[Qemu-devel] [PATCH] Fix COR by disabling BDRV_O_COPY_ON_READ before opening the backing_file.

2013-10-25 Thread Thibaut LAURENT
Since commit 0ebd24e0a203cf2852c310b59fbe050190dc6c8c,
bdrv_open_common will throw an error when trying to open a file
read-only with the BDRV_O_COPY_ON_READ flag set.
Although BDRV_O_RDWR is unset for the backing files,
BDRV_O_COPY_ON_READ is still passed on if copy-on-read was requested
for the drive. Let's unset this flag too before opening the backing
file, or bdrv_open_common will fail.

Signed-off-by: Thibaut LAURENT thibaut.laur...@gmail.com
---
 block.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/block.c b/block.c
index fd05a80..4474012 100644
--- a/block.c
+++ b/block.c
@@ -999,7 +999,8 @@ int bdrv_open_backing_file(BlockDriverState *bs, QDict 
*options, Error **errp)
 }
 
 /* backing files always opened read-only */
-back_flags = bs-open_flags  ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT);
+back_flags = bs-open_flags  ~(BDRV_O_RDWR | BDRV_O_SNAPSHOT |
+BDRV_O_COPY_ON_READ);
 
 ret = bdrv_open(bs-backing_hd,
 *backing_filename ? backing_filename : NULL, options,
-- 
1.8.4.1




[Qemu-devel] Qemu failures: x86_64 host / x86_64 guest

2006-03-29 Thread Thibaut LAURENT
Hi,

still no luck with x86_64 on last night CVS build...

* CentOS 3.6 x86_64:
   - UP won't boot with or without kqemu. Log file is attached.

  - Booting with -kernel-kqemu is even worse: the guest kernel won't start
at all (at least it does not print anything).

   - Booting with -smp 2 makes it a bit further: the kernel fully boots but
the system crashes while starting Anaconda. System output in attachment.

In all cases qemu gets stuck eating 100% CPU.


* CentOS 4.2 x86_64:
  - UP does run without kqemu and with user code virtualization.  Booting
 with -smp 2 also works.

  - However, running with -kernel-kqemu does not work: the kernel won't
 boot and it makes qemu crash. Log files are attached (guest output and
 crash).


The good news is that i386 versions for both distros do run smoothly :-)

Host system is an Athlon 64 running a Mandriva 2006.0 with a plain kernel.org
2.6.15-4 kernel. Kqemu is 1.3.0pre5. Qemu was compiled with gcc 3.3.6-2mdk
and the host kernel with gcc 4.0.2-1mdk.
I tried several values for '-m' (128,160,192,224) with the same results.

Fabrice, do you need any more information in order to help you debug this ?

Regards,
Thibaut
ok

Bootdata ok (command line is initrd=initrd.img devfs=nomount ramdisk_size=9216 
BOOT_IMAGE=vmlinuz text console=ttyS0,115200)

Linux version 2.4.21-37.EL ([EMAIL PROTECTED]) (gcc version 3.2.3 20030502 (Red 
Hat Linux 3.2.3-52)) #1 SMP Wed Sep 28 12:59:51 EDT 2005

BIOS-provided physical RAM map:

 BIOS-e820:  - 0009fc00 (usable)

 BIOS-e820: 0010 - 0c00 (usable)

kernel direct mapping tables upto 1000c00 @ 8000-a000

No NUMA configuration found

Faking a node at -0c00

Bootmem setup node 0 -0c00

setting up node 0 0-c000

On node 0 totalpages: 49152

zone(0): 4096 pages.

zone(1): 45056 pages.

zone(2): 0 pages.

ACPI: Unable to locate RSDP

Found and enabled local APIC!

Kernel command line: initrd=initrd.img devfs=nomount ramdisk_size=9216 
BOOT_IMAGE=vmlinuz text console=ttyS0,115200

Initializing CPU#0

time.c: Detected 1.193182 MHz PIT timer.

time.c: Detected 1795.151 MHz TSC timer.

Console: colour VGA+ 80x25

Calibrating delay loop... 3565.15 BogoMIPS

Page-cache hash table entries: 65536 (order: 7, 512 KB)

Page-pin hash table entries: 16384 (order: 4, 64 KB)

Dentry cache hash table entries: 32768 (order: 7, 512 KB)

Inode cache hash table entries: 16384 (order: 6, 256 KB)

Buffer cache hash table entries: 16384 (order: 5, 128 KB)

Memory: 179516k/196608k available (1821k kernel code, 0k reserved, 1883k data, 
228k init)

Mount cache hash table entries: 256 (order: 0, 4096 bytes)

CPU: L1 I Cache: 64K (64 bytes/line/2 way), D cache 64K (64 bytes/line/2 way)

CPU: L2 Cache: 512K (64 bytes/line/8 way)

Intel machine check architecture supported.

Intel machine check reporting enabled on CPU#0.

POSIX conformance testing by UNIFIX

mtrr: v2.02 (20020716))

CPU: L1 I Cache: 64K (64 bytes/line/2 way), D cache 64K (64 bytes/line/2 way)

CPU: L2 Cache: 512K (64 bytes/line/8 way)

CPU0: QEMU Virtual CPU version 0.8.0 stepping 03

per-CPU timeslice cutoff: 2560.10 usecs.

task migration cache decay timeout: 10 msecs.

SMP motherboard not detected.

general protection fault: 

CPU 0 

Pid: 1, comm: swapper Not tainted

RIP: 0010:[f000ff53f000ff53]

RSP: :01000bfd3ee0  EFLAGS: 0216

RAX:  RBX: 0011 RCX: 00050011

RDX: 804388c0 RSI: 010001bd6140 RDI: 804388a0

RBP:  R08:  R09: 

R10: 0001 R11:  R12: 

R13:  R14:  R15: 

FS:  () GS:805e8040() knlGS:

CS:  0010 DS: 0018 ES: 0018 CR0: 8005003b

CR2:  CR3: 00101000 CR4: 06e0


Call Trace: [8010c098]{init+40} [80110cc1]{child_rip+8} 

   [8010c070]{init+0} [80110cb9]{child_rip+0} 

   

Process swapper (pid: 1, stackpage=1000bfd3000)

Stack: 01000bfd3ee0  806280f5  

   806286bc  80627b14  

       

   80621599 01000bfd2000 8010c098  

   80110cc1    

      000a 

   805eecc0 805eecc0 805eed08  

   8061e000 0e00  8010c070 

    80110cb9 0010 0200 

   01000bfd3f58  

Call Trace: [8010c098]{init+40} [80110cc1]{child_rip+8}