Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Christian Borntraeger
+blkcfg.sectors = secs ~(blk_size / pblk_size - 1); I'm not sure here what you mean. Usually blk_size = pblk_size on non-s390 systems, so this is completely different from the previous code, which is effectively I was trying to prevent the masking of the sector number. the first

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the host these 4096 arereported via getss and getpbsz. The geometry reported by the device driver

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Christian Borntraeger
On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the host these 4096 arereported via getss and getpbsz.

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 12:50, Christian Borntraeger ha scritto: On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Alexander Graf
On 05/02/2012 12:50 PM, Christian Borntraeger wrote: On 02/05/12 12:25, Paolo Bonzini wrote: Il 02/05/2012 12:18, Christian Borntraeger ha scritto: Maybe that really points to the problem that we are trying to solve here. For a dasd device, there is usually a 4096 byte block size and on the

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 13:07, Alexander Graf ha scritto: Both can be accessed using virtio-blk-s390. The former have the same semantics on geometry as what we're used to. They use normal MBRs and essentially the geometry doesn't mean too much these days anymore ;). However, if possible, I would like to

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Alexander Graf
On 05/02/2012 01:09 PM, Paolo Bonzini wrote: Il 02/05/2012 13:07, Alexander Graf ha scritto: Both can be accessed using virtio-blk-s390. The former have the same semantics on geometry as what we're used to. They use normal MBRs and essentially the geometry doesn't mean too much these days

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-05-02 Thread Paolo Bonzini
Il 02/05/2012 13:10, Alexander Graf ha scritto: For DASD disks, the geometry is important, as its disk label is usually not MBR, but something s390 specific. Can we use this to guess the geometry like we do on x86? Yes, but what do you do with a blank disk? :) Right. :) Paolo

Re: [Qemu-devel] [PATCH 1/3] Fix geometry sector calculation

2012-04-27 Thread Paolo Bonzini
Il 26/04/2012 15:49, Christian Borntraeger ha scritto: Currently the sector value for the geometry is masked based on the sector size. This works fine for with 512 physical sector size, but it fails for dasd devices on s390. A dasd device can have a physical block size of 4096 (== same for