Bug 1351089
| Summary: | The mac address didn't change when set ctrl_mac_addr=off | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Yiqian Wei <yiwei> |
| Component: | virtio-win | Assignee: | Yvugenfi <yvugenfi> |
| Status: | CLOSED ERRATA | QA Contact: | lijin <lijin> |
| Severity: | low | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.3 | CC: | chayang, jasowang, jinzhao, juzhang, knoel, lijin, michen, phou, virt-maint, vrozenfe, wyu, xiagao, xiywang, yiwei, yvugenfi |
| Target Milestone: | rc | Keywords: | Reopened |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
The driver didn't follow virtio 1.0 spec regarding the access to virtio-configuration space regarding MAC address setting.
Consequence:
If control MAC address control queue feature was off, the guest driver tried to set up MAC address using the legacy method that was deprecated in virtio 1.0 devices.
Fix:
The driver now confirms to the spec and only changes MAX address using control queue.
Result:
The driver behaves according to the virtio 1.0 spec.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2018-10-30 16:21:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Yiqian Wei
2016-06-29 08:12:07 UTC
Hi,jason, I have a question, if Fence writing it in virtio1.0, when ctrl_mac_addr=on, info network see the mac also can't change, according to your #comment5 , virtio 0.95 can change macaddr, and virtio1.0 can't change mac address in qemu? Now test result: Scenario 1(virtio 0.95): disable-legacy=off,desable-modern=on: ctrl_mac_addr=on and ctrl_mac_addr=off, when change guest mac address. info network via hmp see macaddr all change. Scenario 2(virtio 1.0): disable-legacy=on,desable-modern=off: ctrl_mac_addr=on change guest mac address, info network via hmp see macaddr change. ctrl_mac_addr=off change guest mac address, info network via hmp see macaddr no change. this result is expected? if I have mistake please correct me. thanks Wei (In reply to weliao from comment #6) > Hi,jason, > I have a question, if Fence writing it in virtio1.0, when > ctrl_mac_addr=on, info network see the mac also can't change, according to > your #comment5 , virtio 0.95 can change macaddr, and virtio1.0 can't change > mac address in qemu? > Now test result: > Scenario 1(virtio 0.95): > disable-legacy=off,desable-modern=on: > ctrl_mac_addr=on and ctrl_mac_addr=off, when change guest mac > address. info network via hmp see macaddr all change. > Scenario 2(virtio 1.0): > disable-legacy=on,desable-modern=off: > ctrl_mac_addr=on change guest mac address, info network via hmp see > macaddr change. > ctrl_mac_addr=off change guest mac address, info network via hmp see > macaddr no change. > > this result is expected? if I have mistake please correct me. > > > thanks > Wei This is expected. Thanks Hi Jason, I have hit the same problem on power platform. And I have a little question about this. As stated in comment #5 . We have disabled mac write at virtio 1.0 , why I can still modify the mac address of device with cmd "ip link set eth0 addr $newmac up"? After I modified the mac address, the device works well. Only left the Inconsistency b/w the "mac address" from hmp output and that got from inside guest. (In reply to Zhengtong from comment #8) > Hi Jason, I have hit the same problem on power platform. And I have a little > question about this. > > As stated in comment #5 . We have disabled mac write at virtio 1.0 , why I > can still modify the mac address of device with cmd "ip link set eth0 addr > $newmac up"? > > After I modified the mac address, the device works well. Only left the > Inconsistency b/w the "mac address" from hmp output and that got from inside > guest. If you are using vhost, it works by chance since mac filter does not work for vhost. And I don't think this can work with vhost=off. Hi jason,
I tested with win10 x86_64 guest, when used virtio1.0 , the same test scenario but had the different result with linux guest..
Linux guest:
Scenario(virtio 1.0):
disable-legacy=on,disable-modern=off:
ctrl_mac_addr=off change guest mac address, info network via hmp see
macaddress no change.
Windows 10 guest:
Scenario(virtio 1.0):
disable-legacy=on,disable-modern=off:
ctrl_mac_addr=off change guest mac address, info network via hmp see
macaddress change.
Does the different guest handled differently? I confirm windows 10 support the virtio 1.0, so can you help confirm is this a bug?
thanks,
Wei.
Hi jason, I hit the same problem as comment #10. When virtio1.0 and ctrl_mac_addr=off. In linux guest to change mac address,find mac address no change via hmp. ---------right(According to comment #5.) In win2016 guest to change mac address,find mac address change via hmp. ---------Is this expected or bug? If it is bug, need to open a new bug ? (In reply to Yiqian Wei from comment #11) > Hi jason, > > I hit the same problem as comment #10. > > > When virtio1.0 and ctrl_mac_addr=off. > In linux guest to change mac address,find mac address no change via hmp. > ---------right(According to comment #5.) > > In win2016 guest to change mac address,find mac address change via hmp. > ---------Is this expected or bug? > > If it is bug, need to open a new bug ? It looks like a bug of windows driver. Cc Yan for more thoughts. Thanks (In reply to jason wang from comment #12) > (In reply to Yiqian Wei from comment #11) > > Hi jason, > > > > I hit the same problem as comment #10. > > > > > > When virtio1.0 and ctrl_mac_addr=off. > > In linux guest to change mac address,find mac address no change via hmp. > > ---------right(According to comment #5.) > > > > In win2016 guest to change mac address,find mac address change via hmp. > > ---------Is this expected or bug? > > > > If it is bug, need to open a new bug ? > > It looks like a bug of windows driver. Cc Yan for more thoughts. > > Thanks This is a bug in Windows driver. The driver will write the MAC address through configuration space on virtio 1.0. Patches are sent upstream: https://github.com/virtio-win/kvm-guest-drivers-windows/pull/229 Please check with the latest drivers from build 148 https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=659785 Thanks, Vadim. Hi Yan, I tried with the latest driver(build 148), when boot guest with ctrl_mac_addr=off, after changing mac address,both guest and hmp are not changed. Is that expected? Since in linux, when boot guest with ctrl_mac_addr=off, mac address will be changed in guest, and not changed in hmp (info network). So I'm not sure these are expected, or windows/linux bug. Thanks Yu Wang (In reply to Yu Wang from comment #16) > Hi Yan, > > I tried with the latest driver(build 148), when boot guest with > ctrl_mac_addr=off, after changing mac address,both guest and hmp are not > changed. > Is that expected? > > Since in linux, when boot guest with ctrl_mac_addr=off, mac address will be > changed in guest, and not changed in hmp (info network). So I'm not sure > these are expected, or windows/linux bug. > > Thanks > Yu Wang Hi, There are additional tests on the guest side for the validity of the MAC address. Only the address that has locally administered bit can be set from the guest. Please ensure that such MAC address is used during test. Best regards, Yan. (In reply to Yan Vugenfirer from comment #17) > (In reply to Yu Wang from comment #16) > > Hi Yan, > > > > I tried with the latest driver(build 148), when boot guest with > > ctrl_mac_addr=off, after changing mac address,both guest and hmp are not > > changed. > > Is that expected? > > > > Since in linux, when boot guest with ctrl_mac_addr=off, mac address will be > > changed in guest, and not changed in hmp (info network). So I'm not sure > > these are expected, or windows/linux bug. > > > > Thanks > > Yu Wang > > Hi, > > There are additional tests on the guest side for the validity of the MAC > address. Only the address that has locally administered bit can be set from > the guest. Please ensure that such MAC address is used during test. I research some for this, it seems that my mac is valid (52-54-00-02-9a-8f), and if I use previous build(build 144,ctrl_mac_addr=off), both guest/hmp mac changed. And If I use build 148 (ctrl_mac_addr=off), both guest/hmp mac will not change. If I use build 148 (ctrl_mac_addr=on), both guest/hmp mac changed. So I think the mac is valid for our test. > > Best regards, > Yan. Hi Yan, Could you check the comment#18? Thanks (In reply to Yu Wang from comment #19) > Hi Yan, > > Could you check the comment#18? > > Thanks I am looking into this. This is expected behavior on Windows. If ctrl_mac_addr=off with virtio 1.0, we cannot change MAC address in the device - therefore Windows driver will not change MAC address. (In reply to Yan Vugenfirer from comment #21) > This is expected behavior on Windows. > > If ctrl_mac_addr=off with virtio 1.0, we cannot change MAC address in the > device - therefore Windows driver will not change MAC address. So I summary the result, you can correct me if I am wrong. (windows guest) 1 legacy mode/ctrl_mac_addr=off, both guest/hmp mac changed (right? I'm not sure) 2 legacy mode/ctrl_mac_addr=on, both guest/hmp mac changed 3 modern mode/ctrl_mac_addr=off, both guest/hmp mac NOT changed 4 modern mode/ctrl_mac_addr=on, both guest/hmp mac changed Thanks Yu Wang (In reply to Yu Wang from comment #22) > (In reply to Yan Vugenfirer from comment #21) > > This is expected behavior on Windows. > > > > If ctrl_mac_addr=off with virtio 1.0, we cannot change MAC address in the > > device - therefore Windows driver will not change MAC address. > > So I summary the result, you can correct me if I am wrong. (windows guest) > > 1 legacy mode/ctrl_mac_addr=off, both guest/hmp mac changed (right? I'm not > sure) > 2 legacy mode/ctrl_mac_addr=on, both guest/hmp mac changed > 3 modern mode/ctrl_mac_addr=off, both guest/hmp mac NOT changed > 4 modern mode/ctrl_mac_addr=on, both guest/hmp mac changed Yes. > > Thanks > Yu Wang According to comment#21 and comment#23, this bug has been fixed, so change status to verified Thanks all Yu Wang Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:3413 |