Skip to content
This repository was archived by the owner on Jan 20, 2022. It is now read-only.

add support for s390x#43

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

add support for s390x#43
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Aug 28, 2018

Fixes #37
Signed-off-by: Yash Jain ydjainopensource@gmail.com

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 28, 2018

@alicefr PTAL

@coveralls
Copy link
Copy Markdown

coveralls commented Aug 28, 2018

Coverage Status

Coverage decreased (-0.03%) to 79.723% when pulling 4c05d8f on ydjainopensource:s390x into 25277d5 on intel:master.

Copy link
Copy Markdown
Contributor

@rbradford rbradford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!

I'm worried that changing the existing constants will break the ABI. We know about the alias rules in QEMU so please can we use them and add generic versions wherever appropriate.

Long term we could deprecate those that duplicated.

NVDIMM DeviceDriver = "nvdimm"

// Virtio9P is the 9pfs device driver.
Virtio9P DeviceDriver = "virtio-9p-pci"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break the ABI. I think you should consider adding a new one called Virtio9PGeneric

VirtioNet DeviceDriver = "virtio-net"

// VirtioNetPCI is the virt-io pci networking device driver.
VirtioNetPCI DeviceDriver = "virtio-net-pci"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need to change this one as there is already a generic version.

VirtioNetPCI DeviceDriver = "virtio-net"

// VirtioSerial is the serial device driver.
VirtioSerial DeviceDriver = "virtio-serial-pci"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again I think you'll need to a VirtioSerialGeneric

qemu/qemu.go Outdated
VHostVSockPCI DeviceDriver = "vhost-vsock-pci"

// VHostVSockCCW is the vhost vsock ccw driver.
VHostVSockCCW DeviceDriver = "vhost-vsock-ccw"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than add -ccw version add a generic version.

Copy link
Copy Markdown
Author

@ghost ghost Aug 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for vhost-vsock generic version does not exist. But both vhost-vsock-ccw and vhost-vsock-pci exist hence I created a new device


const (
//VhostUserSCSI represents a SCSI vhostuser device type
VhostUserSCSI = "vhost-user-scsi-pci"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add generic versions of this and those below rather than renaming.

@ghost ghost changed the title add support for s390x [WIP]add support for s390x Aug 28, 2018
@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 29, 2018

@rbradford the cyclo is 16. I don't know how to reduce this to 15. Can you help me out here?


const (
//VhostUserSCSI represents a SCSI vhostuser device type
VhostUserSCSI = "vhost-user-scsi-pci"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is not alias in this case, add a variable as for vfio-pci

qemu/qemu.go Outdated
default:
return ""
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why you split it in 2 switches, but I personally don't like it. If the maintainers agree, I would rather put a variable virtioNet and vfio and and a if statement at the beginning. Something like this

var virtioNet = "virtio-net-pci"
var vfio = "vfio-pci"

if runtime.GOARCH == "s390x" {
   virtioNet = "virtio-net-ccw"
   vfio = "vfio-ccw"
}

and substitue the string in the original switch with the variable

qemu/qemu.go Outdated

// VhostVSOCKCCW is the VSOCK vhost device type for s390x.
VhostVSOCKCCW = "vhost-vsock-ccw"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can save some lines by adding a generic VhostVSOCK and assign the ccw value if the architecture is s390x

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generic vhost-vsock does not exist but to avoid unnecessary duplication, we can set VhostVSOCKPCI to "vhost-vsock-ccw" on Z. Not sure if the maintainers want this.

qemu/qemu.go Outdated

deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
if runtime.GOARCH != "s390x" {
deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use the generic variable and remove this if-else statement

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see comment above

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait for @markdryan or @rbradford to comment here, but I'd be tempted to remove all these 390-specific if tests and create qemu_s390x.go like we do in the runtime:

To minimise code duplication, you can create generic functions and variables that all other arches can call.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding a new specific file for s390x is not necessary, there are not many points where arch specific if tests are used. But if you still insist I am okay with it.

qemu/qemu.go Outdated
Virtio9P = "virtio-9p"

}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd explicitly use -ccw

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe also a short comment that on s390x the -pci devices don't properly work. That's why you introduce the init function

}
}

func init() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same as for the other init function. Add a short comment

@ghost ghost changed the title [WIP]add support for s390x add support for s390x Aug 29, 2018
@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 29, 2018

@devimc PTAL

qemu/qemu.go Outdated
}
}

var vfio = "vfio-pci"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add this variable to the list of variables at the beginning of the file

qemu/qemu.go Outdated

deviceParam := fmt.Sprintf("vfio-pci,host=%s", vfioDev.BDF)
if runtime.GOARCH != "s390x" {
deviceParam = fmt.Sprintf("vfio-pci,host=%s", vfioDev.BDF)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this if..else condition is not needed since you can use the variable vfio, right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No vfio is not an available device

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry I don't understand why you can't do something like this

deviceParam = fmt.Sprintf("%s,host=%s", vfio, vfioDev.BDF)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be I missed something, please help me to understand

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other devices like virtio-net are alias to virtio-net-ccw on Z and virtio-net-pci on others. However, a similar alias for vfio does not exist. Hence this needs to be kept as is.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just writing 'vfio' would result in an error

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, a similar alias for vfio does not exist

what do you mean?

At the beginning of the file you are declaring Vfio = "vfio-pci" but you change its value at init() if runtime.GOARCH == "s390x", I wonder if is possible to use theVfio variable or declare a new variable (like you did with VirtioSCSI) in order to rid of this if...else condition.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let me update my example

deviceParam = fmt.Sprintf("%s,host=%s", Vfio, vfioDev.BDF)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup that's possible... I thought you were asking me to change vfio-pci to generic vfio

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devimc Updated

qemu/qemu.go Outdated

devParams = append(devParams, fmt.Sprintf("virtio-scsi-pci,id=%s", scsiCon.ID))
if runtime.GOARCH == "s390x" {
devParams = append(devParams, fmt.Sprintf("virtio-scsi-ccw,id=%s", scsiCon.ID))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can declare a variable for virtio-scsi-pci and change it value to virtio-scsi-ccw at at init()

@ghost
Copy link
Copy Markdown
Author

ghost commented Aug 29, 2018

@devimc @rbradford PTAL

qemu/qemu.go Outdated

devParams = append(devParams, fmt.Sprintf("virtio-scsi-pci,id=%s", scsiCon.ID))
if runtime.GOARCH == "s390x" {
devParams = append(devParams, fmt.Sprintf("%s,id=%s", VirtioSCSI, scsiCon.ID))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't need the if-else you use the same variable. Actually, the two lines are the same

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops oversight

qemu/qemu.go Outdated
var devParams []string

devParams = append(devParams, fmt.Sprintf("virtio-scsi-pci,id=%s", scsiCon.ID))
if runtime.GOARCH == "s390x" {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now I think this condition is not required, since VirtioSCSI changes its values at init() if runtime.GOARCH == "s390x", right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry oversight changes done

qemu/qemu.go Outdated
// -pci devices don't play well with Z hence replace them with corresponding -ccw devices
// See https://wiki.qemu.org/Documentation/Platforms/S390X
func init() {
if runtime.GOARCH == "s390x" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a very bad idea. We should use the generic versions for all those that have aliases in QEMU. Those that don't should be managed explicitly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually the QEMU team is planning on deprecating those alias in favour of the -ccw alternatives. Hence this was done.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rbradford Keeping them to -ccw would also allow us to have better ABI compatibility

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rbradford @devimc Do you still want me to make this change?

qemu/qemu.go Outdated

deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
if runtime.GOARCH != "s390x" {
deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's wait for @markdryan or @rbradford to comment here, but I'd be tempted to remove all these 390-specific if tests and create qemu_s390x.go like we do in the runtime:

To minimise code duplication, you can create generic functions and variables that all other arches can call.

qemu/qemu.go Outdated
type DeviceDriver string

const (
var (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove the const here 😄

Copy link
Copy Markdown
Author

@ghost ghost Sep 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am setting the value of these variables at runtime. So making them const is not really possible.

However, since you and others have raised concerns with this and the arch specific if-else, let me just refactor this into a separate file.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 5, 2018

@devimc @jodh-intel @rbradford PTAL.

Copy link
Copy Markdown
Collaborator

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @ydjainopensource!

Let's get more input from @markdryan and @rbradford too...

var deviceParams []string
var qemuParams []string

deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only difference between this function and the one in qemu_s390x.go so you could make this a generic function and define something like the following:

  • qemu_amd64.go

    const vsockDevice = VhostVSOCKPCI
    
  • qemu_s390x.go

    const vsockDevice = VhostVSOCKCCW
    

... however, that would require you to create qemu_amd64.go of course :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jodh-intel PCI is also used on ARM so this probably not you want.

@@ -0,0 +1,127 @@
// +build !s390x

/*
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the "double comments"? I'd remove the C-style comments from this file and qemu_s390x.go as they are redundant.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some mysterious reasons, the go build tool fails to build without this on my instances hence I have kept them

qemu/qmp.go Outdated
"addr": addr,
}

if runtime.GOARCH == "s390x" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, for consistency with the qemu*.go files, I'd rework this as follows:

  • Create qmp_amd64.go and qmp_s390x.go containing their own implementations of:

    var archPCIVFIODeviceAddMap = map[string]interface{}{ ... }
    
  • Make qmp.go reference the right implementation. Something like:

    var pciVFIODeviceAddMap = archPCIVFIODeviceAddMap
    
    func (q *QMP) ExecutePCIVFIODeviceAdd(...) {
          arg := archPCIVFIODeviceAddMap
          return q.executeCommand(ctx, "device_add", args, nil)
    }
    

Copy link
Copy Markdown
Contributor

@rbradford rbradford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking a lot better. Thank you for your diligence.

var deviceParams []string
var qemuParams []string

deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jodh-intel PCI is also used on ARM so this probably not you want.

VirtioSerialPort DeviceDriver = "virtserialport"

// VHostVSockPCI is the vhost vsock pci driver.
VHostVSockPCI DeviceDriver = "vhost-vsock-ccw"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This grates me. But I understand why you did it. Maybe we could transition all the users to a more generic name and eventually get rid of this?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new variable VhostVSOCK...where do I include the deprecation notice?

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 7, 2018

@devimc @rbradford @jodh-intel PTAL.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 7, 2018

All tests have passed now 🙂


// -pci devices don't play well with Z hence replace them with corresponding -ccw devices
// See https://wiki.qemu.org/Documentation/Platforms/S390X
func init() {
Copy link
Copy Markdown

@devimc devimc Sep 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this function, declare these variables

var deviceFSString = "-device virtio-9p-ccw,disable-modern=true,fsdev=workload9p,mount_tag=rootfs -fsdev local,id=workload9p,path=/var/lib/docker/devicemapper/mnt/e31ebda2,security_model=none"
var deviceNetworkString = "-netdev tap,id=tap0,vhost=on,ifname=ceth0,downscript=no,script=no -device driver=virtio-net,netdev=tap0,mac=01:02:de:ad:be:ef,disable-modern=true"
....

and move the declaration of these variables from qemu_test.go to qemu_generic_test.go


// -pci devices don't play well with Z hence replace them with corresponding -ccw devices
// See https://wiki.qemu.org/Documentation/Platforms/S390X
func init() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this function


//VhostUserBlk represents a block vhostuser device type
VhostUserBlk = "vhost-user-blk-pci"

Copy link
Copy Markdown

@alicefr alicefr Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you remove this constant? There is no support for vhost-user devices and you could throw an error if the case is hit. You already split the s390x code, so you can set that explicitly

case VFIO:
return string(Vfio) // -device vfio-pci (no netdev) or vfio-ccw on Z
case VHOSTUSER:
return "" // -netdev type=vhost-user (no device)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you print an error message if this case is hit?

Copy link
Copy Markdown
Author

@ghost ghost Sep 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does exist on Z.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 10, 2018

@rbradford @devimc PTAL

case VETHTAP:
return string(VirtioNet)
case VFIO:
return string(VirtioNet)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be string(Vfio), right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devimc Yup changed now

Signed-off-by: Yash Jain <ydjainopensource@gmail.com>
)

// QemuDeviceParam converts to the QEMU -device parameter notation
func (n NetDeviceType) QemuDeviceParam() string {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now this function is the same than the function in qemu_generic.go, can you move it to qemu.go ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had by by mistake changed this. Now I have reverted to the correct version. Sorry for the inconvenience

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, ping me when it's ready to review

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devimc I have already repushed with the changes. PTAL

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, I don't find any difference between this function and the function in qemu_generic.go (QemuDeviceParam), can you please factorize them?

}

// QemuParams returns the qemu parameters built out of the VSOCK device.
func (vsock VSOCKDevice) QemuParams(config *Config) []string {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change , did you just move the function? if this is the case could you please revert it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@devimc Z does not support vhost-user-blk device so this test was oved into qemu_generic_test.go and qemu_s390x_test.go. With suitable changes applied.

var deviceParams []string
var qemuParams []string

deviceParams = append(deviceParams, fmt.Sprintf("%s", VhostVSOCKPCI))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the change was VhostVSOCKPCI to VhostVSOCK right?, if that's correct could you please just change this line and not all the function, since it's not easy to read and detect the change

Copy link
Copy Markdown
Contributor

@markdryan markdryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it's taken me so long to look at this. I've made a few small comments to the PR, but in general I have one large comment. Our contribution guidelines require all commits to have a commit body which explains what the commit actually does and why it's needed. In this case, such a description is really needed. I found it hard to review the PR as I don't really understand the context. Why is it needed? Why are these specific changes required? Some of this information is covered in comments in the PR but it really needs to go in the commit message.

Could you add a description to the commit message? Once it's added I'll take a more detailed look at the PR.

devParams = append(devParams, "logical_block_size=4096")
devParams = append(devParams, "size=512M")
devParams = append(devParams, fmt.Sprintf("chardev=%s", vhostuserDev.CharDevID))
if (VhostUserBlk) != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need for the brackets here. Also it's more idiomatic to write

if VhostUserBlk == "" {
   return
}
devParams = append(devParams, VhostUserBlk)
...


/*
// Copyright (c) 2018 Yash Jain
//
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't some, if not all of the code in this file come qemu.go? If so, we should "Copyright (c) 2016 Intel Corporation" in the comments.

var deviceParam string

deviceParam := fmt.Sprintf("vfio-pci,host=%s", vfioDev.BDF)
deviceParam = fmt.Sprintf("%s,host=%s", Vfio, vfioDev.BDF)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just write deviceParam := fmt.Sprintf(

and delete the var deviceParam string declaration.

// limitations under the License.
*/

// Package qemu provides methods and types for launching and managing QEMU
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it makes sense to duplicate this comment. It's still present in qemu.go and will just make the godoc look weird if we duplicate it. Please delete it.

@@ -0,0 +1,97 @@
// +build !s390x
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming of this file is a bit weird. Generic to me suggests that the code is suitable for all platforms but if I read the build constraint correctly, this code will not compile of s390, so it's not generic. Having said that I'm not quite sure what to call it right now as I'm lacking some context about this PR. I'll comment on this a little later.

@@ -1,4 +1,5 @@
/*
// Copyright (c) 2018 Yash Jain
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really the best person to comment on this but you haven't actually added any code to this file. You've just deleted stuff. Hence I find the change to the copyright a little confusing. Anyone else care to comment?


// -pci devices don't play well with Z hence corresponding -ccw devices
// See https://wiki.qemu.org/Documentation/Platforms/S390X
const (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we are duplicating all of these constants. How many of them differ between s390 and non s390. Is it just the pci devices? If so we only need these guys to be separated out.

@ghost
Copy link
Copy Markdown
Author

ghost commented Sep 24, 2018

@markdryan @devimc @rbradford Unfortunately, I am at the end of my internship and hence won't be able to work on this further. Someone from IBM would be continuing from where I left. With that said, I am closing this PR.

Thanks a lot for your time and patience.

@ghost ghost closed this Sep 24, 2018
@devimc
Copy link
Copy Markdown

devimc commented Sep 24, 2018

@ydjainopensource sad to hear that, thank you for your time and the contributions you did 👍

@markdryan
Copy link
Copy Markdown
Contributor

@ydjainopensource thank you for your contributions. Your PR initiated lots of interesting discussions.

This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants